mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 23:11:56 -04:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user