mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Merge pull request #381 from UltraNix/AcBuildFix
Buildfix for AzerothCore.
This commit is contained in:
@@ -2813,14 +2813,16 @@ namespace LuaUnit
|
||||
#elif AZEROTHCORE
|
||||
if (!spell)
|
||||
{
|
||||
uint32 absorb = 0;
|
||||
uint32 resist = 0;
|
||||
unit->CalcAbsorbResist(unit, target, schoolmask, SPELL_DIRECT_DAMAGE, damage, &absorb, &resist);
|
||||
if (damage <= absorb + resist)
|
||||
DamageInfo dmgInfo(unit, target, damage, nullptr, schoolmask, SPELL_DIRECT_DAMAGE);
|
||||
unit->CalcAbsorbResist(dmgInfo);
|
||||
|
||||
if (!dmgInfo.GetDamage())
|
||||
damage = 0;
|
||||
else
|
||||
damage -= absorb + resist;
|
||||
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);
|
||||
@@ -2834,7 +2836,7 @@ namespace LuaUnit
|
||||
if (!spellInfo)
|
||||
return 0;
|
||||
|
||||
SpellNonMeleeDamage dmgInfo(unit, target, spell, spellInfo->GetSchoolMask());
|
||||
SpellNonMeleeDamage dmgInfo(unit, target, spellInfo, spellInfo->GetSchoolMask());
|
||||
Unit::DealDamageMods(dmgInfo.target, dmgInfo.damage, &dmgInfo.absorb);
|
||||
unit->SendSpellNonMeleeDamageLog(&dmgInfo);
|
||||
unit->DealSpellDamage(&dmgInfo, true);
|
||||
@@ -2879,17 +2881,12 @@ namespace LuaUnit
|
||||
uint32 amount = Eluna::CHECKVAL<uint32>(L, 4);
|
||||
bool critical = Eluna::CHECKVAL<bool>(L, 5, false);
|
||||
|
||||
#ifdef TRINITY
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
if (const SpellInfo* info = sSpellMgr->GetSpellInfo(spell))
|
||||
{
|
||||
HealInfo healInfo(unit, target, amount, info, info->GetSchoolMask());
|
||||
unit->HealBySpell(healInfo, critical);
|
||||
}
|
||||
#elif AZEROTHCORE
|
||||
if (const SpellInfo* info = sSpellMgr->GetSpellInfo(spell))
|
||||
{
|
||||
unit->HealBySpell(target, info, amount, critical);
|
||||
}
|
||||
#else
|
||||
#ifdef CMANGOS
|
||||
SpellEntry const* spellEntry = GetSpellStore()->LookupEntry<SpellEntry>(spell);
|
||||
|
||||
Reference in New Issue
Block a user