mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 15:00:52 +01:00
Final Patch to totems, resolves the NumberFormatException for all Totems. Added correct SQL for totems.
This commit is contained in:
parent
353bde440c
commit
6f0fcafb7b
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
6
sqlupdates/2_2_1_TO_2_2_2.sql
Normal file
6
sqlupdates/2_2_1_TO_2_2_2.sql
Normal 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';
|
@ -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";
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user