Mobs fleeing and getting assistance feature implementaion.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also rename ACTION_T_FLEE to ACTION_T_FLEE_FOR_ASSIST for clear use
This commit is contained in:
Neo2003 2009-05-20 23:21:47 +04:00 committed by VladimirMangos
parent f332c000d1
commit fa03b3663a
21 changed files with 238 additions and 19 deletions

View file

@ -7299,7 +7299,10 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/)
// reset only at real combat stop
if(!targetSwitch && GetTypeId()==TYPEID_UNIT )
{
((Creature*)this)->SetNoCallAssistance(false);
((Creature*)this)->SetNoSearchAssistance(false);
}
SendAttackStop(victim);
@ -10918,7 +10921,7 @@ void Unit::StopMoving()
SendMessageToSet(&data,false);
}
void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID)
void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID, uint32 time)
{
if( apply )
{
@ -10932,7 +10935,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
{