[7645] Fixed problems wit temporary unsummoned pets and cleanup code.

* Save temporary unsummoned pet to current slot (instead non_in_slot mode) and
  prevent save as current pet summoned while temporay unsummon (arena)
* Prevent overwrite temporary summoned pet data
* At player loading set temporary unsummoned pet data instead pet loading
  if pet expected to be temporary unsummoned in current player state (loading in taxi flight/etc)
* Restore proper pet at arena leave and unsummon in arena summoned.
This commit is contained in:
VladimirMangos 2009-04-11 06:54:39 +04:00
parent 263bf2ab22
commit eb198f8239
9 changed files with 105 additions and 108 deletions

View file

@ -798,9 +798,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
SendDoFlight( MountId, path, startNode );
}
// Load pet if any and player is alive and not in taxi flight
if(pCurrChar->isAlive() && pCurrChar->m_taxi.GetTaxiSource()==0)
pCurrChar->LoadPet();
// Load pet if any (if player not alive and in taxi flight or another then pet will remember as temporary unsummoned)
pCurrChar->LoadPet();
// Set FFA PvP for non GM in non-rest mode
if(sWorld.IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_RESTING) )