mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Build fix. Again. Oops.
This commit is contained in:
30
src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
Normal file
30
src/server/game/AI/ScriptedAI/ScriptedGossip.cpp
Normal file
@@ -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(); }
|
||||
@@ -82,19 +82,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
|
||||
|
||||
Reference in New Issue
Block a user