mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Prevent too big z positions
This commit is contained in:
parent
1765a14ac1
commit
cb88b55d73
@ -272,7 +272,7 @@ public class ItemManager {
|
|||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_not_freeze", WiredConditionNotFreezeGameActive.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_not_freeze", WiredConditionNotFreezeGameActive.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_rank", WiredConditionHabboHasRank.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_rank", WiredConditionHabboHasRank.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_not_rank", WiredConditionHabboNotRank.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_not_rank", WiredConditionHabboNotRank.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_diamonds", WiredConditionHabboHasDiamonds.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_diamonds", WiredConditionHabboHasDiamonds.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_credits", WiredConditionHabboHasCredits.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_credits", WiredConditionHabboHasCredits.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_duckets", WiredConditionHabboHasDuckets.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_habbo_has_duckets", WiredConditionHabboHasDuckets.class));
|
||||||
this.interactionsList.add(new ItemInteraction("wf_cnd_not_habbo_has_diamonds", WiredConditionNotHabboHasDiamonds.class));
|
this.interactionsList.add(new ItemInteraction("wf_cnd_not_habbo_has_diamonds", WiredConditionNotHabboHasDiamonds.class));
|
||||||
|
@ -180,6 +180,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setZ(double z) {
|
public void setZ(double z) {
|
||||||
|
if (z > 9999) return;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,12 +246,7 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
|
|||||||
statement.setString(3, this.wallPosition);
|
statement.setString(3, this.wallPosition);
|
||||||
statement.setInt(4, this.x);
|
statement.setInt(4, this.x);
|
||||||
statement.setInt(5, this.y);
|
statement.setInt(5, this.y);
|
||||||
|
statement.setDouble(6, Math.min(9999, Math.round(this.z * Math.pow(10, 6)) / Math.pow(10, 6)));
|
||||||
String zString = String.valueOf(Math.round(this.z * Math.pow(10, 6)) / Math.pow(10, 6));
|
|
||||||
if (zString.length() > 10) zString = zString.substring(0, 10);
|
|
||||||
if (zString.endsWith(".")) zString = zString.substring(0, zString.length() - 1);
|
|
||||||
|
|
||||||
statement.setDouble(6, Double.valueOf(zString));
|
|
||||||
statement.setInt(7, this.rotation);
|
statement.setInt(7, this.rotation);
|
||||||
statement.setString(8, this instanceof InteractionGuildGate ? "" : this.getDatabaseExtraData());
|
statement.setString(8, this instanceof InteractionGuildGate ? "" : this.getDatabaseExtraData());
|
||||||
statement.setString(9, this.limitedStack + ":" + this.limitedSells);
|
statement.setString(9, this.limitedStack + ":" + this.limitedSells);
|
||||||
|
Loading…
Reference in New Issue
Block a user