mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
This commit is contained in:
parent
40b0a2cd92
commit
d7ae5e3af0
20 changed files with 135 additions and 132 deletions
|
|
@ -156,7 +156,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
|
|||
}
|
||||
|
||||
Map *map = owner->GetMap();
|
||||
uint32 guid = objmgr.GenerateLowGuid(HIGHGUID_PET);
|
||||
uint32 guid = map->GenerateLocalLowGuid(HIGHGUID_PET);
|
||||
if (!Create(guid, map, owner->GetPhaseMask(), petentry, pet_number))
|
||||
{
|
||||
delete result;
|
||||
|
|
@ -743,7 +743,8 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
sLog.outError("CRITICAL: NULL pointer parsed into CreateBaseAtCreature()");
|
||||
return false;
|
||||
}
|
||||
uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET);
|
||||
|
||||
uint32 guid = creature->GetMap()->GenerateLocalLowGuid(HIGHGUID_PET);
|
||||
|
||||
sLog.outBasic("Create pet");
|
||||
uint32 pet_number = objmgr.GeneratePetNumber();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue