2018-07-06 15:30:00 +02:00
|
|
|
package com.eu.habbo.messages.outgoing.users;
|
|
|
|
|
|
|
|
import com.eu.habbo.Emulator;
|
|
|
|
import com.eu.habbo.habbohotel.users.Habbo;
|
|
|
|
import com.eu.habbo.messages.ServerMessage;
|
|
|
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
|
|
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
|
|
|
|
|
|
|
public class UserCurrencyComposer extends MessageComposer
|
|
|
|
{
|
|
|
|
private final Habbo habbo;
|
|
|
|
|
|
|
|
public UserCurrencyComposer(Habbo habbo)
|
|
|
|
{
|
|
|
|
this.habbo = habbo;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ServerMessage compose()
|
|
|
|
{
|
|
|
|
this.response.init(Outgoing.UserCurrencyComposer);
|
|
|
|
String[] pointsTypes = Emulator.getConfig().getValue("seasonal.types").split(";");
|
|
|
|
this.response.appendInt(pointsTypes.length);
|
|
|
|
for(String s : pointsTypes)
|
|
|
|
{
|
2019-03-18 02:22:00 +01:00
|
|
|
int type;
|
2018-07-06 15:30:00 +02:00
|
|
|
try
|
|
|
|
{
|
|
|
|
type = Integer.valueOf(s);
|
|
|
|
}
|
|
|
|
catch (Exception e){
|
|
|
|
Emulator.getLogging().logErrorLine(e);
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.response.appendInt(type);
|
|
|
|
this.response.appendInt(this.habbo.getHabboInfo().getCurrencyAmount(type));
|
|
|
|
}
|
|
|
|
return this.response;
|
|
|
|
}
|
|
|
|
}
|