mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
fix: build after qAston (#66)
This commit is contained in:
@@ -2777,7 +2777,7 @@ namespace LuaUnit
|
|||||||
damage = unit->CalcArmorReducedDamage(target, damage);
|
damage = unit->CalcArmorReducedDamage(target, damage);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TRINITY
|
#if defined TRINITY || AZEROTHCORE
|
||||||
// melee damage by specific school
|
// melee damage by specific school
|
||||||
if (!spell)
|
if (!spell)
|
||||||
{
|
{
|
||||||
@@ -2792,7 +2792,7 @@ 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
|
#if defined TRINITY || AZEROTHCORE
|
||||||
Unit::DealDamage(unit, target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
Unit::DealDamage(unit, target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
||||||
#else
|
#else
|
||||||
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
unit->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
||||||
@@ -2807,9 +2807,13 @@ namespace LuaUnit
|
|||||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
|
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifdef AZEROTHCORE
|
||||||
|
SpellNonMeleeDamage dmgInfo(unit, target, spellInfo, spellInfo->GetSchoolMask());
|
||||||
|
#else
|
||||||
SpellNonMeleeDamage dmgInfo(unit, target, spell, spellInfo->GetSchoolMask());
|
SpellNonMeleeDamage dmgInfo(unit, target, spell, spellInfo->GetSchoolMask());
|
||||||
#ifdef TRINITY
|
#endif
|
||||||
|
|
||||||
|
#if defined TRINITY || AZEROTHCORE
|
||||||
Unit::DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
Unit::DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
||||||
#else
|
#else
|
||||||
damage = unit->SpellDamageBonusDone(target, spellInfo, damage, SPELL_DIRECT_DAMAGE;
|
damage = unit->SpellDamageBonusDone(target, spellInfo, damage, SPELL_DIRECT_DAMAGE;
|
||||||
@@ -2818,37 +2822,6 @@ namespace LuaUnit
|
|||||||
unit->DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
unit->DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unit->SendSpellNonMeleeDamageLog(&dmgInfo);
|
|
||||||
unit->DealSpellDamage(&dmgInfo, true);
|
|
||||||
return 0;
|
|
||||||
#elif AZEROTHCORE
|
|
||||||
if (!spell)
|
|
||||||
{
|
|
||||||
DamageInfo dmgInfo(unit, target, damage, nullptr, schoolmask, SPELL_DIRECT_DAMAGE);
|
|
||||||
unit->CalcAbsorbResist(dmgInfo);
|
|
||||||
|
|
||||||
if (!dmgInfo.GetDamage())
|
|
||||||
damage = 0;
|
|
||||||
else
|
|
||||||
damage = dmgInfo.GetDamage();
|
|
||||||
|
|
||||||
uint32 absorb = dmgInfo.GetAbsorb();
|
|
||||||
uint32 resist = dmgInfo.GetResist();
|
|
||||||
unit->DealDamageMods(target, damage, &absorb);
|
|
||||||
Unit::DealDamage(unit, target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false);
|
|
||||||
unit->SendAttackStateUpdate(HITINFO_AFFECTS_VICTIM, target, 0, schoolmask, damage, absorb, resist, VICTIMSTATE_HIT, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!spell)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
|
|
||||||
if (!spellInfo)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
SpellNonMeleeDamage dmgInfo(unit, target, spellInfo, spellInfo->GetSchoolMask());
|
|
||||||
Unit::DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
|
||||||
unit->SendSpellNonMeleeDamageLog(&dmgInfo);
|
unit->SendSpellNonMeleeDamageLog(&dmgInfo);
|
||||||
unit->DealSpellDamage(&dmgInfo, true);
|
unit->DealSpellDamage(&dmgInfo, true);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user