*Note: this patch may do not have any use for TC.

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

    * 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.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-11 14:47:38 -05:00
parent f4d69d1b3b
commit 3120221deb
8 changed files with 103 additions and 94 deletions

View File

@@ -157,14 +157,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
// resummon pet
if(GetPlayer()->m_temporaryUnsummonedPetNumber)
{
Pet* NewPet = new Pet(GetPlayer());
if(!NewPet->LoadPetFromDB(GetPlayer(), 0, GetPlayer()->m_temporaryUnsummonedPetNumber, true))
delete NewPet;
GetPlayer()->m_temporaryUnsummonedPetNumber = 0;
}
GetPlayer()->ResummonPetTemporaryUnSummonedIfAny();
GetPlayer()->SetDontMove(false);
}