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:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user