aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAIImpl.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-29 14:58:45 -0500
committermegamage <none@none>2009-08-29 14:58:45 -0500
commit2a4c9bcaf910430cdf3070987ce085da3c2666da (patch)
treea9498395a05c8306726142a8dea856bb79f173d2 /src/game/CreatureAIImpl.h
parent3aabef53ee48e67596d2920cbbc17b9e2238a2cc (diff)
*Make position as a class;
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAIImpl.h')
-rw-r--r--src/game/CreatureAIImpl.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h
index c687f04dad9..d143daa288c 100644
--- a/src/game/CreatureAIImpl.h
+++ b/src/game/CreatureAIImpl.h
@@ -311,9 +311,25 @@ inline bool CreatureAI::_EnterEvadeMode()
return true;
}
-inline Creature *CreatureAI::DoSummon(uint32 uiEntry, const Position fPos, uint32 uiDespawntime, TempSummonType uiType)
+inline void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
{
- return me->SummonCreature(uiEntry, fPos[0], fPos[1], fPos[2], fPos[3], uiType, uiDespawntime);
+ if(!victim || me->hasUnitState(UNIT_STAT_CASTING) && !triggered)
+ return;
+
+ me->CastSpell(victim, spellId, triggered);
+}
+
+inline void UnitAI::DoCastAOE(uint32 spellId, bool triggered)
+{
+ if(!triggered && me->hasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ me->CastSpell((Unit*)NULL, spellId, triggered);
+}
+
+inline Creature *CreatureAI::DoSummon(uint32 uiEntry, const Position &pos, uint32 uiDespawntime, TempSummonType uiType)
+{
+ return me->SummonCreature(uiEntry, pos, uiType, uiDespawntime);
}
inline Creature *CreatureAI::DoSummon(uint32 uiEntry, WorldObject* pGo, float fRadius, uint32 uiDespawntime, TempSummonType uiType)