mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11270] Let GM (.gm on) always see gossip options regardless of conditions set.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
92a1e9b4d0
commit
5fc4a839e3
2 changed files with 20 additions and 17 deletions
|
|
@ -12876,25 +12876,28 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||||
{
|
{
|
||||||
bool hasMenuItem = true;
|
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)
|
if (itr->second.cond_1 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_1))
|
||||||
canSeeQuests = false;
|
{
|
||||||
continue;
|
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.cond_2 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_2))
|
||||||
{
|
{
|
||||||
if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER)
|
if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER)
|
||||||
canSeeQuests = false;
|
canSeeQuests = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itr->second.cond_3 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_3))
|
if (itr->second.cond_3 && !sObjectMgr.IsPlayerMeetToCondition(this, itr->second.cond_3))
|
||||||
{
|
{
|
||||||
if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER)
|
if (itr->second.option_id == GOSSIP_OPTION_QUESTGIVER)
|
||||||
canSeeQuests = false;
|
canSeeQuests = false;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pSource->GetTypeId() == TYPEID_UNIT)
|
if (pSource->GetTypeId() == TYPEID_UNIT)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11269"
|
#define REVISION_NR "11270"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue