forked from ike3/mangosbot-bots
-
Notifications
You must be signed in to change notification settings - Fork 2
/
GuildTaskMgr.h
51 lines (43 loc) · 2.01 KB
/
GuildTaskMgr.h
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
#ifndef _GuildTaskMgr_H
#define _GuildTaskMgr_H
#include "Common.h"
#include "PlayerbotAIBase.h"
using namespace std;
class GuildTaskMgr
{
public:
GuildTaskMgr();
virtual ~GuildTaskMgr();
static GuildTaskMgr& instance()
{
static GuildTaskMgr instance;
return instance;
}
void Update(Player* owner, Player* guildMaster);
public:
static bool HandleConsoleCommand(ChatHandler* handler, char const* args);
bool IsGuildTaskItem(uint32 itemId, uint32 guildId);
bool CheckItemTask(uint32 itemId, uint32 obtained, Player* owner, Player* bot, bool byMail = false);
void CheckKillTask(Player* owner, Unit* victim);
void CheckKillTaskInternal(Player* owner, Unit* victim);
bool CheckTaskTransfer(string text, Player* owner, Player* bot);
private:
map<uint32,uint32> GetTaskValues(uint32 owner, string type, uint32 *validIn = NULL);
uint32 GetTaskValue(uint32 owner, uint32 guildId, string type, uint32 *validIn = NULL);
uint32 SetTaskValue(uint32 owner, uint32 guildId, string type, uint32 value, uint32 validIn);
uint32 CreateTask(uint32 owner, uint32 guildId);
bool SendAdvertisement(uint32 owner, uint32 guildId);
bool SendItemAdvertisement(uint32 itemId, uint32 owner, uint32 guildId, uint32 validIn);
bool SendKillAdvertisement(uint32 creatureId, uint32 owner, uint32 guildId, uint32 validIn);
bool SendThanks(uint32 owner, uint32 guildId, uint32 payment);
bool Reward(uint32 owner, uint32 guildId);
bool CreateItemTask(uint32 owner, uint32 guildId);
bool CreateKillTask(uint32 owner, uint32 guildId);
uint32 GetMaxItemTaskCount(uint32 itemId);
void CleanupAdverts();
void RemoveDuplicatedAdverts();
void DeleteMail(list<uint32> buffer);
void SendCompletionMessage(Player* player, string verb);
};
#define sGuildTaskMgr GuildTaskMgr::instance()
#endif