mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
InteractionWaterItem now extends InteractionMultiHeight
This commit is contained in:
parent
b49a0e652a
commit
6d54a957f5
@ -90,13 +90,6 @@ public class InteractionMultiHeight extends HabboItem {
|
|||||||
if (unit.hasStatus(RoomUnitStatus.MOVE) && unit.getGoal() != tile)
|
if (unit.hasStatus(RoomUnitStatus.MOVE) && unit.getGoal() != tile)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
this.getBaseItem().getMultiHeights();
|
|
||||||
/*if (this.getBaseItem().allowSit()) {
|
|
||||||
unit.setStatus(RoomUnitStatus.SIT, this.getBaseItem().getMultiHeights()[(this.getExtradata().isEmpty() ? 0 : Integer.parseInt(this.getExtradata()) % (this.getBaseItem().getMultiHeights().length))] * 1.0D + "");
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (this.getBaseItem().allowSit() || unit.hasStatus(RoomUnitStatus.SIT)) {
|
if (this.getBaseItem().allowSit() || unit.hasStatus(RoomUnitStatus.SIT)) {
|
||||||
unit.sitUpdate = true;
|
unit.sitUpdate = true;
|
||||||
unit.statusUpdate(true);
|
unit.statusUpdate(true);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.eu.habbo.habbohotel.items.interactions;
|
package com.eu.habbo.habbohotel.items.interactions;
|
||||||
|
|
||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
|
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||||
import com.eu.habbo.habbohotel.items.Item;
|
import com.eu.habbo.habbohotel.items.Item;
|
||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.rooms.RoomLayout;
|
import com.eu.habbo.habbohotel.rooms.RoomLayout;
|
||||||
@ -13,7 +14,7 @@ import java.awt.*;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
public class InteractionWaterItem extends InteractionDefault {
|
public class InteractionWaterItem extends InteractionMultiHeight {
|
||||||
public InteractionWaterItem(ResultSet set, Item baseItem) throws SQLException {
|
public InteractionWaterItem(ResultSet set, Item baseItem) throws SQLException {
|
||||||
super(set, baseItem);
|
super(set, baseItem);
|
||||||
}
|
}
|
||||||
@ -30,15 +31,22 @@ public class InteractionWaterItem extends InteractionDefault {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPickUp(Room room) {
|
public void onPickUp(Room room) {
|
||||||
|
super.onPickUp(room);
|
||||||
this.setExtradata("0");
|
this.setExtradata("0");
|
||||||
this.needsUpdate(true);
|
this.needsUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMove(Room room, RoomTile oldLocation, RoomTile newLocation) {
|
public void onMove(Room room, RoomTile oldLocation, RoomTile newLocation) {
|
||||||
|
super.onMove(room, oldLocation, newLocation);
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
|
||||||
|
super.onClick(client, room, new Object[] { });
|
||||||
|
}
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.getRoomId());
|
Room room = Emulator.getGameEnvironment().getRoomManager().getRoom(this.getRoomId());
|
||||||
|
|
||||||
@ -75,7 +83,7 @@ public class InteractionWaterItem extends InteractionDefault {
|
|||||||
if (!this.getExtradata().equals(updatedData)) {
|
if (!this.getExtradata().equals(updatedData)) {
|
||||||
this.setExtradata(updatedData);
|
this.setExtradata(updatedData);
|
||||||
this.needsUpdate(true);
|
this.needsUpdate(true);
|
||||||
room.updateItem(this);
|
room.updateItemState(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,9 +91,4 @@ public class InteractionWaterItem extends InteractionDefault {
|
|||||||
public boolean allowWiredResetState() {
|
public boolean allowWiredResetState() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canToggle(Habbo habbo, Room room) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user