diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 10 | ||||
-rw-r--r-- | src/map/clif.c | 97 | ||||
-rw-r--r-- | src/map/clif.h | 5 | ||||
-rw-r--r-- | src/map/itemdb.c | 5 | ||||
-rw-r--r-- | src/map/itemdb.h | 1 | ||||
-rw-r--r-- | src/map/map.c | 23 | ||||
-rw-r--r-- | src/map/messages.h | 2 | ||||
-rw-r--r-- | src/map/messages_ad.h | 4 | ||||
-rw-r--r-- | src/map/messages_main.h | 43 | ||||
-rw-r--r-- | src/map/messages_re.h | 39 | ||||
-rw-r--r-- | src/map/messages_sak.h | 4 | ||||
-rw-r--r-- | src/map/messages_zero.h | 20 | ||||
-rw-r--r-- | src/map/packets.h | 8 | ||||
-rw-r--r-- | src/map/packets_keys_main.h | 11 | ||||
-rw-r--r-- | src/map/packets_keys_zero.h | 9 | ||||
-rw-r--r-- | src/map/packets_shuffle_main.h | 11 | ||||
-rw-r--r-- | src/map/packets_shuffle_re.h | 11 | ||||
-rw-r--r-- | src/map/packets_shuffle_zero.h | 9 | ||||
-rw-r--r-- | src/map/packets_struct.h | 39 | ||||
-rw-r--r-- | src/map/pc.c | 29 | ||||
-rw-r--r-- | src/map/pc.h | 4 | ||||
-rw-r--r-- | src/map/script.c | 41 | ||||
-rw-r--r-- | src/map/script.h | 21 | ||||
-rw-r--r-- | src/map/unit.c | 6 |
24 files changed, 354 insertions, 98 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3684c1d9f..b82224206 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8300,6 +8300,15 @@ ACMD(feelreset) return true; } +// Reset hatred targets [Wolfie] +ACMD(hatereset) +{ + pc->resethate(sd); + clif->message(fd, msg_fd(fd, 979)); // Reset 'Hatred' targets. + + return true; +} + /*========================================== * AUCTION SYSTEM *------------------------------------------*/ @@ -10201,6 +10210,7 @@ static void atcommand_basecommands(void) ACMD_DEF(homshuffle), ACMD_DEF(showmobs), ACMD_DEF(feelreset), + ACMD_DEF(hatereset), ACMD_DEF(auction), ACMD_DEF(mail), ACMD_DEF2("noks", ksprotection), diff --git a/src/map/clif.c b/src/map/clif.c index 31fb00c37..6ba0db2f3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11467,7 +11467,9 @@ static void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action { struct npc_data *nd = map->id2nd(target_id); if (nd != NULL) { - npc->click(sd, nd); + if (sd->block_action.npc == 0) { // *pcblock script command + npc->click(sd, nd); + } return; } @@ -11942,7 +11944,7 @@ static void clif_parse_NpcClicked(int fd, struct map_session_data *sd) clif->clearunit_area(&sd->bl,CLR_DEAD); return; } - if (sd->npc_id || sd->state.workinprogress & 2) { + if (sd->npc_id > 0 || (sd->state.workinprogress & 2) == 2 || sd->block_action.npc == 1) { // *pcblock script command #if PACKETVER >= 20110308 clif->msgtable(sd, MSG_BUSY); #else @@ -19982,34 +19984,65 @@ static void clif_parse_dull(int fd, struct map_session_data *sd) return; } -static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); -static void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) +static void clif_parse_cashShopOpen1(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopOpen1(int fd, struct map_session_data *sd) { -#if PACKETVER >= 20100824 if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd)) return; if (map->list[sd->bl.m].flag.nocashshop) { - clif->messagecolor_self(fd, COLOR_RED, msg_fd(fd,1489)); //Cash Shop is disabled in this map + clif->messagecolor_self(fd, COLOR_RED, msg_fd(fd, 1489)); //Cash Shop is disabled in this map + return; + } + + clif->cashShopOpen(fd, sd, 0); +} + +static void clif_parse_cashShopLimitedReq(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopLimitedReq(int fd, struct map_session_data *sd) +{ +} + +static void clif_parse_cashShopOpen2(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopOpen2(int fd, struct map_session_data *sd) +{ + if (sd->state.trading != 0 || pc_isdead(sd) || pc_isvending(sd)) + return; + + if (map->list[sd->bl.m].flag.nocashshop != 0) { + clif->messagecolor_self(fd, COLOR_RED, msg_fd(fd, 1489)); //Cash Shop is disabled in this map return; } - WFIFOHEAD(fd, 10); - WFIFOW(fd, 0) = 0x845; - WFIFOL(fd, 2) = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values - WFIFOL(fd, 6) = sd->kafraPoints; - WFIFOSET(fd, 10); +#if PACKETVER >= 20191224 + const struct PACKET_CZ_SE_CASHSHOP_OPEN2 *p = RFIFOP(fd, 0); + clif->cashShopOpen(fd, sd, p->tab); #endif } -static void clif_parse_CashShopClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); -static void clif_parse_CashShopClose(int fd, struct map_session_data *sd) +static void clif_cashShopOpen(int fd, struct map_session_data *sd, int tab) +{ +#if PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || PACKETVER_ZERO_NUM >= defined(PACKETVER_ZERO) + WFIFOHEAD(fd, sizeof(struct PACKET_ZC_SE_CASHSHOP_OPEN)); + struct PACKET_ZC_SE_CASHSHOP_OPEN *p = WFIFOP(fd, 0); + p->packetType = HEADER_ZC_SE_CASHSHOP_OPEN; + p->cashPoints = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values + p->kafraPoints = sd->kafraPoints; +#if PACKETVER_ZERO_NUM >= 20191224 + p->tab = tab; +#endif + WFIFOSET(fd, sizeof(struct PACKET_ZC_SE_CASHSHOP_OPEN)); +#endif +} + +static void clif_parse_cashShopClose(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopClose(int fd, struct map_session_data *sd) { /* TODO apply some state tracking */ } -static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); -static void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) +static void clif_parse_cashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopSchedule(int fd, struct map_session_data *sd) { if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd)) return; @@ -20048,8 +20081,8 @@ void clif_cashShopSchedule(int fd, struct map_session_data *sd) } /// R 0848 <len>.W <limit>.W <kafra pay>.L (<item id>.L <amount>.L <tab>.W)* -static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); -static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) +static void clif_parse_cashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopBuy(int fd, struct map_session_data *sd) { if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd)) return; @@ -20108,7 +20141,7 @@ static void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) ret = pc->paycash(sd, clif->cs.data[tab][j]->price * qty, kafra_pay);// [Ryuuzaki] //changed Kafrapoints calculation. [Normynator] if (ret < 0) { - ShowError("clif_parse_CashShopBuy: The return from pc->paycash was negative which is not allowed.\n"); + ShowError("clif_parse_cashShopBuy: The return from pc->paycash was negative which is not allowed.\n"); break; //This should never happen. } kafra_pay = ret; @@ -20168,9 +20201,9 @@ static void clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, #endif } -static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_cashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); /* [Ind/Hercules] */ -static void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) +static void clif_parse_cashShopReqTab(int fd, struct map_session_data *sd) { // [4144] packet exists only in 2011 and was dropped after #if PACKETVER >= 20110222 && PACKETVER < 20120000 @@ -20245,12 +20278,15 @@ static void clif_status_change2(struct block_list *bl, int tid, enum send_target static void clif_partytickack(struct map_session_data *sd, bool flag) { +#if PACKETVER_MAIN_NUM >= 20070911 || defined(PACKETVER_RE) || PACKETVER_AD_NUM >= 20070911 || PACKETVER_SAK_NUM >= 20070904 || defined(PACKETVER_ZERO) nullpo_retv(sd); - WFIFOHEAD(sd->fd, packet_len(0x2c9)); - WFIFOW(sd->fd, 0) = 0x2c9; - WFIFOB(sd->fd, 2) = flag; - WFIFOSET(sd->fd, packet_len(0x2c9)); + WFIFOHEAD(sd->fd, sizeof(struct PACKET_ZC_PARTY_CONFIG)); + struct PACKET_ZC_PARTY_CONFIG *p = WFIFOP(sd->fd, 0); + p->packetType = HEADER_ZC_PARTY_CONFIG; + p->denyPartyInvites = flag; + WFIFOSET(sd->fd, sizeof(struct PACKET_ZC_PARTY_CONFIG)); +#endif } static void clif_ShowScript(struct block_list *bl, const char *message, enum send_target target) @@ -24615,12 +24651,15 @@ void clif_defaults(void) clif->pBGQueueRevokeReq = clif_parse_bgqueue_revoke_req; clif->pBGQueueBattleBeginAck = clif_parse_bgqueue_battlebegin_ack; /* RagExe Cash Shop [Ind/Hercules] */ - clif->pCashShopOpen = clif_parse_CashShopOpen; - clif->pCashShopClose = clif_parse_CashShopClose; - clif->pCashShopReqTab = clif_parse_CashShopReqTab; - clif->pCashShopSchedule = clif_parse_CashShopSchedule; - clif->pCashShopBuy = clif_parse_CashShopBuy; + clif->pCashShopOpen1 = clif_parse_cashShopOpen1; + clif->pCashShopOpen2 = clif_parse_cashShopOpen2; + clif->pCashShopLimitedReq = clif_parse_cashShopLimitedReq; + clif->pCashShopClose = clif_parse_cashShopClose; + clif->pCashShopReqTab = clif_parse_cashShopReqTab; + clif->pCashShopSchedule = clif_parse_cashShopSchedule; + clif->pCashShopBuy = clif_parse_cashShopBuy; clif->cashShopBuyAck = clif_cashShopBuyAck; + clif->cashShopOpen = clif_cashShopOpen; /* */ clif->pPartyTick = clif_parse_PartyTick; clif->pGuildInvite2 = clif_parse_GuildInvite2; diff --git a/src/map/clif.h b/src/map/clif.h index 14a7997a1..99560f52e 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1548,7 +1548,9 @@ struct clif_interface { void (*pBGQueueRevokeReq) (int fd, struct map_session_data *sd); void (*pBGQueueBattleBeginAck) (int fd, struct map_session_data *sd); /* RagExe Cash Shop [Ind/Hercules] */ - void (*pCashShopOpen) (int fd, struct map_session_data *sd); + void (*pCashShopOpen1) (int fd, struct map_session_data *sd); + void (*pCashShopOpen2) (int fd, struct map_session_data *sd); + void (*pCashShopLimitedReq) (int fd, struct map_session_data *sd); void (*pCashShopClose) (int fd, struct map_session_data *sd); void (*pCashShopReqTab) (int fd, struct map_session_data *sd); void (*pCashShopSchedule) (int fd, struct map_session_data *sd); @@ -1556,6 +1558,7 @@ struct clif_interface { void (*pPartyTick) (int fd, struct map_session_data *sd); void (*pGuildInvite2) (int fd, struct map_session_data *sd); void (*cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); + void (*cashShopOpen) (int fd, struct map_session_data *sd, int tab); /* Group Search System Update */ void (*pPartyBookingAddFilter) (int fd, struct map_session_data *sd); void (*pPartyBookingSubFilter) (int fd, struct map_session_data *sd); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 5dc3d9317..b016af1c9 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1552,6 +1552,11 @@ static void itemdb_read_chains(void) else itemdb->chain_cache[ECC_SIEGFRIED] = i; + if (!script->get_constant("ITMCHAIN_NEO_INSURANCE", &i)) + ShowWarning("itemdb_read_chains: failed to find 'ITMCHAIN_NEO_INSURANCE' chain to link to cache!\n"); + else + itemdb->chain_cache[ECC_NEO_INSURANCE] = i; + ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 14ead7707..ecdcbcafc 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -359,6 +359,7 @@ enum geneticist_item_list { enum e_chain_cache { ECC_ORE, ECC_SIEGFRIED, + ECC_NEO_INSURANCE, /* */ ECC_MAX, }; diff --git a/src/map/map.c b/src/map/map.c index 8d60d1672..9db868329 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3769,8 +3769,29 @@ static int map_waterheight(char *mapname) // read & convert fn rsw = grfio_read(fn); if (rsw) { + if (memcmp(rsw, "GRSW", 4) != 0) { + ShowWarning("Failed to find water level for %s (%s)\n", mapname, fn); + aFree(rsw); + return NO_WATER; + } + int major_version = rsw[4]; + int minor_version = rsw[5]; + if (major_version > 2 || (major_version == 2 && minor_version > 2)) { + ShowWarning("Failed to find water level for %s (%s)\n", mapname, fn); + aFree(rsw); + return NO_WATER; + } + if (major_version < 1 || (major_version == 1 && minor_version <= 4)) { + ShowWarning("Failed to find water level for %s (%s)\n", mapname, fn); + aFree(rsw); + return NO_WATER; + } + int offset = 166; + if (major_version == 2 && minor_version >= 2) { + offset = 167; + } //Load water height from file - int wh = (int) *(float*)(rsw+166); + int wh = (int)*(float*)(rsw + offset); aFree(rsw); return wh; } diff --git a/src/map/messages.h b/src/map/messages.h index 5bfd476a2..a46905a76 100644 --- a/src/map/messages.h +++ b/src/map/messages.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2020 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/messages_ad.h b/src/map/messages_ad.h index e0a4e5c98..016858496 100644 --- a/src/map/messages_ad.h +++ b/src/map/messages_ad.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/map/messages_main.h b/src/map/messages_main.h index e369d6c56..5dce0b1ce 100644 --- a/src/map/messages_main.h +++ b/src/map/messages_main.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20191211 +Latest version: 20200108 */ enum clif_messages { @@ -7263,9 +7263,11 @@ The Memorial Dungeon's entry time limit expired; it has been destroyed. The Memorial Dungeon has been removed. */ MSG_MEMORIAL_DUN_DESTROY_REQUEST = 0x544, -/*20070918 to latest +/*20070918 to 20191218 메모리얼 던전에 시스템 오류가 발생하였습니다. 정상적인 게임 진행을 위해 재접속을 해주십시오. A system error has occurred in the Memorial Dungeon. Please relog in to the game to continue playing. +20191224 to latest +메모리얼 던전에 통신 장애가 발생하였습니다. 정상적인 게임 진행을 위해 잠시 후, 재접속을 해주십시오. */ MSG_MEMORIAL_DUN_ERROR = 0x545, /*20070918 to latest @@ -21243,8 +21245,10 @@ Zoom Out 기능을 해제합니다 (Off) 파티장인 경우, 가입 요청을 할 수 없습니다. */ MSG_ID_DBB = 0xdbb, -/*20180418 to latest +/*20180418 to 20191211 모험가 중개소에 등록 중입니다. 잠시만 기다려 주세요. +20191218 to latest +파티 가입 최대 레벨은 최소 레벨 설정보다 높아야 합니다. */ MSG_ID_DBC = 0xdbc, /*20180418 to latest @@ -22226,8 +22230,10 @@ VTC 인증에 실패하였습니다. 가나다 정렬 */ MSG_ID_E8A = 0xe8a, -/*20191113 to latest +/*20191113 to 20191224 기본 결과물은 %s %d개 이나, 낮은 확률로 최대 %d개까지 생성될 수 있습니다. +20200108 to latest +※[%s] %d~%d개 제작 */ MSG_ID_E8B = 0xe8b, /*20191113 to latest @@ -22433,6 +22439,31 @@ Num: %d/%d Weight: %d/%d */ MSG_ID_EBC = 0xebc, #endif +#if PACKETVER >= 20191218 +/*20191218 to latest +서번트 웨폰 %d개가 필요합니다. +*/ + MSG_ID_EBD = 0xebd, +/*20191218 to latest +https://member.gnjoy.com.tw/billing.aspx +*/ + MSG_ID_EBE = 0xebe, +#endif +#if PACKETVER >= 20200108 +/*20200108 to latest +역순 정렬 +*/ + MSG_ID_EBF = 0xebf, +/*20200108 to latest +검색 내용 입력 +*/ + MSG_ID_EC0 = 0xec0, +/*20200108 to latest +검색 +Search +*/ + MSG_ID_EC1 = 0xec1, +#endif }; #endif /* MAP_MESSAGES_MAIN_H */ diff --git a/src/map/messages_re.h b/src/map/messages_re.h index d9f279bfd..294084c65 100644 --- a/src/map/messages_re.h +++ b/src/map/messages_re.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20191211 +Latest version: 20200108 */ enum clif_messages { @@ -6780,9 +6780,11 @@ The Memorial Dungeon's entry time limit expired; it has been destroyed. The Memorial Dungeon has been removed. */ MSG_MEMORIAL_DUN_DESTROY_REQUEST = 0x544, -/*20080827 to latest +/*20080827 to 20191218 메모리얼 던전에 시스템 오류가 발생하였습니다. 정상적인 게임 진행을 위해 재접속을 해주십시오. A system error has occurred in the Memorial Dungeon. Please relog in to the game to continue playing. +20191224 to latest +메모리얼 던전에 통신 장애가 발생하였습니다. 정상적인 게임 진행을 위해 잠시 후, 재접속을 해주십시오. */ MSG_MEMORIAL_DUN_ERROR = 0x545, /*20080827 to latest @@ -21705,8 +21707,10 @@ VTC 인증에 실패하였습니다. 가나다 정렬 */ MSG_ID_E8A = 0xe8a, -/*20191113 to latest +/*20191113 to 20191224 기본 결과물은 %s %d개 이나, 낮은 확률로 최대 %d개까지 생성될 수 있습니다. +20200108 to latest +※[%s] %d~%d개 제작 */ MSG_ID_E8B = 0xe8b, /*20191113 to latest @@ -21912,6 +21916,31 @@ Num: %d/%d Weight: %d/%d */ MSG_ID_EBC = 0xebc, #endif +#if PACKETVER >= 20191218 +/*20191218 to latest +서번트 웨폰 %d개가 필요합니다. +*/ + MSG_ID_EBD = 0xebd, +/*20191218 to latest +https://member.gnjoy.com.tw/billing.aspx +*/ + MSG_ID_EBE = 0xebe, +#endif +#if PACKETVER >= 20200108 +/*20200108 to latest +역순 정렬 +*/ + MSG_ID_EBF = 0xebf, +/*20200108 to latest +검색 내용 입력 +*/ + MSG_ID_EC0 = 0xec0, +/*20200108 to latest +검색 +Search +*/ + MSG_ID_EC1 = 0xec1, +#endif }; #endif /* MAP_MESSAGES_RE_H */ diff --git a/src/map/messages_sak.h b/src/map/messages_sak.h index 2c7bfd661..00e414b22 100644 --- a/src/map/messages_sak.h +++ b/src/map/messages_sak.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h index 2c0c6203b..305f76911 100644 --- a/src/map/messages_zero.h +++ b/src/map/messages_zero.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20191211 +Latest version: 20191224 */ enum clif_messages { @@ -17343,8 +17343,10 @@ Zoom Out 기능을 해제합니다 (Off) 파티장인 경우, 가입 요청을 할 수 없습니다. */ MSG_ID_DBB = 0xdbb, -/*20180425 to latest +/*20180425 to 20191211 모험가 중개소에 등록 중입니다. 잠시만 기다려 주세요. +20191224 to latest +파티 가입 최대 레벨은 최소 레벨 설정보다 높아야 합니다. */ MSG_ID_DBC = 0xdbc, /*20180425 to latest @@ -18524,6 +18526,16 @@ Num: %d/%d Weight: %d/%d */ MSG_ID_EBC = 0xebc, #endif +#if PACKETVER >= 20191224 +/*20191224 to latest +서번트 웨폰 %d개가 필요합니다. +*/ + MSG_ID_EBD = 0xebd, +/*20191224 to latest +https://member.gnjoy.com.tw/billing.aspx +*/ + MSG_ID_EBE = 0xebe, +#endif }; #endif /* MAP_MESSAGES_ZERO_H */ diff --git a/src/map/packets.h b/src/map/packets.h index 48d937957..abcbddadb 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -728,7 +728,7 @@ packet(0x96e,clif->ackmergeitems); // all versions #if PACKETVER >= 20100824 - packet(0x0844,clif->pCashShopOpen,2); + packet(0x0844,clif->pCashShopOpen1); #endif //2010-11-24aRagexeRE @@ -1980,7 +1980,11 @@ packet(0x96e,clif->ackmergeitems); #endif #if PACKETVER >= 20190724 - packet(0x0b4c,clif->pCashShopOpen,2); + packet(0x0b4c,clif->pCashShopLimitedReq); +#endif + +#if PACKETVER >= 20191224 + packet(0x0b6d,clif->pCashShopOpen2); #endif #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h index 39186039d..adfefe5dc 100644 --- a/src/map/packets_keys_main.h +++ b/src/map/packets_keys_main.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ packetKeys(0x49357d72,0x22c370a1,0x5f836591); #endif -// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE +// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE, 2019-12-18bRagexe, 2019-12-18bRagexeRE, 2019-12-24aRagexe, 2019-12-24aRagexeRE, 2019-12-24bRagexe, 2019-12-24bRagexeRE, 2020-01-08aRagexe, 2020-01-08bRagexeRE #if PACKETVER == 20101123 || \ PACKETVER == 20101124 || \ PACKETVER == 20101125 || \ @@ -178,7 +178,10 @@ PACKETVER == 20191120 || \ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ - PACKETVER >= 20191211 + PACKETVER == 20191211 || \ + PACKETVER == 20191218 || \ + PACKETVER == 20191224 || \ + PACKETVER >= 20200108 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h index 3faefb3cf..6be572964 100644 --- a/src/map/packets_keys_zero.h +++ b/src/map/packets_keys_zero.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -102,7 +102,8 @@ PACKETVER == 20191113 || \ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ - PACKETVER >= 20191211 + PACKETVER == 20191211 || \ + PACKETVER >= 20191224 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h index 8e0eb63d5..0e7ca8609 100644 --- a/src/map/packets_shuffle_main.h +++ b/src/map/packets_shuffle_main.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -9794,7 +9794,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe +// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe, 2019-12-18bRagexe, 2019-12-24aRagexe, 2019-12-24bRagexe, 2020-01-08aRagexe #if PACKETVER == 20190904 || \ PACKETVER == 20190918 || \ PACKETVER == 20190925 || \ @@ -9809,7 +9809,10 @@ PACKETVER == 20191120 || \ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ - PACKETVER == 20191211 + PACKETVER == 20191211 || \ + PACKETVER == 20191218 || \ + PACKETVER == 20191224 || \ + PACKETVER == 20200108 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h index 891afde57..37b50c863 100644 --- a/src/map/packets_shuffle_re.h +++ b/src/map/packets_shuffle_re.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -9744,7 +9744,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE +// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE, 2019-12-18bRagexeRE, 2019-12-24aRagexeRE, 2019-12-24bRagexeRE, 2020-01-08bRagexeRE #if PACKETVER == 20190904 || \ PACKETVER == 20190918 || \ PACKETVER == 20190925 || \ @@ -9758,7 +9758,10 @@ PACKETVER == 20191120 || \ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ - PACKETVER == 20191211 + PACKETVER == 20191211 || \ + PACKETVER == 20191218 || \ + PACKETVER == 20191224 || \ + PACKETVER == 20200108 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h index 8ea474bd5..eaac59a12 100644 --- a/src/map/packets_shuffle_zero.h +++ b/src/map/packets_shuffle_zero.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2019 Hercules Dev Team - * Copyright (C) 2018-2019 Andrei Karas (4144) + * Copyright (C) 2013-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -803,7 +803,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero +// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero #if PACKETVER == 20190828 || \ PACKETVER == 20190911 || \ PACKETVER == 20190918 || \ @@ -814,7 +814,8 @@ PACKETVER == 20191113 || \ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ - PACKETVER == 20191211 + PACKETVER == 20191211 || \ + PACKETVER == 20191224 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index a98317364..7b1d91004 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3748,17 +3748,44 @@ struct PACKET_ZC_NOTIFY_EFFECT3 { DEFINE_PACKET_HEADER(ZC_NOTIFY_EFFECT3, 0x0284); #endif +#if PACKETVER >= 20100824 +struct PACKET_CZ_SE_CASHSHOP_OPEN1 { + int16 packetType; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN1, 0x0844); +#endif + +#if PACKETVER >= 20191224 +struct PACKET_CZ_SE_CASHSHOP_OPEN2 { + int16 packetType; + uint32 tab; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN2, 0x0b6d); +#endif + #if PACKETVER >= 20190724 -struct PACKET_CZ_SE_CASHSHOP_OPEN { +struct PACKET_CZ_SE_CASHSHOP_LIMITED_REQ { int16 packetType; } __attribute__((packed)); -DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN, 0x0b4c); -CHECK_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN, 0x0844); -#elif PACKETVER >= 20100824 -struct PACKET_CZ_SE_CASHSHOP_OPEN { +DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_LIMITED_REQ, 0x0b4c); +#endif + +#if PACKETVER_ZERO_NUM >= 20191224 +struct PACKET_ZC_SE_CASHSHOP_OPEN { + int16 packetType; + uint32 cashPoints; + uint32 kafraPoints; + uint32 tab; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0b6e); +// for ragexeRE in some version this packet unused [4144] +#elif PACKETVER_MAIN_NUM >= 20101123 || PACKETVER_RE_NUM >= 20120328 || PACKETVER_ZERO_NUM >= defined(PACKETVER_ZERO) +struct PACKET_ZC_SE_CASHSHOP_OPEN { int16 packetType; + uint32 cashPoints; + uint32 kafraPoints; } __attribute__((packed)); -DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_OPEN, 0x0844); +DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845); #endif #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute diff --git a/src/map/pc.c b/src/map/pc.c index 179a4b78a..6ea3b3393 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8189,6 +8189,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src) && pc->isDeathPenaltyJob(sd->job) && !map->list[sd->bl.m].flag.noexppenalty && !map_flag_gvg2(sd->bl.m) && !sd->sc.data[SC_BABY] && !sd->sc.data[SC_CASH_DEATHPENALTY] + && !pc->auto_exp_insurance(sd) ) { if (battle_config.death_penalty_base > 0) { unsigned int base_penalty = 0; @@ -12162,15 +12163,15 @@ static int pc_have_magnifier(struct map_session_data *sd) /** * checks if player have any item that listed in item chain * @param sd map_session_data of Player - * @param chain_id unsigned short of item chain id + * @param chain_cache_id cache id of item chain * @return index of inventory, INDEX_NOT_FOUND if it is not found */ -static int pc_have_item_chain(struct map_session_data *sd, unsigned short chain_id) +static int pc_have_item_chain(struct map_session_data *sd, enum e_chain_cache chain_cache_id) { - if (chain_id >= itemdb->chain_count) { - ShowError("itemdb_chain_item: unknown chain id %d\n", chain_id); - return INDEX_NOT_FOUND; - } + nullpo_retr(INDEX_NOT_FOUND, sd); + Assert_retr(INDEX_NOT_FOUND, chain_cache_id >= ECC_ORE && chain_cache_id < ECC_MAX); + + int chain_id = itemdb->chain_cache[chain_cache_id]; for (int n = 0; n < itemdb->chains[chain_id].qty; n++) { struct item_chain_entry *entry = &itemdb->chains[chain_id].items[n]; @@ -12392,6 +12393,21 @@ static bool pc_expandInventory(struct map_session_data *sd, int adjustSize) return true; } +static bool pc_auto_exp_insurance(struct map_session_data *sd) +{ + nullpo_retr(false, sd); + + int item_position = pc->have_item_chain(sd, ECC_NEO_INSURANCE); + if (item_position == INDEX_NOT_FOUND) + return false; + + pc->delitem(sd, item_position, 1, 0, DELITEM_SKILLUSE, LOG_TYPE_CONSUME); +#if PACKETVER >= 20100914 + clif->msgtable(sd, MSG_NOTIFY_NEO_INSURANCE_ITEM_USE); +#endif + return true; +} + static void do_final_pc(void) { @@ -12798,4 +12814,5 @@ void pc_defaults(void) pc->isDeathPenaltyJob = pc_isDeathPenaltyJob; pc->has_second_costume = pc_has_second_costume; pc->expandInventory = pc_expandInventory; + pc->auto_exp_insurance = pc_auto_exp_insurance; } diff --git a/src/map/pc.h b/src/map/pc.h index 7a42be5be..e44b9cdda 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -635,6 +635,7 @@ END_ZEROED_BLOCK; unsigned immune : 1; unsigned sitstand : 1; unsigned commands : 1; + unsigned npc : 1; } block_action; /* Achievement System */ @@ -1186,7 +1187,7 @@ END_ZEROED_BLOCK; /* End */ void (*update_idle_time) (struct map_session_data* sd, enum e_battle_config_idletime type); int (*have_magnifier) (struct map_session_data *sd); - int (*have_item_chain) (struct map_session_data *sd, unsigned short chain_id); + int (*have_item_chain) (struct map_session_data *sd, enum e_chain_cache chain_cache_id); bool (*process_chat_message) (struct map_session_data *sd, const char *message); int (*wis_message_to_gm) (const char *sender_name, int permission, const char *message); @@ -1196,6 +1197,7 @@ END_ZEROED_BLOCK; /* End */ bool (*isDeathPenaltyJob) (uint16 job); bool (*has_second_costume) (struct map_session_data *sd); bool (*expandInventory) (struct map_session_data *sd, int adjustSize); + bool (*auto_exp_insurance) (struct map_session_data *sd); }; #ifdef HERCULES_CORE diff --git a/src/map/script.c b/src/map/script.c index 7116f7808..f8a12f2a4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -19162,6 +19162,9 @@ static BUILDIN(setpcblock) if ((type & PCBLOCK_COMMANDS) != 0) sd->block_action.commands = state; + if ((type & PCBLOCK_NPC) != 0) + sd->block_action.npc = state; + return true; } @@ -19199,6 +19202,9 @@ static BUILDIN(checkpcblock) if (sd->block_action.commands != 0) retval |= PCBLOCK_COMMANDS; + if (sd->block_action.npc != 0) + retval |= PCBLOCK_NPC; + script_pushint(st, retval); return true; } @@ -26004,6 +26010,38 @@ static BUILDIN(openlapineddukddakboxui) return true; } +// Reset 'Feeling' maps. +BUILDIN(resetfeel) +{ + struct map_session_data *sd; + + if (script_hasdata(st, 2)) + sd = script->id2sd(st, script_getnum(st, 2)); + else + sd = script->rid2sd(st); + + if (sd != NULL) + pc->resetfeel(sd); + + return true; +} + +// Reset hatred target marks. +BUILDIN(resethate) +{ + struct map_session_data *sd; + + if (script_hasdata(st, 2)) + sd = script->id2sd(st, script_getnum(st, 2)); + else + sd = script->rid2sd(st); + + if (sd != NULL) + pc->resethate(sd); + + return true; +} + /** * Adds a built-in script function. * @@ -26385,6 +26423,8 @@ static void script_parse_builtin(void) BUILDIN_DEF(resetlvl,"i"), BUILDIN_DEF(resetstatus,""), BUILDIN_DEF(resetskill,""), + BUILDIN_DEF(resetfeel, "?"), + BUILDIN_DEF(resethate, "?"), BUILDIN_DEF(skillpointcount,""), BUILDIN_DEF(changebase,"i?"), BUILDIN_DEF(changesex,""), @@ -27264,6 +27304,7 @@ static void script_hardcoded_constants(void) script->set_constant("PCBLOCK_IMMUNE", PCBLOCK_IMMUNE, false, false); script->set_constant("PCBLOCK_SITSTAND", PCBLOCK_SITSTAND, false, false); script->set_constant("PCBLOCK_COMMANDS", PCBLOCK_COMMANDS, false, false); + script->set_constant("PCBLOCK_NPC", PCBLOCK_NPC, false, false); script->constdb_comment("private airship responds"); script->set_constant("P_AIRSHIP_NONE", P_AIRSHIP_NONE, false, false); diff --git a/src/map/script.h b/src/map/script.h index 1cec02b97..7bcb5298c 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -529,16 +529,17 @@ enum script_petinfo_types { * Player blocking actions related flags. */ enum pcblock_action_flag { - PCBLOCK_NONE = 0x00, - PCBLOCK_MOVE = 0x01, - PCBLOCK_ATTACK = 0x02, - PCBLOCK_SKILL = 0x04, - PCBLOCK_USEITEM = 0x08, - PCBLOCK_CHAT = 0x10, - PCBLOCK_IMMUNE = 0x20, - PCBLOCK_SITSTAND = 0x40, - PCBLOCK_COMMANDS = 0x80, - PCBLOCK_ALL = 0xFF, + PCBLOCK_NONE = 0x000, + PCBLOCK_MOVE = 0x001, + PCBLOCK_ATTACK = 0x002, + PCBLOCK_SKILL = 0x004, + PCBLOCK_USEITEM = 0x008, + PCBLOCK_CHAT = 0x010, + PCBLOCK_IMMUNE = 0x020, + PCBLOCK_SITSTAND = 0x040, + PCBLOCK_COMMANDS = 0x080, + PCBLOCK_NPC = 0x100, + PCBLOCK_ALL = 0x1FF, }; /** diff --git a/src/map/unit.c b/src/map/unit.c index b9176fa69..d7d95c57b 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1932,8 +1932,10 @@ static int unit_attack(struct block_list *src, int target_id, int continuous) if (src->type == BL_PC) { struct map_session_data *sd = BL_UCAST(BL_PC, src); - if( target->type == BL_NPC ) { // monster npcs [Valaris] - npc->click(sd, BL_UCAST(BL_NPC, target)); // submitted by leinsirk10 [Celest] + if (target->type == BL_NPC) { // monster npcs [Valaris] + if (sd->block_action.npc == 0) { // *pcblock script command + npc->click(sd, BL_UCAST(BL_NPC, target)); // submitted by leinsirk10 [Celest] + } return 0; } if( pc_is90overweight(sd) || pc_isridingwug(sd) ) { // overweight or mounted on warg - stop attacking |