Mobs fleeing and getting assistance feature implementaion. Author: Neo2003
--HG-- branch : trunk
This commit is contained in:
1 parent
b7053ecc0d
commit
67c84b1f3d
20 files changed
+245
-97
No files matched your search
+6
-5
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user