sVi0E{~C+IDJiS-SLf`na6hHvI%@#970>^ncc-KJ+CWr5
z^uh>Xfth0)JJ7LWhQxyN5lHY?8&cjDk?gM&;tdo{m~DAt>pu(f{RqrCi_|K6lmNb!
z*DLc~CgHMq{WuEj^o8++;`69gsY<2>J(kiPnD2Vcd^mLB;>}J5-+m*7uco7h&<|CP
zEFp|f&i6hph~0ta4i44N5kf(w1a>u^g4QJcGYcs;)n`ma>XbmuGb0}o%SP3DkNSS|
zHPfN2wPbp>MF3JZ6#09-n
zwI~Ui3^it8FB_c#8`by`RZU7Cj1iQ=Xufcv~G0w
z9A0l0%k!*EPY^qhjuHsBuUA>7nU3^;e~xqfMgQ|!U<-#p*6F#4*94DOo5t2D;CMLP
z=BzOT?`;F)vh<8Ky0tE^>_M10s_%#8v~U3zfyr5ji~WZ0#@O96N>-tsC|P7*oR;3ZI7qtzK#$
zq1u#AF^;!dnIw2t`o;pk5EiyRG2{QTx4isVC}h52X2aJY%}fp5#%%j0QKT!9Co1P!
zvz*PT02}nk;GB3#`CIP*+)ntiDn*@gC9aK+R7?p`ZVh9fy0;pOlG^-il_DMA9NZ~1
z$U;kWUh#LY>Dq{2;`2Ts_pN4VO>JZgR5TRz#{PlK4iSHw2hboAZcIv*vRA^Z7v*Cg
zbT;PQH3d8O$9=ihZ>NZ5|6=I75^}x2oj**;$IR?GDK2nGr-d<1lb*Roxb5|?m(Vnc
zKLnyCZ9L}aOKqw+nbgb9ckn3bcwpQ-_NkMkZEoKJW4R}>c9~qx7E}BUQ^`cv*nMB1
zdy%$v-GSi1iZ5o0mO1mP;4qX+PgGI)K9m>t`KlJa;{
zFj%^4@o5B{^E*=Wq1szlaY#$7osfvy!~(@hGyd0;?-&(xfz8)LnH!nrsf*?o=7?x>
zjp)Ya)>VB+my*DXT;VjQ6T;~t;!g>65acx94%Cy=1uHk#66#hpISYI%r%!i!b#uCj
zIzGHU-I@M|Bc$WFJW7PAu{4MWx!O?0-zbIHc>4JcR~+icEQdbP#rUr53v$Gk`^qI3
zmmsyuD`gJ#(mfcG!Ykk>#0DOr@5@nP!ZXkcu0KtxalBB@*~&vp0>_Ujn!-
zZh+g
!t_Y!;)mMQL07aMgIA
z@}3>Pi%-i(s5FskNBvO%;M}2hsAFs$_F0mvV@94Qt)t&^6_ku!$90g)0xx}6@IhC_~%?}cN
zETTROLdL3kn$+dlmtYy(N~NqW;u%wZ*Rz0M3|5J2mP^IAis!frf_d9D
zrdVL0I?sU;S?BjMFq0GBJjtzR>e$=5jvrHb0apc>Cq-DZy2>MPiAI2*W_P$i=ofkR
zd`Lu^u9}A6;1A@5&j3}3kK0ag<#)w;<@8u~oloY&vD1xATcnf8LrcWk?PpSBlW57O
z5T=QBb=qCkIRAxZOsdsa&ll8Zty=}*0Lb=U2d
z4XUrJQy7~1$VXBfM>a&nfS8U!`a9M^>1FxGmy#-PfeTAd>x|fOZHqtQKd}f~@$wIK
z7scMxGHOQ-t^)Twg;PDEYHz*)EprZxcRcU-98pRZda(&4kK0Ez)4{buszxY}aVuwkR=L`DSUmo2;Tnh+{L*2bGwUG@ra>6J!5S%t%AFHVY1xFy_^I
zdZ{a%_;K{=0|6^*#_e-)&=j_NS*)O3f8bN+PzL22o$*Lkw-fz8u)`@&c;8t^)_TyT
z4x^V|0he-wy9ZL=#w6<~f8>L?J5Bmbu8M_s_x7)>(_a9x2ot^*y
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownGuildComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/GuildMembershipRequestedComposer.java
similarity index 71%
rename from src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownGuildComposer.java
rename to src/main/java/com/eu/habbo/messages/outgoing/unknown/GuildMembershipRequestedComposer.java
index 44e81d79..c18f107c 100644
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownGuildComposer.java
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/GuildMembershipRequestedComposer.java
@@ -4,13 +4,12 @@ import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.Outgoing;
-public class UnknownGuildComposer extends MessageComposer
+public class GuildMembershipRequestedComposer extends MessageComposer
{
private final int guildId;
private final int requester;
- //Related to membership requess?
- public UnknownGuildComposer(int guildId, int requester)
+ public GuildMembershipRequestedComposer(int guildId, int requester)
{
this.guildId = guildId;
this.requester = requester;
@@ -19,7 +18,7 @@ public class UnknownGuildComposer extends MessageComposer
@Override
public ServerMessage compose()
{
- this.response.init(Outgoing.UnknownGuildComposer);
+ this.response.init(Outgoing.GuildMembershipRequestedComposer);
this.response.appendInt(this.guildId);
this.response.appendInt(this.requester);
return this.response;
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/HotelViewNextLTDAvailableComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/HotelViewNextLTDAvailableComposer.java
deleted file mode 100644
index 2e13e386..00000000
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/HotelViewNextLTDAvailableComposer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.eu.habbo.messages.outgoing.unknown;
-
-import com.eu.habbo.messages.ServerMessage;
-import com.eu.habbo.messages.outgoing.MessageComposer;
-import com.eu.habbo.messages.outgoing.Outgoing;
-
-public class HotelViewNextLTDAvailableComposer extends MessageComposer
-{
- private final int unknownInt1;
- private final int pageId;
- private final int unknownInt2;
- private final String unknownString1;
-
- public HotelViewNextLTDAvailableComposer(int unknownInt1, int pageId, int unknownInt2, String unknownString1)
- {
- this.unknownInt1 = unknownInt1;
- this.pageId = pageId;
- this.unknownInt2 = unknownInt2;
- this.unknownString1 = unknownString1;
- }
-
- @Override
- public ServerMessage compose()
- {
- this.response.init(Outgoing.HotelViewNextLTDAvailableComposer);
- this.response.appendInt(this.unknownInt1);
- this.response.appendInt(this.pageId);
- this.response.appendInt(this.unknownInt2);
- this.response.appendString(this.unknownString1);
- return this.response;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer6.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersComposer.java
similarity index 73%
rename from src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer6.java
rename to src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersComposer.java
index 0010491e..b3edba09 100644
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer6.java
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/IgnoredUsersComposer.java
@@ -4,12 +4,12 @@ import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.Outgoing;
-public class UnknownComposer6 extends MessageComposer
+public class IgnoredUsersComposer extends MessageComposer
{
@Override
public ServerMessage compose()
{
- this.response.init(Outgoing.UnknownComposer6);
+ this.response.init(Outgoing.IgnoredUsersComposer);
this.response.appendInt(0);
return this.response;
}
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestComposer.java
new file mode 100644
index 00000000..3c3d5d07
--- /dev/null
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestComposer.java
@@ -0,0 +1,23 @@
+package com.eu.habbo.messages.outgoing.unknown;
+
+import com.eu.habbo.messages.ServerMessage;
+import com.eu.habbo.messages.outgoing.MessageComposer;
+import com.eu.habbo.messages.outgoing.Outgoing;
+
+public class QuestComposer extends MessageComposer
+{
+ private final QuestsComposer.Quest quest;
+
+ public QuestComposer(QuestsComposer.Quest quest)
+ {
+ this.quest = quest;
+ }
+
+ @Override
+ public ServerMessage compose()
+ {
+ this.response.init(Outgoing.QuestComposer);
+ this.response.append(quest);
+ return this.response;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestsComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestsComposer.java
new file mode 100644
index 00000000..cff97ffe
--- /dev/null
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/QuestsComposer.java
@@ -0,0 +1,94 @@
+package com.eu.habbo.messages.outgoing.unknown;
+
+import com.eu.habbo.messages.ISerialize;
+import com.eu.habbo.messages.ServerMessage;
+import com.eu.habbo.messages.outgoing.MessageComposer;
+import com.eu.habbo.messages.outgoing.Outgoing;
+
+import java.util.List;
+
+public class QuestsComposer extends MessageComposer
+{
+ private final List quests;
+ private final boolean unknownBoolean;
+
+ public QuestsComposer(List quests, boolean unknownBoolean)
+ {
+ this.quests = quests;
+ this.unknownBoolean = unknownBoolean;
+ }
+
+ @Override
+ public ServerMessage compose()
+ {
+ this.response.init(Outgoing.QuestsComposer);
+ this.response.appendInt(this.quests.size());
+ for (Quest quest : this.quests)
+ {
+ this.response.append(quest);
+ }
+ this.response.appendBoolean(this.unknownBoolean);
+ return this.response;
+ }
+
+ public static class Quest implements ISerialize
+ {
+ private final String campaignCode;
+ private final int completedQuestsInCampaign;
+ private final int questCountInCampaign;
+ private final int activityPointType;
+ private final int id;
+ private final boolean accepted;
+ private final String type;
+ private final String imageVersion;
+ private final int rewardCurrencyAmount;
+ private final String localizationCode;
+ private final int completedSteps;
+ private final int totalSteps;
+ private final int sortOrder;
+ private final String catalogPageName;
+ private final String chainCode;
+ private final boolean easy;
+
+ public Quest(String campaignCode, int completedQuestsInCampaign, int questCountInCampaign, int activityPointType, int id, boolean accepted, String type, String imageVersion, int rewardCurrencyAmount, String localizationCode, int completedSteps, int totalSteps, int sortOrder, String catalogPageName, String chainCode, boolean easy)
+ {
+ this.campaignCode = campaignCode;
+ this.completedQuestsInCampaign = completedQuestsInCampaign;
+ this.questCountInCampaign = questCountInCampaign;
+ this.activityPointType = activityPointType;
+ this.id = id;
+ this.accepted = accepted;
+ this.type = type;
+ this.imageVersion = imageVersion;
+ this.rewardCurrencyAmount = rewardCurrencyAmount;
+ this.localizationCode = localizationCode;
+ this.completedSteps = completedSteps;
+ this.totalSteps = totalSteps;
+ this.sortOrder = sortOrder;
+ this.catalogPageName = catalogPageName;
+ this.chainCode = chainCode;
+ this.easy = easy;
+ }
+
+ @Override
+ public void serialize(ServerMessage message)
+ {
+ message.appendString(this.campaignCode);
+ message.appendInt(this.completedQuestsInCampaign);
+ message.appendInt(this.questCountInCampaign);
+ message.appendInt(this.activityPointType);
+ message.appendInt(this.id);
+ message.appendBoolean(this.accepted);
+ message.appendString(this.type);
+ message.appendString(this.imageVersion);
+ message.appendInt(this.rewardCurrencyAmount);
+ message.appendString(this.localizationCode);
+ message.appendInt(this.completedSteps);
+ message.appendInt(this.totalSteps);
+ message.appendInt(this.sortOrder);
+ message.appendString(this.catalogPageName);
+ message.appendString(this.chainCode);
+ message.appendBoolean(this.easy);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/RoomUnknown2Composer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/RoomUnknown2Composer.java
deleted file mode 100644
index 9817fce2..00000000
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/RoomUnknown2Composer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.eu.habbo.messages.outgoing.unknown;
-
-import com.eu.habbo.messages.ServerMessage;
-import com.eu.habbo.messages.outgoing.MessageComposer;
-import com.eu.habbo.messages.outgoing.Outgoing;
-
-public class RoomUnknown2Composer extends MessageComposer
-{
- @Override
- public ServerMessage compose()
- {
- this.response.init(Outgoing.RoomUnknown2Composer);
- this.response.appendInt(0); //Count
- {
- this.response.appendString(""); //Name
- this.response.appendInt(0); //Target
-
- this.response.appendInt(0); //Count
- {//Part of previous object (string, int)
- this.response.appendString("");
- this.response.appendInt(0);
- }
- }
- return this.response;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer4.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer4.java
index 0052a297..bee208a2 100644
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer4.java
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownComposer4.java
@@ -9,7 +9,7 @@ public class UnknownComposer4 extends MessageComposer
@Override
public ServerMessage compose()
{
- this.response.init(Outgoing.UnknownComposer4);
+ this.response.init(Outgoing.IsFirstLoginOfDayComposer);
this.response.appendBoolean(false); //Think something related to promo. Not sure though.
return this.response;
}
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownWiredComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownWiredComposer.java
index d00f2998..eaf91dee 100644
--- a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownWiredComposer.java
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UnknownWiredComposer.java
@@ -17,7 +17,7 @@ public class UnknownWiredComposer extends MessageComposer
@Override
public ServerMessage compose()
{
- this.response.init(Outgoing.UnknownWiredComposer);
+ this.response.init(Outgoing.WiredOpenComposer);
this.response.appendInt(this.item.getId());
return this.response;
}
diff --git a/src/main/java/com/eu/habbo/messages/outgoing/unknown/UserClassificationComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UserClassificationComposer.java
new file mode 100644
index 00000000..e5b8d98c
--- /dev/null
+++ b/src/main/java/com/eu/habbo/messages/outgoing/unknown/UserClassificationComposer.java
@@ -0,0 +1,32 @@
+package com.eu.habbo.messages.outgoing.unknown;
+
+import com.eu.habbo.messages.ServerMessage;
+import com.eu.habbo.messages.outgoing.MessageComposer;
+import com.eu.habbo.messages.outgoing.Outgoing;
+import org.apache.commons.math3.util.Pair;
+
+import java.util.List;
+
+public class UserClassificationComposer extends MessageComposer
+{
+ private final List>> info;
+
+ public UserClassificationComposer(List>> info)
+ {
+ this.info = info;
+ }
+
+ @Override
+ public ServerMessage compose()
+ {
+ this.response.init(Outgoing.UserClassificationComposer);
+ this.response.appendInt(this.info.size());
+ for (Pair> set : info)
+ {
+ this.response.appendInt(set.getKey());
+ this.response.appendString(set.getValue().getKey());
+ this.response.appendString(set.getValue().getValue());
+ }
+ return this.response;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java b/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java
index 3b368ea5..ae62ea2f 100644
--- a/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java
+++ b/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java
@@ -38,7 +38,7 @@ public class DisconnectUser extends RCONMessage
+{
+ public ImageAlertUser()
+ {
+ super(ImageAlertUser.JSON.class);
+ }
+
+ @Override
+ public void handle(Gson gson, JSON json)
+ {
+ Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(json.user_id);
+
+ if (habbo == null)
+ {
+ this.status = HABBO_NOT_FOUND;
+ return;
+ }
+
+ THashMap keys = new THashMap<>();
+
+ if (!json.message.isEmpty())
+ {
+ keys.put("message", json.message);
+ }
+
+ if (!json.url.isEmpty())
+ {
+ keys.put("linkUrl", json.url);
+ }
+
+ if (!json.url_message.isEmpty())
+ {
+ keys.put("linkTitle", json.url_message);
+ }
+
+ if (!json.title.isEmpty())
+ {
+ keys.put("title", json.title);
+ }
+
+ if (!json.display_type.isEmpty())
+ {
+ keys.put("display", json.display_type);
+ }
+
+ if (!json.image.isEmpty())
+ {
+ keys.put("image", json.image);
+ }
+
+ habbo.getClient().sendResponse(new BubbleAlertComposer(json.bubble_key, keys));
+ }
+
+ public static class JSON
+ {
+
+ public int user_id;
+
+
+ public String bubble_key = "";
+
+
+ public String message = "";
+
+
+ public String url = "";
+
+
+ public String url_message = "";
+
+
+ public String title = "";
+
+
+ public String display_type = "";
+
+
+ public String image = "";
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/rcon/ImageHotelAlert.java b/src/main/java/com/eu/habbo/messages/rcon/ImageHotelAlert.java
index 4fbb8cc1..094fb4a8 100644
--- a/src/main/java/com/eu/habbo/messages/rcon/ImageHotelAlert.java
+++ b/src/main/java/com/eu/habbo/messages/rcon/ImageHotelAlert.java
@@ -20,10 +20,37 @@ public class ImageHotelAlert extends RCONMessage
public void handle(Gson gson, JSON json)
{
THashMap keys = new THashMap<>();
- keys.put("message", json.message);
- keys.put("linkUrl", json.url);
- keys.put("linkTitle", json.url_message);
- keys.put("title", json.title);
+
+ if (!json.message.isEmpty())
+ {
+ keys.put("message", json.message);
+ }
+
+ if (!json.url.isEmpty())
+ {
+ keys.put("linkUrl", json.url);
+ }
+
+ if (!json.url_message.isEmpty())
+ {
+ keys.put("linkTitle", json.url_message);
+ }
+
+ if (!json.title.isEmpty())
+ {
+ keys.put("title", json.title);
+ }
+
+ if (!json.display_type.isEmpty())
+ {
+ keys.put("display", json.display_type);
+ }
+
+ if (!json.image.isEmpty())
+ {
+ keys.put("image", json.image);
+ }
+
ServerMessage message = new BubbleAlertComposer(json.bubble_key, keys).compose();
for(Map.Entry set : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet())
{
@@ -38,18 +65,24 @@ public class ImageHotelAlert extends RCONMessage
public static class JSON
{
- public String bubble_key;
+ public String bubble_key = "";
- public String message;
+ public String message = "";
- public String url;
+ public String url = "";
- public String url_message;
+ public String url_message = "";
- public String title;
+ public String title = "";
+
+
+ public String display_type = "";
+
+
+ public String image = "";
}
}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/messages/rcon/MuteUser.java b/src/main/java/com/eu/habbo/messages/rcon/MuteUser.java
index a5484170..6011930a 100644
--- a/src/main/java/com/eu/habbo/messages/rcon/MuteUser.java
+++ b/src/main/java/com/eu/habbo/messages/rcon/MuteUser.java
@@ -10,9 +10,9 @@ import java.sql.SQLException;
public class MuteUser extends RCONMessage
{
- public MuteUser(Class type)
+ public MuteUser()
{
- super(type);
+ super(MuteUser.JSON.class);
}
@Override
diff --git a/src/main/java/com/eu/habbo/messages/rcon/SetMotto.java b/src/main/java/com/eu/habbo/messages/rcon/SetMotto.java
new file mode 100644
index 00000000..6fad0242
--- /dev/null
+++ b/src/main/java/com/eu/habbo/messages/rcon/SetMotto.java
@@ -0,0 +1,55 @@
+package com.eu.habbo.messages.rcon;
+
+import com.eu.habbo.Emulator;
+import com.eu.habbo.habbohotel.users.Habbo;
+import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
+import com.google.gson.Gson;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class SetMotto extends RCONMessage
+{
+ public SetMotto()
+ {
+ super(SetMottoJSON.class);
+ }
+
+ @Override
+ public void handle(Gson gson, SetMottoJSON json)
+ {
+ Habbo habbo = Emulator.getGameEnvironment().getHabboManager().getHabbo(json.user_id);
+
+ if (habbo != null)
+ {
+ habbo.getHabboInfo().setMotto(json.motto);
+ habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(habbo).compose());
+ }
+ else
+ {
+ try (Connection connection = Emulator.getDatabase().getDataSource().getConnection())
+ {
+ try (PreparedStatement statement = connection.prepareStatement("UPDATE users SET motto = ? WHERE id = ? LIMIT 1"))
+ {
+ statement.setString(1, json.motto);
+ statement.setInt(2, json.user_id);
+ statement.execute();
+ }
+ }
+ catch (SQLException e)
+ {
+ Emulator.getLogging().logErrorLine(e);
+ }
+ }
+ }
+
+ public class SetMottoJSON
+ {
+
+ public int user_id;
+
+
+ public String motto;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/networking/gameserver/GameByteDecoder.java b/src/main/java/com/eu/habbo/networking/gameserver/GameByteDecoder.java
index cafaaf54..ee055ad1 100644
--- a/src/main/java/com/eu/habbo/networking/gameserver/GameByteDecoder.java
+++ b/src/main/java/com/eu/habbo/networking/gameserver/GameByteDecoder.java
@@ -41,7 +41,6 @@ public class GameByteDecoder extends ByteToMessageDecoder
" \n" +
" " + (char) 0, CharsetUtil.UTF_8));
- f.channel().close();
ctx.channel().close();
return;
}
diff --git a/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java b/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java
index 93ecafe7..a63469f0 100644
--- a/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java
+++ b/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java
@@ -50,6 +50,7 @@ public class RCONServer extends Server
this.addRCONMessage("updateuser", UpdateUser.class);
this.addRCONMessage("friendrequest", FriendRequest.class);
this.addRCONMessage("imagehotelalert", ImageHotelAlert.class);
+ this.addRCONMessage("imagealertuser", ImageAlertUser.class);
this.addRCONMessage("stalkuser", StalkUser.class);
this.addRCONMessage("staffalert", StaffAlert.class);
this.addRCONMessage("modticket", CreateModToolTicket.class);
@@ -58,6 +59,7 @@ public class RCONServer extends Server
this.addRCONMessage("muteuser", MuteUser.class);
this.addRCONMessage("giverespect", GiveRespect.class);
this.addRCONMessage("ignoreuser", IgnoreUser.class);
+ this.addRCONMessage("setmotto", SetMotto.class);
for (String ip : Emulator.getConfig().getValue("rcon.allowed", "127.0.0.1").split(";"))
{
diff --git a/src/main/java/com/eu/habbo/plugin/PluginManager.java b/src/main/java/com/eu/habbo/plugin/PluginManager.java
index 6cb16aa0..52f48f85 100644
--- a/src/main/java/com/eu/habbo/plugin/PluginManager.java
+++ b/src/main/java/com/eu/habbo/plugin/PluginManager.java
@@ -377,7 +377,7 @@ public class PluginManager
HotelViewRequestLTDAvailabilityEvent.TIMESTAMP = Emulator.getConfig().getInt("hotel.view.ltdcountdown.timestamp");
HotelViewRequestLTDAvailabilityEvent.ITEM_ID = Emulator.getConfig().getInt("hotel.view.ltdcountdown.itemid");
HotelViewRequestLTDAvailabilityEvent.PAGE_ID = Emulator.getConfig().getInt("hotel.view.ltdcountdown.pageid");
- HotelViewRequestLTDAvailabilityEvent.ITEM_NAME = Emulator.getConfig().getValue("hotel.view.ltdcountdown.itename");
+ HotelViewRequestLTDAvailabilityEvent.ITEM_NAME = Emulator.getConfig().getValue("hotel.view.ltdcountdown.itemname");
InteractionPostIt.STICKYPOLE_PREFIX_TEXT = Emulator.getConfig().getValue("hotel.room.stickypole.prefix");
TargetOffer.ACTIVE_TARGET_OFFER_ID = Emulator.getConfig().getInt("hotel.targetoffer.id");
WordFilter.DEFAULT_REPLACEMENT = Emulator.getConfig().getValue("hotel.wordfilter.replacement");
diff --git a/src/main/java/com/eu/habbo/threading/runnables/CrackableExplode.java b/src/main/java/com/eu/habbo/threading/runnables/CrackableExplode.java
index aa6a13f5..241049a6 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/CrackableExplode.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/CrackableExplode.java
@@ -1,6 +1,7 @@
package com.eu.habbo.threading.runnables;
import com.eu.habbo.Emulator;
+import com.eu.habbo.habbohotel.items.Item;
import com.eu.habbo.habbohotel.items.interactions.InteractionCrackable;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.users.Habbo;
@@ -16,13 +17,18 @@ public class CrackableExplode implements Runnable
private final InteractionCrackable habboItem;
private final Habbo habbo;
private final boolean toInventory;
+ private short x;
+ private short y;
- public CrackableExplode(Room room, InteractionCrackable item, Habbo habbo, boolean toInventory)
+ public CrackableExplode(Room room, InteractionCrackable item, Habbo habbo, boolean toInventory, short x, short y)
{
this.room = room;
this.habboItem = item;
this.habbo = habbo;
this.toInventory = toInventory;
+
+ this.x = x;
+ this.y = y;
}
@Override
@@ -32,7 +38,7 @@ public class CrackableExplode implements Runnable
{
return;
}
-
+//MAKING DINNER BRB
if (!this.habboItem.resetable())
{
this.room.removeHabboItem(this.habboItem);
@@ -44,26 +50,33 @@ public class CrackableExplode implements Runnable
{
this.habboItem.reset(this.room);
}
- HabboItem newItem = Emulator.getGameEnvironment().getItemManager().createItem(this.habboItem.allowAnyone() ? habbo.getHabboInfo().getId() : this.habboItem.getUserId(), Emulator.getGameEnvironment().getItemManager().getCrackableReward(this.habboItem.getBaseItem().getId()), 0, 0, "");
+ Item rewardItem = Emulator.getGameEnvironment().getItemManager().getCrackableReward(this.habboItem.getBaseItem().getId());
- if (newItem != null)
+ if (rewardItem != null)
{
- if (this.toInventory)
+ HabboItem newItem = Emulator.getGameEnvironment().getItemManager().createItem(this.habboItem.allowAnyone() ? habbo.getHabboInfo().getId() : this.habboItem.getUserId(), rewardItem, 0, 0, "");
+
+ if (newItem != null)
{
- habbo.getInventory().getItemsComponent().addItem(newItem);
- habbo.getClient().sendResponse(new AddHabboItemComposer(newItem));
- habbo.getClient().sendResponse(new InventoryRefreshComposer());
- }
- else
- {
- newItem.setX(this.habboItem.getX());
- newItem.setY(this.habboItem.getY());
- newItem.setZ(this.habboItem.getZ());
- newItem.setRoomId(this.room.getId());
- newItem.needsUpdate(true);
- this.room.addHabboItem(newItem);
- this.room.sendComposer(new AddFloorItemComposer(newItem, this.room.getFurniOwnerNames().get(newItem.getUserId())).compose());
+ if (this.toInventory)
+ {
+ habbo.getInventory().getItemsComponent().addItem(newItem);
+ habbo.getClient().sendResponse(new AddHabboItemComposer(newItem));
+ habbo.getClient().sendResponse(new InventoryRefreshComposer());
+ } else
+ {
+ newItem.setX(this.x);
+ newItem.setY(this.y);
+ newItem.setZ(room.getStackHeight(this.x, this.y, false));
+ newItem.setRoomId(this.room.getId());
+ newItem.needsUpdate(true);
+ this.room.addHabboItem(newItem);
+ this.room.sendComposer(new AddFloorItemComposer(newItem, this.room.getFurniOwnerNames().get(newItem.getUserId())).compose());
+ }
}
}
+
+
+ this.room.updateTile(room.getLayout().getTile(this.x, this.y));
}
}
diff --git a/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java b/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java
index 628210f4..da912d5d 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/RemoveFloorItemTask.java
@@ -1,6 +1,7 @@
package com.eu.habbo.threading.runnables;
import com.eu.habbo.habbohotel.rooms.Room;
+import com.eu.habbo.habbohotel.rooms.RoomTile;
import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.outgoing.rooms.UpdateStackHeightComposer;
import com.eu.habbo.messages.outgoing.rooms.items.RemoveFloorItemComposer;
@@ -19,8 +20,10 @@ class RemoveFloorItemTask implements Runnable
@Override
public void run()
{
+ RoomTile tile = this.room.getLayout().getTile(this.item.getX(), this.item.getY());
this.room.removeHabboItem(this.item);
+ this.room.updateTile(tile);
this.room.sendComposer(new RemoveFloorItemComposer(this.item, true).compose());
- this.room.sendComposer(new UpdateStackHeightComposer(this.item.getX(), this.item.getY(), this.room.getStackHeight(this.item.getX(), this.item.getY(), false)).compose());
+ this.room.sendComposer(new UpdateStackHeightComposer(this.item.getX(), this.item.getY(), tile.relativeHeight()).compose());
}
}
diff --git a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java
index 8e69dcf4..cba65990 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java
@@ -8,6 +8,8 @@ import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUnitOnRollerComposer;
+import java.util.LinkedList;
+
public class RoomUnitTeleport implements Runnable
{
private RoomUnit roomUnit;
@@ -45,10 +47,21 @@ public class RoomUnitTeleport implements Runnable
Emulator.getLogging().logErrorLine(e);
}
}
+ this.roomUnit.setPath(new LinkedList<>());
this.roomUnit.setCurrentLocation(t);
+ this.roomUnit.setPreviousLocation(t);
+ this.roomUnit.setZ(this.z);
+ this.roomUnit.setPreviousLocationZ(this.z);
this.roomUnit.removeStatus(RoomUnitStatus.MOVE);
this.room.sendComposer(new RoomUnitOnRollerComposer(this.roomUnit, null, t, this.room).compose());
- this.room.giveEffect(this.roomUnit, this.newEffect);
+ Emulator.getThreading().run(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ room.giveEffect(roomUnit, newEffect);
+ }
+ }, 1000);
this.room.updateHabbosAt(t.x, t.y);
}
}
diff --git a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitVendingMachineAction.java b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitVendingMachineAction.java
index 6e3d5431..88ef4828 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitVendingMachineAction.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitVendingMachineAction.java
@@ -39,7 +39,7 @@ public class RoomUnitVendingMachineAction implements Runnable
}
catch (Exception e)
{
- e.printStackTrace();
+ Emulator.getLogging().logErrorLine(e);
}
}
else
diff --git a/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionOne.java b/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionOne.java
index 324e67be..970e3cdb 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionOne.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionOne.java
@@ -30,6 +30,7 @@ public class HopperActionOne implements Runnable
this.room.scheduledComposers.add(new RoomUserStatusComposer(this.client.getHabbo().getRoomUnit()).compose());
this.client.getHabbo().getRoomUnit().setLocation(this.room.getLayout().getTile(this.teleportOne.getX(), this.teleportOne.getY()));
this.client.getHabbo().getRoomUnit().setZ(this.teleportOne.getZ());
+ this.client.getHabbo().getRoomUnit().setPreviousLocationZ(this.teleportOne.getZ());
Emulator.getThreading().run(new Runnable()
{
diff --git a/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionThree.java b/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionThree.java
index 822d454f..08e20ff9 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionThree.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/hopper/HopperActionThree.java
@@ -53,6 +53,7 @@ class HopperActionThree implements Runnable
targetTeleport.setExtradata("2");
targetRoom.updateItem(targetTeleport);
this.client.getHabbo().getRoomUnit().setLocation(this.room.getLayout().getTile(targetTeleport.getX(), targetTeleport.getY()));
+ this.client.getHabbo().getRoomUnit().setPreviousLocationZ(targetTeleport.getZ());
this.client.getHabbo().getRoomUnit().setZ(targetTeleport.getZ());
this.client.getHabbo().getRoomUnit().setRotation(RoomUserRotation.values()[targetTeleport.getRotation() % 8]);
this.client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
diff --git a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java
index 046d0362..39b147e6 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java
@@ -33,7 +33,7 @@ class TeleportActionFive implements Runnable
{
RoomTile tile = this.room.getLayout().getTileInFront(this.room.getLayout().getTile(this.currentTeleport.getX(), this.currentTeleport.getY()), this.currentTeleport.getRotation());
- if (tile != null && tile.isWalkable())
+ if (tile != null)
{
this.client.getHabbo().getRoomUnit().setGoalLocation(tile);
}
diff --git a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionThree.java b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionThree.java
index 128cfeda..6b8d9824 100644
--- a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionThree.java
+++ b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionThree.java
@@ -9,7 +9,6 @@ import com.eu.habbo.habbohotel.rooms.RoomUnitStatus;
import com.eu.habbo.habbohotel.rooms.RoomUserRotation;
import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer;
-import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
class TeleportActionThree implements Runnable
{
@@ -60,7 +59,7 @@ class TeleportActionThree implements Runnable
targetTeleport.setExtradata("2");
targetRoom.updateItem(targetTeleport);
- targetRoom.sendComposer(new RoomUserStatusComposer(this.client.getHabbo().getRoomUnit()).compose());
+ //targetRoom.sendComposer(new RoomUserStatusComposer(this.client.getHabbo().getRoomUnit()).compose());
this.client.getHabbo().getHabboInfo().setCurrentRoom(targetRoom);
//Emulator.getThreading().run(new HabboItemNewState(this.currentTeleport, this.room, "0"), 500);