-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMessage.h
More file actions
48 lines (40 loc) · 1.74 KB
/
Copy pathMessage.h
File metadata and controls
48 lines (40 loc) · 1.74 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
#pragma once
#include <iostream>
#include <memory>
#include <set>
#include "Inventory.h"
#include "Aux_function.h"
#include "Basic_actions.h"
#include "Movement.h"
#include "Items.h"
#include "craft.h"
#include "Party.h"
#include "Healing.h"
#include "Trade.h"
class Message {
public:
Message(Aux_function& arg_aux);
void scan_packet(std::vector<unsigned char>& arr);
void send_private_message(unsigned int target_id, std::wstring message, bool is_friend = false);
void send_party_message(std::wstring message);
void set_enviroment(std::shared_ptr<Inventory> inventory_arg, std::shared_ptr<Basic_actions> basic_actions_arg,
std::shared_ptr<Movement> movement_arg, std::shared_ptr<Items> items_arg,
std::shared_ptr<Craft> craft_arg, std::shared_ptr<Party> party_arg,
std::shared_ptr<Healing> healing_arg, std::shared_ptr<Trade> trade_arg);
void set_player_info(std::pair<unsigned int, std::string> player_basic_info);
void add_permission(unsigned int player_id);
std::set<unsigned int>& get_permission_list();
private:
std::set<unsigned int> permission;
std::shared_ptr<Inventory> inventory;
std::shared_ptr<Basic_actions> basic_actions;
std::shared_ptr<Movement> movement;
std::shared_ptr<Healing> healing;
std::shared_ptr<Items> items;
std::shared_ptr<Craft> craft;
std::shared_ptr<Party> party;
std::shared_ptr<Trade> trade;
std::pair<unsigned int, std::string> player_basic_info;
Aux_function& aux;
void execute_message(std::string message_arg, unsigned char type, unsigned int player_id);
};