aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortobmaps <spambot42@yandex.ru>2011-05-30 05:27:41 +0700
committertobmaps <spambot42@yandex.ru>2011-05-30 05:27:41 +0700
commit76413ae661efc911a555ae6c6b15c988fb2bd9dd (patch)
tree441847569c2b80c2611cdef2c52ad60e5d656c3b /src
parent00da67740d78f7a206c68d59d5d096d5633821c9 (diff)
Core/Players: Allow damaging spells to complete their damage-ticks/hits even if target runs to a sanctuary zone
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 89caafa459b..e1672cc958c 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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);