Merge branch 'dev' into 'master'

Final Patch to totems, resolves the NumberFormatException for all Totems....

See merge request morningstar/Arcturus-Community!67
This commit is contained in:
Harmonic 2020-01-17 15:11:38 -05:00
commit cd2505ebf7
5 changed files with 20 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<groupId>com.eu.habbo</groupId>
<artifactId>Habbo</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -0,0 +1,6 @@
UPDATE items_base SET interaction_type = 'totem_leg' WHERE item_name = 'totem_leg';
UPDATE items_base SET interaction_type = 'totem_head' WHERE item_name = 'totem_head';
UPDATE items_base SET interaction_type = 'totem_planet' WHERE item_name = 'totem_planet';
UPDATE items_base SET interaction_modes_count = '3' WHERE item_name = 'totem_planet';
UPDATE items_base SET interaction_modes_count = '12' WHERE item_name = 'totem_leg';
UPDATE items_base SET interaction_modes_count = '9' WHERE item_name = 'totem_head';

View File

@ -34,7 +34,7 @@ public final class Emulator {
public final static int MINOR = 2;
public final static int BUILD = 1;
public final static int BUILD = 2;
public final static String PREVIEW = "Stable";

View File

@ -21,7 +21,12 @@ public class InteractionTotemLegs extends InteractionDefault {
}
public TotemType getTotemType() {
int extraData = Integer.parseInt(this.getExtradata());
int extraData;
try {
extraData = Integer.parseInt(this.getExtradata());
} catch(NumberFormatException ex) {
extraData = 0;
}
return TotemType.fromInt((int)Math.ceil((extraData + 1) / 4.0f));
}

View File

@ -22,7 +22,12 @@ public class InteractionTotemPlanet extends InteractionDefault {
}
public TotemPlanetType getPlanetType() {
int extraData = Integer.parseInt(this.getExtradata());
int extraData;
try {
extraData = Integer.parseInt(this.getExtradata());
} catch(NumberFormatException ex) {
extraData = 0;
}
return TotemPlanetType.fromInt(extraData);
}