Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// %Log the player out
- void WorldSession::LogoutPlayer(bool save)
- {
- // finish pending transfers before starting the logout
- while (_player && _player->IsBeingTeleportedFar())
- HandleMoveWorldportAckOpcode();
- m_playerLogout = true;
- m_playerSave = save;
- if (_player)
- {
- if (ObjectGuid lguid = _player->GetLootGUID())
- DoLootRelease(lguid);
- ///- If the player just died before logging out, make him appear as a ghost
- if (_player->GetDeathTimer())
- {
- _player->getHostileRefManager().deleteReferences();
- _player->BuildPlayerRepop();
- _player->RepopAtGraveyard();
- }
- else if (_player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
- {
- // this will kill character by SPELL_AURA_SPIRIT_OF_REDEMPTION
- _player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- _player->KillPlayer();
- _player->BuildPlayerRepop();
- _player->RepopAtGraveyard();
- }
- else if (_player->HasPendingBind())
- {
- _player->RepopAtGraveyard();
- _player->SetPendingBind(0, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement