aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/MiscHandler.cpp
diff options
context:
space:
mode:
authorDiscover- <amort11@hotmail.com>2014-01-19 13:50:30 +0100
committerDiscover- <amort11@hotmail.com>2014-01-19 13:50:30 +0100
commite1f1e0cef5c11f8ffc52c28f87ab982ab971c4fe (patch)
tree66c5b096b61290201f28f6b82bdcd7942a13b760 /src/server/game/Handlers/MiscHandler.cpp
parent55bde59a92e0d8c5d1cc96f7d3ec63855d3f0582 (diff)
Core/Misc: Split the calculating of the corpse reclaim delay and sending of SMSG_CORPSE_RECLAIM_DELAY in two different methods.
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 8b92706bd06..fcec4f38852 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -734,34 +734,34 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- if (GetPlayer()->IsAlive())
+ if (_player->IsAlive())
return;
// do not allow corpse reclaim in arena
- if (GetPlayer()->InArena())
+ if (_player->InArena())
return;
// body not released yet
- if (!GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
+ if (!_player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
return;
- Corpse* corpse = GetPlayer()->GetCorpse();
+ Corpse* corpse = _player->GetCorpse();
if (!corpse)
return;
// prevent resurrect before 30-sec delay after body release not finished
- if (time_t(corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(time(NULL)))
+ if (time_t(corpse->GetGhostTime() + _player->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP)) > time_t(time(NULL)))
return;
- if (!corpse->IsWithinDistInMap(GetPlayer(), CORPSE_RECLAIM_RADIUS, true))
+ if (!corpse->IsWithinDistInMap(_player, CORPSE_RECLAIM_RADIUS, true))
return;
// resurrect
- GetPlayer()->ResurrectPlayer(GetPlayer()->InBattleground() ? 1.0f : 0.5f);
+ _player->ResurrectPlayer(_player->InBattleground() ? 1.0f : 0.5f);
// spawn bones
- GetPlayer()->SpawnCorpseBones();
+ _player->SpawnCorpseBones();
}
void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recvData)