aboutsummaryrefslogtreecommitdiff
path: root/src/game/GossipDef.h
diff options
context:
space:
mode:
authorwin32 <none@none>2009-12-20 13:35:08 +0200
committerwin32 <none@none>2009-12-20 13:35:08 +0200
commit7c9f6b4bc37eec7b94aaba1cd8912bd5c0054e2a (patch)
tree6dde39dad95c2ce3d688890082cd66d66abb878e /src/game/GossipDef.h
parent31c6b10a192671562f38f17f9e6270979ebe417c (diff)
Merge MaNGOS, Gossip System. Autor NoFantasy.
* DB support required * Closes #859 --HG-- branch : trunk
Diffstat (limited to 'src/game/GossipDef.h')
-rw-r--r--src/game/GossipDef.h67
1 files changed, 65 insertions, 2 deletions
diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h
index 5e4c2e8b65a..901576b447c 100644
--- a/src/game/GossipDef.h
+++ b/src/game/GossipDef.h
@@ -30,6 +30,47 @@ class WorldSession;
#define GOSSIP_MAX_MENU_ITEMS 64 // client supported items unknown, but provided number must be enough
#define DEFAULT_GOSSIP_MESSAGE 0xffffff
+enum Gossip_Option
+{
+ GOSSIP_OPTION_NONE = 0, //UNIT_NPC_FLAG_NONE (0)
+ GOSSIP_OPTION_GOSSIP = 1, //UNIT_NPC_FLAG_GOSSIP (1)
+ GOSSIP_OPTION_QUESTGIVER = 2, //UNIT_NPC_FLAG_QUESTGIVER (2)
+ GOSSIP_OPTION_VENDOR = 3, //UNIT_NPC_FLAG_VENDOR (128)
+ GOSSIP_OPTION_TAXIVENDOR = 4, //UNIT_NPC_FLAG_TAXIVENDOR (8192)
+ GOSSIP_OPTION_TRAINER = 5, //UNIT_NPC_FLAG_TRAINER (16)
+ GOSSIP_OPTION_SPIRITHEALER = 6, //UNIT_NPC_FLAG_SPIRITHEALER (16384)
+ GOSSIP_OPTION_SPIRITGUIDE = 7, //UNIT_NPC_FLAG_SPIRITGUIDE (32768)
+ GOSSIP_OPTION_INNKEEPER = 8, //UNIT_NPC_FLAG_INNKEEPER (65536)
+ GOSSIP_OPTION_BANKER = 9, //UNIT_NPC_FLAG_BANKER (131072)
+ GOSSIP_OPTION_PETITIONER = 10, //UNIT_NPC_FLAG_PETITIONER (262144)
+ GOSSIP_OPTION_TABARDDESIGNER = 11, //UNIT_NPC_FLAG_TABARDDESIGNER (524288)
+ GOSSIP_OPTION_BATTLEFIELD = 12, //UNIT_NPC_FLAG_BATTLEFIELDPERSON (1048576)
+ GOSSIP_OPTION_AUCTIONEER = 13, //UNIT_NPC_FLAG_AUCTIONEER (2097152)
+ GOSSIP_OPTION_STABLEPET = 14, //UNIT_NPC_FLAG_STABLE (4194304)
+ GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER (4096)
+ GOSSIP_OPTION_UNLEARNTALENTS = 16, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
+ GOSSIP_OPTION_UNLEARNPETSKILLS = 17, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
+ GOSSIP_OPTION_LEARNDUALSPEC = 18, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
+ GOSSIP_OPTION_OUTDOORPVP = 19, //added by code (option for outdoor pvp creatures)
+ GOSSIP_OPTION_MAX
+};
+
+enum GossipOptionIcon
+{
+ GOSSIP_ICON_CHAT = 0, //white chat bubble
+ GOSSIP_ICON_VENDOR = 1, //brown bag
+ GOSSIP_ICON_TAXI = 2, //flight
+ GOSSIP_ICON_TRAINER = 3, //book
+ GOSSIP_ICON_INTERACT_1 = 4, //interaction wheel
+ GOSSIP_ICON_INTERACT_2 = 5, //interaction wheel
+ GOSSIP_ICON_MONEY_BAG = 6, //brown bag with yellow dot
+ GOSSIP_ICON_TALK = 7, //white chat bubble with black dots
+ GOSSIP_ICON_TABARD = 8, //tabard
+ GOSSIP_ICON_BATTLE = 9, //two swords
+ GOSSIP_ICON_DOT = 10, //yellow dot
+ GOSSIP_ICON_MAX
+};
+
//POI icons. Many more exist, list not complete.
enum Poi_Icon
{
@@ -82,13 +123,22 @@ struct GossipMenuItem
bool m_gCoded;
std::string m_gMessage;
uint32 m_gSender;
- uint32 m_gAction;
+ uint32 m_gOptionId;
std::string m_gBoxMessage;
uint32 m_gBoxMoney;
};
typedef std::vector<GossipMenuItem> GossipMenuItemList;
+struct GossipMenuItemData
+{
+ uint32 m_gAction_menu;
+ uint32 m_gAction_poi;
+ uint32 m_gAction_script;
+};
+
+typedef std::vector<GossipMenuItemData> GossipMenuItemDataList;
+
struct QuestMenuItem
{
uint32 m_qId;
@@ -110,6 +160,11 @@ class TRINITY_DLL_SPEC GossipMenu
void AddMenuItem(uint8 Icon, char const* Message, bool Coded = false);
void AddMenuItem(uint8 Icon, char const* Message, uint32 dtSender, uint32 dtAction, char const* BoxMessage, uint32 BoxMoney, bool Coded = false);
+ void SetMenuId(uint32 menu_id) { m_gMenuId = menu_id; }
+ uint32 GetMenuId() { return m_gMenuId; }
+
+ void AddGossipMenuItemData(uint32 action_menu, uint32 action_poi, uint32 action_script);
+
unsigned int MenuItemCount() const
{
return m_gItems.size();
@@ -125,6 +180,11 @@ class TRINITY_DLL_SPEC GossipMenu
return m_gItems[ Id ];
}
+ GossipMenuItemData const& GetItemData(unsigned int indexId)
+ {
+ return m_gItemsData[indexId];
+ }
+
uint32 MenuItemSender( unsigned int ItemId );
uint32 MenuItemAction( unsigned int ItemId );
bool MenuItemCoded( unsigned int ItemId );
@@ -132,7 +192,10 @@ class TRINITY_DLL_SPEC GossipMenu
void ClearMenu();
protected:
- GossipMenuItemList m_gItems;
+ GossipMenuItemList m_gItems;
+ GossipMenuItemDataList m_gItemsData;
+
+ uint32 m_gMenuId;
};
class QuestMenu