mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Fix number formatting error in toggle furni effect
This commit is contained in:
parent
419c3d07af
commit
0e56cba7a1
@ -146,7 +146,15 @@ public class WiredEffectToggleFurni extends InteractionWiredEffect
|
|||||||
{
|
{
|
||||||
if (item.getBaseItem().getStateCount() > 1 || item instanceof InteractionGameTimer)
|
if (item.getBaseItem().getStateCount() > 1 || item instanceof InteractionGameTimer)
|
||||||
{
|
{
|
||||||
item.onClick(habbo != null && !(item instanceof InteractionGameTimer) ? habbo.getClient() : null, room, new Object[]{item.getExtradata().length() == 0 ? 0 : Integer.valueOf(item.getExtradata()), this.getType()});
|
int state = 0;
|
||||||
|
if (!item.getExtradata().isEmpty()) {
|
||||||
|
try {
|
||||||
|
state = Integer.valueOf(item.getExtradata()); // assumes that extradata is state, could be something else for trophies etc.
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.onClick(habbo != null && !(item instanceof InteractionGameTimer) ? habbo.getClient() : null, room, new Object[]{state, this.getType()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
Loading…
Reference in New Issue
Block a user