mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-10-24 03:33:06 +02:00
30 lines
799 B
Java
30 lines
799 B
Java
|
package com.eu.habbo.habbohotel.pets;
|
||
|
|
||
|
import java.sql.ResultSet;
|
||
|
import java.sql.SQLException;
|
||
|
|
||
|
public class PetCommand implements Comparable<PetCommand>
|
||
|
{
|
||
|
public final int id;
|
||
|
public final String key;
|
||
|
public final int level;
|
||
|
public final int xp;
|
||
|
public final int energyCost;
|
||
|
public final int happynessCost;
|
||
|
|
||
|
public PetCommand(ResultSet set) throws SQLException
|
||
|
{
|
||
|
this.id = set.getInt("command_id");
|
||
|
this.key = set.getString("text");
|
||
|
this.level = set.getInt("required_level");
|
||
|
this.xp = set.getInt("reward_xp");
|
||
|
this.energyCost = set.getInt("cost_energy");
|
||
|
this.happynessCost = set.getInt("cost_happyness");
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int compareTo(PetCommand o)
|
||
|
{
|
||
|
return this.level - o.level;
|
||
|
}
|
||
|
}
|