diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index f105cb938..4a51b6ada 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -557,6 +557,8 @@ void Creature::DoFleeToGetAssistance() cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius); SetNoSearchAssistance(true); + UpdateSpeed(MOVE_RUN, false); + if(!pCreature) SetFeared(true, getVictim()->GetGUID(), 0 ,sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY)); else @@ -1242,7 +1244,12 @@ void Creature::setDeathState(DeathState s) if (canFly() && FallGround()) return; - SetNoSearchAssistance(false); + if (HasSearchedAssistance()) + { + SetNoSearchAssistance(false); + UpdateSpeed(MOVE_RUN, false); + } + Unit::setDeathState(CORPSE); } if (s == JUST_ALIVED) diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp index d14a9d1d5..0c80e09bf 100644 --- a/src/game/TargetedMovementGenerator.cpp +++ b/src/game/TargetedMovementGenerator.cpp @@ -91,9 +91,7 @@ TargetedMovementGenerator::_setTargetLocation(T &owner) template<> void TargetedMovementGenerator::Initialize(Creature &owner) { - if (owner.HasSearchedAssistance()) - owner.AddMonsterMoveFlag(MONSTER_MOVE_WALK); - else if (owner.isInCombat()) + if (owner.isInCombat()) owner.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); if (((Creature*)&owner)->canFly()) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6757b124b..b81e8dba5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8174,7 +8174,12 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/) if(!targetSwitch && GetTypeId()==TYPEID_UNIT ) { ((Creature*)this)->SetNoCallAssistance(false); - ((Creature*)this)->SetNoSearchAssistance(false); + + if (((Creature*)this)->HasSearchedAssistance()) + { + ((Creature*)this)->SetNoSearchAssistance(false); + UpdateSpeed(MOVE_RUN, false); + } } SendMeleeAttackStop(victim); @@ -10464,6 +10469,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) break; } + // for creature case, we check explicit if mob searched for assistance + if (GetTypeId() == TYPEID_UNIT) + { + if (((Creature*)this)->HasSearchedAssistance()) + speed *= 0.66f; // best guessed value, so this will be 33% reduction. Based off initial speed, mob can then "run", "walk fast" or "walk". + } + // Apply strongest slow aura mod to speed int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); if (slow) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0c5b7ec8d..a3ea105e0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9164" + #define REVISION_NR "9165" #endif // __REVISION_NR_H__