diff options
| author | Meji <alvaro.megias@outlook.com> | 2022-10-09 22:03:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-09 22:03:04 +0200 |
| commit | ba49dbfdcbbbee4d6be39284c6924bf56d7f6586 (patch) | |
| tree | 4831ee1c6bf8d98c75e8b0682e5e957dfb5be8c6 /src/server/game | |
| parent | d39923e4f916ae635693ae8c4872802570defd87 (diff) | |
Core/Gossip: Drop OptionNpcFlag from gossip_menu_option (#28254)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 19 | ||||
| -rw-r--r-- | src/server/game/Globals/ObjectMgr.h | 1 |
3 files changed, 10 insertions, 18 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9c59b4b5105..9d7ff5c40a2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -13634,12 +13634,9 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues Trinity::IteratorPair menuItemBounds = sObjectMgr->GetGossipMenuItemsMapBounds(menuId); - uint64 npcflags = 0; - if (source->GetTypeId() == TYPEID_UNIT) { - npcflags = (uint64(source->ToUnit()->m_unitData->NpcFlags[1]) << 32) | source->ToUnit()->m_unitData->NpcFlags[0]; - if (showQuests && npcflags & UNIT_NPC_FLAG_QUESTGIVER) + if (showQuests && source->ToUnit()->IsQuestGiver()) PrepareQuestMenu(source->GetGUID()); } else if (source->GetTypeId() == TYPEID_GAMEOBJECT) @@ -13654,9 +13651,6 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues bool canTalk = true; if (Creature* creature = source->ToCreature()) { - if (!(gossipMenuItem.OptionNpcFlag & npcflags)) - continue; - switch (gossipMenuItem.OptionNpc) { case GossipOptionNpc::TaxiNode: diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index f5542024956..96db3bfa064 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -9616,8 +9616,8 @@ void ObjectMgr::LoadGossipMenuItems() _gossipMenuItemsStore.clear(); QueryResult result = WorldDatabase.Query( - // 0 1 2 3 4 5 6 7 8 9 10 11 12 - "SELECT MenuID, OptionID, OptionNpc, OptionText, OptionBroadcastTextID, OptionNpcFlag, Language, ActionMenuID, ActionPoiID, BoxCoded, BoxMoney, BoxText, BoxBroadcastTextID " + // 0 1 2 3 4 5 6 7 8 9 10 11 + "SELECT MenuID, OptionID, OptionNpc, OptionText, OptionBroadcastTextID, Language, ActionMenuID, ActionPoiID, BoxCoded, BoxMoney, BoxText, BoxBroadcastTextID " "FROM gossip_menu_option ORDER BY MenuID, OptionID"); if (!result) @@ -9637,14 +9637,13 @@ void ObjectMgr::LoadGossipMenuItems() gMenuItem.OptionNpc = GossipOptionNpc(fields[2].GetUInt8()); gMenuItem.OptionText = fields[3].GetString(); gMenuItem.OptionBroadcastTextID = fields[4].GetUInt32(); - gMenuItem.OptionNpcFlag = fields[5].GetUInt64(); - gMenuItem.Language = fields[6].GetUInt32(); - gMenuItem.ActionMenuID = fields[7].GetUInt32(); - gMenuItem.ActionPoiID = fields[8].GetUInt32(); - gMenuItem.BoxCoded = fields[9].GetBool(); - gMenuItem.BoxMoney = fields[10].GetUInt32(); - gMenuItem.BoxText = fields[11].GetString(); - gMenuItem.BoxBroadcastTextID = fields[12].GetUInt32(); + gMenuItem.Language = fields[5].GetUInt32(); + gMenuItem.ActionMenuID = fields[6].GetUInt32(); + gMenuItem.ActionPoiID = fields[7].GetUInt32(); + gMenuItem.BoxCoded = fields[8].GetBool(); + gMenuItem.BoxMoney = fields[9].GetUInt32(); + gMenuItem.BoxText = fields[10].GetString(); + gMenuItem.BoxBroadcastTextID = fields[11].GetUInt32(); if (gMenuItem.OptionNpc >= GossipOptionNpc::Count) { diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 91499ba7e40..6919992f228 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -747,7 +747,6 @@ struct GossipMenuItems GossipOptionNpc OptionNpc; std::string OptionText; uint32 OptionBroadcastTextID; - uint32 OptionNpcFlag; uint32 Language; uint32 ActionMenuID; uint32 ActionPoiID; |
