Reset Creature Spells template on respawn.

And fix Set Spells Template script command.
This commit is contained in:
ratkosrb
2018-03-15 18:20:20 +02:00
parent 560cbcf4df
commit a62768524f
5 changed files with 13 additions and 12 deletions
-6
View File
@@ -912,12 +912,6 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
sLog.outErrorDb("Table `%s` has dataint%u with negative chance in SCRIPT_COMMAND_CREATURE_SPELLS for script id %u.", tablename, i, tmp.id);
break;
}
else if (!tmp.creatureSpells.spells_template[i] && (tmp.creatureSpells.chance[i] > 0))
{
abort = true;
sLog.outErrorDb("Table `%s` has dataint%u=%i but no provided creature spells id in SCRIPT_COMMAND_CREATURE_SPELLS for script id %u.", tablename, i, tmp.creatureSpells.chance[i], tmp.id);
break;
}
else if (tmp.creatureSpells.spells_template[i])
{
if (!sObjectMgr.GetCreatureSpellsTemplate(tmp.creatureSpells.spells_template[i]))