Repository navigation
Expand file tree
/
Copy pathclient.h
More file actions
128 lines (108 loc) · 4.56 KB
/
Copy pathclient.h
File metadata and controls
128 lines (108 loc) · 4.56 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/* EQEmu: EQEmulator
Copyright (C) 2001-2026 EQEmu Development Team
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 3 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/>.
*/
#pragma once
#include "common/eq_packet_structs.h"
#include "common/inventory_profile.h"
#include "common/linked_list.h"
#include "common/timer.h"
#include "world/cliententry.h"
#include <string>
class EQApplicationPacket;
class EQStreamInterface;
class Client {
public:
Client(EQStreamInterface* ieqs);
~Client();
bool Process();
void SendCharInfo();
void SendMaxCharCreate();
void SendMembership();
void SendMembershipSettings();
void EnterWorld(bool TryBootup = true);
void TellClientZoneUnavailable();
void QueuePacket(const EQApplicationPacket* app, bool ack_req = true);
void Clearance(int8 response);
void SendGuildList();
void SendEnterWorld(std::string name);
void SendExpansionInfo();
void SendLogServer();
void SendApproveWorld();
void SendPostEnterWorld();
void SendGuildTributeFavorAndTimer(uint32 favor, uint32 time_remaining);
void SendGuildTributeOptInToggle(const GuildTributeMemberToggle* in);
inline uint32 GetIP() { return ip; }
inline uint16 GetPort() { return port; }
inline uint32 GetZoneID() { return zone_id; }
inline uint32 GetInstanceID() { return instance_id; }
inline uint32 WaitingForBootup() { return zone_waiting_for_bootup; }
inline const char * GetAccountName() { if (cle) { return cle->AccountName(); } return "NOCLE"; }
inline int16 GetAdmin() { if (cle) { return cle->Admin(); } return 0; }
inline uint32 GetAccountID() { if (cle) { return cle->AccountID(); } return 0; }
inline uint32 GetWID() { if (cle) { return cle->GetID(); } return 0; }
inline uint32 GetLSID() { if (cle) { return cle->LSID(); } return 0; }
inline const char* GetLSKey() { if (cle) { return cle->GetLSKey(); } return "NOKEY"; }
inline uint32 GetCharID() { return charid; }
inline const char* GetCharName() { return char_name; }
inline EQ::versions::ClientVersion GetClientVersion() { return m_ClientVersion; }
inline ClientListEntry* GetCLE() { return cle; }
inline void SetCLE(ClientListEntry* iCLE) { cle = iCLE; }
bool StoreCharacter(
uint32 account_id,
PlayerProfile_Struct *p_player_profile_struct,
EQ::InventoryProfile *p_inventory_profile
);
private:
uint32 ip;
uint16 port;
uint32 charid;
char char_name[64];
uint32 zone_id;
uint32 instance_id;
bool is_player_zoning;
Timer autobootup_timeout;
uint32 zone_waiting_for_bootup;
bool enter_world_triggered;
bool StartInTutorial;
EQ::versions::ClientVersion m_ClientVersion;
uint32 m_ClientVersionBit;
bool OPCharCreate(char *name, CharCreate_Struct *cc);
void SetClassStartingSkills( PlayerProfile_Struct *pp );
void SetRaceStartingSkills( PlayerProfile_Struct *pp );
void SetRacialLanguages( PlayerProfile_Struct *pp );
void SetClassLanguages(PlayerProfile_Struct *pp);
ClientListEntry* cle;
Timer connect;
bool seen_character_select;
bool HandlePacket(const EQApplicationPacket *app);
bool HandleNameApprovalPacket(const EQApplicationPacket *app);
bool HandleSendLoginInfoPacket(const EQApplicationPacket *app);
bool HandleGenerateRandomNamePacket(const EQApplicationPacket *app);
bool HandleCharacterCreateRequestPacket(const EQApplicationPacket *app);
bool HandleCharacterCreatePacket(const EQApplicationPacket *app);
bool HandleEnterWorldPacket(const EQApplicationPacket *app);
bool HandleDeleteCharacterPacket(const EQApplicationPacket *app);
bool HandleZoneChangePacket(const EQApplicationPacket *app);
bool HandleChecksumPacket(const EQApplicationPacket *app);
bool ChecksumVerificationCRCEQGame(uint64 checksum);
bool ChecksumVerificationCRCSkillCaps(uint64 checksum);
bool ChecksumVerificationCRCBaseData(uint64 checksum);
EQStreamInterface* eqs;
bool CanTradeFVNoDropItem();
void RecordPossibleHack(const std::string& message);
void SendUnsupportedClientPacket(const std::string& message);
void LoadDataBucketsCache();
void ClearDataBucketsCache();
};
bool CheckCharCreateInfoSoF(CharCreate_Struct *cc);
bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc);