Skip to content

Commit 39272fc

Browse files
committed
Fix OnGossipSelect with Eluna disabled
1 parent c87f5b4 commit 39272fc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CMakeFiles/CMakeOutput.log

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/server/game/Handlers/MiscHandler.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
178178

179179
#ifdef ELUNA
180180
if (Eluna* e = GetPlayer()->GetEluna())
181-
if (!e->OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
181+
if (e->OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
182+
return;
182183
#endif
183184
if (!unit->AI()->OnGossipSelectCode(_player, menuId, gossipListId, code.c_str()))
184185
_player->OnGossipSelect(unit, gossipListId, menuId);
@@ -195,7 +196,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
195196
{
196197
#ifdef ELUNA
197198
if (Eluna* e = GetPlayer()->GetEluna())
198-
if (!e->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
199+
if (e->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
200+
return;
199201
#endif
200202
if (!go->AI()->OnGossipSelectCode(_player, menuId, gossipListId, code.c_str()))
201203
_player->OnGossipSelect(go, gossipListId, menuId);
@@ -207,7 +209,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
207209
{
208210
#ifdef ELUNA
209211
if (Eluna* e = GetPlayer()->GetEluna())
210-
if (!e->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
212+
if (e->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
213+
return;
211214
#endif
212215
if (!unit->AI()->OnGossipSelect(_player, menuId, gossipListId))
213216
_player->OnGossipSelect(unit, gossipListId, menuId);
@@ -224,7 +227,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
224227
{
225228
#ifdef ELUNA
226229
if (Eluna* e = GetPlayer()->GetEluna())
227-
if (!e->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
230+
if (e->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
231+
return;
228232
#endif
229233
if (!go->AI()->OnGossipSelect(_player, menuId, gossipListId))
230234
_player->OnGossipSelect(go, gossipListId, menuId);

0 commit comments

Comments
 (0)