Description:
if a player cast a spell that has a EffectWeaponDmg effect,and the spell school isn't NORMAL,at the same time,
the player has a SPELL_AURA_MOD_DAMAGE_PERCENT_DONE aura,
the spell damge is wrong.
Current behaviour:
Caster hasaura(72221)
Luck of the Draw
Stacks up to 3 times
Increases damage done by 5%, healing done by 5%, and health by 5% whenever you use the Dungeon tool to find other players for your group.
castspell(20375)
trigger spell id 20424
Seal Of Command
the Seal Of Command damage should increase to 105%,but it increased to 105% x 105%.
Branch(es): 335/6x
335
TC hash/commit:
https://github.com/TrinityCore/TrinityCore/commit/a41bd8e94379224c081764a14a8498f0b96b6e3c
TDB version:
TDB 335.60
Luck of the Draw cannot stack on 335.
And i cannot reproduce the problem "105% x 105%". This would be insane ~11000%.
Maybe you can tell us what the end result would be. (By example of three 5% auras). Base damage is 250.
1.) 250 * 1.15 = 287.5 -- Calculate the total percent increase then calculate the final damage.
2.) 250 * 1.05 * 1.05 * 1.05 = 289.41 -- Calculate every aura on top of the last modified damage value.
Luck of the Draw damage increase damage too low.
cast spellid = 20424
Berserk
Caster hasaura(27680)
increase 500% all school damage. aura m_miscvalue = 127
if damage is 250,hasaura(27680),
damage = 250 * 600% * 600% = 9000
500% weapon damge and 500% spell bonus damage
if Berserk has two effects apply aura,
aura m_miscvalue_1 =1
aura m_miscvalue_2 =126
if damage is 250,hasaura(27680),
damage = 250 * (600% + 600% )= 3000
Actually that's question
in HandleModDamagePercentDone not correct Central goes , he instead put the interest multiplies them ( not entirely correctly)
Here is the code of
Code SpellAuraEffect.cpp
void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
Unit* target = aurApp->GetTarget();
if (!target)
return;
if (target->GetTypeId() == TYPEID_PLAYER)
{
for (int i = 0; i < MAX_ATTACK; ++i)
if (Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), false))
target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(item, WeaponAttackType(i), this, apply);
}
if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) && (GetSpellInfo()->EquippedItemClass == -1 || target->GetTypeId() != TYPEID_PLAYER))
{
target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float (GetAmount()), apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float (GetAmount()), apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float (GetAmount()), apply);
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float (GetAmount()), apply);
}
else
{
// done in Player::_ApplyWeaponDependentAuraMods for SPELL_SCHOOL_MASK_NORMAL && EquippedItemClass != -1 and also for wand case
}
}
or this code not correctly work
void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT)))
return;
Unit* target = aurApp->GetTarget();
int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
if (abs(spellGroupVal) >= abs(GetAmount()))
return;
if (target->GetTypeId() == TYPEID_PLAYER)
{
for (int i = 0; i < MAX_ATTACK; ++i)
if (Item* item = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), false))
target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(item, WeaponAttackType(i), this, apply);
}
if ((GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) && (GetSpellInfo()->EquippedItemClass == -1 || target->GetTypeId() != TYPEID_PLAYER))
{
if (spellGroupVal)
{
target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float(spellGroupVal), !apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(spellGroupVal), !apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float(spellGroupVal), !apply);
}
target->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, float(GetAmount()), apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(GetAmount()), apply);
target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float(GetAmount()), apply);
if (Player* player = target->ToPlayer())
{
if (spellGroupVal)
player->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float(spellGroupVal), !apply);
player->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, float(GetAmount()), apply);
}
}
else
{
// done in Player::_ApplyWeaponDependentAuraMods for SPELL_SCHOOL_MASK_NORMAL && EquippedItemClass != -1 and also for wand case
}
}
When use Berserk 500% = 600% damage and when use 1 more berserk 500% = 3600%



and see 1 berserk


Is this issue valid?
ID - 55816 Eck Berserk
=================================================
Description: Eck goes berserk, increasing his attack speed by $s2% and all damage he deals by $s1%.
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA)
BasePoints = 500
Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET)
Aura Id 79 (SPELL_AURA_MOD_DAMAGE_PERCENT_DONE), value = 500, misc = 127 (127), miscB = 0, periodic = 0
In the screens you have 2 damage INCREASES of 500% meaning 600% of base damage, so 600% x 600% = 3600%, which is correct and what the game shows in the tooltip.
It is, you can reproduce the problem with abilities like
Chimera Shot (53209)
SpellSchoolMask = 8 (SPELL_SCHOOL_MASK_NATURE)
Effect 2: Id 31 (SPELL_EFFECT_WEAPON_PERCENT_DAMAGE)
SPELL_AURA_MOD_DAMAGE_PERCENT_DONE effects will stack multiplicative with itself.
As you can see the average dmg done is 1600, but with 98% SPELL_AURA_MOD_DAMAGE_PERCENT_DONE effect (7x 58549) it does ca 6300
1600 x 1.98 x 1.98 = 6272.64
TC rev. hash/commit:
8fe85017125803a4ca8fd1d972b128930cd364b9

