aboutsummaryrefslogtreecommitdiff
path: root/src/game/UnitAI.cpp
diff options
context:
space:
mode:
authorRat <none@none>2010-04-09 10:47:11 +0200
committerRat <none@none>2010-04-09 10:47:11 +0200
commitcbbe587817f9d635338c1efc309418a9a6575d76 (patch)
treeab4db09b5c7fe4491fd6f6542c45a8c0ef9a18bb /src/game/UnitAI.cpp
parent1f46c1150d8d04d5d3e72f27c475062cc320d545 (diff)
*added code for loading Spelldifficulty.dbc + Custom Spelldifficulty from Database
*added spell searcher based on creature's map difficulty, usage is optional and only for scipts for now *added new table spelldifficulty_dbc --HG-- branch : trunk
Diffstat (limited to 'src/game/UnitAI.cpp')
-rw-r--r--src/game/UnitAI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/UnitAI.cpp b/src/game/UnitAI.cpp
index b66b725d462..4fd4693885e 100644
--- a/src/game/UnitAI.cpp
+++ b/src/game/UnitAI.cpp
@@ -193,8 +193,12 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
return;
}
-void UnitAI::DoCast(uint32 spellId)
+void UnitAI::DoCast(uint32 spellId, bool useMode)
{
+ //search for instance mode spell
+ if(useMode && me->ToCreature())
+ spellId = me->ToCreature()->GetSpellIdForDifficulty(spellId);
+
Unit *target = NULL;
//sLog.outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
switch(AISpellInfo[spellId].target)