diff --git a/zone/mob.cpp b/zone/mob.cpp index d95b3bea7..a8bed6417 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -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()) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 18618e262..dd20d605c 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -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()) { diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index d1a447a5e..f75743a7d 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -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();