2018-12-22 11:39:00 +01:00
|
|
|
package com.eu.habbo.habbohotel.items.interactions;
|
|
|
|
|
|
|
|
import com.eu.habbo.Emulator;
|
|
|
|
import com.eu.habbo.habbohotel.items.Item;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.Room;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
|
|
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public class InteractionHanditemTile extends InteractionHanditem {
|
|
|
|
public InteractionHanditemTile(ResultSet set, Item baseItem) throws SQLException {
|
2018-12-22 11:39:00 +01:00
|
|
|
super(set, baseItem);
|
|
|
|
}
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public InteractionHanditemTile(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells) {
|
2018-12-22 11:39:00 +01:00
|
|
|
super(id, userId, item, extradata, limitedStack, limitedSells);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-26 20:14:53 +02:00
|
|
|
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
2018-12-22 11:39:00 +01:00
|
|
|
InteractionHanditemTile instance = this;
|
2019-05-26 20:14:53 +02:00
|
|
|
Emulator.getThreading().run(new Runnable() {
|
2018-12-22 11:39:00 +01:00
|
|
|
@Override
|
2019-05-26 20:14:53 +02:00
|
|
|
public void run() {
|
|
|
|
if (roomUnit.getCurrentLocation().x == instance.getX() && roomUnit.getCurrentLocation().y == instance.getY()) {
|
2018-12-22 11:39:00 +01:00
|
|
|
instance.handle(room, roomUnit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 3000);
|
|
|
|
}
|
|
|
|
}
|