EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Increasing Melee dmg with Str (https://www.eqemulator.org/forums/showthread.php?t=42255)

Garudan 01-05-2019 04:33 AM

Increasing Melee dmg with Str
 
so i modified the attack.cpp in line 5087 as follows

Code:

        if (IsClient()) {
                int extra = 0;
                switch (hit.skill) {
                case EQEmu::skills::SkillThrowing:
                case EQEmu::skills::SkillArchery:
                        extra = CastToClient()->GetHeroicDEX() / 10;
                        break;
                default:
                        extra = CastToClient()->GetHeroicSTR() / 10;
                        break;
                }
                hit.damage_done += extra;
                hit.damage_done = hit.damage_done*((GetSTR()-50)/40);
        }

The idea is to effect the very last dmg a melee is doing by factor (Str-50)/40

so if a char with 130 str would inflict 10 dmg, he now inflicts 20.

it is somehow not working. any ideas why this is not working?

Garudan 01-05-2019 07:02 AM

solved:
it was an integer problem.

changed it to:
Code:

        hit.damage_done = hit.damage_done*(((CastToClient()->GetSTR()-50)*100)/40);
        hit.damage_done = hit.damage_done/100;

works like a charm!


All times are GMT -4. The time now is 05:46 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.