mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -2838,7 +2838,8 @@ std::string Creature::GetScriptName() const
|
||||
uint32 Creature::GetScriptId() const
|
||||
{
|
||||
if (CreatureData const* creatureData = GetCreatureData())
|
||||
return creatureData->ScriptId;
|
||||
if (uint32 scriptId = creatureData->ScriptId)
|
||||
return scriptId;
|
||||
|
||||
return sObjectMgr->GetCreatureTemplate(GetEntry())->ScriptID;
|
||||
}
|
||||
|
||||
@@ -2142,7 +2142,8 @@ void GameObject::EventInform(uint32 eventId)
|
||||
uint32 GameObject::GetScriptId() const
|
||||
{
|
||||
if (GameObjectData const* gameObjectData = GetGOData())
|
||||
return gameObjectData->ScriptId;
|
||||
if (uint32 scriptId = gameObjectData->ScriptId)
|
||||
return scriptId;
|
||||
|
||||
return GetGOInfo()->ScriptId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user