aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-21 10:48:00 -0500
committermegamage <none@none>2009-05-21 10:48:00 -0500
commit67c84b1f3d74985fd2521feb9e536e56b9c9f2e9 (patch)
tree8bad07c2da1392ecaed20b4f295a78e5e2e90545 /src/game/Unit.cpp
parentb7053ecc0d565ba2f91d56f34a616d1992a91562 (diff)
Mobs fleeing and getting assistance feature implementaion. Author: Neo2003
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 6aeefa6e4aa..b66564756a0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8085,10 +8085,11 @@ bool Unit::AttackStop()
InterruptSpell(CURRENT_MELEE_SPELL);
- if( GetTypeId()==TYPEID_UNIT )
+ // reset only at real combat stop
+ if(GetTypeId()==TYPEID_UNIT )
{
- // reset call assistance
((Creature*)this)->SetNoCallAssistance(false);
+ ((Creature*)this)->SetNoSearchAssistance(false);
}
SendAttackStop(victim);
@@ -12321,7 +12322,7 @@ void Unit::SendMovementFlagUpdate()
}
/*
-void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID)
+void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID, uint32 time)
{
if( apply )
{
@@ -12335,7 +12336,7 @@ void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID)
Unit* caster = ObjectAccessor::GetUnit(*this,casterGUID);
- GetMotionMaster()->MoveFleeing(caster); // caster==NULL processed in MoveFleeing
+ GetMotionMaster()->MoveFleeing(caster, time); // caster==NULL processed in MoveFleeing
}
else
{
@@ -13332,7 +13333,7 @@ void Unit::SetFeared(bool apply)
caster = ObjectAccessor::GetUnit(*this, fearAuras.front()->GetCasterGUID());
if(!caster)
caster = getAttackerForHelper();
- GetMotionMaster()->MoveFleeing(caster); // caster==NULL processed in MoveFleeing
+ GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster==NULL processed in MoveFleeing
}
else
{