Advertisement
Guest User

test

a guest
Sep 22nd, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. /// %Log the player out
  2. void WorldSession::LogoutPlayer(bool save)
  3. {
  4. // finish pending transfers before starting the logout
  5. while (_player && _player->IsBeingTeleportedFar())
  6. HandleMoveWorldportAckOpcode();
  7.  
  8. m_playerLogout = true;
  9. m_playerSave = save;
  10.  
  11. if (_player)
  12. {
  13. if (ObjectGuid lguid = _player->GetLootGUID())
  14. DoLootRelease(lguid);
  15.  
  16. ///- If the player just died before logging out, make him appear as a ghost
  17. if (_player->GetDeathTimer())
  18. {
  19. _player->getHostileRefManager().deleteReferences();
  20. _player->BuildPlayerRepop();
  21. _player->RepopAtGraveyard();
  22. }
  23. else if (_player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
  24. {
  25. // this will kill character by SPELL_AURA_SPIRIT_OF_REDEMPTION
  26. _player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
  27. _player->KillPlayer();
  28. _player->BuildPlayerRepop();
  29. _player->RepopAtGraveyard();
  30. }
  31. else if (_player->HasPendingBind())
  32. {
  33. _player->RepopAtGraveyard();
  34. _player->SetPendingBind(0, 0);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement