This commit is contained in:
hondacrx
2017-07-21 23:08:32 -04:00
parent 0736bf1fda
commit c41f76d27e
3 changed files with 47 additions and 238 deletions
-19
View File
@@ -128,24 +128,5 @@ namespace Game.AI
}
return new NullGameObjectAI(go);
}
public static SpellScript SelectSpellScript(Spell spell)
{
var holder = Global.SmartAIMgr.GetScript((int)spell.GetSpellInfo().Id, SmartScriptType.Spell);
if (holder.Empty())
return null;
var script = new SmartSpell();
script._Init("", spell.GetSpellInfo().Id);
if (!script._Load(spell))
return null;
script._Register();
if (!script._Validate(spell.GetSpellInfo()))
return null;
return script;
}
}
}