Add script commands to set instance data.

This commit is contained in:
brotalnia
2018-01-09 17:49:57 +02:00
parent 0787b1e911
commit d025b44a64
7 changed files with 167 additions and 24 deletions
+18
View File
@@ -632,6 +632,24 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
}
break;
}
case SCRIPT_COMMAND_SET_INST_DATA:
{
if (tmp.setData.type >= SO_INSTDATA_MAX)
{
sLog.outErrorDb("Table `%s` has invalid option datalong3 = %u in SCRIPT_COMMAND_SET_INST_DATA for script id %u.", tablename, tmp.setData.type, tmp.id);
continue;
}
break;
}
case SCRIPT_COMMAND_SET_INST_DATA64:
{
if (tmp.setData64.type >= SO_INSTDATA64_MAX)
{
sLog.outErrorDb("Table `%s` has invalid option datalong3 = %u in SCRIPT_COMMAND_SET_INST_DATA64 for script id %u.", tablename, tmp.setData64.type, tmp.id);
continue;
}
break;
}
}
if (scripts.find(tmp.id) == scripts.end())