diff options
author | megamage <none@none> | 2009-04-25 09:15:40 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-25 09:15:40 -0500 |
commit | 8644c48db870b2f33e2b64a62ab8ec1030188067 (patch) | |
tree | b10e62271825bc8351841839b67293ba5d97c4ed /src/game/Creature.cpp | |
parent | c4e6f9708fa07baa3ae9f4689e41c5ed98cb05d7 (diff) |
*Add new eventAI action 105 call assistance. Param1 = radius.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r-- | src/game/Creature.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 5b3f45b66dd..5d8df6de1de 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1932,13 +1932,15 @@ Unit* Creature::SelectNearestTarget(float dist) const return target; } -void Creature::CallAssistance() +void Creature::CallAssistance(float radius) { if( !m_AlreadyCallAssistance && getVictim() && !isPet() && !isCharmed()) { SetNoCallAssistance(true); - float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS); + if(!radius) + radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS); + if(radius > 0) { std::list<Creature*> assistList; |