@@ -12230,14 +12230,17 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId)
12230
12230
for (GossipMenuItemsMap::const_iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
12231
12231
{
12232
12232
bool hasMenuItem = true;
12233
+ bool isGMSkipConditionCheck = false;
12233
12234
12234
- if (!isGameMaster()) // Let GM always see menu items regardless of conditions
12235
+ if (itr->second.conditionId && !sObjectMgr.IsPlayerMeetToCondition(itr->second.conditionId, this, GetMap(), pSource, CONDITION_FROM_GOSSIP_OPTION))
12235
12236
{
12236
- if (itr->second.conditionId && !sObjectMgr.IsPlayerMeetToCondition(itr->second.conditionId, this, GetMap(), pSource, CONDITION_FROM_GOSSIP_OPTION))
12237
+ if (isGameMaster()) // Let GM always see menu items regardless of conditions
12238
+ isGMSkipConditionCheck = true;
12239
+ else
12237
12240
{
12238
12241
if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER)
12239
12242
canSeeQuests = false;
12240
- continue;
12243
+ continue; // Skip this option
12241
12244
}
12242
12245
}
12243
12246
@@ -12352,6 +12355,13 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId)
12352
12355
}
12353
12356
}
12354
12357
12358
+ if (isGMSkipConditionCheck)
12359
+ {
12360
+ strOptionText.append(" (");
12361
+ strOptionText.append(GetSession()->GetMangosString(LANG_GM_ON));
12362
+ strOptionText.append(")");
12363
+ }
12364
+
12355
12365
pMenu->GetGossipMenu().AddMenuItem(itr->second.option_icon, strOptionText, 0, itr->second.option_id, strBoxText, itr->second.box_money, itr->second.box_coded);
12356
12366
pMenu->GetGossipMenu().AddGossipMenuItemData(itr->second.action_menu_id, itr->second.action_poi_id, itr->second.action_script_id);
12357
12367
}
0 commit comments