-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathAdd_Command_Script.cpp
More file actions
68 lines (61 loc) · 1.93 KB
/
Copy pathAdd_Command_Script.cpp
File metadata and controls
68 lines (61 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "ScriptPCH.h"
#include "Chat.h"
#include <cstring>
#include "GuildMgr.h"
#include "ObjectMgr.h"
class GGW_Commands : public CommandScript
{
public:
GGW_Commands() : CommandScript("GGW_Commands"){ }
ChatCommand* GetCommands() const
{
static ChatCommand GuildWarzSubCommandTable[] =
{
{ "buy", 2, false, GuildWarzBuy, "", NULL },
{ "sell", 2, false, GuildWarzSell, "", NULL },
{ "commands", 2, false, GuildWarzCommands, "", NULL },
{ "info", 2, false, GuildWarzInfo, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand GuildWarzCommandTable[] =
{
{ "GGW", 0, true, NULL, "", GuildWarzSubCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
return GuildWarzCommandTable;
TC_LOG_INFO("GUILD_WARZ.TEST", ">> LINE %u >>", 36);
TC_LOG_INFO("GUILD_WARZ.TEST", ">> MEMBER RANK >>");
};
static bool GuildWarzBuy(ChatHandler* handler, const char* args) // Give player 100 gold
{
Player* pPlayer = handler->GetSession()->GetPlayer();
Player* plTarget = pPlayer->GetSelectedPlayer();
handler->PSendSysMessage("|cffB400B4 BUY");
return true;
}
static bool GuildWarzSell(ChatHandler* handler, const char* args) // Give player 100 gold
{
Player* pPlayer = handler->GetSession()->GetPlayer();
Player* plTarget = pPlayer->GetSelectedPlayer();
handler->PSendSysMessage("|cffB400B4 SELL");
return true;
}
static bool GuildWarzCommands(ChatHandler* handler, const char* args) // Give player 100 gold
{
Player* pPlayer = handler->GetSession()->GetPlayer();
Player* plTarget = pPlayer->GetSelectedPlayer();
handler->PSendSysMessage("|cffB400B4 COMMANDS!");
return true;
}
static bool GuildWarzInfo(ChatHandler* handler, const char* args) // Give player 100 gold
{
Player* pPlayer = handler->GetSession()->GetPlayer();
Player* plTarget = pPlayer->GetSelectedPlayer();
handler->PSendSysMessage("|cffB400B4 INFO");
return true;
}
};
void AddSC_GGW_Commands()
{
new GGW_Commands;
}