mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Added stand command from habbo.
This commit is contained in:
parent
ce9aae174f
commit
b11923452f
@ -1 +1,2 @@
|
|||||||
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.generic.cmd_commands.text', 'Your Commands');
|
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.generic.cmd_commands.text', 'Your Commands');
|
||||||
|
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.keys.cmd_stand', 'stand');
|
||||||
|
@ -245,6 +245,7 @@ public class CommandHandler {
|
|||||||
addCommand(new ShoutCommand());
|
addCommand(new ShoutCommand());
|
||||||
addCommand(new ShutdownCommand());
|
addCommand(new ShutdownCommand());
|
||||||
addCommand(new SitCommand());
|
addCommand(new SitCommand());
|
||||||
|
addCommand(new StandCommand());
|
||||||
addCommand(new SitDownCommand());
|
addCommand(new SitDownCommand());
|
||||||
addCommand(new StaffAlertCommand());
|
addCommand(new StaffAlertCommand());
|
||||||
addCommand(new StaffOnlineCommand());
|
addCommand(new StaffOnlineCommand());
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.eu.habbo.habbohotel.commands;
|
||||||
|
|
||||||
|
import com.eu.habbo.Emulator;
|
||||||
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
|
|
||||||
|
public class StandCommand extends Command {
|
||||||
|
public StandCommand() {
|
||||||
|
super(null, Emulator.getTexts().getValue("commands.keys.cmd_stand").split(";"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handle(GameClient gameClient, String[] params) throws Exception {
|
||||||
|
if (gameClient.getHabbo().getHabboInfo().getRiding() == null)
|
||||||
|
gameClient.getHabbo().getHabboInfo().getCurrentRoom().makeStand(gameClient.getHabbo());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -3993,6 +3993,17 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
this.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose());
|
this.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void makeStand(Habbo habbo) {
|
||||||
|
if (habbo.getRoomUnit() == null) return;
|
||||||
|
HabboItem item = this.getTopItemAt(habbo.getRoomUnit().getX(), habbo.getRoomUnit().getY());
|
||||||
|
if (item == null || !item.getBaseItem().allowSit()) {
|
||||||
|
habbo.getRoomUnit().cmdStand = true;
|
||||||
|
habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[habbo.getRoomUnit().getBodyRotation().getValue() - habbo.getRoomUnit().getBodyRotation().getValue() % 2]);
|
||||||
|
habbo.getRoomUnit().removeStatus(RoomUnitStatus.SIT);
|
||||||
|
this.sendComposer(new RoomUserStatusComposer(habbo.getRoomUnit()).compose());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void giveEffect(Habbo habbo, int effectId, int duration) {
|
public void giveEffect(Habbo habbo, int effectId, int duration) {
|
||||||
if (this.currentHabbos.containsKey(habbo.getHabboInfo().getId())) {
|
if (this.currentHabbos.containsKey(habbo.getHabboInfo().getId())) {
|
||||||
this.giveEffect(habbo.getRoomUnit(), effectId, duration);
|
this.giveEffect(habbo.getRoomUnit(), effectId, duration);
|
||||||
|
@ -38,6 +38,7 @@ public class RoomUnit {
|
|||||||
public boolean animateWalk = false;
|
public boolean animateWalk = false;
|
||||||
public boolean cmdTeleport = false;
|
public boolean cmdTeleport = false;
|
||||||
public boolean cmdSit = false;
|
public boolean cmdSit = false;
|
||||||
|
public boolean cmdStand = false;
|
||||||
public boolean cmdLay = false;
|
public boolean cmdLay = false;
|
||||||
public boolean sitUpdate = false;
|
public boolean sitUpdate = false;
|
||||||
public boolean isTeleporting = false;
|
public boolean isTeleporting = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user