Add SCRIPT_MODIFY_FLAGS & Improve Sentinel Selarin Script (#942)
* Added SCRIPT_COMMAND_MODIFY_NPC_FLAGS to ScriptMgr * Improved script for Sentinel Selarin
This commit is contained in:
@@ -556,6 +556,20 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_MODIFY_NPC_FLAGS:
|
||||
{
|
||||
if (tmp.npcFlag.creatureEntry && !ObjectMgr::GetCreatureTemplate(tmp.npcFlag.creatureEntry))
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` has datalong3 = %u in SCRIPT_COMMAND_MODIFY_NPC_FLAGS for script id %u, but this creature_template does not exist.", tablename, tmp.npcFlag.creatureEntry, tmp.id);
|
||||
continue;
|
||||
}
|
||||
if (tmp.npcFlag.creatureEntry && !tmp.npcFlag.searchRadius)
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` has datalong3 = %u in SCRIPT_COMMAND_MODIFY_NPC_FLAGS for script id %u, but search radius is too small (datalong4 = %u).", tablename, tmp.npcFlag.creatureEntry, tmp.id, tmp.npcFlag.searchRadius);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (scripts.find(tmp.id) == scripts.end())
|
||||
|
||||
Reference in New Issue
Block a user