mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-09-17 13:34:16 +02:00
44 lines
1.4 KiB
Java
44 lines
1.4 KiB
Java
package com.eu.habbo.messages.outgoing.catalog;
|
|
|
|
import com.eu.habbo.habbohotel.catalog.CatalogItem;
|
|
import com.eu.habbo.messages.ServerMessage;
|
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
|
|
|
public class PurchaseOKComposer extends MessageComposer {
|
|
private final CatalogItem catalogItem;
|
|
|
|
public PurchaseOKComposer(CatalogItem catalogItem) {
|
|
this.catalogItem = catalogItem;
|
|
}
|
|
|
|
public PurchaseOKComposer() {
|
|
this.catalogItem = null;
|
|
}
|
|
|
|
@Override
|
|
protected ServerMessage composeInternal() {
|
|
this.response.init(Outgoing.PurchaseOKComposer);
|
|
if (this.catalogItem != null) {
|
|
this.catalogItem.serialize(this.response);
|
|
} else {
|
|
this.response.appendInt(0);
|
|
this.response.appendString("");
|
|
this.response.appendBoolean(false);
|
|
this.response.appendInt(0);
|
|
this.response.appendInt(0);
|
|
this.response.appendInt(0);
|
|
this.response.appendBoolean(true);
|
|
this.response.appendInt(1);
|
|
this.response.appendString("s");
|
|
this.response.appendInt(0);
|
|
this.response.appendString("");
|
|
this.response.appendInt(1);
|
|
this.response.appendInt(0);
|
|
this.response.appendString("");
|
|
this.response.appendInt(1);
|
|
}
|
|
return this.response;
|
|
}
|
|
}
|