summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/clif.c10
-rw-r--r--src/map/guild.c4
-rw-r--r--src/map/packets.h9
-rw-r--r--src/map/packets_keys_main.h5
-rw-r--r--src/map/packets_keys_zero.h5
-rw-r--r--src/map/packets_shuffle_main.h5
-rw-r--r--src/map/packets_shuffle_zero.h5
-rw-r--r--src/map/packets_struct.h4
-rw-r--r--src/map/skill.c16
-rw-r--r--src/map/skill.h4
-rw-r--r--src/map/status.c24
12 files changed, 58 insertions, 35 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 5f56599d7..49cc78f7e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6955,7 +6955,7 @@ static const struct battle_data {
{ "chase_range_rate", &battle_config.chase_range_rate, 100, 0, INT_MAX, },
{ "gtb_sc_immunity", &battle_config.gtb_sc_immunity, 50, 0, INT_MAX, },
{ "guild_max_castles", &battle_config.guild_max_castles, 0, 0, INT_MAX, },
- { "guild_skill_relog_delay", &battle_config.guild_skill_relog_delay, 0, 0, 1, },
+ { "guild_skill_relog_delay", &battle_config.guild_skill_relog_delay, 0, 0, 2, },
{ "emergency_call", &battle_config.emergency_call, 11, 0, 31, },
{ "atcommand_spawn_quantity_limit", &battle_config.atc_spawn_quantity_limit, 100, 0, INT_MAX, },
{ "atcommand_slave_clone_limit", &battle_config.atc_slave_clone_limit, 25, 0, INT_MAX, },
diff --git a/src/map/clif.c b/src/map/clif.c
index 60f4b18c0..47d5a1586 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -819,7 +819,7 @@ void clif_dropflooritem(struct flooritem_data* fitem) {
p.subX = fitem->subx;
p.subY = fitem->suby;
p.count = fitem->item_data.amount;
-#ifdef PACKETVER_ZERO
+#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
if (fitem->showdropeffect) {
p.showdropeffect = itemdb_showdropeffect(fitem->item_data.nameid);
p.dropeffectmode = itemdb_dropeffectmode(fitem->item_data.nameid);
@@ -20519,7 +20519,7 @@ void clif_parse_open_ui_request(int fd, struct map_session_data *sd)
void clif_open_ui(struct map_session_data *sd, int8 UIType)
{
-#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404
+#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
int claimed = 0;
struct PACKET_ZC_OPEN_UI p;
@@ -20542,14 +20542,14 @@ void clif_open_ui(struct map_session_data *sd, int8 UIType)
clif->send(&p, sizeof(p), &sd->bl, SELF);
#else
- ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404.\n");
+ ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n");
#endif
}
void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
{
-#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404
+#if PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411
struct rodex_message msg = { 0 };
struct attendance_entry *entry;
@@ -20593,7 +20593,7 @@ void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd)
intif->rodex_sendmail(&msg);
clif->ui_action(sd, 0, sd->status.attendance_count);
#else
- ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404.\n");
+ ShowWarning("Attendance System available only for PACKETVER_RE_NUM >= 20180307 || PACKETVER_MAIN_NUM >= 20180404 || PACKETVER_ZERO_NUM >= 20180411.\n");
#endif
}
diff --git a/src/map/guild.c b/src/map/guild.c
index d33df5e08..d9833a2f4 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -552,7 +552,7 @@ int guild_recv_info(const struct guild *sg)
if ((sd = map->nick2sd(sg->master)) != NULL) {
//If the guild master is online the first time the guild_info is received,
//that means he was the first to join, so apply guild skill blocking here.
- if( battle_config.guild_skill_relog_delay )
+ if( battle_config.guild_skill_relog_delay == 1)
guild->block_skill(sd, 300000);
//Also set the guild master flag.
@@ -760,7 +760,7 @@ void guild_member_joined(struct map_session_data *sd)
// set the Guild Master flag
sd->state.gmaster_flag = 1;
// prevent Guild Skills from being used directly after relog
- if( battle_config.guild_skill_relog_delay )
+ if( battle_config.guild_skill_relog_delay == 1 )
guild->block_skill(sd, 300000);
}
i = guild->getindex(g, sd->status.account_id, sd->status.char_id);
diff --git a/src/map/packets.h b/src/map/packets.h
index db98cdc28..a723463b4 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -4087,4 +4087,13 @@ packet(0x96e,-1,clif->ackmergeitems);
#endif
#endif
+#ifndef PACKETVER_ZERO
+// 2018-04-18aRagexe, 2018-04-18bRagexeRE
+#if PACKETVER >= 20180418
+// new packets
+ packet(0x0afb,-1,clif->pDull/*,XXX*/);
+// changed packet sizes
+#endif
+#endif
+
#endif /* MAP_PACKETS_H */
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 150fb486a..1f6a3ca6d 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -874,7 +874,7 @@
packetKeys(0x6A596301,0x76866D0E,0x32294A45);
#endif
-// 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
+// 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
#if PACKETVER == 20131223 || \
PACKETVER == 20140508 || \
PACKETVER == 20140611 || \
@@ -882,7 +882,8 @@
PACKETVER == 20180315 || \
PACKETVER == 20180321 || \
PACKETVER == 20180328 || \
- PACKETVER >= 20180404
+ PACKETVER == 20180404 || \
+ PACKETVER >= 20180418
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index 2bd6f1604..d9625f716 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -29,7 +29,7 @@
/* This file is autogenerated, please do not commit manual changes */
-// 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
+// 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
#if PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
PACKETVER == 20171024 || \
@@ -41,7 +41,8 @@
PACKETVER == 20171113 || \
PACKETVER == 20180315 || \
PACKETVER == 20180321 || \
- PACKETVER == 20180328
+ PACKETVER == 20180328 || \
+ PACKETVER >= 20180411
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 16d480893..4bb998652 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -3345,13 +3345,14 @@
packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE
#endif
-// 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
+// 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
#if PACKETVER == 20140611 || \
PACKETVER == 20150225 || \
PACKETVER == 20180315 || \
PACKETVER == 20180321 || \
PACKETVER == 20180328 || \
- PACKETVER >= 20180404
+ PACKETVER == 20180404 || \
+ PACKETVER >= 20180418
packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS
packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER
packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD
diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h
index 7cd52d971..087eb119f 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -36,7 +36,7 @@
/* This file is autogenerated, please do not commit manual changes */
-// 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
+// 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
#if PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
PACKETVER == 20171024 || \
@@ -48,7 +48,8 @@
PACKETVER == 20171113 || \
PACKETVER == 20180315 || \
PACKETVER == 20180321 || \
- PACKETVER == 20180328
+ PACKETVER == 20180328 || \
+ PACKETVER >= 20180411
packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS
packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER
packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 438084778..5b9a4344a 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -191,7 +191,7 @@ enum packet_headers {
skill_entryType = 0x9ca,
#endif
graffiti_entryType = 0x1c9,
-#ifdef PACKETVER_ZERO
+#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
dropflooritemType = 0xadd,
#elif PACKETVER > 20130000 /* not sure date */
dropflooritemType = 0x84b,
@@ -530,7 +530,7 @@ struct packet_dropflooritem {
uint8 subX;
uint8 subY;
int16 count;
-#ifdef PACKETVER_ZERO
+#if defined(PACKETVER_ZERO) || PACKETVER >= 20180418
int8 showdropeffect;
int16 dropeffectmode;
#endif
diff --git a/src/map/skill.c b/src/map/skill.c
index 9108b6575..87e869ec7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -19030,9 +19030,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
if (DIFF_TICK32(cd->entry[i]->started + cd->entry[i]->duration, now) > tick)
return 0;
cd->entry[i]->duration = tick;
-#if PACKETVER >= 20120604
cd->entry[i]->total = tick;
-#endif
cd->entry[i]->started = now;
if( timer->settick(cd->entry[i]->timer,now+tick) != -1 )
return 0;
@@ -19064,9 +19062,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
cd->entry[cd->cursor] = ers_alloc(skill->cd_entry_ers,struct skill_cd_entry);
cd->entry[cd->cursor]->duration = tick;
-#if PACKETVER >= 20120604
cd->entry[cd->cursor]->total = tick;
-#endif
cd->entry[cd->cursor]->skidx = idx;
cd->entry[cd->cursor]->skill_id = skill_id;
cd->entry[cd->cursor]->started = now;
@@ -19715,8 +19711,16 @@ void skill_cooldown_load(struct map_session_data * sd)
// process each individual cooldown associated with the character
for( i = 0; i < cd->cursor; i++ ) {
- cd->entry[i]->started = now;
- cd->entry[i]->timer = timer->add(timer->gettick()+cd->entry[i]->duration,skill->blockpc_end,sd->bl.id,cd->entry[i]->skidx);
+ int64 remaining;
+
+ if (battle_config.guild_skill_relog_delay == 2 && cd->entry[i]->skill_id >= GD_SKILLBASE && cd->entry[i]->skill_id < GD_MAX) {
+ remaining = cd->entry[i]->started + cd->entry[i]->total - now;
+ remaining = max(1, remaining); // expired cooldowns will be 1, so they'll expire in the normal way just after this.
+ } else {
+ cd->entry[i]->started = now;
+ remaining = cd->entry[i]->duration;
+ }
+ cd->entry[i]->timer = timer->add(timer->gettick() + remaining, skill->blockpc_end, sd->bl.id, cd->entry[i]->skidx);
sd->blockskill[cd->entry[i]->skidx] = true;
}
}
diff --git a/src/map/skill.h b/src/map/skill.h
index d7590921a..3de7f7bdf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1842,9 +1842,7 @@ struct s_skill_magicmushroom_db {
struct skill_cd_entry {
int duration;//milliseconds
-#if PACKETVER >= 20120604
- int total;/* used for display on newer clients */
-#endif
+ int total;/* used when reducing offline cooldown and for display on newer clients */
short skidx;//the skill index entries belong to
int64 started;/* gettick() of when it started, used vs duration to measure how much left upon logout */
int timer;/* timer id */
diff --git a/src/map/status.c b/src/map/status.c
index b2f67735b..a39449b11 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -10189,8 +10189,8 @@ void status_change_start_stop_action(struct block_list *bl, enum sc_type type)
* @param val3 Additional value (meaning depends on type).
* @param val4 Additional value (meaning depends on type).
*
- * @retval 0 if no status change happened.
- * @retval 1 if the status change was successfully applied.
+ * @retval false if no status change happened, or the other sc can be started regardless.
+ * @retval true if the status change was successfully applied and the other sc shouldn't be started.
*/
bool status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change* sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4)
{
@@ -10200,14 +10200,22 @@ bool status_end_sc_before_start(struct block_list *bl, struct status_data *st, s
switch (type) {
case SC_BLESSING:
- //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
- //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
- if ((!undead_flag && st->race != RC_DEMON) || bl->type == BL_PC) {
- status_change_end(bl, SC_CURSE, INVALID_TIMER);
- if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
+ // TODO: Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
+ // but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
+ if ((undead_flag == 0 && st->race != RC_DEMON) || bl->type == BL_PC) {
+ bool prevent_start = false;
+ if (sc->data[SC_CURSE] != NULL) {
+ prevent_start = true;
+ status_change_end(bl, SC_CURSE, INVALID_TIMER);
+ }
+ if (sc->data[SC_STONE] != NULL && sc->opt1 == OPT1_STONE) {
+ prevent_start = true;
status_change_end(bl, SC_STONE, INVALID_TIMER);
+ }
+ if (prevent_start)
+ return true;
}
- if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH)
+ if (sc->data[SC_SOULLINK] != NULL && sc->data[SC_SOULLINK]->val2 == SL_HIGH)
status_change_end(bl, SC_SOULLINK, INVALID_TIMER);
break;
case SC_INC_AGI: