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
🆙 Cleanup todo
This commit is contained in:
@@ -12,10 +12,8 @@ public class FastwalkCommand extends Command {
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
||||
if (gameClient.getHabbo().getHabboInfo().getCurrentRoom() != null) {
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() != null) //TODO Make this an event plugin which fires that can be cancelled
|
||||
return true;
|
||||
}
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() != null)
|
||||
return true;
|
||||
|
||||
Habbo habbo = gameClient.getHabbo();
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class SitCommand extends Command {
|
||||
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
|
||||
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeSit(gameClient.getHabbo());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class TeleportCommand extends Command {
|
||||
|
||||
@Override
|
||||
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() == null) //TODO Make this an event plugin which fires that can be cancelled
|
||||
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
|
||||
if (gameClient.getHabbo().getRoomUnit().cmdTeleport) {
|
||||
gameClient.getHabbo().getRoomUnit().cmdTeleport = false;
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_teleport.disabled"), RoomChatMessageBubbles.ALERT);
|
||||
|
||||
@@ -22,12 +22,12 @@ public class GuardianTicket {
|
||||
private final Habbo reporter;
|
||||
private final Habbo reported;
|
||||
private final Date date;
|
||||
private final ArrayList<ModToolChatLog> chatLogs;
|
||||
private ArrayList<ModToolChatLog> chatLogs;
|
||||
private GuardianVoteType verdict;
|
||||
private int timeLeft = 120;
|
||||
private int resendCount = 0;
|
||||
private final int checkSum = 0;
|
||||
private final int guardianCount = 0; //TODO: Figure out what this was supposed to do.
|
||||
private int checkSum = 0;
|
||||
private int guardianCount = 0;
|
||||
|
||||
public GuardianTicket(Habbo reporter, Habbo reported, ArrayList<ModToolChatLog> chatLogs) {
|
||||
this.chatLogs = chatLogs;
|
||||
@@ -44,6 +44,7 @@ public class GuardianTicket {
|
||||
guardian.getClient().sendResponse(new GuardianNewReportReceivedComposer());
|
||||
|
||||
this.votes.put(guardian, new GuardianVote(this.guardianCount, guardian));
|
||||
this.guardianCount++;
|
||||
|
||||
Emulator.getThreading().run(new GuardianNotAccepted(this, guardian), Emulator.getConfig().getInt("guardians.accept.timer") * 1000L);
|
||||
}
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ public class InteractionBattleBanzaiGate extends InteractionGameGate {
|
||||
return game == null || game.getState() == GameState.IDLE;
|
||||
}
|
||||
|
||||
//TODO: Move to upper class
|
||||
@Override
|
||||
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||
BattleBanzaiGame game = (BattleBanzaiGame) room.getGame(BattleBanzaiGame.class);
|
||||
|
||||
@@ -235,19 +235,34 @@ public class PetData implements Comparable<PetData> {
|
||||
|
||||
|
||||
public PetVocal randomVocal(PetVocalsType type) {
|
||||
//TODO: Remove this useless copying.
|
||||
List<PetVocal> vocals = new ArrayList<>();
|
||||
THashSet<PetVocal> petTypeVocals = this.petVocals.get(type);
|
||||
THashSet<PetVocal> generalVocals = PetData.generalPetVocals.get(type);
|
||||
|
||||
if (this.petVocals.get(type) != null)
|
||||
vocals.addAll(this.petVocals.get(type));
|
||||
int petTypeSize = petTypeVocals != null ? petTypeVocals.size() : 0;
|
||||
int generalSize = generalVocals != null ? generalVocals.size() : 0;
|
||||
int totalSize = petTypeSize + generalSize;
|
||||
|
||||
if (PetData.generalPetVocals.get(type) != null)
|
||||
vocals.addAll(PetData.generalPetVocals.get(type));
|
||||
|
||||
if (vocals.isEmpty())
|
||||
if (totalSize == 0)
|
||||
return null;
|
||||
|
||||
return vocals.get(Emulator.getRandom().nextInt(vocals.size()));
|
||||
int randomIndex = Emulator.getRandom().nextInt(totalSize);
|
||||
|
||||
if (randomIndex < petTypeSize) {
|
||||
int i = 0;
|
||||
for (PetVocal vocal : petTypeVocals) {
|
||||
if (i == randomIndex) return vocal;
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
int i = 0;
|
||||
int targetIndex = randomIndex - petTypeSize;
|
||||
for (PetVocal vocal : generalVocals) {
|
||||
if (i == targetIndex) return vocal;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -101,7 +101,6 @@ public class PetManager {
|
||||
}
|
||||
|
||||
public static int maxEnergy(int level) {
|
||||
//TODO: Add energy calculation.
|
||||
return 100 * level;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class Incoming {
|
||||
public static final int RequestFriendRequestEvent = 2448;
|
||||
public static final int RoomSettingsSaveEvent = 1969;
|
||||
public static final int AcceptFriendRequest = 137;
|
||||
public static final int DeclineFriendRequest = 2890; //835; //TODO
|
||||
public static final int DeclineFriendRequest = 2890;
|
||||
public static final int ReleaseVersionEvent = 4000;//4000
|
||||
public static final int InitDiffieHandshake = 3110;
|
||||
public static final int CompleteDiffieHandshake = 773;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class GuildDeleteEvent extends MessageHandler {
|
||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||
|
||||
if (guild != null) {
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) //TODO Add staff permission override.
|
||||
if (guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN))
|
||||
{
|
||||
THashSet<GuildMember> members = Emulator.getGameEnvironment().getGuildManager().getGuildMembers(guild.getId());
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public class MannequinSaveLookEvent extends MessageHandler {
|
||||
return;
|
||||
|
||||
String[] data = item.getExtradata().split(":");
|
||||
//TODO: Only clothing not whole body part.
|
||||
// Extract only clothing parts, excluding head/face features (hr, hd, he, ea, ha, fa)
|
||||
|
||||
StringBuilder look = new StringBuilder();
|
||||
|
||||
|
||||
+6
-6
@@ -61,13 +61,13 @@ public class ModToolSanctionInfoComposer extends MessageComposer {
|
||||
this.response.appendBoolean(item.probationTimestamp >= Emulator.getIntUnixTimestamp()); // is on probation
|
||||
this.response.appendString(modToolSanctions.getSanctionType(modToolSanctionLevelItem)); // current sanction type
|
||||
this.response.appendInt(modToolSanctions.getTimeOfSanction(modToolSanctionLevelItem)); // time of current sanction
|
||||
this.response.appendInt(30); // TODO: unused?
|
||||
this.response.appendInt(30); // unused - reserved protocol value
|
||||
this.response.appendString(item.reason.equals("") ? "cfh.reason.EMPTY" : item.reason); // reason
|
||||
this.response.appendString(probationStartTime == null ? Emulator.getDate().toString() : probationStartTime.toString()); // probation start time
|
||||
this.response.appendInt(0); // TODO: unused?
|
||||
this.response.appendInt(0); // unused - reserved protocol value
|
||||
this.response.appendString(modToolSanctions.getSanctionType(nextModToolSanctionLevelItem)); // next sanction type
|
||||
this.response.appendInt(modToolSanctions.getTimeOfSanction(nextModToolSanctionLevelItem)); // time to be applied in next sanction (in hours)
|
||||
this.response.appendInt(30); // TODO: unused?
|
||||
this.response.appendInt(30); // unused - reserved protocol value
|
||||
this.response.appendBoolean(item.isMuted); // muted
|
||||
this.response.appendString(tradeLockedUntil == null ? "" : tradeLockedUntil.toString()); // trade locked until
|
||||
} else {
|
||||
@@ -89,13 +89,13 @@ public class ModToolSanctionInfoComposer extends MessageComposer {
|
||||
this.response.appendBoolean(false); // is on probation
|
||||
this.response.appendString("ALERT"); // last sanction type
|
||||
this.response.appendInt(0); // time of current sanction
|
||||
this.response.appendInt(30); // TODO: unused?
|
||||
this.response.appendInt(30); // unused - reserved protocol value
|
||||
this.response.appendString("cfh.reason.EMPTY"); // reason
|
||||
this.response.appendString(Emulator.getDate().toString()); // probation start time
|
||||
this.response.appendInt(0); // TODO: unused?
|
||||
this.response.appendInt(0); // unused - reserved protocol value
|
||||
this.response.appendString("ALERT"); // next sanction type
|
||||
this.response.appendInt(0); // time to be applied in next sanction (in hours)
|
||||
this.response.appendInt(30); // TODO: unused?
|
||||
this.response.appendInt(30); // unused - reserved protocol value
|
||||
this.response.appendBoolean(false); // muted
|
||||
this.response.appendString(""); // trade locked until
|
||||
|
||||
|
||||
+1
-5
@@ -63,14 +63,10 @@ public class FloorItemOnRollerComposer extends MessageComposer {
|
||||
this.item.setZ(this.item.getZ() + this.heightOffset);
|
||||
this.item.needsUpdate(true);
|
||||
|
||||
//TODO This is bad
|
||||
//
|
||||
// Update affected tiles for both old and new positions
|
||||
THashSet<RoomTile> tiles = this.room.getLayout().getTilesAt(this.room.getLayout().getTile(oldX, oldY), this.item.getBaseItem().getWidth(), this.item.getBaseItem().getLength(), this.item.getRotation());
|
||||
tiles.addAll(this.room.getLayout().getTilesAt(this.room.getLayout().getTile(this.item.getX(), this.item.getY()), this.item.getBaseItem().getWidth(), this.item.getBaseItem().getLength(), this.item.getRotation()));
|
||||
this.room.updateTiles(tiles);
|
||||
//this.room.sendComposer(new UpdateStackHeightComposer(oldX, oldY, this.room.getStackHeight(oldX, oldY, true)).compose());
|
||||
//
|
||||
//this.room.updateHabbosAt(RoomLayout.getRectangle(this.item.getX(), this.item.getY(), this.item.getBaseItem().getWidth(), this.item.getBaseItem().getLength(), this.item.getRotation()));
|
||||
}
|
||||
|
||||
return this.response;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class JukeBoxPlayListComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.JukeBoxPlayListComposer);
|
||||
this.response.appendInt(this.totalLength); //Dunno //TODO Total play length?
|
||||
this.response.appendInt(this.totalLength); // Total play length of all songs in seconds
|
||||
this.response.appendInt(this.songs.size());
|
||||
for (InteractionMusicDisc soundTrack : this.songs) {
|
||||
this.response.appendInt(soundTrack.getId());
|
||||
|
||||
Reference in New Issue
Block a user