aboutsummaryrefslogtreecommitdiff
path: root/src/game/GossipDef.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:35:07 -0700
committermaximius <none@none>2009-10-17 15:35:07 -0700
commit26b5e033ffde3d161382fc9addbfa99738379641 (patch)
treea344f369ca32945f787a02dee35c3dbe342bed7e /src/game/GossipDef.h
parentf21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff)
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
Diffstat (limited to 'src/game/GossipDef.h')
-rw-r--r--src/game/GossipDef.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h
index 88c15f334a1..b70348f1715 100644
--- a/src/game/GossipDef.h
+++ b/src/game/GossipDef.h
@@ -17,19 +17,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#ifndef TRINITYCORE_GOSSIP_H
#define TRINITYCORE_GOSSIP_H
-
#include "Common.h"
#include "QuestDef.h"
#include "NPCHandler.h"
-
class WorldSession;
-
#define GOSSIP_MAX_MENU_ITEMS 64 // client supported items unknown, but provided number must be enough
#define DEFAULT_GOSSIP_MESSAGE 0xffffff
-
//POI icons. Many more exist, list not complete.
enum Poi_Icon
{
@@ -75,7 +70,6 @@ enum Poi_Icon
ICON_POI_RWHORSE = 39, // Red and White Horse
ICON_POI_REDHORSE = 40 // Red Horse
};
-
struct GossipMenuItem
{
uint8 m_gIcon;
@@ -86,123 +80,94 @@ struct GossipMenuItem
std::string m_gBoxMessage;
uint32 m_gBoxMoney;
};
-
typedef std::vector<GossipMenuItem> GossipMenuItemList;
-
struct QuestMenuItem
{
uint32 m_qId;
uint8 m_qIcon;
};
-
typedef std::vector<QuestMenuItem> QuestMenuItemList;
-
class TRINITY_DLL_SPEC GossipMenu
{
public:
GossipMenu();
~GossipMenu();
-
void AddMenuItem(uint8 Icon, const std::string& Message, bool Coded = false);
void AddMenuItem(uint8 Icon, const std::string& Message, uint32 dtSender, uint32 dtAction, const std::string& BoxMessage, uint32 BoxMoney, bool Coded = false);
-
// for using from scripts, don't must be inlined
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);
-
unsigned int MenuItemCount() const
{
return m_gItems.size();
}
-
bool Empty() const
{
return m_gItems.empty();
}
-
GossipMenuItem const& GetItem( unsigned int Id )
{
return m_gItems[ Id ];
}
-
uint32 MenuItemSender( unsigned int ItemId );
uint32 MenuItemAction( unsigned int ItemId );
bool MenuItemCoded( unsigned int ItemId );
-
void ClearMenu();
-
protected:
GossipMenuItemList m_gItems;
};
-
class QuestMenu
{
public:
QuestMenu();
~QuestMenu();
-
void AddMenuItem( uint32 QuestId, uint8 Icon);
void ClearMenu();
-
uint8 MenuItemCount() const
{
return m_qItems.size();
}
-
bool Empty() const
{
return m_qItems.empty();
}
-
bool HasItem( uint32 questid );
-
QuestMenuItem const& GetItem( uint16 Id )
{
return m_qItems[ Id ];
}
-
protected:
QuestMenuItemList m_qItems;
};
-
class TRINITY_DLL_SPEC PlayerMenu
{
private:
GossipMenu mGossipMenu;
QuestMenu mQuestMenu;
WorldSession* pSession;
-
public:
PlayerMenu( WorldSession *Session );
~PlayerMenu();
-
GossipMenu& GetGossipMenu() { return mGossipMenu; }
QuestMenu& GetQuestMenu() { return mQuestMenu; }
-
bool Empty() const { return mGossipMenu.Empty() && mQuestMenu.Empty(); }
-
void ClearMenus();
uint32 GossipOptionSender( unsigned int Selection );
uint32 GossipOptionAction( unsigned int Selection );
bool GossipOptionCoded( unsigned int Selection );
-
void SendGossipMenu( uint32 TitleTextId, uint64 npcGUID );
void CloseGossip();
void SendPointOfInterest( float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, const char * locName );
void SendPointOfInterest( uint32 poi_id );
void SendTalking( uint32 textID );
void SendTalking( char const * title, char const * text );
-
/*********************************************************/
/*** QUEST SYSTEM ***/
/*********************************************************/
void SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID );
-
void SendQuestGiverQuestList( QEmote eEmote, const std::string& Title, uint64 npcGUID );
-
void SendQuestQueryResponse ( Quest const *pQuest );
void SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept);
-
void SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnableNext );
void SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel );
};