*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
This commit is contained in:
Rat
2010-04-09 10:47:11 +02:00
parent 1f46c1150d
commit cbbe587817
11 changed files with 110 additions and 4 deletions

View File

@@ -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)