summaryrefslogtreecommitdiff
path: root/src/map/intif.h
blob: c397eda7d940e13b73acbd168501621690792135 (plain) (blame)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/**
 * This file is part of Hercules.
 * http://herc.ws - http://github.com/HerculesWS/Hercules
 *
 * Copyright (C) 2012-2020 Hercules Dev Team
 * Copyright (C) Athena Dev Teams
 *
 * Hercules 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/>.
 */
#ifndef MAP_INTIF_H
#define MAP_INTIF_H

#include "common/hercules.h"

/**
 * Declarations
 **/
struct auction_data;
struct guild_member;
struct guild_position;
struct guild_storage;
struct mail_message;
struct map_session_data;
struct party_member;
struct s_elemental;
struct s_homunculus;
struct s_mercenary;
struct s_pet;
struct rodex_message;

/**
 * Defines
 **/
#define intif_rename_pc(sd, name)  (intif->rename((sd), 0, (name)))
#define intif_rename_pet(sd, name) (intif->rename((sd), 1, (name)))
#define intif_rename_hom(sd, name) (intif->rename((sd), 2, (name)))
#define INTIF_PACKET_LEN_TABLE_SIZE 161


/*=====================================
* Interface : intif.h
* Generated by HerculesInterfaceMaker
* created by Susu
*-------------------------------------*/
struct intif_interface {
	/* */
	int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE];
	/* funcs */
	int (*parse) (int fd);
	int (*create_pet)(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id,
	                  int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
	int (*saveregistry) (struct map_session_data *sd);
	int (*request_registry) (struct map_session_data *sd, int flag);
	void (*request_account_storage) (const struct map_session_data *sd);
	void (*send_account_storage) (struct map_session_data *sd);
	int (*request_guild_storage) (int account_id, int guild_id);
	int (*send_guild_storage) (int account_id, struct guild_storage *gstor);
	int (*create_party) (struct party_member *member, const char *name, int item, int item2);
	int (*request_partyinfo) (int party_id, int char_id);
	int (*party_addmember) (int party_id,struct party_member *member);
	int (*party_changeoption) (int party_id, int account_id, int exp, int item);
	int (*party_leave) (int party_id,int account_id, int char_id);
	int (*party_changemap) (struct map_session_data *sd, int online);
	int (*break_party) (int party_id);
	int (*party_leaderchange) (int party_id,int account_id,int char_id);
	int (*guild_create) (const char *name, const struct guild_member *master);
	int (*guild_request_info) (int guild_id);
	int (*guild_addmember) (int guild_id, struct guild_member *m);
	int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes);
	int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class);
	int (*guild_break) (int guild_id);
	int (*guild_change_gm) (int guild_id, const char *name, int len);
	int (*guild_change_basicinfo) (int guild_id, int type, const void *data, int len);
	int (*guild_change_memberinfo) (int guild_id, int account_id, int char_id, int type, const void *data, int len);
	int (*guild_position) (int guild_id, int idx, struct guild_position *p);
	int (*guild_skillup) (int guild_id, uint16 skill_id, int account_id, int max);
	int (*guild_alliance) (int guild_id1, int guild_id2, int account_id1, int account_id2, int flag);
	int (*guild_notice) (int guild_id, const char *mes1, const char *mes2);
	int (*guild_emblem) (int guild_id, int len, const char *data);
	int (*guild_castle_dataload) (int num, int *castle_ids);
	int (*guild_castle_datasave) (int castle_id, int index, int value);
	void (*itembound_req) (int char_id, int aid, int guild_id);
	int (*request_petdata) (int account_id, int char_id, int pet_id);
	int (*save_petdata) (int account_id, struct s_pet *p);
	int (*delete_petdata) (int pet_id);
	int (*rename) (struct map_session_data *sd, int type, const char *name);
	int (*homunculus_create) (int account_id, struct s_homunculus *sh);
	bool (*homunculus_requestload) (int account_id, int homun_id);
	int (*homunculus_requestsave) (int account_id, struct s_homunculus* sh);
	int (*homunculus_requestdelete) (int homun_id);
	/******QUEST SYTEM*******/
	void (*request_questlog) (struct map_session_data * sd);
	int (*quest_save) (struct map_session_data * sd);
	// MERCENARY SYSTEM
	int (*mercenary_create) (struct s_mercenary *merc);
	int (*mercenary_request) (int merc_id, int char_id);
	int (*mercenary_delete) (int merc_id);
	int (*mercenary_save) (struct s_mercenary *merc);
	// MAIL SYSTEM
	int (*Mail_requestinbox) (int char_id, unsigned char flag);
	int (*Mail_read) (int mail_id);
	int (*Mail_getattach) (int char_id, int mail_id);
	int (*Mail_delete) (int char_id, int mail_id);
	int (*Mail_return) (int char_id, int mail_id);
	int (*Mail_send) (int account_id, struct mail_message *msg);
	// AUCTION SYSTEM
	int (*Auction_requestlist) (int char_id, short type, int price, const char* searchtext, short page);
	int (*Auction_register) (struct auction_data *auction);
	int (*Auction_cancel) (int char_id, unsigned int auction_id);
	int (*Auction_close) (int char_id, unsigned int auction_id);
	int (*Auction_bid) (int char_id, const char* name, unsigned int auction_id, int bid);
	// ELEMENTAL SYSTEM
	int (*elemental_create) (struct s_elemental *ele);
	int (*elemental_request) (int ele_id, int char_id);
	int (*elemental_delete) (int ele_id);
	int (*elemental_save) (struct s_elemental *ele);
	// RoDEX
	int(*rodex_requestinbox) (int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id);
	int(*rodex_checkhasnew) (struct map_session_data *sd);
	int(*rodex_updatemail) (struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
	int(*rodex_sendmail) (struct rodex_message *msg);
	int(*rodex_checkname) (struct map_session_data *sd, const char *name);
	void (*pGetZenyAck) (int fd);
	void (*pGetItemsAck) (int fd);
	/* Clan System */
	int (*clan_kickoffline) (int clan_id, int kick_interval);
	int (*clan_membercount) (int clan_id, int kick_interval);
	/* @accinfo */
	void (*request_accinfo) (int u_fd, int aid, int group_lv, char* query);
	/* */
	int (*CheckForCharServer) (void);
	/* Achievement System [Smokexyz/Hercules] */
	void(*achievements_request) (struct map_session_data *sd);
	void(*achievements_save) (struct map_session_data *sd);
	/* */
	void (*pRegisters) (int fd);
	void (*pAccountStorage) (int fd);
	void (*pChangeNameOk) (int fd);
	void (*pMessageToFD) (int fd);
	void (*pAccountStorageSaveAck) (int fd);
	void (*pLoadGuildStorage) (int fd);
	void (*pSaveGuildStorage) (int fd);
	void (*pPartyCreated) (int fd);
	void (*pPartyInfo) (int fd);
	void (*pPartyMemberAdded) (int fd);
	void (*pPartyOptionChanged) (int fd);
	void (*pPartyMemberWithdraw) (int fd);
	void (*pPartyMove) (int fd);
	void (*pPartyBroken) (int fd);
	void (*pGuildCreated) (int fd);
	void (*pGuildInfo) (int fd);
	void (*pGuildMemberAdded) (int fd);
	void (*pGuildMemberWithdraw) (int fd);
	void (*pGuildMemberInfoShort) (int fd);
	void (*pGuildBroken) (int fd);
	void (*pGuildBasicInfoChanged) (int fd);
	void (*pGuildMemberInfoChanged) (int fd);
	void (*pGuildPosition) (int fd);
	void (*pGuildSkillUp) (int fd);
	void (*pGuildAlliance) (int fd);
	void (*pGuildNotice) (int fd);
	void (*pGuildEmblem) (int fd);
	void (*pGuildCastleDataLoad) (int fd);
	void (*pGuildMasterChanged) (int fd);
	void (*pQuestLog) (int fd);
	void (*pQuestSave) (int fd);
	void (*pMailInboxReceived) (int fd);
	void (*pMailNew) (int fd);
	void (*pMailGetAttach) (int fd);
	void (*pMailDelete) (int fd);
	void (*pMailReturn) (int fd);
	void (*pMailSend) (int fd);
	void (*pAuctionResults) (int fd);
	void (*pAuctionRegister) (int fd);
	void (*pAuctionCancel) (int fd);
	void (*pAuctionClose) (int fd);
	void (*pAuctionMessage) (int fd);
	void (*pAuctionBid) (int fd);
	void (*pItembound_ack) (int fd);
	void (*pMercenaryReceived) (int fd);
	void (*pMercenaryDeleted) (int fd);
	void (*pMercenarySaved) (int fd);
	void (*pElementalReceived) (int fd);
	void (*pElementalDeleted) (int fd);
	void (*pElementalSaved) (int fd);
	void (*pCreatePet) (int fd);
	void (*pRecvPetData) (int fd);
	void (*pSavePetOk) (int fd);
	void (*pDeletePetOk) (int fd);
	void (*pCreateHomunculus) (int fd);
	void (*pRecvHomunculusData) (int fd);
	void (*pSaveHomunculusOk) (int fd);
	void (*pDeleteHomunculusOk) (int fd);
	/* RoDEX */
	void(*pRequestRodexOpenInbox) (int fd);
	void(*pRodexHasNew) (int fd);
	void(*pRodexSendMail) (int fd);
	void(*pRodexCheckName) (int fd);
	/* Clan System */
	void (*pRecvClanMemberAction) (int fd);
	/* Achievements */
	void (*pAchievementsLoad) (int fd);
};

#ifdef HERCULES_CORE
void intif_defaults(void);
#endif // HERCULES_CORE

HPShared struct intif_interface *intif;

#endif /* MAP_INTIF_H */