Files
prestonbane/src/engine/objects/Condemned.java
T

59 lines
2.0 KiB
Java
Raw Normal View History

2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.objects;
import engine.gameManager.DbManager;
import java.sql.ResultSet;
import java.sql.SQLException;
2023-07-15 09:23:48 -04:00
public class Condemned {
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
public static final int INDIVIDUAL = 2;
public static final int GUILD = 4;
public static final int NATION = 5;
2022-04-30 09:41:17 -04:00
public int playerUID;
public int buildingUUID;
public int guildUID;
public int friendType;
public boolean active;
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
/**
* ResultSet Constructor
*/
public Condemned(ResultSet rs) throws SQLException {
this.playerUID = rs.getInt("playerUID");
this.buildingUUID = rs.getInt("buildingUID");
2023-07-15 09:23:48 -04:00
this.guildUID = rs.getInt("guildUID");
this.friendType = rs.getInt("friendType");
this.active = rs.getBoolean("active");
}
2022-04-30 09:41:17 -04:00
public Condemned(int playerUID, int buildingUUID, int guildUID, int friendType) {
2023-07-15 09:23:48 -04:00
super();
this.playerUID = playerUID;
this.buildingUUID = buildingUUID;
2023-07-15 09:23:48 -04:00
this.guildUID = guildUID;
this.friendType = friendType;
this.active = false;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
public boolean setActive(boolean active) {
2023-07-15 09:23:48 -04:00
if (!DbManager.BuildingQueries.updateActiveCondemn(this, active))
return false;
2023-07-15 09:23:48 -04:00
this.active = active;
return true;
}
2022-04-30 09:41:17 -04:00
}