mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 02:11:30 +00:00
Move the extra appearance packet guard to SetAppearance
This commit is contained in:
parent
79a87fac1d
commit
553b7c9f8c
@ -2027,6 +2027,8 @@ const int32& Mob::SetMana(int32 amount)
|
||||
|
||||
|
||||
void Mob::SetAppearance(EmuAppearance app, bool iIgnoreSelf) {
|
||||
if (_appearance == app)
|
||||
return;
|
||||
_appearance = app;
|
||||
SendAppearancePacket(AT_Anim, GetAppearanceValue(app), true, iIgnoreSelf);
|
||||
if (this->IsClient() && this->IsAIControlled())
|
||||
|
||||
@ -1676,8 +1676,7 @@ void NPC::AI_DoMovement() {
|
||||
Log.Out(Logs::Detail, Logs::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
|
||||
if (cur_wp_pause != 0) {
|
||||
SetWaypointPause();
|
||||
if (GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
SetAppearance(eaStanding, false);
|
||||
SetMoving(false);
|
||||
if (m_CurrentWayPoint.w >= 0.0) {
|
||||
SetHeading(m_CurrentWayPoint.w);
|
||||
@ -1728,8 +1727,7 @@ void NPC::AI_DoMovement() {
|
||||
SetGrid( 0 - GetGrid()); // revert to AI control
|
||||
Log.Out(Logs::Detail, Logs::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid());
|
||||
|
||||
if(GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
SetAppearance(eaStanding, false);
|
||||
|
||||
CalculateNewWaypoint();
|
||||
}
|
||||
@ -1817,8 +1815,7 @@ void NPC::AI_SetupNextWaypoint() {
|
||||
cur_wp = 0;
|
||||
}
|
||||
|
||||
if (GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
SetAppearance(eaStanding, false);
|
||||
|
||||
entity_list.OpenDoorsNear(CastToNPC());
|
||||
|
||||
@ -1845,10 +1842,7 @@ void Mob::AI_Event_Engaged(Mob* attacker, bool iYellForHelp) {
|
||||
if (!IsAIControlled())
|
||||
return;
|
||||
|
||||
if(GetAppearance() != eaStanding)
|
||||
{
|
||||
SetAppearance(eaStanding);
|
||||
}
|
||||
SetAppearance(eaStanding);
|
||||
|
||||
if (iYellForHelp) {
|
||||
if(IsPet()) {
|
||||
|
||||
@ -712,8 +712,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
// force an update now
|
||||
move_tic_count = RuleI(Zone, NPCPositonUpdateTicCount);
|
||||
SendPosUpdate();
|
||||
if (GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
SetAppearance(eaStanding, false);
|
||||
}
|
||||
pLastChange = Timer::GetCurrentTime();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user