diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 781022ae8..94551dd9f 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -50,10 +50,10 @@ #include "Policies/SingletonImp.h" -HighGuid CreatureData::GetHighGuid() const +ObjectGuid CreatureData::GetObjectGuid(uint32 lowguid) const { // info existence checked at loading - return ObjectMgr::GetCreatureTemplate(id)->GetHighGuid(); + return ObjectMgr::GetCreatureTemplate(id)->GetObjectGuid(lowguid); } TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const @@ -1280,7 +1280,7 @@ bool Creature::LoadFromDB(uint32 guidlow, Map *map) GameEventCreatureData const* eventData = sGameEventMgr.GetCreatureUpdateDataForActiveEvent(guidlow); // Creature can be loaded already in map if grid has been unloaded while creature walk to another grid - if (map->GetCreature(data->GetObjectGuid(guidlow))) + if (map->GetCreature(cinfo->GetObjectGuid(guidlow))) return false; CreatureCreatePos pos(map, data->posX, data->posY, data->posZ, data->orientation, data->phaseMask); diff --git a/src/game/Creature.h b/src/game/Creature.h index 5341b9d54..ae4be4237 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -147,6 +147,8 @@ struct CreatureInfo return vehicleId ? HIGHGUID_VEHICLE : HIGHGUID_UNIT; } + ObjectGuid GetObjectGuid(uint32 lowguid) const { return ObjectGuid(GetHighGuid(), Entry, lowguid); } + SkillType GetRequiredLootSkill() const { if(type_flags & CREATURE_TYPEFLAGS_HERBLOOT) @@ -202,8 +204,7 @@ struct CreatureData uint8 spawnMask; // helper function - HighGuid GetHighGuid() const; - ObjectGuid GetObjectGuid(uint32 lowguid) const { return ObjectGuid(GetHighGuid(), id, lowguid); } + ObjectGuid GetObjectGuid(uint32 lowguid) const; }; // from `creature_addon` and `creature_template_addon`tables diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 826a94fa4..b9069dd42 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11572" + #define REVISION_NR "11573" #endif // __REVISION_NR_H__