mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[11573] Add CreatureInfo::GetObjectGuid
Also remove redundent CreatureData::GetHighGuid
This commit is contained in:
parent
442e06090d
commit
8698ac207d
3 changed files with 7 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11572"
|
||||
#define REVISION_NR "11573"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue