mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
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:
parent
f332c000d1
commit
fa03b3663a
21 changed files with 238 additions and 19 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue