summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c342
1 files changed, 286 insertions, 56 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a4d2f62b1..68b9ce7ed 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -713,6 +713,7 @@ void clif_authok(struct map_session_data *sd)
clif->send(&p,sizeof(p),&sd->bl,SELF);
}
+/// [4144] Packet not using error_code anymore. Works for fixed error only (MsgString: 9 - Rejected from Server)
/// Notifies the client, that it's connection attempt was refused (ZC_REFUSE_ENTER).
/// 0074 <error code>.B
/// error code:
@@ -1935,6 +1936,25 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
WFIFOSET(fd,packet_len(0x91));
}
+/// Notifies the client of a position change (on air ship) to coordinates on given map (ZC_AIRSHIP_MAPMOVE).
+/// 0A4B <map name>.16B <x>.W <y>.W
+void clif_changemap_airship(struct map_session_data *sd, short m, int x, int y)
+{
+#if PACKETVER_MAIN_NUM >= 20180620 || PACKETVER_RE_NUM >= 20180321 || PACKETVER_ZERO_NUM >= 20171027
+ // [4144] this packet is not used yet by kro, but it here
+ int fd;
+ nullpo_retv(sd);
+ fd = sd->fd;
+
+ WFIFOHEAD(fd, packet_len(0xa4b));
+ WFIFOW(fd, 0) = 0xa4b;
+ mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, WFIFOP(fd,2));
+ WFIFOW(fd, 18) = x;
+ WFIFOW(fd, 20) = y;
+ WFIFOSET(fd, packet_len(0xa4b));
+#endif
+}
+
/// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
/// 0ac7 <map name>.16B <x>.W <y>.W <ip>.L <port>.W <zero>.128B
@@ -1958,6 +1978,28 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index,
WFIFOSET(fd, packet_len(cmd));
}
+/// Notifies the client of a position change (with air ship) to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
+/// 0a4c <map name>.16B <x>.W <y>.W <ip>.L <port>.W
+void clif_changemapserver_airship(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
+{
+#if (PACKETVER_MAIN_NUM >= 20180620) || (PACKETVER_RE_NUM >= 20180321) || (PACKETVER_ZERO_NUM >= 20171027)
+ // [4144] this packet is not used yet by kro, but it here
+ int fd;
+ const int cmd = 0xa4c;
+ nullpo_retv(sd);
+ fd = sd->fd;
+
+ WFIFOHEAD(fd, packet_len(cmd));
+ WFIFOW(fd, 0) = cmd;
+ mapindex->getmapname_ext(mapindex_id2name(map_index), WFIFOP(fd, 2));
+ WFIFOW(fd, 18) = x;
+ WFIFOW(fd, 20) = y;
+ WFIFOL(fd, 22) = htonl(ip);
+ WFIFOW(fd, 26) = sockt->ntows(htons(port)); // [!] LE byte order here [!]
+ WFIFOSET(fd, packet_len(cmd));
+#endif
+}
+
void clif_blown(struct block_list *bl)
{
//Aegis packets says fixpos, but it's unsure whether slide works better or not.
@@ -3089,7 +3131,7 @@ void clif_updatestatus(struct map_session_data *sd,int type)
WFIFOL(fd,4)=sd->status.zeny;
len = packet_len(0xb1);
break;
-// [4144] unconfirment exact version can be from 20170405 to 20170913
+// [4144] exact version unknown, between 20170405 to 20170913?
#if PACKETVER >= 20170830
case SP_BASEEXP:
WFIFOW(fd, 0) = 0xacb;
@@ -8923,35 +8965,60 @@ void clif_slide(struct block_list *bl, int x, int y)
/// Public chat message (ZC_NOTIFY_CHAT). lordalfa/Skotlex - used by @me as well
/// 008d <packet len>.W <id>.L <message>.?B
-void clif_disp_overhead(struct block_list *bl, const char *mes)
+void clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl)
{
- unsigned char buf[256]; //This should be more than sufficient, the theoretical max is CHAT_SIZE + 8 (pads and extra inserted crap)
+ char buf[CHAT_SIZE_MAX + (int)sizeof(struct PACKET_ZC_NOTIFY_CHAT)];
+ int max_len = CHAT_SIZE_MAX - (int)sizeof(struct PACKET_ZC_NOTIFY_CHAT);
+ struct PACKET_ZC_NOTIFY_CHAT *p = (struct PACKET_ZC_NOTIFY_CHAT *)&buf;
int mes_len;
nullpo_retv(bl);
nullpo_retv(mes);
- mes_len = (int)strlen(mes)+1; //Account for \0
- if (mes_len > (int)sizeof(buf)-8) {
- ShowError("clif_disp_overhead: Message too long (length %d)\n", mes_len);
- mes_len = sizeof(buf)-8; //Trunk it to avoid problems.
+ mes_len = (int)strlen(mes) + 1; //Account for \0
+ if (mes_len > max_len) {
+ ShowError("clif_disp_overhead: Truncated message '%s' (len=%d, max=%u).\n", mes, mes_len, max_len);
+ mes_len = max_len; //Trunk it to avoid problems.
}
+
// send message to others
- WBUFW(buf,0) = 0x8d;
- WBUFW(buf,2) = mes_len + 8; // len of message + 8 (command+len+id)
- WBUFL(buf,4) = bl->id;
- safestrncpy(WBUFP(buf,8), mes, mes_len);
- clif->send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);
+ p->PacketType = 0x8d;
+ p->PacketLength = mes_len + (int)sizeof(struct PACKET_ZC_NOTIFY_CHAT); // len of message + 8 (command+len+id)
+ p->GID = bl->id;
+ safestrncpy(p->Message, mes, mes_len);
+ if (target == SELF && target_bl != NULL) {
+ clif->send(p, p->PacketLength, target_bl, SELF);
+ } else {
+ clif->send(p, p->PacketLength, bl, AREA_CHAT_WOC);
- // send back message to the speaker
- if (bl->type == BL_PC) {
- WBUFW(buf,0) = 0x8e;
- WBUFW(buf, 2) = mes_len + 4;
- safestrncpy(WBUFP(buf,4), mes, mes_len);
- clif->send(buf, WBUFW(buf,2), bl, SELF);
+ // send back message to the speaker
+ if (bl->type == BL_PC)
+ clif->notify_playerchat(bl, mes);
}
}
+void clif_notify_playerchat(struct block_list *bl, const char *mes)
+{
+ char buf[CHAT_SIZE_MAX + (int)sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT)];
+ int max_len = CHAT_SIZE_MAX - (int)sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT);
+ struct PACKET_ZC_NOTIFY_PLAYERCHAT *p = (struct PACKET_ZC_NOTIFY_PLAYERCHAT *)&buf;
+ int mes_len;
+
+ nullpo_retv(bl);
+ nullpo_retv(mes);
+
+ mes_len = (int)strlen(mes) + 1; // Account for \0
+ if (mes_len > max_len) {
+ ShowError("clif_notify_playerchat: Truncated message '%s' (len=%d, max=%u).\n", mes, mes_len, max_len);
+ mes_len = max_len; // Truncate to avoid problems.
+ }
+
+ p->PacketType = 0x8e;
+ p->PacketLength = mes_len + (int)sizeof(struct PACKET_ZC_NOTIFY_PLAYERCHAT);
+ safestrncpy(p->Message, mes, mes_len);
+ clif->send(p, p->PacketLength, bl, SELF);
+}
+
/*==========================
* Minimap fix [Kevin]
* Remove dot from minimap
@@ -9093,7 +9160,7 @@ void clif_feel_hate_reset(struct map_session_data *sd)
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_zc_config(struct map_session_data* sd, int type, int flag)
+void clif_zc_config(struct map_session_data* sd, enum CZ_CONFIG type, int flag)
{
int fd;
nullpo_retv(sd);
@@ -9483,6 +9550,22 @@ void clif_channel_msg2(struct channel_data *chan, char *msg)
dbi_destroy(iter);
}
+// TODO: [4144] same packet with login server. need somehow use one function for both servers
+// 3 - Rejected by server
+void clif_auth_error(int fd, int errorCode)
+{
+ struct packet_ZC_REFUSE_LOGIN p;
+ const int len = sizeof(p);
+
+ p.PacketType = authError;
+ p.error_code = errorCode;
+ p.block_date[0] = '\0';
+
+ WFIFOHEAD(fd, len);
+ memcpy(WFIFOP(fd, 0), &p, len);
+ WFIFOSET(fd, len);
+}
+
// ------------
// clif_parse_*
// ------------
@@ -9521,10 +9604,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
bl = map->id2bl(account_id);
if(bl && bl->type != BL_PC) {
ShowError("clif_parse_WantToConnection: a non-player object already has id %d, please increase the starting account number\n", account_id);
- WFIFOHEAD(fd,packet_len(0x6a));
- WFIFOW(fd,0) = 0x6a;
- WFIFOB(fd,2) = 3; // Rejected by server
- WFIFOSET(fd,packet_len(0x6a));
+ clif->auth_error(fd, 3); // Rejected by server
sockt->eof(fd);
return;
@@ -11081,7 +11161,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) __attribute_
/// 1 = public
void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; //not zero-terminated
@@ -11137,7 +11217,7 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd) __attr
/// 1 = public
void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; // not zero-terminated
@@ -13148,12 +13228,12 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) __attribute__((
/// 0 = canceled
/// 1 = open
void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
- short len = (short)RFIFOW(fd,2) - 85;
+ int len = (int)RFIFOW(fd, 2) - 85;
const char *message;
bool flag;
const uint8 *data;
- if (len < 1)
+ if (len < 0)
return;
message = RFIFOP(fd,4);
@@ -13755,6 +13835,115 @@ void clif_parse_ChangePetName(int fd, struct map_session_data *sd)
pet->change_name(sd, RFIFOP(fd,2));
}
+void clif_parse_pet_evolution(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+/// Request to Evolve the pet (CZ_PET_EVOLUTION) [Dastgir/Hercules]
+/// 09fb <Length>.W <EvolvedPetEggID>.W {<index>.W <amount>.W}*items
+void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
+{
+ const struct PACKET_CZ_PET_EVOLUTION *p = RP2PTR(fd);
+ int i = 0, idx, petIndex;
+
+ Assert_retv(p->PacketLength >= (uint16)sizeof(struct PACKET_CZ_PET_EVOLUTION));
+
+ if (sd->status.pet_id == 0) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_CALLPET);
+ return;
+ }
+
+ ARR_FIND(0, MAX_INVENTORY, idx, sd->status.inventory[idx].card[0] == CARD0_PET &&
+ sd->status.pet_id == MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2]));
+
+ if (idx == MAX_INVENTORY) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_PETEGG);
+ return;
+ }
+
+ // Not Loyal Yet
+ if (sd->pd == NULL || sd->pd->pet.intimate < 900) {
+ clif->petEvolutionResult(fd, PET_EVOL_RG_FAMILIAR);
+ return;
+ }
+
+ ARR_FIND(0, MAX_PET_DB, petIndex, pet->db[petIndex].class_ == sd->pd->pet.class_);
+
+ if (petIndex == MAX_PET_DB) {
+ // Which error?
+ clif->petEvolutionResult(fd, PET_EVOL_UNKNOWN);
+ return;
+ }
+
+ // Client side validation is not done as it is insecure.
+ for (i = 0; i < VECTOR_LENGTH(pet->db[petIndex].evolve_data); i++) {
+ struct pet_evolve_data *ped = &VECTOR_INDEX(pet->db[petIndex].evolve_data, i);
+ if (ped->petEggId == p->EvolvedPetEggID) {
+ int j;
+ int pet_id;
+
+ if (VECTOR_LENGTH(ped->items) == 0) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_RECIPE);
+ return;
+ }
+ for (j = 0; j < VECTOR_LENGTH(ped->items); j++) {
+ struct itemlist_entry *list = &VECTOR_INDEX(ped->items, j);
+ int n = pc->search_inventory(sd, list->id);
+
+ if (n == INDEX_NOT_FOUND) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_MATERIAL);
+ return;
+ }
+ }
+
+ for (j = 0; j < VECTOR_LENGTH(ped->items); j++) {
+ struct itemlist_entry *list = &VECTOR_INDEX(ped->items, j);
+ int n = pc->search_inventory(sd, list->id);
+
+ if (pc->delitem(sd, n, list->amount, 0, DELITEM_NORMAL, LOG_TYPE_EGG) == 1) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_MATERIAL);
+ return;
+ }
+ }
+
+ // Return to Egg
+ pet->return_egg(sd, sd->pd);
+
+ if (pc->delitem(sd, idx, 1, 0, DELITEM_NORMAL, LOG_TYPE_EGG) == 1) {
+ clif->petEvolutionResult(fd, PET_EVOL_NO_PETEGG);
+ return;
+ }
+
+ pet_id = pet->search_petDB_index(ped->petEggId, PET_EGG);
+ if (pet_id >= 0) {
+ sd->catch_target_class = pet->db[pet_id].class_;
+
+ intif->create_pet(
+ sd->status.account_id, sd->status.char_id,
+ (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
+ 100, 0, 1, pet->db[pet_id].jname);
+ clif->petEvolutionResult(fd, PET_EVOL_SUCCESS);
+ } else {
+ clif->petEvolutionResult(fd, PET_EVOL_UNKNOWN);
+ }
+ return;
+ }
+ }
+
+ clif->petEvolutionResult(fd, PET_EVOL_UNKNOWN);
+}
+
+/**
+ * Result of Pet Evolution (ZC_PET_EVOLUTION_RESULT)
+ * 0x9fc <Result>.L
+ */
+void clif_pet_evolution_result(int fd, enum pet_evolution_result result) {
+#if PACKETVER >= 20140122
+ WFIFOHEAD(fd, packet_len(0x9fc));
+ WFIFOW(fd, 0) = 0x9fc;
+ WFIFOL(fd, 2) = result;
+ WFIFOSET(fd, packet_len(0x9fc));
+#endif
+}
+
void clif_parse_GMKick(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
/// /kill (CZ_DISCONNECT_CHARACTER).
/// Request to disconnect a character.
@@ -16154,24 +16343,38 @@ void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((no
/// 02d8 <type>.L <value>.L
/// type:
/// 0 = open equip window
+/// 2 = pet autofeeding
/// 3 = homunculus autofeeding
/// value:
/// 0 = disabled
/// 1 = enabled
void clif_parse_cz_config(int fd, struct map_session_data *sd)
{
- int type = RFIFOL(fd, 2);
+ enum CZ_CONFIG type = RFIFOL(fd, 2);
int flag = RFIFOL(fd, 6);
- if (type == CZ_CONFIG_OPEN_EQUIPMENT_WINDOW) {
+ switch (type) {
+ case CZ_CONFIG_OPEN_EQUIPMENT_WINDOW:
sd->status.show_equip = flag;
- } else if (type == CZ_CONFIG_HOMUNCULUS_AUTOFEEDING) {
- struct homun_data *hd;
- hd = sd->hd;
+ break;
+ case CZ_CONFIG_PET_AUTOFEEDING: {
+ struct pet_data *pd = sd->pd;
+ nullpo_retv(pd);
+ if (pd->petDB->autofeed == 0) {
+ clif->message(fd, "Autofeed is disabled for this pet.");
+ return;
+ }
+ pd->pet.autofeed = flag;
+ break;
+ }
+ case CZ_CONFIG_HOMUNCULUS_AUTOFEEDING: {
+ struct homun_data *hd = sd->hd;
nullpo_retv(hd);
hd->homunculus.autofeed = flag;
- } else {
- ShowWarning("clif_parse_cz_config: Unsupported type has been received (%d).", type);
+ break;
+ }
+ default:
+ ShowWarning("clif_parse_cz_config: Unsupported type has been received (%u).\n", type);
return;
}
clif->zc_config(sd, type, flag);
@@ -17637,7 +17840,11 @@ void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd) {
/// 1 = "next" label to retrieve more results
void clif_search_store_info_ack(struct map_session_data* sd)
{
- const unsigned int blocksize = MESSAGE_SIZE+26;
+#if PACKETVER >= 20150226
+ const unsigned int blocksize = MESSAGE_SIZE + 26 + 5 * MAX_ITEM_OPTIONS;
+#else
+ const unsigned int blocksize = MESSAGE_SIZE + 26;
+#endif
int fd;
unsigned int i, start, end;
@@ -17672,7 +17879,11 @@ void clif_search_store_info_ack(struct map_session_data* sd)
it.nameid = ssitem->nameid;
it.amount = ssitem->amount;
- clif->addcards(WFIFOP(fd,i*blocksize+25+MESSAGE_SIZE), &it);
+ clif->addcards(WFIFOP(fd, i * blocksize + 25 + MESSAGE_SIZE), &it);
+#if PACKETVER >= 20150226
+ memcpy(&it.option, &ssitem->option, sizeof(it.option));
+ clif->add_item_options(WFIFOP(fd, i * blocksize + 33 + MESSAGE_SIZE), &it);
+#endif
}
WFIFOSET(fd,WFIFOW(fd,2));
@@ -19098,6 +19309,9 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd)
p.ItemInfo[count].Position = j;
p.ItemInfo[count].ItemId = clif->rd.nameid[i][j];
p.ItemInfo[count].Count = clif->rd.qty[i][j];
+#if PACKETVER >= 20180523 // unknown real version
+ p.ItemInfo[count].unused = 0;
+#endif
count++;
}
}
@@ -20531,36 +20745,43 @@ void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
clif->open_ui(sd, p->UIType);
}
-void clif_open_ui(struct map_session_data *sd, int8 UIType)
+void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
{
-#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
- int claimed = 0;
+#if PACKETVER >= 20150128
struct PACKET_ZC_OPEN_UI p;
nullpo_retv(sd);
- p.PacketType = 0xAE2;
- switch (UIType) {
- case STYLIST_UI:
- p.UIType = STYLIST_UI;
+ p.PacketType = openUiType;
+ switch (uiType) {
+ case CZ_STYLIST_UI:
+ p.UIType = ZC_STYLIST_UI;
+#if PACKETVER >= 20171122
p.data = 0;
+#endif
break;
- case 5: // client will send 5 for the request but requires to receive ATTENDANCE_UI (7) to open the correct ui.
+ case CZ_ATTENDANCE_UI:
+ {
+#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
+ int claimed = 0;
if (clif->attendance_timediff(sd) != true)
++claimed;
else if (sd->status.attendance_count >= VECTOR_LENGTH(clif->attendance_data))
sd->status.attendance_count = 0;
- p.UIType = ATTENDANCE_UI;
+ p.UIType = ZC_ATTENDANCE_UI;
p.data = sd->status.attendance_count * 10 + claimed;
+#else
+ ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n");
+ return;
+#endif
break;
+ }
default:
- ShowWarning("clif_open_ui: Requested UI (%d) is not implemented yet.\n", UIType);
+ ShowWarning("clif_open_ui: Requested UI (%u) is not implemented yet.\n", uiType);
return;
}
clif->send(&p, sizeof(p), &sd->bl, SELF);
-#else
- ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n");
#endif
}
@@ -20637,7 +20858,7 @@ void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data)
void clif_parse_private_airship_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
{
-#if defined(PACKETVER_RE) && PACKETVER >= 20180321
+#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
char evname[EVENT_NAME_LENGTH];
struct event_data *ev = NULL;
const struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST *p = RP2PTR(fd);
@@ -20648,22 +20869,22 @@ void clif_parse_private_airship_request(int fd, struct map_session_data *sd)
pc->setreg(sd, script->add_str("@itemid"), p->ItemID);
script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
} else {
- ShowError("clif_parse_private_airship_request: event '%s' not found, operation failed\n", evname);
+ ShowError("clif_parse_private_airship_request: event '%s' not found, operation failed.\n", evname);
}
#else
- ShowWarning("clif_parse_private_airship_request: private airship is not supported in this client version, possible packet manipulation.");
+ ShowWarning("clif_parse_private_airship_request: private airship is not supported in this client version, possible packet manipulation.\n");
#endif
}
void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
{
-#if defined(PACKETVER_RE) && PACKETVER >= 20180321
+#if PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620
struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE p;
nullpo_retv(sd);
if (flag > P_AIRSHIP_ITEM_INVALID) {
- ShowError("clif_private_airship_response: invalid flag given '%d', defaulting to 0.\n", flag);
+ ShowError("clif_private_airship_response: invalid flag given '%u', defaulting to 0.\n", flag);
flag = 0;
}
@@ -20672,7 +20893,7 @@ void clif_private_airship_response(struct map_session_data *sd, uint32 flag)
clif->send(&p, sizeof(p), &sd->bl, SELF);
#else
- ShowWarning("clif_private_airship_response: private airship works only for clients >= 20180321.");
+ ShowWarning("clif_private_airship_response: private airship works only for clients PACKETVER_RE_NUM >= 20180321 || PACKETVER_MAIN_NUM >= 20180620.\n");
#endif
}
@@ -20827,7 +21048,7 @@ void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
if (p->BottomAccessory > 0)
clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
- clif->style_change_response(sd, true);
+ clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
@@ -20850,7 +21071,7 @@ void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 i
}
}
-void clif_style_change_response(struct map_session_data *sd, int8 flag)
+void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
{
#if PACKETVER >= 20151104
struct PACKET_ZC_STYLE_CHANGE_RES p;
@@ -21186,6 +21407,7 @@ void clif_defaults(void) {
clif->packet = clif_packet;
/* auth */
clif->authok = clif_authok;
+ clif->auth_error = clif_auth_error;
clif->authrefuse = clif_authrefuse;
clif->authfail_fd = clif_authfail_fd;
clif->charselectok = clif_charselectok;
@@ -21247,6 +21469,7 @@ void clif_defaults(void) {
clif->spawn = clif_spawn;
/* map-related */
clif->changemap = clif_changemap;
+ clif->changemap_airship = clif_changemap_airship;
clif->changemapcell = clif_changemapcell;
clif->map_property = clif_map_property;
clif->pvpset = clif_pvpset;
@@ -21256,6 +21479,7 @@ void clif_defaults(void) {
clif->maptypeproperty2 = clif_maptypeproperty2;
/* multi-map-server */
clif->changemapserver = clif_changemapserver;
+ clif->changemapserver_airship = clif_changemapserver_airship;
/* npc-shop-related */
clif->npcbuysell = clif_npcbuysell;
clif->buylist = clif_buylist;
@@ -21425,6 +21649,7 @@ void clif_defaults(void) {
clif->messagecolor_self = clif_messagecolor_self;
clif->messagecolor = clif_messagecolor;
clif->disp_overhead = clif_disp_overhead;
+ clif->notify_playerchat = clif_notify_playerchat;
clif->msgtable_skill = clif_msgtable_skill;
clif->msgtable = clif_msgtable;
clif->msgtable_num = clif_msgtable_num;
@@ -21984,4 +22209,9 @@ void clif_defaults(void) {
clif->pReqStyleChange = clif_parse_cz_req_style_change;
clif->cz_req_style_change_sub = clif_cz_req_style_change_sub;
clif->style_change_response = clif_style_change_response;
+
+ // -- Pet Evolution
+ clif->pPetEvolution = clif_parse_pet_evolution;
+ clif->petEvolutionResult = clif_pet_evolution_result;
+
}