mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
[11244] Collect in CreatureCreatePos data for delayed pos setup into Creature::Create.
* CreatureCreatePos work in 3 modes:
- exactly provided coordinates/orientation/map/phasemask
- exactly object + orientation as coordinates/map/phasemask
- delayed position calculation near provided object at specific dist/angle.
* Use in similar way and for Pet/Vehicle Create functions.
For Totem created new Totem::Create function with some moved in to it totem specific code.
* This let resolve recent problems with creature spawn and preserve fix for cases when
Creature::Create addon/script code expected known correct possition for creature.
This commit is contained in:
parent
44915f6f13
commit
2b65cdb3bb
13 changed files with 223 additions and 362 deletions
|
|
@ -61,15 +61,21 @@ void Vehicle::Update( uint32 update_diff, uint32 diff)
|
|||
Creature::Update(update_diff, diff);
|
||||
}
|
||||
|
||||
bool Vehicle::Create(uint32 guidlow, Map *map, uint32 Entry, uint32 vehicleId, Team team)
|
||||
bool Vehicle::Create(uint32 guidlow, CreatureCreatePos& cPos, uint32 Entry, uint32 vehicleId, Team team)
|
||||
{
|
||||
SetMap(map);
|
||||
SetMap(cPos.GetMap());
|
||||
SetPhaseMask(cPos.GetPhaseMask(), false);
|
||||
|
||||
Object::_Create(guidlow, Entry, HIGHGUID_VEHICLE);
|
||||
|
||||
if(!InitEntry(Entry))
|
||||
return false;
|
||||
|
||||
cPos.SelectFinalPoint(this);
|
||||
|
||||
if (!cPos.Relocate(this))
|
||||
return false;
|
||||
|
||||
m_defaultMovementType = IDLE_MOTION_TYPE;
|
||||
|
||||
AIM_Initialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue