Core/Spells Disables environmental damage to spirit of redemption form of priest

Core: Added check for AOE attackability to environmental damage
Fixes #2531
Reduced check for environmental damage to whether unit is attackable by AOE. check for GM and death state is included in this check

Fixes #2531
This commit is contained in:
hacknowledge
2011-08-13 23:58:33 +02:00
parent 0cb68815ec
commit 78ca3ad5d2
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -1244,9 +1244,15 @@ void Player::StopMirrorTimer(MirrorTimerType Type)
GetSession()->SendPacket(&data); GetSession()->SendPacket(&data);
} }
bool Player::IsImmuneToEnvironmentalDamage()
{
// check for GM and death state included in isAttackableByAOE
return (!isAttackableByAOE());
}
uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage) uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{ {
if (!isAlive() || isGameMaster()) if (IsImmuneToEnvironmentalDamage())
return 0; return 0;
// Absorb, resist some environmental damage type // Absorb, resist some environmental damage type
+2
View File
@@ -2753,6 +2753,8 @@ class Player : public Unit, public GridObject<Player>
bool IsHasDelayedTeleport() const { return m_bHasDelayedTeleport; } bool IsHasDelayedTeleport() const { return m_bHasDelayedTeleport; }
void SetDelayedTeleportFlag(bool setting) { m_bHasDelayedTeleport = setting; } void SetDelayedTeleportFlag(bool setting) { m_bHasDelayedTeleport = setting; }
bool IsImmuneToEnvironmentalDamage();
void ScheduleDelayedOperation(uint32 operation) void ScheduleDelayedOperation(uint32 operation)
{ {
if (operation < DELAYED_END) if (operation < DELAYED_END)