mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags. * Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class. * Cleanups and fix related code. NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
This commit is contained in:
parent
00fc1d7593
commit
21a6a26386
24 changed files with 215 additions and 201 deletions
|
|
@ -64,7 +64,6 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
unit.StopMoving();
|
unit.StopMoving();
|
||||||
unit.RemoveUnitMovementFlag(MONSTER_MOVE_WALK);
|
|
||||||
unit.addUnitState(UNIT_STAT_CONFUSED);
|
unit.addUnitState(UNIT_STAT_CONFUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,6 +71,8 @@ template<>
|
||||||
void
|
void
|
||||||
ConfusedMovementGenerator<Creature>::_InitSpecific(Creature &creature, bool &is_water_ok, bool &is_land_ok)
|
ConfusedMovementGenerator<Creature>::_InitSpecific(Creature &creature, bool &is_water_ok, bool &is_land_ok)
|
||||||
{
|
{
|
||||||
|
creature.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
|
||||||
is_water_ok = creature.canSwim();
|
is_water_ok = creature.canSwim();
|
||||||
is_land_ok = creature.canWalk();
|
is_land_ok = creature.canWalk();
|
||||||
}
|
}
|
||||||
|
|
@ -138,17 +139,21 @@ ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<>
|
||||||
void
|
void ConfusedMovementGenerator<Player>::Finalize(Player &unit)
|
||||||
ConfusedMovementGenerator<T>::Finalize(T &unit)
|
|
||||||
{
|
{
|
||||||
unit.clearUnitState(UNIT_STAT_CONFUSED);
|
unit.clearUnitState(UNIT_STAT_CONFUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void ConfusedMovementGenerator<Creature>::Finalize(Creature &unit)
|
||||||
|
{
|
||||||
|
unit.clearUnitState(UNIT_STAT_CONFUSED);
|
||||||
|
unit.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
}
|
||||||
|
|
||||||
template void ConfusedMovementGenerator<Player>::Initialize(Player &player);
|
template void ConfusedMovementGenerator<Player>::Initialize(Player &player);
|
||||||
template void ConfusedMovementGenerator<Creature>::Initialize(Creature &creature);
|
template void ConfusedMovementGenerator<Creature>::Initialize(Creature &creature);
|
||||||
template void ConfusedMovementGenerator<Player>::Finalize(Player &player);
|
|
||||||
template void ConfusedMovementGenerator<Creature>::Finalize(Creature &creature);
|
|
||||||
template void ConfusedMovementGenerator<Player>::Reset(Player &player);
|
template void ConfusedMovementGenerator<Player>::Reset(Player &player);
|
||||||
template void ConfusedMovementGenerator<Creature>::Reset(Creature &creature);
|
template void ConfusedMovementGenerator<Creature>::Reset(Creature &creature);
|
||||||
template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 &diff);
|
template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 &diff);
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,10 @@ lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGrou
|
||||||
m_lootMoney(0), m_lootRecipient(0),
|
m_lootMoney(0), m_lootRecipient(0),
|
||||||
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
|
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
|
||||||
m_gossipOptionLoaded(false), m_isPet(false), m_isVehicle(false), m_isTotem(false),
|
m_gossipOptionLoaded(false), m_isPet(false), m_isVehicle(false), m_isTotem(false),
|
||||||
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false),
|
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0),
|
||||||
|
m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false),
|
||||||
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
|
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
|
||||||
m_creatureInfo(NULL), m_isActiveObject(false), m_AlreadySearchedAssistance(false)
|
m_creatureInfo(NULL), m_isActiveObject(false), m_monsterMoveFlags(MONSTER_MOVE_WALK)
|
||||||
{
|
{
|
||||||
m_regenTimer = 200;
|
m_regenTimer = 200;
|
||||||
m_valuesCount = UNIT_END;
|
m_valuesCount = UNIT_END;
|
||||||
|
|
@ -122,7 +123,8 @@ m_creatureInfo(NULL), m_isActiveObject(false), m_AlreadySearchedAssistance(false
|
||||||
m_CreatureSpellCooldowns.clear();
|
m_CreatureSpellCooldowns.clear();
|
||||||
m_CreatureCategoryCooldowns.clear();
|
m_CreatureCategoryCooldowns.clear();
|
||||||
m_GlobalCooldown = 0;
|
m_GlobalCooldown = 0;
|
||||||
m_unit_movement_flags = MONSTER_MOVE_WALK;
|
|
||||||
|
m_monsterMoveFlags = MONSTER_MOVE_WALK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Creature::~Creature()
|
Creature::~Creature()
|
||||||
|
|
@ -1032,7 +1034,7 @@ void Creature::LoadGossipOptions()
|
||||||
m_gossipOptionLoaded = true;
|
m_gossipOptionLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type)
|
void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, MonsterMovementFlags flags, uint8 type)
|
||||||
{
|
{
|
||||||
/* uint32 timeElap = getMSTime();
|
/* uint32 timeElap = getMSTime();
|
||||||
if ((timeElap - m_startMove) < m_moveTime)
|
if ((timeElap - m_startMove) < m_moveTime)
|
||||||
|
|
@ -1052,7 +1054,7 @@ void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint3
|
||||||
|
|
||||||
m_startMove = getMSTime();
|
m_startMove = getMSTime();
|
||||||
m_moveTime = time;*/
|
m_moveTime = time;*/
|
||||||
SendMonsterMove(x, y, z, type, MovementFlags, time);
|
SendMonsterMove(x, y, z, type, flags, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
Player *Creature::GetLootRecipient() const
|
Player *Creature::GetLootRecipient() const
|
||||||
|
|
@ -1533,7 +1535,7 @@ void Creature::setDeathState(DeathState s)
|
||||||
CreatureInfo const *cinfo = GetCreatureInfo();
|
CreatureInfo const *cinfo = GetCreatureInfo();
|
||||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
||||||
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||||
AddUnitMovementFlag(MONSTER_MOVE_WALK);
|
AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
||||||
clearUnitState(UNIT_STAT_ALL_STATE);
|
clearUnitState(UNIT_STAT_ALL_STATE);
|
||||||
i_motionMaster.Clear();
|
i_motionMaster.Clear();
|
||||||
|
|
@ -1938,7 +1940,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
||||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, cainfo->emote);
|
SetUInt32Value(UNIT_NPC_EMOTESTATE, cainfo->emote);
|
||||||
|
|
||||||
if (cainfo->move_flags != 0)
|
if (cainfo->move_flags != 0)
|
||||||
SetUnitMovementFlags(cainfo->move_flags);
|
SetMonsterMoveFlags(MonsterMovementFlags(cainfo->move_flags));
|
||||||
|
|
||||||
if(cainfo->auras)
|
if(cainfo->auras)
|
||||||
{
|
{
|
||||||
|
|
@ -2279,3 +2281,29 @@ void Creature::SetActiveObjectState( bool on )
|
||||||
if(world)
|
if(world)
|
||||||
map->Add(this);
|
map->Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Creature::SendMonsterMoveWithSpeedToCurrentDestination(Player* player)
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
if(GetMotionMaster()->GetDestination(x, y, z))
|
||||||
|
SendMonsterMoveWithSpeed(x, y, z, 0, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Creature::SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime, Player* player)
|
||||||
|
{
|
||||||
|
if (!transitTime)
|
||||||
|
{
|
||||||
|
if(GetTypeId()==TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
Traveller<Player> traveller(*(Player*)this);
|
||||||
|
transitTime = traveller.GetTotalTrevelTimeTo(x,y,z);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Traveller<Creature> traveller(*(Creature*)this);
|
||||||
|
transitTime = traveller.GetTotalTrevelTimeTo(x,y,z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//float orientation = (float)atan2((double)dy, (double)dx);
|
||||||
|
SendMonsterMove(x, y, z, 0, GetMonsterMoveFlags(), transitTime, player);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -517,9 +517,18 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
||||||
|
|
||||||
bool AIM_Initialize();
|
bool AIM_Initialize();
|
||||||
|
|
||||||
void AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type);
|
void AI_SendMoveToPacket(float x, float y, float z, uint32 time, MonsterMovementFlags MovementFlags, uint8 type);
|
||||||
CreatureAI* AI() { return i_AI; }
|
CreatureAI* AI() { return i_AI; }
|
||||||
|
|
||||||
|
void AddMonsterMoveFlag(MonsterMovementFlags f) { m_monsterMoveFlags = MonsterMovementFlags(m_monsterMoveFlags | f); }
|
||||||
|
void RemoveMonsterMoveFlag(MonsterMovementFlags f) { m_monsterMoveFlags = MonsterMovementFlags(m_monsterMoveFlags & ~f); }
|
||||||
|
bool HasMonsterMoveFlag(MonsterMovementFlags f) const { return m_monsterMoveFlags & f; }
|
||||||
|
MonsterMovementFlags GetMonsterMoveFlags() const { return m_monsterMoveFlags; }
|
||||||
|
void SetMonsterMoveFlags(MonsterMovementFlags f) { m_monsterMoveFlags = f; }
|
||||||
|
|
||||||
|
void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL);
|
||||||
|
void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL);
|
||||||
|
|
||||||
uint32 GetShieldBlockValue() const //dunno mob block value
|
uint32 GetShieldBlockValue() const //dunno mob block value
|
||||||
{
|
{
|
||||||
return (getLevel()/2 + uint32(GetStat(STAT_STRENGTH)/20));
|
return (getLevel()/2 + uint32(GetStat(STAT_STRENGTH)/20));
|
||||||
|
|
@ -725,6 +734,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
||||||
GridReference<Creature> m_gridRef;
|
GridReference<Creature> m_gridRef;
|
||||||
CreatureInfo const* m_creatureInfo; // in heroic mode can different from ObjMgr::GetCreatureTemplate(GetEntry())
|
CreatureInfo const* m_creatureInfo; // in heroic mode can different from ObjMgr::GetCreatureTemplate(GetEntry())
|
||||||
bool m_isActiveObject;
|
bool m_isActiveObject;
|
||||||
|
MonsterMovementFlags m_monsterMoveFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AssistDelayEvent : public BasicEvent
|
class AssistDelayEvent : public BasicEvent
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,6 @@ FleeingMovementGenerator<T>::Initialize(T &owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_Init(owner);
|
_Init(owner);
|
||||||
owner.RemoveUnitMovementFlag(MONSTER_MOVE_WALK);
|
|
||||||
|
|
||||||
if(Unit * fright = ObjectAccessor::GetUnit(owner, i_frightGUID))
|
if(Unit * fright = ObjectAccessor::GetUnit(owner, i_frightGUID))
|
||||||
{
|
{
|
||||||
|
|
@ -313,6 +312,8 @@ FleeingMovementGenerator<Creature>::_Init(Creature &owner)
|
||||||
{
|
{
|
||||||
if(!&owner)
|
if(!&owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
owner.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
owner.SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
owner.SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||||
is_water_ok = owner.canSwim();
|
is_water_ok = owner.canSwim();
|
||||||
is_land_ok = owner.canWalk();
|
is_land_ok = owner.canWalk();
|
||||||
|
|
@ -326,13 +327,19 @@ FleeingMovementGenerator<Player>::_Init(Player &)
|
||||||
is_land_ok = true;
|
is_land_ok = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<>
|
||||||
void
|
void FleeingMovementGenerator<Player>::Finalize(Player &owner)
|
||||||
FleeingMovementGenerator<T>::Finalize(T &owner)
|
|
||||||
{
|
{
|
||||||
owner.clearUnitState(UNIT_STAT_FLEEING);
|
owner.clearUnitState(UNIT_STAT_FLEEING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void FleeingMovementGenerator<Creature>::Finalize(Creature &owner)
|
||||||
|
{
|
||||||
|
owner.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
owner.clearUnitState(UNIT_STAT_FLEEING);
|
||||||
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void
|
void
|
||||||
FleeingMovementGenerator<T>::Reset(T &owner)
|
FleeingMovementGenerator<T>::Reset(T &owner)
|
||||||
|
|
@ -379,8 +386,6 @@ template bool FleeingMovementGenerator<Player>::_getPoint(Player &, float &, flo
|
||||||
template bool FleeingMovementGenerator<Creature>::_getPoint(Creature &, float &, float &, float &);
|
template bool FleeingMovementGenerator<Creature>::_getPoint(Creature &, float &, float &, float &);
|
||||||
template void FleeingMovementGenerator<Player>::_setTargetLocation(Player &);
|
template void FleeingMovementGenerator<Player>::_setTargetLocation(Player &);
|
||||||
template void FleeingMovementGenerator<Creature>::_setTargetLocation(Creature &);
|
template void FleeingMovementGenerator<Creature>::_setTargetLocation(Creature &);
|
||||||
template void FleeingMovementGenerator<Player>::Finalize(Player &);
|
|
||||||
template void FleeingMovementGenerator<Creature>::Finalize(Creature &);
|
|
||||||
template void FleeingMovementGenerator<Player>::Reset(Player &);
|
template void FleeingMovementGenerator<Player>::Reset(Player &);
|
||||||
template void FleeingMovementGenerator<Creature>::Reset(Creature &);
|
template void FleeingMovementGenerator<Creature>::Reset(Creature &);
|
||||||
template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32 &);
|
template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32 &);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
void
|
void
|
||||||
HomeMovementGenerator<Creature>::Initialize(Creature & owner)
|
HomeMovementGenerator<Creature>::Initialize(Creature & owner)
|
||||||
{
|
{
|
||||||
owner.RemoveUnitMovementFlag(MONSTER_MOVE_WALK);
|
owner.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
_setTargetLocation(owner);
|
_setTargetLocation(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32& time_diff
|
||||||
|
|
||||||
if (time_diff > i_travel_timer)
|
if (time_diff > i_travel_timer)
|
||||||
{
|
{
|
||||||
owner.AddUnitMovementFlag(MONSTER_MOVE_WALK);
|
owner.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
|
||||||
// restore orientation of not moving creature at returning to home
|
// restore orientation of not moving creature at returning to home
|
||||||
if(owner.GetDefaultMovementType()==IDLE_MOTION_TYPE)
|
if(owner.GetDefaultMovementType()==IDLE_MOTION_TYPE)
|
||||||
|
|
|
||||||
|
|
@ -6057,7 +6057,7 @@ bool ChatHandler::HandleComeToMeCommand(const char *args)
|
||||||
|
|
||||||
uint32 newFlags = atoi(newFlagStr);
|
uint32 newFlags = atoi(newFlagStr);
|
||||||
|
|
||||||
caster->SetUnitMovementFlags(newFlags);
|
caster->SetMonsterMoveFlags(MonsterMovementFlags(newFlags));
|
||||||
|
|
||||||
Player* pl = m_session->GetPlayer();
|
Player* pl = m_session->GetPlayer();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
|
||||||
if( GetPlayer()->isInCombat() || //...is in combat
|
if( GetPlayer()->isInCombat() || //...is in combat
|
||||||
GetPlayer()->duel || //...is in Duel
|
GetPlayer()->duel || //...is in Duel
|
||||||
//...is jumping ...is falling
|
//...is jumping ...is falling
|
||||||
GetPlayer()->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_JUMPING | MOVEMENTFLAG_FALLING))
|
GetPlayer()->m_movementInfo.HasMovementFlag(MovementFlags(MOVEMENTFLAG_JUMPING | MOVEMENTFLAG_FALLING)))
|
||||||
{
|
{
|
||||||
WorldPacket data( SMSG_LOGOUT_RESPONSE, (2+4) ) ;
|
WorldPacket data( SMSG_LOGOUT_RESPONSE, (2+4) ) ;
|
||||||
data << (uint8)0xC;
|
data << (uint8)0xC;
|
||||||
|
|
@ -1542,7 +1542,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
recv_data >> guid >> unk >> flags;
|
recv_data >> guid >> unk >> flags;
|
||||||
|
|
||||||
_player->m_movementInfo.flags = flags;
|
_player->m_movementInfo.SetMovementFlags(MovementFlags(flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)
|
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* handle special cases */
|
/* handle special cases */
|
||||||
if (movementInfo.flags & MOVEMENTFLAG_ONTRANSPORT)
|
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||||
{
|
{
|
||||||
// transports size limited
|
// transports size limited
|
||||||
// (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
|
// (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
|
||||||
|
|
@ -272,7 +272,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
||||||
plMover->HandleFall(movementInfo);
|
plMover->HandleFall(movementInfo);
|
||||||
|
|
||||||
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
|
if (plMover && (movementInfo.HasMovementFlag(MOVEMENTFLAG_SWIMMING) != plMover->IsInWater()))
|
||||||
{
|
{
|
||||||
// now client not include swimming flag in case jumping under water
|
// now client not include swimming flag in case jumping under water
|
||||||
plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
|
plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
|
||||||
|
|
@ -331,7 +331,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
if(Map *map = mover->GetMap())
|
if(Map *map = mover->GetMap())
|
||||||
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||||
mover->SetUnitMovementFlags(movementInfo.flags);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1511,43 +1511,6 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
|
||||||
*data << (uint8)0; // ChatTag
|
*data << (uint8)0; // ChatTag
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldObject::BuildHeartBeatMsg(WorldPacket *data) const
|
|
||||||
{
|
|
||||||
//Heartbeat message cannot be used for non-units
|
|
||||||
if (!isType(TYPEMASK_UNIT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
data->Initialize(MSG_MOVE_HEARTBEAT, 32);
|
|
||||||
data->append(GetPackGUID());
|
|
||||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
|
||||||
*data << uint16(0); // 2.3.0
|
|
||||||
*data << uint32(getMSTime()); // time
|
|
||||||
*data << m_positionX;
|
|
||||||
*data << m_positionY;
|
|
||||||
*data << m_positionZ;
|
|
||||||
*data << m_orientation;
|
|
||||||
*data << uint32(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WorldObject::BuildTeleportAckMsg(WorldPacket *data, float x, float y, float z, float ang) const
|
|
||||||
{
|
|
||||||
//TeleportAck message cannot be used for non-units
|
|
||||||
if (!isType(TYPEMASK_UNIT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
data->Initialize(MSG_MOVE_TELEPORT_ACK, 41);
|
|
||||||
data->append(GetPackGUID());
|
|
||||||
*data << uint32(0); // this value increments every time
|
|
||||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
|
||||||
*data << uint16(0); // 2.3.0
|
|
||||||
*data << uint32(getMSTime()); // time
|
|
||||||
*data << x;
|
|
||||||
*data << y;
|
|
||||||
*data << z;
|
|
||||||
*data << ang;
|
|
||||||
*data << uint32(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WorldObject::SendMessageToSet(WorldPacket *data, bool /*bToSelf*/)
|
void WorldObject::SendMessageToSet(WorldPacket *data, bool /*bToSelf*/)
|
||||||
{
|
{
|
||||||
//if object is in world, map for it already created!
|
//if object is in world, map for it already created!
|
||||||
|
|
|
||||||
|
|
@ -449,8 +449,6 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
||||||
|
|
||||||
virtual void SendMessageToSet(WorldPacket *data, bool self);
|
virtual void SendMessageToSet(WorldPacket *data, bool self);
|
||||||
virtual void SendMessageToSetInRange(WorldPacket *data, float dist, bool self);
|
virtual void SendMessageToSetInRange(WorldPacket *data, float dist, bool self);
|
||||||
void BuildHeartBeatMsg( WorldPacket *data ) const;
|
|
||||||
void BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang) const;
|
|
||||||
|
|
||||||
void MonsterSay(const char* text, uint32 language, uint64 TargetGuid);
|
void MonsterSay(const char* text, uint32 language, uint64 TargetGuid);
|
||||||
void MonsterYell(const char* text, uint32 language, uint64 TargetGuid);
|
void MonsterYell(const char* text, uint32 language, uint64 TargetGuid);
|
||||||
|
|
|
||||||
|
|
@ -449,9 +449,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
|
||||||
m_summon_y = 0.0f;
|
m_summon_y = 0.0f;
|
||||||
m_summon_z = 0.0f;
|
m_summon_z = 0.0f;
|
||||||
|
|
||||||
//Default movement to run mode
|
|
||||||
m_unit_movement_flags = 0;
|
|
||||||
|
|
||||||
m_mover = this;
|
m_mover = this;
|
||||||
|
|
||||||
m_miniPet = 0;
|
m_miniPet = 0;
|
||||||
|
|
@ -1623,7 +1620,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
||||||
m_movementInfo.flags = 0;
|
m_movementInfo.SetMovementFlags(MOVEMENTFLAG_NONE);
|
||||||
|
|
||||||
if ((GetMapId() == mapid) && (!m_transport))
|
if ((GetMapId() == mapid) && (!m_transport))
|
||||||
{
|
{
|
||||||
|
|
@ -17970,7 +17967,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||||
|
|
||||||
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
||||||
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
|
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
|
||||||
m_movementInfo.flags |= MOVEMENTFLAG_FLYING2;
|
m_movementInfo.AddMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
|
|
||||||
m_mover = this;
|
m_mover = this;
|
||||||
}
|
}
|
||||||
|
|
@ -20321,3 +20318,18 @@ void Player::SendClearCooldown( uint32 spell_id, Unit* target )
|
||||||
data << uint64(target->GetGUID());
|
data << uint64(target->GetGUID());
|
||||||
SendDirectMessage(&data);
|
SendDirectMessage(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang ) const
|
||||||
|
{
|
||||||
|
data->Initialize(MSG_MOVE_TELEPORT_ACK, 41);
|
||||||
|
data->append(GetPackGUID());
|
||||||
|
*data << uint32(0); // this value increments every time
|
||||||
|
*data << uint32(m_movementInfo.GetMovementFlags()); // movement flags
|
||||||
|
*data << uint16(0); // 2.3.0
|
||||||
|
*data << uint32(getMSTime()); // time
|
||||||
|
*data << x;
|
||||||
|
*data << y;
|
||||||
|
*data << z;
|
||||||
|
*data << ang;
|
||||||
|
*data << uint32(0);
|
||||||
|
}
|
||||||
|
|
@ -687,10 +687,42 @@ enum InstanceResetWarningType
|
||||||
RAID_INSTANCE_EXPIRED = 5
|
RAID_INSTANCE_EXPIRED = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// used in most movement packets (send and received)
|
||||||
|
enum MovementFlags
|
||||||
|
{
|
||||||
|
MOVEMENTFLAG_NONE = 0x00000000,
|
||||||
|
MOVEMENTFLAG_FORWARD = 0x00000001,
|
||||||
|
MOVEMENTFLAG_BACKWARD = 0x00000002,
|
||||||
|
MOVEMENTFLAG_STRAFE_LEFT = 0x00000004,
|
||||||
|
MOVEMENTFLAG_STRAFE_RIGHT = 0x00000008,
|
||||||
|
MOVEMENTFLAG_LEFT = 0x00000010,
|
||||||
|
MOVEMENTFLAG_RIGHT = 0x00000020,
|
||||||
|
MOVEMENTFLAG_PITCH_UP = 0x00000040,
|
||||||
|
MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
|
||||||
|
MOVEMENTFLAG_WALK_MODE = 0x00000100, // Walking
|
||||||
|
MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
|
||||||
|
MOVEMENTFLAG_LEVITATING = 0x00000400,
|
||||||
|
MOVEMENTFLAG_FLY_UNK1 = 0x00000800,
|
||||||
|
MOVEMENTFLAG_JUMPING = 0x00001000,
|
||||||
|
MOVEMENTFLAG_UNK4 = 0x00002000,
|
||||||
|
MOVEMENTFLAG_FALLING = 0x00004000,
|
||||||
|
// 0x8000, 0x10000, 0x20000, 0x40000, 0x80000, 0x100000
|
||||||
|
MOVEMENTFLAG_SWIMMING = 0x00200000, // appears with fly flag also
|
||||||
|
MOVEMENTFLAG_FLY_UP = 0x00400000,
|
||||||
|
MOVEMENTFLAG_CAN_FLY = 0x00800000,
|
||||||
|
MOVEMENTFLAG_FLYING = 0x01000000,
|
||||||
|
MOVEMENTFLAG_FLYING2 = 0x02000000, // Actual flying mode
|
||||||
|
MOVEMENTFLAG_SPLINE = 0x04000000, // used for flight paths
|
||||||
|
MOVEMENTFLAG_SPLINE2 = 0x08000000, // used for flight paths
|
||||||
|
MOVEMENTFLAG_WATERWALKING = 0x10000000, // prevent unit from falling through water
|
||||||
|
MOVEMENTFLAG_SAFE_FALL = 0x20000000, // active rogue safe fall spell (passive)
|
||||||
|
MOVEMENTFLAG_UNK3 = 0x40000000
|
||||||
|
};
|
||||||
|
|
||||||
struct MovementInfo
|
struct MovementInfo
|
||||||
{
|
{
|
||||||
// common
|
// common
|
||||||
uint32 flags;
|
uint32 flags; // see enum MovementFlags
|
||||||
uint16 unk1;
|
uint16 unk1;
|
||||||
uint32 time;
|
uint32 time;
|
||||||
float x, y, z, o;
|
float x, y, z, o;
|
||||||
|
|
@ -710,16 +742,18 @@ struct MovementInfo
|
||||||
|
|
||||||
MovementInfo()
|
MovementInfo()
|
||||||
{
|
{
|
||||||
flags = 0;
|
flags = MOVEMENTFLAG_NONE;
|
||||||
time = t_time = fallTime = 0;
|
time = t_time = fallTime = 0;
|
||||||
unk1 = 0;
|
unk1 = 0;
|
||||||
x = y = z = o = t_x = t_y = t_z = t_o = s_pitch = j_unk = j_sinAngle = j_cosAngle = j_xyspeed = u_unk1 = 0.0f;
|
x = y = z = o = t_x = t_y = t_z = t_o = s_pitch = j_unk = j_sinAngle = j_cosAngle = j_xyspeed = u_unk1 = 0.0f;
|
||||||
t_guid = 0;
|
t_guid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetMovementFlags() { return flags; }
|
void AddMovementFlag(MovementFlags f) { flags |= f; }
|
||||||
void AddMovementFlag(uint32 flag) { flags |= flag; }
|
void RemoveMovementFlag(MovementFlags f) { flags &= ~f; }
|
||||||
bool HasMovementFlag(uint32 flag) const { return flags & flag; }
|
bool HasMovementFlag(MovementFlags f) const { return flags & f; }
|
||||||
|
MovementFlags GetMovementFlags() const { return MovementFlags(flags); }
|
||||||
|
void SetMovementFlags(MovementFlags f) { flags = f; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// flags that use in movement check for example at spell casting
|
// flags that use in movement check for example at spell casting
|
||||||
|
|
@ -1945,6 +1979,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
}
|
}
|
||||||
void HandleFall(MovementInfo const& movementInfo);
|
void HandleFall(MovementInfo const& movementInfo);
|
||||||
|
|
||||||
|
void BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang) const;
|
||||||
|
|
||||||
bool isMoving() const { return m_movementInfo.HasMovementFlag(movementFlagsMask); }
|
bool isMoving() const { return m_movementInfo.HasMovementFlag(movementFlagsMask); }
|
||||||
bool isMovingOrTurning() const { return m_movementInfo.HasMovementFlag(movementOrTurningFlagsMask); }
|
bool isMovingOrTurning() const { return m_movementInfo.HasMovementFlag(movementOrTurningFlagsMask); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ void PointMovementGenerator<T>::Initialize(T &unit)
|
||||||
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z);
|
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z);
|
||||||
|
|
||||||
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
|
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
|
||||||
unit.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
((Creature&)unit).AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,13 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
||||||
if (is_air_ok)
|
if (is_air_ok)
|
||||||
{
|
{
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
creature.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
}
|
}
|
||||||
//else if (is_water_ok) // Swimming mode to be done with more than this check
|
//else if (is_water_ok) // Swimming mode to be done with more than this check
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i_nextMoveTime.Reset(urand(500+i_destinationHolder.GetTotalTravelTime(),5000+i_destinationHolder.GetTotalTravelTime()));
|
i_nextMoveTime.Reset(urand(500+i_destinationHolder.GetTotalTravelTime(),5000+i_destinationHolder.GetTotalTravelTime()));
|
||||||
creature.SetUnitMovementFlags(MONSTER_MOVE_WALK);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,9 +108,13 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
|
|
||||||
|
else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
|
||||||
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
else
|
else
|
||||||
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MONSTER_MOVE_WALK : MONSTER_MOVE_NONE);
|
creature.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); // run with 1/RUNNING_CHANCE_RANDOMMV chance
|
||||||
|
|
||||||
_setRandomLocation(creature);
|
_setRandomLocation(creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,14 +151,17 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
|
||||||
if(i_nextMoveTime.Passed())
|
if(i_nextMoveTime.Passed())
|
||||||
{
|
{
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
else
|
else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
|
||||||
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MONSTER_MOVE_WALK : MONSTER_MOVE_NONE);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
else // run with 1/RUNNING_CHANCE_RANDOMMV chance
|
||||||
|
creature.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
|
||||||
_setRandomLocation(creature);
|
_setRandomLocation(creature);
|
||||||
}
|
}
|
||||||
else if(creature.isPet() && creature.GetOwner() && !creature.IsWithinDist(creature.GetOwner(),PET_FOLLOW_DIST+2.5f))
|
else if(creature.isPet() && creature.GetOwner() && !creature.IsWithinDist(creature.GetOwner(),PET_FOLLOW_DIST+2.5f))
|
||||||
{
|
{
|
||||||
creature.SetUnitMovementFlags(MONSTER_MOVE_WALK);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
_setRandomLocation(creature);
|
_setRandomLocation(creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2579,7 +2579,7 @@ void Spell::update(uint32 difftime)
|
||||||
// check if the player caster has moved before the spell finished
|
// check if the player caster has moved before the spell finished
|
||||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER && m_timer != 0) &&
|
if ((m_caster->GetTypeId() == TYPEID_PLAYER && m_timer != 0) &&
|
||||||
(m_castPositionX != m_caster->GetPositionX() || m_castPositionY != m_caster->GetPositionY() || m_castPositionZ != m_caster->GetPositionZ()) &&
|
(m_castPositionX != m_caster->GetPositionX() || m_castPositionY != m_caster->GetPositionY() || m_castPositionZ != m_caster->GetPositionZ()) &&
|
||||||
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)))
|
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING)))
|
||||||
{
|
{
|
||||||
// always cancel for channeled spells
|
// always cancel for channeled spells
|
||||||
if( m_spellState == SPELL_STATE_CASTING )
|
if( m_spellState == SPELL_STATE_CASTING )
|
||||||
|
|
@ -2611,7 +2611,7 @@ void Spell::update(uint32 difftime)
|
||||||
if( m_caster->GetTypeId() == TYPEID_PLAYER )
|
if( m_caster->GetTypeId() == TYPEID_PLAYER )
|
||||||
{
|
{
|
||||||
// check if player has jumped before the channeling finished
|
// check if player has jumped before the channeling finished
|
||||||
if(m_caster->HasUnitMovementFlag(MOVEMENTFLAG_JUMPING))
|
if(((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_JUMPING))
|
||||||
cancel();
|
cancel();
|
||||||
|
|
||||||
// check for incapacitating player states
|
// check for incapacitating player states
|
||||||
|
|
|
||||||
|
|
@ -3174,7 +3174,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
pet->AttackStop();
|
pet->AttackStop();
|
||||||
pet->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
pet->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||||
pet->SetUnitMovementFlags(MONSTER_MOVE_WALK);
|
pet->AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3415,10 +3415,10 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
|
||||||
|
|
||||||
// Creature specific
|
// Creature specific
|
||||||
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
if(m_target->GetTypeId() != TYPEID_PLAYER)
|
||||||
((Creature*)m_target)->StopMoving();
|
m_target->StopMoving();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
((Player*)m_target)->m_movementInfo.flags = 0; // Clear movement flags
|
((Player*)m_target)->m_movementInfo.SetMovementFlags(MOVEMENTFLAG_NONE);
|
||||||
m_target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client
|
m_target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3702,10 +3702,10 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
|
||||||
m_target->SendMessageToSet(&data, true);
|
m_target->SendMessageToSet(&data, true);
|
||||||
|
|
||||||
//Clear unit movement flags
|
//Clear unit movement flags
|
||||||
((Player*)m_target)->m_movementInfo.flags = 0;
|
((Player*)m_target)->m_movementInfo.SetMovementFlags(MOVEMENTFLAG_NONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
((Creature *)m_target)->StopMoving();
|
m_target->StopMoving();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -85,24 +85,29 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||||
i_destinationHolder.SetDestination(traveller, x, y, z);
|
i_destinationHolder.SetDestination(traveller, x, y, z);
|
||||||
owner.addUnitState(UNIT_STAT_CHASE);
|
owner.addUnitState(UNIT_STAT_CHASE);
|
||||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
owner.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
((Creature&)owner).AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<>
|
||||||
void
|
void TargetedMovementGenerator<Creature>::Initialize(Creature &owner)
|
||||||
TargetedMovementGenerator<T>::Initialize(T &owner)
|
|
||||||
{
|
{
|
||||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->HasSearchedAssistance())
|
if (owner.HasSearchedAssistance())
|
||||||
owner.AddUnitMovementFlag(MONSTER_MOVE_WALK);
|
owner.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
else
|
else
|
||||||
owner.RemoveUnitMovementFlag(MONSTER_MOVE_WALK);
|
owner.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||||
|
|
||||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
if (((Creature*)&owner)->canFly())
|
||||||
owner.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
owner.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
|
|
||||||
_setTargetLocation(owner);
|
_setTargetLocation(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void TargetedMovementGenerator<Player>::Initialize(Player &owner)
|
||||||
|
{
|
||||||
|
_setTargetLocation(owner);
|
||||||
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void
|
void
|
||||||
TargetedMovementGenerator<T>::Finalize(T &owner)
|
TargetedMovementGenerator<T>::Finalize(T &owner)
|
||||||
|
|
@ -150,7 +155,7 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
||||||
{
|
{
|
||||||
owner.addUnitState(UNIT_STAT_CHASE);
|
owner.addUnitState(UNIT_STAT_CHASE);
|
||||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
owner.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
((Creature&)owner).AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
|
|
||||||
i_destinationHolder.StartTravel(traveller);
|
i_destinationHolder.StartTravel(traveller);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -199,8 +204,6 @@ TargetedMovementGenerator<T>::GetTarget() const
|
||||||
|
|
||||||
template void TargetedMovementGenerator<Player>::_setTargetLocation(Player &);
|
template void TargetedMovementGenerator<Player>::_setTargetLocation(Player &);
|
||||||
template void TargetedMovementGenerator<Creature>::_setTargetLocation(Creature &);
|
template void TargetedMovementGenerator<Creature>::_setTargetLocation(Creature &);
|
||||||
template void TargetedMovementGenerator<Player>::Initialize(Player &);
|
|
||||||
template void TargetedMovementGenerator<Creature>::Initialize(Creature &);
|
|
||||||
template void TargetedMovementGenerator<Player>::Finalize(Player &);
|
template void TargetedMovementGenerator<Player>::Finalize(Player &);
|
||||||
template void TargetedMovementGenerator<Creature>::Finalize(Creature &);
|
template void TargetedMovementGenerator<Creature>::Finalize(Creature &);
|
||||||
template void TargetedMovementGenerator<Player>::Reset(Player &);
|
template void TargetedMovementGenerator<Player>::Reset(Player &);
|
||||||
|
|
|
||||||
|
|
@ -71,9 +71,9 @@ inline uint32 Traveller<T>::GetTotalTrevelTimeTo(float x, float y, float z)
|
||||||
template<>
|
template<>
|
||||||
inline float Traveller<Creature>::Speed()
|
inline float Traveller<Creature>::Speed()
|
||||||
{
|
{
|
||||||
if(i_traveller.HasUnitMovementFlag(MONSTER_MOVE_WALK))
|
if(i_traveller.HasMonsterMoveFlag(MONSTER_MOVE_WALK))
|
||||||
return i_traveller.GetSpeed(MOVE_WALK);
|
return i_traveller.GetSpeed(MOVE_WALK);
|
||||||
else if(i_traveller.HasUnitMovementFlag(MONSTER_MOVE_FLY))
|
else if(i_traveller.HasMonsterMoveFlag(MONSTER_MOVE_FLY))
|
||||||
return i_traveller.GetSpeed(MOVE_FLIGHT);
|
return i_traveller.GetSpeed(MOVE_FLIGHT);
|
||||||
else
|
else
|
||||||
return i_traveller.GetSpeed(MOVE_RUN);
|
return i_traveller.GetSpeed(MOVE_RUN);
|
||||||
|
|
@ -102,7 +102,7 @@ inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z
|
||||||
template<>
|
template<>
|
||||||
inline void Traveller<Creature>::MoveTo(float x, float y, float z, uint32 t)
|
inline void Traveller<Creature>::MoveTo(float x, float y, float z, uint32 t)
|
||||||
{
|
{
|
||||||
i_traveller.AI_SendMoveToPacket(x, y, z, t, i_traveller.GetUnitMovementFlags(), 0);
|
i_traveller.AI_SendMoveToPacket(x, y, z, t, i_traveller.GetMonsterMoveFlags(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// specialization for players
|
// specialization for players
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ Unit::Unit()
|
||||||
|
|
||||||
m_removedAuras = 0;
|
m_removedAuras = 0;
|
||||||
m_charmInfo = NULL;
|
m_charmInfo = NULL;
|
||||||
m_unit_movement_flags = 0;
|
|
||||||
|
|
||||||
// remove aurastates allowing special moves
|
// remove aurastates allowing special moves
|
||||||
for(int i=0; i < MAX_REACTIVE; ++i)
|
for(int i=0; i < MAX_REACTIVE; ++i)
|
||||||
|
|
@ -229,33 +228,7 @@ bool Unit::haveOffhandWeapon() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SendMonsterMoveWithSpeedToCurrentDestination(Player* player)
|
void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, MonsterMovementFlags flags, uint32 Time, Player* player)
|
||||||
{
|
|
||||||
float x, y, z;
|
|
||||||
if(GetMotionMaster()->GetDestination(x, y, z))
|
|
||||||
SendMonsterMoveWithSpeed(x, y, z, 0, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unit::SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime, Player* player)
|
|
||||||
{
|
|
||||||
if (!transitTime)
|
|
||||||
{
|
|
||||||
if(GetTypeId()==TYPEID_PLAYER)
|
|
||||||
{
|
|
||||||
Traveller<Player> traveller(*(Player*)this);
|
|
||||||
transitTime = traveller.GetTotalTrevelTimeTo(x,y,z);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Traveller<Creature> traveller(*(Creature*)this);
|
|
||||||
transitTime = traveller.GetTotalTrevelTimeTo(x,y,z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//float orientation = (float)atan2((double)dy, (double)dx);
|
|
||||||
SendMonsterMove(x, y, z, 0, GetUnitMovementFlags(), transitTime, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player)
|
|
||||||
{
|
{
|
||||||
float moveTime = Time;
|
float moveTime = Time;
|
||||||
|
|
||||||
|
|
@ -286,9 +259,9 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 ty
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
data << uint32(MovementFlags);
|
data << uint32(flags);
|
||||||
|
|
||||||
if(MovementFlags & MONSTER_MOVE_WALK)
|
if(flags & MONSTER_MOVE_WALK)
|
||||||
moveTime *= 1.05f;
|
moveTime *= 1.05f;
|
||||||
|
|
||||||
data << uint32(moveTime); // Time in between points
|
data << uint32(moveTime); // Time in between points
|
||||||
|
|
@ -301,7 +274,7 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 ty
|
||||||
SendMessageToSet( &data, true );
|
SendMessageToSet( &data, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end, uint32 MovementFlags)
|
void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end, MonsterMovementFlags flags)
|
||||||
{
|
{
|
||||||
uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32);
|
uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32);
|
||||||
|
|
||||||
|
|
@ -314,14 +287,32 @@ void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end, uin
|
||||||
data << GetPositionY();
|
data << GetPositionY();
|
||||||
data << GetPositionZ();
|
data << GetPositionZ();
|
||||||
data << uint32(getMSTime());
|
data << uint32(getMSTime());
|
||||||
data << uint8( 0 );
|
data << uint8(0);
|
||||||
data << uint32( MovementFlags );
|
data << uint32(flags);
|
||||||
data << uint32( traveltime );
|
data << uint32(traveltime);
|
||||||
data << uint32( pathSize );
|
data << uint32(pathSize);
|
||||||
data.append( (char*)path.GetNodes(start), pathSize * 4 * 3 );
|
data.append((char*)path.GetNodes(start), pathSize * 4 * 3);
|
||||||
SendMessageToSet(&data, true);
|
SendMessageToSet(&data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Unit::BuildHeartBeatMsg(WorldPacket *data) const
|
||||||
|
{
|
||||||
|
MovementFlags move_flags = GetTypeId()==TYPEID_PLAYER
|
||||||
|
? ((Player const*)this)->m_movementInfo.GetMovementFlags()
|
||||||
|
: MOVEMENTFLAG_NONE;
|
||||||
|
|
||||||
|
data->Initialize(MSG_MOVE_HEARTBEAT, 32);
|
||||||
|
data->append(GetPackGUID());
|
||||||
|
*data << uint32(move_flags); // movement flags
|
||||||
|
*data << uint16(0); // 2.3.0
|
||||||
|
*data << uint32(getMSTime()); // time
|
||||||
|
*data << float(GetPositionX());
|
||||||
|
*data << float(GetPositionY());
|
||||||
|
*data << float(GetPositionZ());
|
||||||
|
*data << float(GetOrientation());
|
||||||
|
*data << uint32(0);
|
||||||
|
}
|
||||||
|
|
||||||
void Unit::resetAttackTimer(WeaponAttackType type)
|
void Unit::resetAttackTimer(WeaponAttackType type)
|
||||||
{
|
{
|
||||||
m_attackTimer[type] = uint32(GetAttackTime(type) * m_modAttackSpeedPct[type]);
|
m_attackTimer[type] = uint32(GetAttackTime(type) * m_modAttackSpeedPct[type]);
|
||||||
|
|
@ -11726,8 +11717,6 @@ void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool ca
|
||||||
GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation);
|
GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation);
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
// Work strange for many spells: triggered active mover set for targeted player to creature
|
|
||||||
//BuildTeleportAckMsg(&data, x, y, z, orientation);
|
|
||||||
BuildHeartBeatMsg(&data);
|
BuildHeartBeatMsg(&data);
|
||||||
SendMessageToSet(&data, false);
|
SendMessageToSet(&data, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -566,37 +566,7 @@ enum NPCFlags
|
||||||
UNIT_NPC_FLAG_GUARD = 0x10000000, // custom flag for guards
|
UNIT_NPC_FLAG_GUARD = 0x10000000, // custom flag for guards
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MovementFlags
|
// used in SMSG_MONSTER_MOVE
|
||||||
{
|
|
||||||
MOVEMENTFLAG_NONE = 0x00000000,
|
|
||||||
MOVEMENTFLAG_FORWARD = 0x00000001,
|
|
||||||
MOVEMENTFLAG_BACKWARD = 0x00000002,
|
|
||||||
MOVEMENTFLAG_STRAFE_LEFT = 0x00000004,
|
|
||||||
MOVEMENTFLAG_STRAFE_RIGHT = 0x00000008,
|
|
||||||
MOVEMENTFLAG_LEFT = 0x00000010,
|
|
||||||
MOVEMENTFLAG_RIGHT = 0x00000020,
|
|
||||||
MOVEMENTFLAG_PITCH_UP = 0x00000040,
|
|
||||||
MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
|
|
||||||
MOVEMENTFLAG_WALK_MODE = 0x00000100, // Walking
|
|
||||||
MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
|
|
||||||
MOVEMENTFLAG_LEVITATING = 0x00000400,
|
|
||||||
MOVEMENTFLAG_FLY_UNK1 = 0x00000800,
|
|
||||||
MOVEMENTFLAG_JUMPING = 0x00001000,
|
|
||||||
MOVEMENTFLAG_UNK4 = 0x00002000,
|
|
||||||
MOVEMENTFLAG_FALLING = 0x00004000,
|
|
||||||
// 0x8000, 0x10000, 0x20000, 0x40000, 0x80000, 0x100000
|
|
||||||
MOVEMENTFLAG_SWIMMING = 0x00200000, // appears with fly flag also
|
|
||||||
MOVEMENTFLAG_FLY_UP = 0x00400000,
|
|
||||||
MOVEMENTFLAG_CAN_FLY = 0x00800000,
|
|
||||||
MOVEMENTFLAG_FLYING = 0x01000000,
|
|
||||||
MOVEMENTFLAG_FLYING2 = 0x02000000, // Actual flying mode
|
|
||||||
MOVEMENTFLAG_SPLINE = 0x04000000, // used for flight paths
|
|
||||||
MOVEMENTFLAG_SPLINE2 = 0x08000000, // used for flight paths
|
|
||||||
MOVEMENTFLAG_WATERWALKING = 0x10000000, // prevent unit from falling through water
|
|
||||||
MOVEMENTFLAG_SAFE_FALL = 0x20000000, // active rogue safe fall spell (passive)
|
|
||||||
MOVEMENTFLAG_UNK3 = 0x40000000
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MonsterMovementFlags
|
enum MonsterMovementFlags
|
||||||
{
|
{
|
||||||
MONSTER_MOVE_NONE = 0x00000000,
|
MONSTER_MOVE_NONE = 0x00000000,
|
||||||
|
|
@ -1143,10 +1113,10 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
|
|
||||||
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
|
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
|
||||||
|
|
||||||
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL);
|
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, MonsterMovementFlags flags, uint32 Time, Player* player = NULL);
|
||||||
void SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end, uint32 MovementFlags);
|
void SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end, MonsterMovementFlags flags);
|
||||||
void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL);
|
|
||||||
void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL);
|
void BuildHeartBeatMsg( WorldPacket *data ) const;
|
||||||
|
|
||||||
virtual void MoveOutOfRange(Player &) { };
|
virtual void MoveOutOfRange(Player &) { };
|
||||||
|
|
||||||
|
|
@ -1474,16 +1444,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
|
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
|
||||||
void StopMoving();
|
void StopMoving();
|
||||||
|
|
||||||
void AddUnitMovementFlag(uint32 f) { m_unit_movement_flags |= f; }
|
|
||||||
void RemoveUnitMovementFlag(uint32 f)
|
|
||||||
{
|
|
||||||
uint32 oldval = m_unit_movement_flags;
|
|
||||||
m_unit_movement_flags = oldval & ~f;
|
|
||||||
}
|
|
||||||
uint32 HasUnitMovementFlag(uint32 f) const { return m_unit_movement_flags & f; }
|
|
||||||
uint32 GetUnitMovementFlags() const { return m_unit_movement_flags; }
|
|
||||||
void SetUnitMovementFlags(uint32 f) { m_unit_movement_flags = f; }
|
|
||||||
|
|
||||||
void SetFeared(bool apply, uint64 casterGUID = 0, uint32 spellID = 0, uint32 time = 0);
|
void SetFeared(bool apply, uint64 casterGUID = 0, uint32 spellID = 0, uint32 time = 0);
|
||||||
void SetConfused(bool apply, uint64 casterGUID = 0, uint32 spellID = 0);
|
void SetConfused(bool apply, uint64 casterGUID = 0, uint32 spellID = 0);
|
||||||
|
|
||||||
|
|
@ -1558,7 +1518,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
virtual SpellSchoolMask GetMeleeDamageSchoolMask() const;
|
virtual SpellSchoolMask GetMeleeDamageSchoolMask() const;
|
||||||
|
|
||||||
MotionMaster i_motionMaster;
|
MotionMaster i_motionMaster;
|
||||||
uint32 m_unit_movement_flags;
|
|
||||||
|
|
||||||
uint32 m_reactiveTimer[MAX_REACTIVE];
|
uint32 m_reactiveTimer[MAX_REACTIVE];
|
||||||
uint32 m_regenTimer;
|
uint32 m_regenTimer;
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
||||||
// Now we re-set destination to same node and start travel
|
// Now we re-set destination to same node and start travel
|
||||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
const WaypointNode &node = i_path->at(i_currentNode);
|
const WaypointNode &node = i_path->at(i_currentNode);
|
||||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
|
|
@ -173,7 +173,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
||||||
{
|
{
|
||||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.AddUnitMovementFlag(MONSTER_MOVE_FLY);
|
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||||
const WaypointNode &node = i_path->at(i_currentNode);
|
const WaypointNode &node = i_path->at(i_currentNode);
|
||||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
|
|
|
||||||
|
|
@ -1821,8 +1821,8 @@ void World::ScriptsProcess()
|
||||||
sLog.outError("SCRIPT_COMMAND_MOVE_TO call for non-creature (TypeId: %u), skipping.",source->GetTypeId());
|
sLog.outError("SCRIPT_COMMAND_MOVE_TO call for non-creature (TypeId: %u), skipping.",source->GetTypeId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
((Unit *)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, step.script->datalong2 );
|
((Creature*)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, step.script->datalong2 );
|
||||||
((Unit *)source)->GetMap()->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0);
|
((Creature*)source)->GetMap()->CreatureRelocation(((Creature*)source), step.script->x, step.script->y, step.script->z, 0);
|
||||||
break;
|
break;
|
||||||
case SCRIPT_COMMAND_FLAG_SET:
|
case SCRIPT_COMMAND_FLAG_SET:
|
||||||
if(!source)
|
if(!source)
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||||
data >> mi->z;
|
data >> mi->z;
|
||||||
data >> mi->o;
|
data >> mi->o;
|
||||||
|
|
||||||
if(mi->flags & MOVEMENTFLAG_ONTRANSPORT)
|
if(mi->HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||||
{
|
{
|
||||||
if(!data.readPackGUID(mi->t_guid))
|
if(!data.readPackGUID(mi->t_guid))
|
||||||
return;
|
return;
|
||||||
|
|
@ -649,7 +649,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||||
data >> mi->t_seat;
|
data >> mi->t_seat;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((mi->flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2)) || (mi->unk1 & 0x20))
|
if((mi->HasMovementFlag(MovementFlags(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2))) || (mi->unk1 & 0x20))
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
||||||
data >> mi->s_pitch;
|
data >> mi->s_pitch;
|
||||||
|
|
@ -658,7 +658,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||||
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
||||||
data >> mi->fallTime;
|
data >> mi->fallTime;
|
||||||
|
|
||||||
if(mi->flags & MOVEMENTFLAG_JUMPING)
|
if(mi->HasMovementFlag(MOVEMENTFLAG_JUMPING))
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(data, data.rpos()+4+4+4+4);
|
CHECK_PACKET_SIZE(data, data.rpos()+4+4+4+4);
|
||||||
data >> mi->j_unk;
|
data >> mi->j_unk;
|
||||||
|
|
@ -667,7 +667,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
|
||||||
data >> mi->j_xyspeed;
|
data >> mi->j_xyspeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mi->flags & MOVEMENTFLAG_SPLINE)
|
if(mi->HasMovementFlag(MOVEMENTFLAG_SPLINE))
|
||||||
{
|
{
|
||||||
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
CHECK_PACKET_SIZE(data, data.rpos()+4);
|
||||||
data >> mi->u_unk1;
|
data >> mi->u_unk1;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8076"
|
#define REVISION_NR "8077"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue