aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.cpp30
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.h15
2 files changed, 37 insertions, 8 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
new file mode 100644
index 00000000000..bf3c6b6df1b
--- /dev/null
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
@@ -0,0 +1,30 @@
+/*
+* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License as published by the
+* Free Software Foundation; either version 2 of the License, or (at your
+* option) any later version.
+*
+* This program is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+* more details.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ScriptedGossip.h"
+#include "Player.h"
+
+void ClearGossipMenuFor(Player* player) { player->PlayerTalkClass->ClearMenus(); }
+// Using provided text, not from DB
+void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, icon, text, sender, action, "", 0); }
+// Using provided texts, not from DB
+void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action, const char* popupText, uint32 popupMoney, bool coded) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, icon, text, sender, action, popupText, popupMoney, coded); }
+// Uses gossip item info from DB
+void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action); }
+void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid) { player->PlayerTalkClass->SendGossipMenu(npcTextID, guid); }
+void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature) { if (creature) SendGossipMenuFor(player, npcTextID, creature->GetGUID()); }
+void CloseGossipMenuFor(Player* player) { player->PlayerTalkClass->SendCloseGossip(); } \ No newline at end of file
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
index 0bbadf32627..f857f4584a9 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
@@ -80,19 +80,18 @@ enum eTradeskill
GOSSIP_SENDER_SEC_STABLEMASTER = 10
};
-inline void ClearGossipMenuFor(Player* player) { player->PlayerTalkClass->ClearMenus(); }
+void ClearGossipMenuFor(Player* player);
// Using provided text, not from DB
-inline void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, icon, text, sender, action, "", 0); }
+void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action);
// Using provided texts, not from DB
-inline void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action, const char* popupText, uint32 popupMoney, bool coded) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, icon, text, sender, action, popupText, popupMoney, coded); }
+void AddGossipItemFor(Player* player, uint32 icon, const char* text, uint32 sender, uint32 action, const char* popupText, uint32 popupMoney, bool coded);
// Uses gossip item info from DB
-inline void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action) { player->PlayerTalkClass->GetGossipMenu().AddMenuItem(gossipMenuID, gossipMenuItemID, sender, action); }
-inline void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid) { player->PlayerTalkClass->SendGossipMenu(npcTextID, guid); }
-inline void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature) { if (creature) SendGossipMenuFor(player, npcTextID, creature->GetGUID()); }
-inline void CloseGossipMenuFor(Player* player) { player->PlayerTalkClass->SendCloseGossip(); }
+void AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action);
+void SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid);
+void SendGossipMenuFor(Player* player, uint32 npcTextID, Creature const* creature);
+void CloseGossipMenuFor(Player* player);
// Defined fuctions to use with player.
-
// This fuction add's a menu item,
// a - Icon Id
// b - Text