Fixed a crash with AISpellInfoType having cooldown default to 0 should be default 5000.

This commit is contained in:
hondacrx
2021-07-03 11:37:20 -04:00
parent 2bc0446de2
commit 1d5337d3f7
6 changed files with 40 additions and 22 deletions
+5 -3
View File
@@ -252,9 +252,13 @@ namespace Game.AI
public void DoCast(uint spellId)
{
Unit target = null;
AITarget aiTargetType = AITarget.Self;
AISpellInfoType info = GetAISpellInfo(spellId, me.GetMap().GetDifficultyID());
switch (info.target)
if (info != null)
aiTargetType = info.target;
switch (aiTargetType)
{
default:
case AITarget.Self:
@@ -321,8 +325,6 @@ namespace Game.AI
public static void FillAISpellInfo()
{
//AISpellInfo = new AISpellInfoType[spellStorage.Keys.Max() + 1];
Global.SpellMgr.ForEachSpellInfo(spellInfo =>
{
AISpellInfoType AIInfo = new();