From 5fc4a839e36d48aed56f83acf1c8dc0e6d10f499 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 21 Mar 2011 10:13:09 +0100 Subject: [PATCH] [11270] Let GM (.gm on) always see gossip options regardless of conditions set. Signed-off-by: NoFantasy --- src/game/Player.cpp | 35 +++++++++++++++++++---------------- src/shared/revision_nr.h | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d39a96bf4..e4817a283 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -12876,25 +12876,28 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId) { bool hasMenuItem = true; - if (itr->second.cond_1 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_1)) + if (!isGameMaster()) // Let GM always see menu items regardless of conditions { - if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) - canSeeQuests = false; - continue; - } + if (itr->second.cond_1 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_1)) + { + if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) + canSeeQuests = false; + continue; + } - if (itr->second.cond_2 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_2)) - { - if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) - canSeeQuests = false; - continue; - } + if (itr->second.cond_2 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_2)) + { + if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) + canSeeQuests = false; + continue; + } - if (itr->second.cond_3 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_3)) - { - if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) - canSeeQuests = false; - continue; + if (itr->second.cond_3 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_3)) + { + if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER) + canSeeQuests = false; + continue; + } } if (pSource->GetTypeId() == TYPEID_UNIT) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 2515c4c2f..85dd3cc34 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11269" + #define REVISION_NR "11270" #endif // __REVISION_NR_H__