diff options
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r-- | src/game/Pet.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 0da02b8fe14..2cf9214fd7a 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -139,7 +139,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool Map *map = owner->GetMap(); uint32 guid = objmgr.GenerateLowGuid(HIGHGUID_PET); uint32 pet_number = fields[0].GetUInt32(); - if(!Create(guid, map, petentry, pet_number)) + if(!Create(guid, map, owner->GetPhaseMask(), petentry, pet_number)) { delete result; return false; @@ -726,7 +726,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) sLog.outDebug("Create pet"); uint32 pet_number = objmgr.GeneratePetNumber(); - if(!Create(guid, creature->GetMap(), creature->GetEntry(), pet_number)) + if(!Create(guid, creature->GetMap(), creature->GetPhaseMask(), creature->GetEntry(), pet_number)) return false; Relocate(creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), creature->GetOrientation()); @@ -1707,10 +1707,11 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply) } } -bool Pet::Create(uint32 guidlow, Map *map, uint32 Entry, uint32 pet_number) +bool Pet::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number) { SetMapId(map->GetId()); SetInstanceId(map->GetInstanceId()); + SetPhaseMask(phaseMask,false); Object::_Create(guidlow, pet_number, HIGHGUID_PET); |