mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
parent
75e1e7c3a3
commit
2835aa5f20
32 changed files with 115 additions and 331 deletions
|
|
@ -190,7 +190,7 @@ Creature::~Creature()
|
|||
void Creature::AddToWorld()
|
||||
{
|
||||
///- Register the creature for guid lookup
|
||||
if(!IsInWorld() && GetObjectGuid().GetHigh() == HIGHGUID_UNIT)
|
||||
if (!IsInWorld() && GetObjectGuid().IsCreatureOrVehicle())
|
||||
GetMap()->GetObjectsStore().insert<Creature>(GetGUID(), (Creature*)this);
|
||||
|
||||
Unit::AddToWorld();
|
||||
|
|
@ -199,7 +199,7 @@ void Creature::AddToWorld()
|
|||
void Creature::RemoveFromWorld()
|
||||
{
|
||||
///- Remove the creature from the accessor
|
||||
if(IsInWorld() && GetObjectGuid().GetHigh() == HIGHGUID_UNIT)
|
||||
if (IsInWorld() && GetObjectGuid().IsCreatureOrVehicle())
|
||||
GetMap()->GetObjectsStore().erase<Creature>(GetGUID(), (Creature*)NULL);
|
||||
|
||||
Unit::RemoveFromWorld();
|
||||
|
|
@ -398,6 +398,8 @@ bool Creature::UpdateEntry(uint32 Entry, Team team, const CreatureData *data /*=
|
|||
for(int i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
m_spells[i] = GetCreatureInfo()->spells[i];
|
||||
|
||||
SetVehicleId(GetCreatureInfo()->vehicleId);
|
||||
|
||||
// if eventData set then event active and need apply spell_start
|
||||
if (eventData)
|
||||
ApplyGameEventSpells(eventData, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue