diff options
author | Meji <alvaro.megias@outlook.com> | 2023-07-20 17:11:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 17:11:56 +0200 |
commit | 3aa264d0c74d0425fd335d69e1890bef6dfa1838 (patch) | |
tree | 481c78fded52a6558c8a1c6d83c76c4a59447530 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 53f9abec14613c0823b1ee5363b3f873cc23ece9 (diff) |
Core/Scripts: Fix EventScript assert for GameObject::SetDestructibleState (#29131)
Closes #29167
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index c8e548d1a39..1239fccfaa1 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5838,8 +5838,10 @@ void ObjectMgr::LoadEventSet() // Load all possible event ids from gameobjects for (auto const& gameObjectTemplatePair : _gameObjectTemplateStore) - if (uint32 eventId = gameObjectTemplatePair.second.GetEventScriptId()) - _eventStore.insert(eventId); + { + EventContainer eventSet = gameObjectTemplatePair.second.GetEventScriptSet(); + _eventStore.insert(eventSet.begin(), eventSet.end()); + } // Load all possible event ids from spells for (SpellNameEntry const* spellNameEntry : sSpellNameStore) @@ -5877,7 +5879,7 @@ void ObjectMgr::LoadEventScripts() for (ScriptMapMap::const_iterator itr = sEventScripts.begin(); itr != sEventScripts.end(); ++itr) { if (!IsValidEvent(itr->first)) - TC_LOG_ERROR("sql.sql", "Table `event_scripts` has script (Id: {}) not referring to any gameobject_template (type 3 data6 field, type 7 data3 field, type 10 data2 field, type 13 data2 field, type 50 data7 field), any taxi path node or any spell effect {}", + TC_LOG_ERROR("sql.sql", "Table `event_scripts` has script (Id: {}) not referring to any gameobject_template (data field referencing GameEvent), any taxi path node or any spell effect {}", itr->first, SPELL_EFFECT_SEND_EVENT); } @@ -5901,7 +5903,7 @@ void ObjectMgr::LoadEventScripts() if (!IsValidEvent(eventId)) { - TC_LOG_ERROR("sql.sql", "Event (ID: {}) not referring to any gameobject_template (type 3 data6 field, type 7 data3 field, type 10 data2 field, type 13 data2 field, type 50 data7 field), any taxi path node or any spell effect {}", + TC_LOG_ERROR("sql.sql", "Event (ID: {}) not referring to any gameobject_template (data field referencing GameEvent), any taxi path node or any spell effect {}", eventId, SPELL_EFFECT_SEND_EVENT); continue; } |