mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[11323] Avoid explicit use HIGHGUID_UNIT as creature high guid in guids or creature creating.
This helper change for allow have in future static spawned vehicles as `creature` table data. Added CreatureInfo::GetHighGuid() high guid selector, and wrapper CreatureData::GetHighGuid() for most real cases of usage. Also easy get expected guid form by CreatureData::GetObjectGuid(lowguid). Also fixed some memory lost cases at creature spawn fail.
This commit is contained in:
parent
0dfcbf8051
commit
ba77d85a30
16 changed files with 156 additions and 81 deletions
|
|
@ -61,14 +61,14 @@ void Vehicle::Update( uint32 update_diff, uint32 diff)
|
|||
Creature::Update(update_diff, diff);
|
||||
}
|
||||
|
||||
bool Vehicle::Create(uint32 guidlow, CreatureCreatePos& cPos, uint32 Entry, uint32 vehicleId, Team team)
|
||||
bool Vehicle::Create(uint32 guidlow, CreatureCreatePos& cPos, CreatureInfo const* cinfo, uint32 vehicleId, Team team)
|
||||
{
|
||||
SetMap(cPos.GetMap());
|
||||
SetPhaseMask(cPos.GetPhaseMask(), false);
|
||||
|
||||
Object::_Create(guidlow, Entry, HIGHGUID_VEHICLE);
|
||||
Object::_Create(guidlow, cinfo->Entry, HIGHGUID_VEHICLE);
|
||||
|
||||
if(!InitEntry(Entry))
|
||||
if (!InitEntry(cinfo->Entry))
|
||||
return false;
|
||||
|
||||
cPos.SelectFinalPoint(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue