feat(Core/Instance): Add instance validation for creature scripts (#4596)
This commit is contained in:
parent
60f865fce6
commit
f9d708b450
371 changed files with 1315 additions and 767 deletions
|
|
@ -468,3 +468,13 @@ std::string InstanceScript::GetBossStateName(uint8 state)
|
|||
return "INVALID";
|
||||
}
|
||||
}
|
||||
|
||||
bool InstanceHasScript(WorldObject const* obj, char const* scriptName)
|
||||
{
|
||||
if (InstanceMap* instance = obj->GetMap()->ToInstanceMap())
|
||||
{
|
||||
return instance->GetScriptName() == scriptName;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue