You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
feat(items): FurnitureDataReloadComposer (header 10047, delta + reload-hint)
This commit is contained in:
@@ -570,6 +570,7 @@ public class Outgoing {
|
||||
public static final int FurniEditorDetailComposer = 10041;
|
||||
public static final int FurniEditorInteractionsComposer = 10043;
|
||||
public static final int FurniEditorResultComposer = 10044;
|
||||
public static final int FurnitureDataReloadComposer = 10047; // CUSTOM
|
||||
|
||||
// Catalog Admin
|
||||
public static final int CatalogAdminResultComposer = 10059;
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.eu.habbo.messages.outgoing.furniture;
|
||||
|
||||
import com.eu.habbo.habbohotel.items.FurnidataEntry;
|
||||
import com.eu.habbo.habbohotel.items.FurnitureType;
|
||||
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 FurnitureDataReloadComposer extends MessageComposer {
|
||||
|
||||
public static final int MODE_DELTA = 0;
|
||||
public static final int MODE_RELOAD_HINT = 1;
|
||||
|
||||
private final int mode;
|
||||
private final List<FurnidataEntry> entries;
|
||||
|
||||
public FurnitureDataReloadComposer(int mode, List<FurnidataEntry> entries) {
|
||||
this.mode = mode;
|
||||
this.entries = entries;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.FurnitureDataReloadComposer);
|
||||
this.response.appendInt(this.mode);
|
||||
|
||||
if (this.mode == MODE_DELTA) {
|
||||
this.response.appendInt(this.entries.size());
|
||||
for (FurnidataEntry e : this.entries) {
|
||||
this.response.appendString(e.type() == FurnitureType.FLOOR ? "S" : "I");
|
||||
this.response.appendInt(e.id());
|
||||
this.response.appendString(e.classname());
|
||||
this.response.appendString(e.name());
|
||||
this.response.appendString(e.description());
|
||||
}
|
||||
}
|
||||
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user