aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-01-16 19:35:30 +0300
committern0n4m3 <none@none>2010-01-16 19:35:30 +0300
commitc9a3698a1130fc4b150ff0574da043e38f61bc99 (patch)
tree0d657a11d9c41387f413c330d7c5127bdf7a11f0 /src/game/Creature.cpp
parentec10853f22694f322a62cc530d82d446e206b5ac (diff)
Implement speed reduction at creatures DoFleeToGetAssistance, by NoFantasy.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 384eec4ebdb..8868b24c768 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -696,6 +696,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));
//TODO: use 31365
@@ -1464,7 +1466,11 @@ void Creature::setDeathState(DeathState s)
if ( LootTemplates_Skinning.HaveLootFor(GetCreatureInfo()->SkinLootId) )
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
- SetNoSearchAssistance(false);
+ if (HasSearchedAssistance())
+ {
+ SetNoSearchAssistance(false);
+ UpdateSpeed(MOVE_RUN, false);
+ }
//Dismiss group if is leader
if(m_formation && m_formation->getLeader() == this)