Merge pull request #2582 from hacknowledge/fix_2531

Core/Spells Disables environmental damage to players which are not attackable by AOE damage
This commit is contained in:
QAston
2011-08-24 10:03:10 -07:00
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);
}
bool Player::IsImmuneToEnvironmentalDamage()
{
// check for GM and death state included in isAttackableByAOE
return (!isAttackableByAOE());
}
uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (!isAlive() || isGameMaster())
if (IsImmuneToEnvironmentalDamage())
return 0;
// 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; }
void SetDelayedTeleportFlag(bool setting) { m_bHasDelayedTeleport = setting; }
bool IsImmuneToEnvironmentalDamage();
void ScheduleDelayedOperation(uint32 operation)
{
if (operation < DELAYED_END)