mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11311] Add SCRIPT_COMMAND_ATTACK_START to initiate attack by creature.
../docs/script_commands.txt updated for details Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
b92ebd994f
commit
acb6372d29
5 changed files with 102 additions and 1 deletions
|
|
@ -519,6 +519,20 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename)
|
|||
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_ATTACK_START:
|
||||
{
|
||||
if (tmp.attack.creatureEntry && !ObjectMgr::GetCreatureTemplate(tmp.attack.creatureEntry))
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` has datalong2 = %u in SCRIPT_COMMAND_ATTACK_START for script id %u, but this creature_template does not exist.", tablename, tmp.attack.creatureEntry, tmp.id);
|
||||
continue;
|
||||
}
|
||||
if (tmp.attack.creatureEntry && !tmp.attack.searchRadius)
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` has datalong2 = %u in SCRIPT_COMMAND_ATTACK_START for script id %u, but search radius is too small (datalong3 = %u).", tablename, tmp.attack.creatureEntry, tmp.id, tmp.attack.searchRadius);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (scripts.find(tmp.id) == scripts.end())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue