mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Movement: Fixed creature movement on transports
This commit is contained in:
@@ -1477,7 +1477,7 @@ void Creature::setDeathState(DeathState s)
|
||||
|
||||
CreatureTemplate const* cinfo = GetCreatureTemplate();
|
||||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
||||
ClearUnitState(uint32(UNIT_STATE_ALL_STATE));
|
||||
ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING));
|
||||
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
|
||||
LoadCreaturesAddon(true);
|
||||
Motion_Initialize();
|
||||
|
||||
@@ -1556,6 +1556,10 @@ void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const
|
||||
|
||||
void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
{
|
||||
// TODO: Allow transports to be part of dynamic vmap tree
|
||||
if (GetTransport())
|
||||
return;
|
||||
|
||||
switch (GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
|
||||
@@ -60,7 +60,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner)
|
||||
|
||||
arrived = false;
|
||||
|
||||
owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE));
|
||||
owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_EVADE | UNIT_STATE_IGNORE_PATHFINDING)));
|
||||
}
|
||||
|
||||
bool HomeMovementGenerator<Creature>::DoUpdate(Creature* owner, const uint32 /*time_diff*/)
|
||||
|
||||
Reference in New Issue
Block a user