Core/Scripts: Add support for spawn specific C++ scripts

Closes #19247
This commit is contained in:
Krudor
2017-03-18 11:31:31 +01:00
committed by Shauren
parent 0a35c473c8
commit 5a36a2eb17
8 changed files with 40 additions and 10 deletions
@@ -1988,6 +1988,14 @@ void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= nullptr*/)
bgMap->GetBG()->ProcessEvent(this, eventId, invoker);
}
uint32 GameObject::GetScriptId() const
{
if (GameObjectData const* gameObjectData = GetGOData())
return gameObjectData->ScriptId;
return GetGOInfo()->ScriptId;
}
// overwrite WorldObject function for proper name localization
std::string const & GameObject::GetNameForLocaleIdx(LocaleConstant loc_idx) const
{