Resolve a crash in channeled spell update when multiple holders are removed during iteration (#368)

* Added a simple unit AI script for testing casting on multiple units that despawn during the spell update

* Now step the aura update iter on holder removal

* Prevent array overrun

* Now initialize m_channelUpdateIterator, refactored and slightly optimised channel holder removal

* Allow unused custom script warnings to be suppressed
This commit is contained in:
bladez
2017-10-29 14:14:09 +11:00
committed by GitHub
parent 05e366fb6e
commit 4932256e35
5 changed files with 108 additions and 31 deletions
+7 -2
View File
@@ -1788,8 +1788,13 @@ void Script::RegisterSelf(bool bReportError)
}
else
{
if (!(strstr(Name.c_str(), "generic") || strstr(Name.c_str(), "npc_escort"))) // Don't report generic scripts.
sLog.outError("Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str());
// Don't report unused generic scripts
if (bReportError)
{
if (!(strstr(Name.c_str(), "generic") || strstr(Name.c_str(), "npc_escort")))
sLog.outError("Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str());
}
delete this;
}
}