Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update droplight effects #5563

Merged
merged 16 commits into from
Nov 21, 2020
9 changes: 7 additions & 2 deletions src/map/itemdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,11 +755,16 @@ enum e_itemshop_restrictions {
enum e_item_drop_effect : uint16 {
DROPEFFECT_NONE = 0,
DROPEFFECT_CLIENT,
DROPEFFECT_WHITE_PILLAR,
#if PACKETVER < 20200304
DROPEFFECT_WHITE_PILLAR, // White pillar was removed from 2020-03-04+
Balferian marked this conversation as resolved.
Show resolved Hide resolved
#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)
Balferian marked this conversation as resolved.
Show resolved Hide resolved
#if PACKETVER >= 20200304
DROPEFFECT_RED_PILLAR,
#endif
DROPEFFECT_MAX
Balferian marked this conversation as resolved.
Show resolved Hide resolved
};

Expand Down
6 changes: 6 additions & 0 deletions src/map/script_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7969,11 +7969,17 @@
/* item drop effects */
export_constant(DROPEFFECT_NONE);
export_constant(DROPEFFECT_CLIENT);
#if PACKETVER < 20200304
Balferian marked this conversation as resolved.
Show resolved Hide resolved
export_constant(DROPEFFECT_WHITE_PILLAR);
#endif
Balferian marked this conversation as resolved.
Show resolved Hide resolved
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);
Balferian marked this conversation as resolved.
Show resolved Hide resolved
#if PACKETVER >= 20200304
Balferian marked this conversation as resolved.
Show resolved Hide resolved
export_constant(DROPEFFECT_RED_PILLAR);
#endif
Balferian marked this conversation as resolved.
Show resolved Hide resolved
export_constant(DROPEFFECT_MAX);

#undef export_constant
Expand Down
6 changes: 6 additions & 0 deletions src/tool/csv2yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Balferian marked this conversation as resolved.
Show resolved Hide resolved
else if (flag & 128)
item.dropEffect = DROPEFFECT_WHITE_PILLAR;
#endif
Balferian marked this conversation as resolved.
Show resolved Hide resolved
else if (flag & 256)
item.dropEffect = DROPEFFECT_BLUE_PILLAR;
else if (flag & 512)
Expand All @@ -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
Balferian marked this conversation as resolved.
Show resolved Hide resolved

item_flag.insert({ strtoul(fields[0], nullptr, 10), item });
return true;
Expand Down