Fix TC build after cb9e72e521

This commit is contained in:
Rochet2
2018-01-14 22:14:13 +02:00
parent 758aff6fe7
commit 751432b2ea

View File

@@ -2636,10 +2636,11 @@ namespace LuaUnit
// flat melee damage without resistence/etc reduction // flat melee damage without resistence/etc reduction
if (school == MAX_SPELL_SCHOOL) if (school == MAX_SPELL_SCHOOL)
{ {
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durabilityloss);
#ifdef TRINITY #ifdef TRINITY
Unit::DealDamage(unit, target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durabilityloss);
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_HIT, 0); unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_HIT, 0);
#else #else
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durabilityloss);
unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0); unit->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0);
#endif #endif
return 0; return 0;
@@ -2649,7 +2650,7 @@ namespace LuaUnit
#ifdef TRINITY #ifdef TRINITY
if (Unit::IsDamageReducedByArmor(schoolmask)) if (Unit::IsDamageReducedByArmor(schoolmask))
damage = unit->CalcArmorReducedDamage(target, damage, NULL, BASE_ATTACK); damage = Unit::CalcArmorReducedDamage(unit, target, damage, NULL, BASE_ATTACK);
#else #else
if (schoolmask & SPELL_SCHOOL_MASK_NORMAL) if (schoolmask & SPELL_SCHOOL_MASK_NORMAL)
damage = unit->CalcArmorReducedDamage(target, damage); damage = unit->CalcArmorReducedDamage(target, damage);
@@ -2670,7 +2671,11 @@ namespace LuaUnit
uint32 absorb = dmgInfo.GetAbsorb(); uint32 absorb = dmgInfo.GetAbsorb();
uint32 resist = dmgInfo.GetResist(); uint32 resist = dmgInfo.GetResist();
unit->DealDamageMods(target, damage, &absorb); unit->DealDamageMods(target, damage, &absorb);
#ifdef TRINITY
Unit::DealDamage(unit, target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
#else
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false); unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
#endif
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 0, schoolmask, damage, absorb, resist, VICTIMSTATE_HIT, 0); unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 0, schoolmask, damage, absorb, resist, VICTIMSTATE_HIT, 0);
return 0; return 0;
} }
@@ -2683,7 +2688,11 @@ namespace LuaUnit
return false; return false;
SpellNonMeleeDamage dmgInfo(unit, target, spell, spellInfo->GetSchoolMask()); SpellNonMeleeDamage dmgInfo(unit, target, spell, spellInfo->GetSchoolMask());
damage = unit->SpellDamageBonusDone(target, spellInfo, damage, SPELL_DIRECT_DAMAGE); #ifdef TRINITY
damage = unit->SpellDamageBonusDone(target, spellInfo, damage, SPELL_DIRECT_DAMAGE, {});
#else
damage = unit->SpellDamageBonusDone(target, spellInfo, damage, SPELL_DIRECT_DAMAGE;
#endif
damage = target->SpellDamageBonusTaken(unit, spellInfo, damage, SPELL_DIRECT_DAMAGE); damage = target->SpellDamageBonusTaken(unit, spellInfo, damage, SPELL_DIRECT_DAMAGE);
unit->CalculateSpellDamageTaken(&dmgInfo, damage, spellInfo); unit->CalculateSpellDamageTaken(&dmgInfo, damage, spellInfo);
@@ -2763,7 +2772,7 @@ namespace LuaUnit
#ifndef TRINITY #ifndef TRINITY
unit->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durLoss); unit->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, durLoss);
#else #else
unit->Kill(target, durLoss); Unit::Kill(unit, target, durLoss);
#endif #endif
return 0; return 0;
} }