Arcturus-Community/src/main/java/com/eu/habbo/messages/incoming/modtool/ModToolReleaseTicketEvent.java

46 lines
1.5 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.messages.incoming.modtool;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.modtool.ModToolIssue;
import com.eu.habbo.habbohotel.modtool.ModToolTicketState;
import com.eu.habbo.habbohotel.modtool.ScripterManager;
2018-09-12 18:45:00 +02:00
import com.eu.habbo.habbohotel.permissions.Permission;
2018-07-06 15:30:00 +02:00
import com.eu.habbo.messages.incoming.MessageHandler;
public class ModToolReleaseTicketEvent extends MessageHandler
{
@Override
public void handle() throws Exception
{
2018-09-12 18:45:00 +02:00
if(this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL))
2018-07-06 15:30:00 +02:00
{
int count = this.packet.readInt();
while (count != 0)
{
count--;
int ticketId = this.packet.readInt();
ModToolIssue issue = Emulator.getGameEnvironment().getModToolManager().getTicket(ticketId);
if (issue == null)
continue;
if (issue.modId != this.client.getHabbo().getHabboInfo().getId())
continue;
issue.modId = 0;
issue.modName = "";
issue.state = ModToolTicketState.OPEN;
Emulator.getGameEnvironment().getModToolManager().updateTicketToMods(issue);
}
}
else
{
ScripterManager.scripterDetected(this.client, Emulator.getTexts().getValue("scripter.warning.modtools.ticket.release").replace("%username%", this.client.getHabbo().getHabboInfo().getUsername()));
2018-07-06 15:30:00 +02:00
}
}
}