mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-07-02 13:35:33 +02:00
88 lines
2.2 KiB
Java
88 lines
2.2 KiB
Java
![]() |
package com.eu.habbo.habbohotel.items.interactions.wired.triggers;
|
||
|
|
||
|
import com.eu.habbo.Emulator;
|
||
|
import com.eu.habbo.habbohotel.items.Item;
|
||
|
import com.eu.habbo.habbohotel.items.interactions.InteractionWiredTrigger;
|
||
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||
|
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||
|
import com.eu.habbo.habbohotel.wired.WiredHandler;
|
||
|
import com.eu.habbo.habbohotel.wired.WiredTriggerType;
|
||
|
import com.eu.habbo.messages.ClientMessage;
|
||
|
import com.eu.habbo.messages.ServerMessage;
|
||
|
|
||
|
import java.sql.ResultSet;
|
||
|
import java.sql.SQLException;
|
||
|
|
||
|
public class WiredTriggerCollision extends InteractionWiredTrigger
|
||
|
{
|
||
|
private static final WiredTriggerType type = WiredTriggerType.COLLISION;
|
||
|
|
||
|
public WiredTriggerCollision(ResultSet set, Item baseItem) throws SQLException
|
||
|
{
|
||
|
super(set, baseItem);
|
||
|
}
|
||
|
|
||
|
public WiredTriggerCollision(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells)
|
||
|
{
|
||
|
super(id, userId, item, extradata, limitedStack, limitedSells);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff)
|
||
|
{
|
||
|
if(stuff.length > 0)
|
||
|
{
|
||
|
return stuff[0] instanceof HabboItem;
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getWiredData()
|
||
|
{
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void loadWiredData(ResultSet set, Room room) throws SQLException
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void onPickUp()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public WiredTriggerType getType()
|
||
|
{
|
||
|
return type;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void serializeWiredData(ServerMessage message, Room room)
|
||
|
{
|
||
|
message.appendBoolean(false);
|
||
|
message.appendInt(WiredHandler.MAXIMUM_FURNI_SELECTION);
|
||
|
message.appendInt(0);
|
||
|
message.appendInt(this.getBaseItem().getSpriteId());
|
||
|
message.appendInt(this.getId());
|
||
|
message.appendString("");
|
||
|
message.appendInt(0);
|
||
|
message.appendInt(0);
|
||
|
message.appendInt(type.code);
|
||
|
message.appendInt(0);
|
||
|
message.appendInt(0);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean saveData(ClientMessage packet)
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
}
|