2018-09-12 18:45:00 +02:00
|
|
|
package com.eu.habbo.habbohotel.items.interactions.wired.conditions;
|
|
|
|
|
|
|
|
import com.eu.habbo.habbohotel.items.Item;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.Room;
|
|
|
|
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
|
|
|
import com.eu.habbo.habbohotel.users.Habbo;
|
2018-12-22 11:39:00 +01:00
|
|
|
import com.eu.habbo.habbohotel.wired.WiredConditionOperator;
|
2018-09-12 18:45:00 +02:00
|
|
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
|
|
|
public class WiredConditionHabboNotRank extends WiredConditionHabboWearsBadge
|
|
|
|
{
|
|
|
|
public WiredConditionHabboNotRank(ResultSet set, Item baseItem) throws SQLException
|
|
|
|
{
|
|
|
|
super(set, baseItem);
|
|
|
|
}
|
|
|
|
|
|
|
|
public WiredConditionHabboNotRank(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)
|
|
|
|
{
|
|
|
|
Habbo habbo = room.getHabbo(roomUnit);
|
|
|
|
|
|
|
|
if (habbo != null)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2018-12-22 11:39:00 +01:00
|
|
|
return habbo.getHabboInfo().getRank().getId() != Integer.valueOf(this.badge);
|
2018-09-12 18:45:00 +02:00
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2018-12-22 11:39:00 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public WiredConditionOperator operator()
|
|
|
|
{
|
|
|
|
return WiredConditionOperator.OR;
|
|
|
|
}
|
2018-09-12 18:45:00 +02:00
|
|
|
}
|