brenoepics / morningstar

An open-source Arcturus Community Fork.
GNU General Public License v3.0
3 stars 2 forks source link

Purchasable Effects with Duration - [closed] #1500

Closed brenoepics closed 1 year ago

brenoepics commented 2 years ago

In GitLab by @TenShie on Jan 26, 2022, 08:24

Merges dev -> dev

Added Purchasable Effects with Duration. (Duration can be set via Extradata) string to int convertion.

brenoepics commented 2 years ago

In GitLab by @Thijmen on Jan 26, 2022, 08:31

changed target branch from master to dev

brenoepics commented 2 years ago

In GitLab by @Thijmen on Jan 26, 2022, 08:38

Commented on src/main/java/com/eu/habbo/habbohotel/catalog/CatalogManager.java line 964

I'd rewrite this LOGGER.error to: Cannot convert extradata to integer, extradata value: (value of extradata). This is much more meaningful, because if there is an exception here, it will be because it cannot be parsed.

brenoepics commented 2 years ago

In GitLab by @TenShie on Jan 26, 2022, 08:46

Commented on src/main/java/com/eu/habbo/habbohotel/catalog/CatalogManager.java line 964

I trust you, i have no idea. or experience coding. and thanks for this advice. :3

brenoepics commented 2 years ago

In GitLab by @TenShie on Jan 26, 2022, 09:07

added 1 commit

Compare with previous version

brenoepics commented 2 years ago

In GitLab by @oshawott on Jan 26, 2022, 10:49

Integer.parseInt(extradata); should be Integer.parseInt(item.getExtradata());, just using extradata doesn't return anything. As recommended, you can replace LOGGER.error("Caught exception", e); with LOGGER.error("Cannot convert extradata to integer, extradata value: " + item.getExtradata());

:smile_cat: