Core/Players: Allow damaging spells to complete their damage-ticks/hits even if target runs to a sanctuary zone
This commit is contained in:
@@ -561,19 +561,6 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
|
||||
return;
|
||||
}
|
||||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if (pVictim != this && IsControlledByPlayer() && pVictim->IsControlledByPlayer())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if (area && area->IsSanctuary()) //sanctuary
|
||||
{
|
||||
if (absorb)
|
||||
*absorb += damage;
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 originalDamage = damage;
|
||||
|
||||
if (absorb && originalDamage > damage)
|
||||
@@ -1122,16 +1109,6 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
|
||||
return;
|
||||
}
|
||||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if (pVictim != this && IsControlledByPlayer() && pVictim->IsControlledByPlayer())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
|
||||
if (area && area->IsSanctuary()) // sanctuary
|
||||
return;
|
||||
}
|
||||
|
||||
// Call default DealDamage
|
||||
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->absorb, BASE_ATTACK, MELEE_HIT_NORMAL);
|
||||
DealDamage(pVictim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss);
|
||||
@@ -1352,15 +1329,6 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
||||
if (!pVictim->isAlive() || pVictim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (pVictim->HasUnitState(UNIT_STAT_ONVEHICLE) && pVictim->GetVehicleBase() != this) || (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsInEvadeMode()))
|
||||
return;
|
||||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if (pVictim != this && IsControlledByPlayer() && pVictim->IsControlledByPlayer())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if (area && area->IsSanctuary()) // sanctuary
|
||||
return;
|
||||
}
|
||||
|
||||
// Hmmmm dont like this emotes client must by self do all animations
|
||||
if (damageInfo->HitInfo&HITINFO_CRITICALHIT)
|
||||
pVictim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL);
|
||||
|
||||
Reference in New Issue
Block a user