From 47d5811747d331465b69c92b7da165c2a3563ebe Mon Sep 17 00:00:00 2001 From: Balfear Date: Thu, 19 Nov 2020 00:37:12 +0300 Subject: [PATCH 01/16] Update droplight effects --- src/map/itemdb.hpp | 11 +++++++++-- src/map/script_constants.hpp | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index 22750d5a2ee..dc51268fe13 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -755,11 +755,18 @@ enum e_itemshop_restrictions { enum e_item_drop_effect : uint16 { DROPEFFECT_NONE = 0, DROPEFFECT_CLIENT, - DROPEFFECT_WHITE_PILLAR, +#if PACKETVER < 20200304 + DROPEFFECT_WHITE_PILLAR = 2, +#else + DROPEFFECT_WHITE_PILLAR = 1, // White pillar was removed from 2020-03-04+ +#endif DROPEFFECT_BLUE_PILLAR, DROPEFFECT_YELLOW_PILLAR, DROPEFFECT_PURPLE_PILLAR, - DROPEFFECT_ORANGE_PILLAR, + DROPEFFECT_ORANGE_PILLAR, // If client version 2020-03-04+ pillar is green (DROPEFFECT_GREEN_PILLAR) +#if PACKETVER >= 20200304 + DROPEFFECT_RED_PILLAR, +#endif DROPEFFECT_MAX }; diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index c90a1ef25cf..7eb52469ede 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7974,6 +7974,8 @@ export_constant(DROPEFFECT_YELLOW_PILLAR); export_constant(DROPEFFECT_PURPLE_PILLAR); export_constant(DROPEFFECT_ORANGE_PILLAR); + export_constant2("DROPEFFECT_GREEN_PILLAR", DROPEFFECT_ORANGE_PILLAR); + export_constant(DROPEFFECT_RED_PILLAR); export_constant(DROPEFFECT_MAX); #undef export_constant From d3381c6d8bc356e7c6f281317f625b31ed739a3b Mon Sep 17 00:00:00 2001 From: Balfear Date: Thu, 19 Nov 2020 03:05:30 +0300 Subject: [PATCH 02/16] minor fix --- src/map/itemdb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index dc51268fe13..cdd700b2b46 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -756,7 +756,7 @@ enum e_item_drop_effect : uint16 { DROPEFFECT_NONE = 0, DROPEFFECT_CLIENT, #if PACKETVER < 20200304 - DROPEFFECT_WHITE_PILLAR = 2, + DROPEFFECT_WHITE_PILLAR, #else DROPEFFECT_WHITE_PILLAR = 1, // White pillar was removed from 2020-03-04+ #endif From 141abf17b7349cb02efb19b655443471747864df Mon Sep 17 00:00:00 2001 From: Balfear Date: Thu, 19 Nov 2020 13:11:01 +0300 Subject: [PATCH 03/16] Update src/map/itemdb.hpp Co-authored-by: Daegaladh --- src/map/itemdb.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index cdd700b2b46..191a0e3a1e1 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -756,9 +756,7 @@ enum e_item_drop_effect : uint16 { DROPEFFECT_NONE = 0, DROPEFFECT_CLIENT, #if PACKETVER < 20200304 - DROPEFFECT_WHITE_PILLAR, -#else - DROPEFFECT_WHITE_PILLAR = 1, // White pillar was removed from 2020-03-04+ + DROPEFFECT_WHITE_PILLAR, // White pillar was removed from 2020-03-04+ #endif DROPEFFECT_BLUE_PILLAR, DROPEFFECT_YELLOW_PILLAR, From cd2232bb420b06538892594cce24af80c6ea5ce4 Mon Sep 17 00:00:00 2001 From: Balfear Date: Fri, 20 Nov 2020 09:31:46 +0300 Subject: [PATCH 04/16] update constants --- src/map/script_constants.hpp | 4 ++++ src/tool/csv2yaml.cpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 7eb52469ede..7524c1d4bbd 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7969,13 +7969,17 @@ /* item drop effects */ export_constant(DROPEFFECT_NONE); export_constant(DROPEFFECT_CLIENT); +#if PACKETVER < 20200304 export_constant(DROPEFFECT_WHITE_PILLAR); +#endif export_constant(DROPEFFECT_BLUE_PILLAR); export_constant(DROPEFFECT_YELLOW_PILLAR); export_constant(DROPEFFECT_PURPLE_PILLAR); export_constant(DROPEFFECT_ORANGE_PILLAR); export_constant2("DROPEFFECT_GREEN_PILLAR", DROPEFFECT_ORANGE_PILLAR); +#if PACKETVER >= 20200304 export_constant(DROPEFFECT_RED_PILLAR); +#endif export_constant(DROPEFFECT_MAX); #undef export_constant diff --git a/src/tool/csv2yaml.cpp b/src/tool/csv2yaml.cpp index ca7a3cd68f3..107e1a3585a 100644 --- a/src/tool/csv2yaml.cpp +++ b/src/tool/csv2yaml.cpp @@ -2865,8 +2865,10 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { item.delay_consume = true; if (flag & 64) item.dropEffect = DROPEFFECT_CLIENT; +#if PACKETVER < 20200304 else if (flag & 128) item.dropEffect = DROPEFFECT_WHITE_PILLAR; +#endif else if (flag & 256) item.dropEffect = DROPEFFECT_BLUE_PILLAR; else if (flag & 512) @@ -2875,6 +2877,10 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { item.dropEffect = DROPEFFECT_PURPLE_PILLAR; else if (flag & 2048) item.dropEffect = DROPEFFECT_ORANGE_PILLAR; +#if PACKETVER >= 20200304 + else if (flag & 4096) + item.dropEffect = DROPEFFECT_RED_PILLAR; +#endif item_flag.insert({ strtoul(fields[0], nullptr, 10), item }); return true; From d941f15f2e639f737615a1b6f34d9428d9d3a069 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:57:22 +0300 Subject: [PATCH 05/16] Update src/map/itemdb.hpp Co-authored-by: Lemongrass3110 --- src/map/itemdb.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index 191a0e3a1e1..c353ce32aa1 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -761,7 +761,11 @@ enum e_item_drop_effect : uint16 { DROPEFFECT_BLUE_PILLAR, DROPEFFECT_YELLOW_PILLAR, DROPEFFECT_PURPLE_PILLAR, - DROPEFFECT_ORANGE_PILLAR, // If client version 2020-03-04+ pillar is green (DROPEFFECT_GREEN_PILLAR) +#if PACKETVER < 20200304 + DROPEFFECT_ORANGE_PILLAR, +#else + DROPEFFECT_GREEN_PILLAR +#endif #if PACKETVER >= 20200304 DROPEFFECT_RED_PILLAR, #endif From 4e84b12a3efeb3208c9e013c0f29ea1be107c63a Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:57:37 +0300 Subject: [PATCH 06/16] Update src/map/itemdb.hpp Co-authored-by: Lemongrass3110 --- src/map/itemdb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index c353ce32aa1..db3d0665b1d 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -756,7 +756,7 @@ enum e_item_drop_effect : uint16 { DROPEFFECT_NONE = 0, DROPEFFECT_CLIENT, #if PACKETVER < 20200304 - DROPEFFECT_WHITE_PILLAR, // White pillar was removed from 2020-03-04+ + DROPEFFECT_WHITE_PILLAR, #endif DROPEFFECT_BLUE_PILLAR, DROPEFFECT_YELLOW_PILLAR, From 30c99f126b1964e6b8825fe1f838cad67b7db5ad Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:57:45 +0300 Subject: [PATCH 07/16] Update src/map/itemdb.hpp Co-authored-by: Lemongrass3110 --- src/map/itemdb.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index db3d0665b1d..87ae58a7b8f 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -769,7 +769,17 @@ enum e_item_drop_effect : uint16 { #if PACKETVER >= 20200304 DROPEFFECT_RED_PILLAR, #endif - DROPEFFECT_MAX + DROPEFFECT_MAX, +#if PACKETVER >= 20200304 + // White was removed in 2020-03-04 + DROPEFFECT_WHITE_PILLAR, + // Orange was replaced by green in 2020-03-04 + DROPEFFECT_ORANGE_PILLAR, +#else + // Not supported before 2020-03-04 + DROPEFFECT_GREEN_PILLAR, + DROPEFFECT_RED_PILLAR, +#endif }; /// Enum for items with delayed consumption From 24c8cd6c86ede5872d41473103cede10a4fafeb4 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:57:54 +0300 Subject: [PATCH 08/16] Update src/map/script_constants.hpp Co-authored-by: Lemongrass3110 --- src/map/script_constants.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 7524c1d4bbd..7d2b247f6c6 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7969,7 +7969,6 @@ /* item drop effects */ export_constant(DROPEFFECT_NONE); export_constant(DROPEFFECT_CLIENT); -#if PACKETVER < 20200304 export_constant(DROPEFFECT_WHITE_PILLAR); #endif export_constant(DROPEFFECT_BLUE_PILLAR); From a079e21182bbc97b9095d656d3a67096e2da0ff5 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:08 +0300 Subject: [PATCH 09/16] Update src/map/script_constants.hpp Co-authored-by: Lemongrass3110 --- src/map/script_constants.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 7d2b247f6c6..ac4de03883e 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7970,7 +7970,6 @@ export_constant(DROPEFFECT_NONE); export_constant(DROPEFFECT_CLIENT); export_constant(DROPEFFECT_WHITE_PILLAR); -#endif export_constant(DROPEFFECT_BLUE_PILLAR); export_constant(DROPEFFECT_YELLOW_PILLAR); export_constant(DROPEFFECT_PURPLE_PILLAR); From 8587454f95e7915dac4d6598b106dbab01b1e24e Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:17 +0300 Subject: [PATCH 10/16] Update src/map/script_constants.hpp Co-authored-by: Lemongrass3110 --- src/map/script_constants.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index ac4de03883e..b2c60f6b857 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7974,7 +7974,7 @@ export_constant(DROPEFFECT_YELLOW_PILLAR); export_constant(DROPEFFECT_PURPLE_PILLAR); export_constant(DROPEFFECT_ORANGE_PILLAR); - export_constant2("DROPEFFECT_GREEN_PILLAR", DROPEFFECT_ORANGE_PILLAR); + export_constant(DROPEFFECT_GREEN_PILLAR); #if PACKETVER >= 20200304 export_constant(DROPEFFECT_RED_PILLAR); #endif From d4ce8b441f4321cb1c9ee5f01ba132e39a422181 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:25 +0300 Subject: [PATCH 11/16] Update src/map/script_constants.hpp Co-authored-by: Lemongrass3110 --- src/map/script_constants.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index b2c60f6b857..8ccd3f70444 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7975,7 +7975,6 @@ export_constant(DROPEFFECT_PURPLE_PILLAR); export_constant(DROPEFFECT_ORANGE_PILLAR); export_constant(DROPEFFECT_GREEN_PILLAR); -#if PACKETVER >= 20200304 export_constant(DROPEFFECT_RED_PILLAR); #endif export_constant(DROPEFFECT_MAX); From 851bd2eb85f7854d1ab53f6f3599515c9d62c10f Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:36 +0300 Subject: [PATCH 12/16] Update src/map/script_constants.hpp Co-authored-by: Lemongrass3110 --- src/map/script_constants.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 8ccd3f70444..ec61446c26a 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -7976,7 +7976,6 @@ export_constant(DROPEFFECT_ORANGE_PILLAR); export_constant(DROPEFFECT_GREEN_PILLAR); export_constant(DROPEFFECT_RED_PILLAR); -#endif export_constant(DROPEFFECT_MAX); #undef export_constant From 0d4bcde19c979f3a70e2be7ca7cc2716e7491c34 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:42 +0300 Subject: [PATCH 13/16] Update src/tool/csv2yaml.cpp Co-authored-by: Lemongrass3110 --- src/tool/csv2yaml.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tool/csv2yaml.cpp b/src/tool/csv2yaml.cpp index 107e1a3585a..749b112ee5b 100644 --- a/src/tool/csv2yaml.cpp +++ b/src/tool/csv2yaml.cpp @@ -2865,7 +2865,6 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { item.delay_consume = true; if (flag & 64) item.dropEffect = DROPEFFECT_CLIENT; -#if PACKETVER < 20200304 else if (flag & 128) item.dropEffect = DROPEFFECT_WHITE_PILLAR; #endif From d5a37b50c85febaf0d84507611772f3160d02fb9 Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:52 +0300 Subject: [PATCH 14/16] Update src/tool/csv2yaml.cpp Co-authored-by: Lemongrass3110 --- src/tool/csv2yaml.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tool/csv2yaml.cpp b/src/tool/csv2yaml.cpp index 749b112ee5b..b3ce8aa1602 100644 --- a/src/tool/csv2yaml.cpp +++ b/src/tool/csv2yaml.cpp @@ -2867,7 +2867,6 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { item.dropEffect = DROPEFFECT_CLIENT; else if (flag & 128) item.dropEffect = DROPEFFECT_WHITE_PILLAR; -#endif else if (flag & 256) item.dropEffect = DROPEFFECT_BLUE_PILLAR; else if (flag & 512) From 45782100391e07071ef77b14b83580cdbd19ab2b Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 08:58:58 +0300 Subject: [PATCH 15/16] Update src/tool/csv2yaml.cpp Co-authored-by: Lemongrass3110 --- src/tool/csv2yaml.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/tool/csv2yaml.cpp b/src/tool/csv2yaml.cpp index b3ce8aa1602..ca7a3cd68f3 100644 --- a/src/tool/csv2yaml.cpp +++ b/src/tool/csv2yaml.cpp @@ -2875,10 +2875,6 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) { item.dropEffect = DROPEFFECT_PURPLE_PILLAR; else if (flag & 2048) item.dropEffect = DROPEFFECT_ORANGE_PILLAR; -#if PACKETVER >= 20200304 - else if (flag & 4096) - item.dropEffect = DROPEFFECT_RED_PILLAR; -#endif item_flag.insert({ strtoul(fields[0], nullptr, 10), item }); return true; From 2c1c5b7cfaf293a8860072a3e968b8796538b7aa Mon Sep 17 00:00:00 2001 From: Balfear Date: Sat, 21 Nov 2020 09:17:49 +0300 Subject: [PATCH 16/16] minor fix --- src/map/itemdb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index 87ae58a7b8f..59a843f531b 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -764,7 +764,7 @@ enum e_item_drop_effect : uint16 { #if PACKETVER < 20200304 DROPEFFECT_ORANGE_PILLAR, #else - DROPEFFECT_GREEN_PILLAR + DROPEFFECT_GREEN_PILLAR, #endif #if PACKETVER >= 20200304 DROPEFFECT_RED_PILLAR,