From 5ceaaf27714e2c467e0a38908971f44c8f7c31a6 Mon Sep 17 00:00:00 2001 From: killerwife Date: Thu, 29 Feb 2024 21:22:17 +0100 Subject: [PATCH] GO: Add chair triggeredEvent handling --- src/game/Entities/GameObject.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/Entities/GameObject.cpp b/src/game/Entities/GameObject.cpp index f555db5591f..4cd6285c5ec 100644 --- a/src/game/Entities/GameObject.cpp +++ b/src/game/Entities/GameObject.cpp @@ -1630,6 +1630,12 @@ void GameObject::Use(Unit* user, SpellEntry const* spellInfo) std::tie(slotX, slotY) = GetClosestChairSlotPosition(user); user->NearTeleportTo(slotX, slotY, GetPositionZ(), GetOrientation()); user->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->chair.height); + + if (uint32 eventId = GetGOInfo()->chair.triggeredEvent) + { + DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Chair ScriptStart id %u for %s (Used by %s).", eventId, GetGuidStr().c_str(), player->GetGuidStr().c_str()); + StartEvents_Event(GetMap(), eventId, user, this); + } return; } case GAMEOBJECT_TYPE_SPELL_FOCUS: // 8