mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Merge branch 'fix-toggle-furni-effect' into 'dev'
Fix toggle furni effect See merge request morningstar/Arcturus-Community!28
This commit is contained in:
commit
f3b1971e2b
@ -146,7 +146,15 @@ public class WiredEffectToggleFurni extends InteractionWiredEffect
|
||||
{
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user