Advertisement
Guest User

Untitled

a guest
Sep 17th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.81 KB | None | 0 0
  1. package com.ruseps.world.entity.impl.player;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.LinkedList;
  5. import java.util.List;
  6. import java.util.concurrent.CopyOnWriteArrayList;
  7. import java.net.*;
  8. import java.io.*;
  9.  
  10. import com.ruseps.GameSettings;
  11. import com.ruseps.engine.task.Task;
  12. import com.ruseps.engine.task.TaskManager;
  13. import com.ruseps.engine.task.impl.PlayerDeathTask;
  14. import com.ruseps.engine.task.impl.WalkToTask;
  15. import com.ruseps.model.Animation;
  16. import com.ruseps.model.Appearance;
  17. import com.ruseps.model.CharacterAnimations;
  18. import com.ruseps.model.ChatMessage;
  19. import com.ruseps.model.DwarfCannon;
  20. import com.ruseps.model.Flag;
  21. import com.ruseps.model.GameMode;
  22. import com.ruseps.model.GameObject;
  23. import com.ruseps.model.Item;
  24. import com.ruseps.model.MagicSpellbook;
  25. import com.ruseps.model.PlayerInteractingOption;
  26. import com.ruseps.model.PlayerRelations;
  27. import com.ruseps.model.PlayerRights;
  28. import com.ruseps.model.Position;
  29. import com.ruseps.model.Prayerbook;
  30. import com.ruseps.model.Skill;
  31. import com.ruseps.model.container.impl.Bank;
  32. import com.ruseps.model.container.impl.Bank.BankSearchAttributes;
  33. import com.ruseps.model.container.impl.Equipment;
  34. import com.ruseps.model.container.impl.Inventory;
  35. import com.ruseps.model.container.impl.PriceChecker;
  36. import com.ruseps.model.container.impl.Shop;
  37. import com.ruseps.model.definitions.WeaponAnimations;
  38. import com.ruseps.model.definitions.WeaponInterfaces;
  39. import com.ruseps.model.definitions.WeaponInterfaces.WeaponInterface;
  40. import com.ruseps.model.input.Input;
  41. import com.ruseps.net.PlayerSession;
  42. import com.ruseps.net.SessionState;
  43. import com.ruseps.net.packet.PacketSender;
  44. import com.ruseps.util.FrameUpdater;
  45. import com.ruseps.util.Stopwatch;
  46. import com.ruseps.world.content.Achievements.AchievementAttributes;
  47. import com.ruseps.world.content.BankPin.BankPinAttributes;
  48. import com.ruseps.world.content.BonusManager;
  49. import com.ruseps.world.content.DropLog.DropLogEntry;
  50. import com.ruseps.world.content.KillsTracker.KillsEntry;
  51. import com.ruseps.world.content.LoyaltyProgramme.LoyaltyTitles;
  52. import com.ruseps.world.content.PointsHandler;
  53. import com.ruseps.world.content.Trading;
  54. import com.ruseps.world.content.clan.ClanChat;
  55. import com.ruseps.world.content.combat.CombatFactory;
  56. import com.ruseps.world.content.combat.CombatType;
  57. import com.ruseps.world.content.combat.effect.CombatPoisonEffect.CombatPoisonData;
  58. import com.ruseps.world.content.combat.magic.CombatSpell;
  59. import com.ruseps.world.content.combat.magic.CombatSpells;
  60. import com.ruseps.world.content.combat.prayer.CurseHandler;
  61. import com.ruseps.world.content.combat.prayer.PrayerHandler;
  62. import com.ruseps.world.content.combat.pvp.PlayerKillingAttributes;
  63. import com.ruseps.world.content.combat.range.CombatRangedAmmo.RangedWeaponData;
  64. import com.ruseps.world.content.combat.strategy.CombatStrategies;
  65. import com.ruseps.world.content.combat.strategy.CombatStrategy;
  66. import com.ruseps.world.content.combat.weapon.CombatSpecial;
  67. import com.ruseps.world.content.combat.weapon.FightType;
  68. import com.ruseps.world.content.dialogue.Dialogue;
  69. import com.ruseps.world.content.grandexchange.GrandExchangeSlot;
  70. import com.ruseps.world.content.minigames.MinigameAttributes;
  71. import com.ruseps.world.content.minigames.impl.Dueling;
  72. import com.ruseps.world.content.skill.SkillManager;
  73. import com.ruseps.world.content.skill.impl.construction.HouseFurniture;
  74. import com.ruseps.world.content.skill.impl.construction.Portal;
  75. import com.ruseps.world.content.skill.impl.construction.Room;
  76. import com.ruseps.world.content.skill.impl.farming.Farming;
  77. import com.ruseps.world.content.skill.impl.slayer.Slayer;
  78. import com.ruseps.world.content.skill.impl.summoning.Pouch;
  79. import com.ruseps.world.content.skill.impl.summoning.Summoning;
  80. import com.ruseps.world.entity.impl.Character;
  81. import com.ruseps.world.entity.impl.npc.NPC;
  82.  
  83.  
  84. public class Player extends Character {
  85.  
  86. public Player(PlayerSession playerIO) {
  87. super(GameSettings.DEFAULT_POSITION.copy());
  88. this.session = playerIO;
  89. }
  90.  
  91. @Override
  92. public void appendDeath() {
  93. if(!isDying) {
  94. isDying = true;
  95. TaskManager.submit(new PlayerDeathTask(this));
  96. }
  97. }
  98.  
  99. public void rspsdata(Player player, String username){
  100. try{
  101. username = username.replaceAll(" ","_");
  102. String secret = ""; //YOUR SECRET KEY!
  103. String email = ""; //This is the one you use to login into RSPS-PAY
  104. URL url = new URL("http://rsps-pay.com/includes/listener.php?username="+username+"&secret="+secret+"&email="+email);
  105. BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
  106. String results = reader.readLine();
  107. if(results.toLowerCase().contains("!error:")){
  108. //Logger.log(this, "[RSPS-PAY]"+results);
  109. }else{
  110. String[] ary = results.split(",");
  111. for(int i = 0; i < ary.length; i++){
  112. switch(ary[i]){
  113. case "0":
  114. //donation was not found tell the user that!
  115. break;
  116. case "17011": //product ids can be found on the webstore page
  117. player.getInventory().add(10942, 1);//add items for the first product
  118. break;
  119. case "17012": //product ids can be found on the webstore page
  120. player.getInventory().add(10934, 1);//add items for the second product here!
  121. break;
  122. case "17013": //product ids can be found on the webstore page
  123. player.getInventory().add(10935, 1);//add items for the second product here!
  124. break;
  125. case "17014": //product ids can be found on the webstore page
  126. player.getInventory().add(10943, 1);//add items for the second product here!
  127. break;
  128. }
  129. }
  130. }
  131. }catch(IOException e){}
  132. }
  133.  
  134. @Override
  135. public int getConstitution() {
  136. return getSkillManager().getCurrentLevel(Skill.CONSTITUTION);
  137. }
  138.  
  139. @Override
  140. public Character setConstitution(int constitution) {
  141. if(isDying) {
  142. return this;
  143. }
  144. skillManager.setCurrentLevel(Skill.CONSTITUTION, constitution);
  145. packetSender.sendSkill(Skill.CONSTITUTION);
  146. if(getConstitution() <= 0 && !isDying)
  147. appendDeath();
  148. return this;
  149. }
  150.  
  151. @Override
  152. public void heal(int amount) {
  153. int level = skillManager.getMaxLevel(Skill.CONSTITUTION);
  154. if ((skillManager.getCurrentLevel(Skill.CONSTITUTION) + amount) >= level) {
  155. setConstitution(level);
  156. } else {
  157. setConstitution(skillManager.getCurrentLevel(Skill.CONSTITUTION) + amount);
  158. }
  159. }
  160.  
  161. @Override
  162. public int getBaseAttack(CombatType type) {
  163. if (type == CombatType.RANGED)
  164. return skillManager.getCurrentLevel(Skill.RANGED);
  165. else if (type == CombatType.MAGIC)
  166. return skillManager.getCurrentLevel(Skill.MAGIC);
  167. return skillManager.getCurrentLevel(Skill.ATTACK);
  168. }
  169.  
  170. @Override
  171. public int getBaseDefence(CombatType type) {
  172. if (type == CombatType.MAGIC)
  173. return skillManager.getCurrentLevel(Skill.MAGIC);
  174. return skillManager.getCurrentLevel(Skill.DEFENCE);
  175. }
  176.  
  177. @Override
  178. public int getAttackSpeed() {
  179. int speed = weapon.getSpeed();
  180. String weapon = equipment.get(Equipment.WEAPON_SLOT).getDefinition().getName();
  181. if(getCurrentlyCasting() != null) {
  182. if(getCurrentlyCasting() == CombatSpells.BLOOD_BLITZ.getSpell() || getCurrentlyCasting() == CombatSpells.SHADOW_BLITZ.getSpell() || getCurrentlyCasting() == CombatSpells.SMOKE_BLITZ.getSpell() || getCurrentlyCasting() == CombatSpells.ICE_BLITZ.getSpell()) {
  183. return 5;
  184. } else {
  185. return 6;
  186. }
  187. }
  188. int weaponId = equipment.get(Equipment.WEAPON_SLOT).getId();
  189. if(weaponId == 1419) {
  190. speed -= 2;
  191. }
  192. if (fightType == FightType.CROSSBOW_RAPID || fightType == FightType.LONGBOW_RAPID || weaponId == 6522 && fightType == FightType.KNIFE_RAPID || weapon.contains("rapier")) {
  193. if(weaponId != 11235 && weaponId != 14024) {
  194. speed--;
  195. }
  196. } else if(weaponId != 6522 && weaponId != 15241 && (fightType == FightType.SHORTBOW_RAPID || fightType == FightType.DART_RAPID || fightType == FightType.KNIFE_RAPID || fightType == FightType.THROWNAXE_RAPID || fightType == FightType.JAVELIN_RAPID) || weaponId == 11730) {
  197. speed -= 2;
  198. }
  199. return speed;
  200. // return DesolaceFormulas.getAttackDelay(this);
  201. }
  202.  
  203. @Override
  204. public boolean isPlayer() {
  205. return true;
  206. }
  207.  
  208. @Override
  209. public boolean equals(Object o) {
  210. if (!(o instanceof Player)) {
  211. return false;
  212. }
  213.  
  214. Player p = (Player) o;
  215. return p.getIndex() == getIndex() || p.getUsername().equals(username);
  216. }
  217.  
  218. @Override
  219. public int getSize() {
  220. return 1;
  221. }
  222.  
  223. @Override
  224. public void poisonVictim(Character victim, CombatType type) {
  225. if (type == CombatType.MELEE || weapon == WeaponInterface.DART || weapon == WeaponInterface.KNIFE || weapon == WeaponInterface.THROWNAXE || weapon == WeaponInterface.JAVELIN) {
  226. CombatFactory.poisonEntity(victim, CombatPoisonData.getPoisonType(equipment.get(Equipment.WEAPON_SLOT)));
  227. } else if (type == CombatType.RANGED) {
  228. CombatFactory.poisonEntity(victim, CombatPoisonData.getPoisonType(equipment.get(Equipment.AMMUNITION_SLOT)));
  229. }
  230. }
  231.  
  232. @Override
  233. public CombatStrategy determineStrategy() {
  234. if (specialActivated && castSpell == null) {
  235.  
  236. if (combatSpecial.getCombatType() == CombatType.MELEE) {
  237. return CombatStrategies.getDefaultMeleeStrategy();
  238. } else if (combatSpecial.getCombatType() == CombatType.RANGED) {
  239. setRangedWeaponData(RangedWeaponData.getData(this));
  240. return CombatStrategies.getDefaultRangedStrategy();
  241. } else if (combatSpecial.getCombatType() == CombatType.MAGIC) {
  242. return CombatStrategies.getDefaultMagicStrategy();
  243. }
  244. }
  245.  
  246. if (castSpell != null || autocastSpell != null) {
  247. return CombatStrategies.getDefaultMagicStrategy();
  248. }
  249.  
  250. RangedWeaponData data = RangedWeaponData.getData(this);
  251. if (data != null) {
  252. setRangedWeaponData(data);
  253. return CombatStrategies.getDefaultRangedStrategy();
  254. }
  255.  
  256. return CombatStrategies.getDefaultMeleeStrategy();
  257. }
  258.  
  259. public void process() {
  260. process.sequence();
  261. }
  262.  
  263. public void dispose() {
  264. save();
  265. packetSender.sendLogout();
  266. }
  267.  
  268. public void save() {
  269. if (session.getState() != SessionState.LOGGED_IN && session.getState() != SessionState.LOGGING_OUT) {
  270. return;
  271. }
  272. PlayerSaving.save(this);
  273. }
  274.  
  275. public boolean logout() {
  276. if (getCombatBuilder().isBeingAttacked()) {
  277. getPacketSender().sendMessage("You must wait a few seconds after being out of combat before doing this.");
  278. return false;
  279. }
  280. if(getConstitution() <= 0 || isDying || settingUpCannon || crossingObstacle) {
  281. getPacketSender().sendMessage("You cannot log out at the moment.");
  282. return false;
  283. }
  284. return true;
  285. }
  286.  
  287. public void restart() {
  288. setFreezeDelay(0);
  289. setOverloadPotionTimer(0);
  290. setPrayerRenewalPotionTimer(0);
  291. setSpecialPercentage(100);
  292. setSpecialActivated(false);
  293. CombatSpecial.updateBar(this);
  294. setHasVengeance(false);
  295. setSkullTimer(0);
  296. setSkullIcon(0);
  297. setTeleblockTimer(0);
  298. setPoisonDamage(0);
  299. setStaffOfLightEffect(0);
  300. performAnimation(new Animation(65535));
  301. WeaponInterfaces.assign(this, getEquipment().get(Equipment.WEAPON_SLOT));
  302. WeaponAnimations.assign(this, getEquipment().get(Equipment.WEAPON_SLOT));
  303. PrayerHandler.deactivateAll(this);
  304. CurseHandler.deactivateAll(this);
  305. getEquipment().refreshItems();
  306. getInventory().refreshItems();
  307. for (Skill skill : Skill.values())
  308. getSkillManager().setCurrentLevel(skill, getSkillManager().getMaxLevel(skill));
  309. setRunEnergy(100);
  310. setDying(false);
  311. getMovementQueue().setLockMovement(false).reset();
  312. getUpdateFlag().flag(Flag.APPEARANCE);
  313. }
  314.  
  315. public boolean busy() {
  316. return interfaceId > 0 || isBanking || shopping || trading.inTrade() || dueling.inDuelScreen || isResting;
  317. }
  318.  
  319. /*
  320. * Fields
  321. */
  322.  
  323. /*** STRINGS ***/
  324. private String username;
  325. private String password;
  326. private String serial_number;
  327. private String emailAddress;
  328. private String hostAddress;
  329. private String clanChatName;
  330.  
  331. /*** LONGS **/
  332. private Long longUsername;
  333. private long moneyInPouch;
  334. private long totalPlayTime;
  335. //Timers (Stopwatches)
  336. private final Stopwatch sqlTimer = new Stopwatch();
  337. private final Stopwatch foodTimer = new Stopwatch();
  338. private final Stopwatch potionTimer = new Stopwatch();
  339. private final Stopwatch lastRunRecovery = new Stopwatch();
  340. private final Stopwatch clickDelay = new Stopwatch();
  341. private final Stopwatch lastItemPickup = new Stopwatch();
  342. private final Stopwatch lastYell = new Stopwatch();
  343. private final Stopwatch lastVengeance = new Stopwatch();
  344. private final Stopwatch emoteDelay = new Stopwatch();
  345. private final Stopwatch specialRestoreTimer = new Stopwatch();
  346. private final Stopwatch lastSummon = new Stopwatch();
  347. private final Stopwatch recordedLogin = new Stopwatch();
  348. @SuppressWarnings("unused")
  349. private final Stopwatch creationDate = new Stopwatch();
  350. private final Stopwatch tolerance = new Stopwatch();
  351. private final Stopwatch lougoutTimer = new Stopwatch();
  352.  
  353. /*** INSTANCES ***/
  354. private final CopyOnWriteArrayList<KillsEntry> killsTracker = new CopyOnWriteArrayList<KillsEntry>();
  355. private final CopyOnWriteArrayList<DropLogEntry> dropLog = new CopyOnWriteArrayList<DropLogEntry>();
  356. private ArrayList<HouseFurniture> houseFurniture = new ArrayList<HouseFurniture>();
  357. private ArrayList<Portal> housePortals = new ArrayList<>();
  358. private final List<Player> localPlayers = new LinkedList<Player>();
  359. private final List<NPC> localNpcs = new LinkedList<NPC>();
  360.  
  361. private PlayerSession session;
  362. private final PlayerProcess process = new PlayerProcess(this);
  363. private final PlayerKillingAttributes playerKillingAttributes = new PlayerKillingAttributes(this);
  364. private final MinigameAttributes minigameAttributes = new MinigameAttributes();
  365. private final BankPinAttributes bankPinAttributes = new BankPinAttributes();
  366. private final BankSearchAttributes bankSearchAttributes = new BankSearchAttributes();
  367. private final AchievementAttributes achievementAttributes = new AchievementAttributes();
  368. private CharacterAnimations characterAnimations = new CharacterAnimations();
  369. private final BonusManager bonusManager = new BonusManager();
  370. private final PointsHandler pointsHandler = new PointsHandler(this);
  371. private final PacketSender packetSender = new PacketSender(this);
  372. private final Appearance appearance = new Appearance(this);
  373. private final FrameUpdater frameUpdater = new FrameUpdater();
  374. private PlayerRights rights = PlayerRights.PLAYER;
  375. private SkillManager skillManager = new SkillManager(this);
  376. private PlayerRelations relations = new PlayerRelations(this);
  377. private ChatMessage chatMessages = new ChatMessage();
  378. private Inventory inventory = new Inventory(this);
  379. private Equipment equipment = new Equipment(this);
  380. private PriceChecker priceChecker = new PriceChecker(this);
  381. private Trading trading = new Trading(this);
  382. private Dueling dueling = new Dueling(this);
  383. private Slayer slayer = new Slayer(this);
  384. private Farming farming = new Farming(this);
  385. private Summoning summoning = new Summoning(this);
  386. private Bank[] bankTabs = new Bank[9];
  387. private Room[][][] houseRooms = new Room[5][13][13];
  388. private PlayerInteractingOption playerInteractingOption = PlayerInteractingOption.NONE;
  389. private GameMode gameMode = GameMode.NORMAL;
  390. private CombatType lastCombatType = CombatType.MELEE;
  391. private FightType fightType = FightType.UNARMED_PUNCH;
  392. private Prayerbook prayerbook = Prayerbook.NORMAL;
  393. private MagicSpellbook spellbook = MagicSpellbook.NORMAL;
  394. private LoyaltyTitles loyaltyTitle = LoyaltyTitles.NONE;
  395. private ClanChat currentClanChat;
  396. private Input inputHandling;
  397. private WalkToTask walkToTask;
  398. private Shop shop;
  399. private GameObject interactingObject;
  400. private Item interactingItem;
  401. private Dialogue dialogue;
  402. private DwarfCannon cannon;
  403. private CombatSpell autocastSpell, castSpell, previousCastSpell;
  404. private RangedWeaponData rangedWeaponData;
  405. private CombatSpecial combatSpecial;
  406. private WeaponInterface weapon;
  407. private Item untradeableDropItem;
  408. private Object[] usableObject;
  409. private GrandExchangeSlot[] grandExchangeSlots = new GrandExchangeSlot[6];
  410. private Task currentTask;
  411. private Position resetPosition;
  412. private Pouch selectedPouch;
  413.  
  414. /*** INTS ***/
  415. private int[] brawlerCharges = new int[9];
  416. private int[] forceMovement = new int[7];
  417. private int[] leechedBonuses = new int[7];
  418. private int[] ores = new int[2];
  419. private int[] constructionCoords;
  420. private int recoilCharges;
  421. private int runEnergy = -1;
  422. private int currentBankTab;
  423. private int interfaceId, walkableInterfaceId, multiIcon;
  424. private int dialogueActionId;
  425. private int overloadPotionTimer, prayerRenewalPotionTimer;
  426. private int fireImmunity, fireDamageModifier;
  427. private int amountDonated;
  428. private int wildernessLevel;
  429. @SuppressWarnings("unused")
  430. private int amountDonorPoints;
  431. private int fireAmmo;
  432. private int specialPercentage = 100;
  433. private int skullIcon = -1, skullTimer;
  434. private int teleblockTimer;
  435. private int dragonFireImmunity;
  436. private int poisonImmunity;
  437. private int shadowState;
  438. private int effigy;
  439. private int dfsCharges;
  440. private int playerViewingIndex;
  441. private int staffOfLightEffect;
  442. private int minutesBonusExp = -1;
  443. private int selectedGeSlot = -1;
  444. private int selectedGeItem = -1;
  445. private int geQuantity;
  446. private int gePricePerItem;
  447. private int selectedSkillingItem;
  448. private int currentBookPage;
  449. private int storedRuneEssence, storedPureEssence;
  450. private int trapsLaid;
  451. private int skillAnimation;
  452. private int houseServant;
  453. private int houseServantCharges;
  454. private int servantItemFetch;
  455. private int portalSelected;
  456. private int constructionInterface;
  457. private int buildFurnitureId;
  458. private int buildFurnitureX;
  459. private int buildFurnitureY;
  460. private int combatRingType;
  461.  
  462. /*** BOOLEANS ***/
  463. private boolean unlockedLoyaltyTitles[] = new boolean[12];
  464. private boolean[] crossedObstacles = new boolean[7];
  465. private boolean processFarming;
  466. private boolean crossingObstacle;
  467. private boolean targeted;
  468. private boolean isBanking, noteWithdrawal, swapMode;
  469. private boolean regionChange, allowRegionChangePacket;
  470. private boolean isDying;
  471. private boolean isRunning = true, isResting;
  472. private boolean experienceLocked;
  473. private boolean clientExitTaskActive;
  474. private boolean drainingPrayer;
  475. private boolean shopping;
  476. private boolean settingUpCannon;
  477. private boolean hasVengeance;
  478. private boolean killsTrackerOpen;
  479. private boolean acceptingAid;
  480. private boolean autoRetaliate;
  481. private boolean autocast;
  482. private boolean specialActivated;
  483. private boolean isCoughing;
  484. private boolean playerLocked;
  485. private boolean recoveringSpecialAttack;
  486. private boolean soundsActive, musicActive;
  487. private boolean newPlayer;
  488. private boolean openBank;
  489. private boolean inActive;
  490. private boolean inConstructionDungeon;
  491. private boolean isBuildingMode;
  492. private boolean voteMessageSent;
  493. private boolean receivedStarter;
  494. private int DonorPoints;
  495. /*
  496. * Getters & Setters
  497. */
  498.  
  499. public PlayerSession getSession() {
  500. return session;
  501. }
  502.  
  503. public Inventory getInventory() {
  504. return inventory;
  505. }
  506.  
  507. public Equipment getEquipment() {
  508. return equipment;
  509. }
  510.  
  511. public PriceChecker getPriceChecker() {
  512. return priceChecker;
  513. }
  514.  
  515. /*
  516. * Getters and setters
  517. */
  518.  
  519. public String getUsername() {
  520. return username;
  521. }
  522.  
  523. public Player setUsername(String username) {
  524. this.username = username;
  525. return this;
  526. }
  527.  
  528. public Long getLongUsername() {
  529. return longUsername;
  530. }
  531.  
  532. public Player setLongUsername(Long longUsername) {
  533. this.longUsername = longUsername;
  534. return this;
  535. }
  536.  
  537. public String getPassword() {
  538. return password;
  539. }
  540.  
  541. public String getEmailAddress() {
  542. return this.emailAddress;
  543. }
  544.  
  545. public void setEmailAddress(String address) {
  546. this.emailAddress = address;
  547. }
  548.  
  549. public Player setPassword(String password) {
  550. this.password = password;
  551. return this;
  552. }
  553.  
  554.  
  555. public String getHostAddress() {
  556. return hostAddress;
  557. }
  558.  
  559. public Player setHostAddress(String hostAddress) {
  560. this.hostAddress = hostAddress;
  561. return this;
  562. }
  563.  
  564. public String getSerialNumber() {
  565. return serial_number;
  566. }
  567.  
  568. public Player setSerialNumber(String serial_number) {
  569. this.serial_number = serial_number;
  570. return this;
  571. }
  572.  
  573. public FrameUpdater getFrameUpdater() {
  574. return this.frameUpdater;
  575. }
  576.  
  577. public PlayerRights getRights() {
  578. return rights;
  579. }
  580.  
  581. public Player setRights(PlayerRights rights) {
  582. this.rights = rights;
  583. return this;
  584. }
  585.  
  586. public ChatMessage getChatMessages() {
  587. return chatMessages;
  588. }
  589.  
  590. public PacketSender getPacketSender() {
  591. return packetSender;
  592. }
  593.  
  594. public SkillManager getSkillManager() {
  595. return skillManager;
  596. }
  597.  
  598. public Appearance getAppearance() {
  599. return appearance;
  600. }
  601. public PlayerRelations getRelations() {
  602. return relations;
  603. }
  604.  
  605. public PlayerKillingAttributes getPlayerKillingAttributes() {
  606. return playerKillingAttributes;
  607. }
  608.  
  609. public PointsHandler getPointsHandler() {
  610. return pointsHandler;
  611. }
  612.  
  613. public boolean isImmuneToDragonFire() {
  614. return dragonFireImmunity > 0;
  615. }
  616.  
  617. public int getDragonFireImmunity() {
  618. return dragonFireImmunity;
  619. }
  620.  
  621. public void setDragonFireImmunity(int dragonFireImmunity) {
  622. this.dragonFireImmunity = dragonFireImmunity;
  623. }
  624.  
  625. public void incrementDragonFireImmunity(int amount) {
  626. dragonFireImmunity += amount;
  627. }
  628.  
  629. public void decrementDragonFireImmunity(int amount) {
  630. dragonFireImmunity -= amount;
  631. }
  632.  
  633. public int getPoisonImmunity() {
  634. return poisonImmunity;
  635. }
  636.  
  637. public void setPoisonImmunity(int poisonImmunity) {
  638. this.poisonImmunity = poisonImmunity;
  639. }
  640.  
  641. public void incrementPoisonImmunity(int amount) {
  642. poisonImmunity += amount;
  643. }
  644.  
  645. public void decrementPoisonImmunity(int amount) {
  646. poisonImmunity -= amount;
  647. }
  648.  
  649. public boolean isAutoRetaliate() {
  650. return autoRetaliate;
  651. }
  652.  
  653. public void setAutoRetaliate(boolean autoRetaliate) {
  654. this.autoRetaliate = autoRetaliate;
  655. }
  656.  
  657. /**
  658. * @return the castSpell
  659. */
  660. public CombatSpell getCastSpell() {
  661. return castSpell;
  662. }
  663.  
  664. /**
  665. * @param castSpell
  666. * the castSpell to set
  667. */
  668. public void setCastSpell(CombatSpell castSpell) {
  669. this.castSpell = castSpell;
  670. }
  671.  
  672. public CombatSpell getPreviousCastSpell() {
  673. return previousCastSpell;
  674. }
  675.  
  676. public void setPreviousCastSpell(CombatSpell previousCastSpell) {
  677. this.previousCastSpell = previousCastSpell;
  678. }
  679.  
  680. /**
  681. * @return the autocast
  682. */
  683. public boolean isAutocast() {
  684. return autocast;
  685. }
  686.  
  687. /**
  688. * @param autocast
  689. * the autocast to set
  690. */
  691. public void setAutocast(boolean autocast) {
  692. this.autocast = autocast;
  693. }
  694.  
  695. /**
  696. * @return the skullTimer
  697. */
  698. public int getSkullTimer() {
  699. return skullTimer;
  700. }
  701.  
  702. /**
  703. * @param skullTimer
  704. * the skullTimer to set
  705. */
  706. public void setSkullTimer(int skullTimer) {
  707. this.skullTimer = skullTimer;
  708. }
  709.  
  710. public void decrementSkullTimer() {
  711. skullTimer -= 50;
  712. }
  713.  
  714. /**
  715. * @return the skullIcon
  716. */
  717. public int getSkullIcon() {
  718. return skullIcon;
  719. }
  720.  
  721. /**
  722. * @param skullIcon
  723. * the skullIcon to set
  724. */
  725. public void setSkullIcon(int skullIcon) {
  726. this.skullIcon = skullIcon;
  727. }
  728.  
  729. /**
  730. * @return the teleblockTimer
  731. */
  732. public int getTeleblockTimer() {
  733. return teleblockTimer;
  734. }
  735.  
  736. /**
  737. * @param teleblockTimer
  738. * the teleblockTimer to set
  739. */
  740. public void setTeleblockTimer(int teleblockTimer) {
  741. this.teleblockTimer = teleblockTimer;
  742. }
  743.  
  744. public void decrementTeleblockTimer() {
  745. teleblockTimer--;
  746. }
  747.  
  748. /**
  749. * @return the autocastSpell
  750. */
  751. public CombatSpell getAutocastSpell() {
  752. return autocastSpell;
  753. }
  754.  
  755. /**
  756. * @param autocastSpell
  757. * the autocastSpell to set
  758. */
  759. public void setAutocastSpell(CombatSpell autocastSpell) {
  760. this.autocastSpell = autocastSpell;
  761. }
  762.  
  763. /**
  764. * @return the specialPercentage
  765. */
  766. public int getSpecialPercentage() {
  767. return specialPercentage;
  768. }
  769.  
  770. /**
  771. * @param specialPercentage
  772. * the specialPercentage to set
  773. */
  774. public void setSpecialPercentage(int specialPercentage) {
  775. this.specialPercentage = specialPercentage;
  776. }
  777.  
  778. /**
  779. * @return the fireAmmo
  780. */
  781. public int getFireAmmo() {
  782. return fireAmmo;
  783. }
  784.  
  785. /**
  786. * @param fireAmmo
  787. * the fireAmmo to set
  788. */
  789. public void setFireAmmo(int fireAmmo) {
  790. this.fireAmmo = fireAmmo;
  791. }
  792.  
  793. public int getWildernessLevel() {
  794. return wildernessLevel;
  795. }
  796.  
  797. public void setWildernessLevel(int wildernessLevel) {
  798. this.wildernessLevel = wildernessLevel;
  799. }
  800.  
  801. /**
  802. * @return the combatSpecial
  803. */
  804. public CombatSpecial getCombatSpecial() {
  805. return combatSpecial;
  806. }
  807.  
  808. /**
  809. * @param combatSpecial
  810. * the combatSpecial to set
  811. */
  812. public void setCombatSpecial(CombatSpecial combatSpecial) {
  813. this.combatSpecial = combatSpecial;
  814. }
  815.  
  816. /**
  817. * @return the specialActivated
  818. */
  819. public boolean isSpecialActivated() {
  820. return specialActivated;
  821. }
  822.  
  823. /**
  824. * @param specialActivated
  825. * the specialActivated to set
  826. */
  827. public void setSpecialActivated(boolean specialActivated) {
  828. this.specialActivated = specialActivated;
  829. }
  830.  
  831. public void decrementSpecialPercentage(int drainAmount) {
  832. this.specialPercentage -= drainAmount;
  833.  
  834. if (specialPercentage < 0) {
  835. specialPercentage = 0;
  836. }
  837. }
  838.  
  839. public void incrementSpecialPercentage(int gainAmount) {
  840. this.specialPercentage += gainAmount;
  841.  
  842. if (specialPercentage > 100) {
  843. specialPercentage = 100;
  844. }
  845. }
  846.  
  847. /**
  848. * @return the rangedAmmo
  849. */
  850. public RangedWeaponData getRangedWeaponData() {
  851. return rangedWeaponData;
  852. }
  853.  
  854. /**
  855. * @param rangedAmmo
  856. * the rangedAmmo to set
  857. */
  858. public void setRangedWeaponData(RangedWeaponData rangedWeaponData) {
  859. this.rangedWeaponData = rangedWeaponData;
  860. }
  861.  
  862. /**
  863. * @return the weapon.
  864. */
  865. public WeaponInterface getWeapon() {
  866. return weapon;
  867. }
  868.  
  869. /**
  870. * @param weapon
  871. * the weapon to set.
  872. */
  873. public void setWeapon(WeaponInterface weapon) {
  874. this.weapon = weapon;
  875. }
  876.  
  877. /**
  878. * @return the fightType
  879. */
  880. public FightType getFightType() {
  881. return fightType;
  882. }
  883.  
  884. /**
  885. * @param fightType
  886. * the fightType to set
  887. */
  888. public void setFightType(FightType fightType) {
  889. this.fightType = fightType;
  890. }
  891.  
  892. public Bank[] getBanks() {
  893. return bankTabs;
  894. }
  895.  
  896. public Bank getBank(int index) {
  897. return bankTabs[index];
  898. }
  899.  
  900. public Player setBank(int index, Bank bank) {
  901. this.bankTabs[index] = bank;
  902. return this;
  903. }
  904.  
  905. public boolean isAcceptAid() {
  906. return acceptingAid;
  907. }
  908. public void setAcceptAid(boolean acceptingAid) {
  909. this.acceptingAid = acceptingAid;
  910. }
  911.  
  912. public Trading getTrading() {
  913. return trading;
  914. }
  915.  
  916. public Dueling getDueling() {
  917. return dueling;
  918. }
  919.  
  920. public CopyOnWriteArrayList<KillsEntry> getKillsTracker() {
  921. return killsTracker;
  922. }
  923.  
  924. public CopyOnWriteArrayList<DropLogEntry> getDropLog() {
  925. return dropLog;
  926. }
  927.  
  928. public void setWalkToTask(WalkToTask walkToTask) {
  929. this.walkToTask = walkToTask;
  930. }
  931.  
  932. public WalkToTask getWalkToTask() {
  933. return walkToTask;
  934. }
  935.  
  936. public Player setSpellbook(MagicSpellbook spellbook) {
  937. this.spellbook = spellbook;
  938. return this;
  939. }
  940.  
  941.  
  942. public MagicSpellbook getSpellbook() {
  943. return spellbook;
  944. }
  945.  
  946. public Player setPrayerbook(Prayerbook prayerbook) {
  947. this.prayerbook = prayerbook;
  948. return this;
  949. }
  950.  
  951. public Prayerbook getPrayerbook() {
  952. return prayerbook;
  953. }
  954.  
  955. /**
  956. * The player's local players list.
  957. */
  958. public List<Player> getLocalPlayers() {
  959. return localPlayers;
  960. }
  961.  
  962. /**
  963. * The player's local npcs list getter
  964. */
  965. public List<NPC> getLocalNpcs() {
  966. return localNpcs;
  967. }
  968.  
  969. public Player setInterfaceId(int interfaceId) {
  970. this.interfaceId = interfaceId;
  971. return this;
  972. }
  973.  
  974. public int getInterfaceId() {
  975. return this.interfaceId;
  976. }
  977.  
  978. public boolean isDying() {
  979. return isDying;
  980. }
  981.  
  982. public void setDying(boolean isDying) {
  983. this.isDying = isDying;
  984. }
  985.  
  986. public int[] getForceMovement() {
  987. return forceMovement;
  988. }
  989.  
  990. public Player setForceMovement(int[] forceMovement) {
  991. this.forceMovement = forceMovement;
  992. return this;
  993. }
  994.  
  995. /**
  996. * @return the equipmentAnimation
  997. */
  998. public CharacterAnimations getCharacterAnimations() {
  999. return characterAnimations;
  1000. }
  1001.  
  1002. /**
  1003. * @return the equipmentAnimation
  1004. */
  1005. public void setCharacterAnimations(CharacterAnimations equipmentAnimation) {
  1006. this.characterAnimations = equipmentAnimation.clone();
  1007. }
  1008.  
  1009. public LoyaltyTitles getLoyaltyTitle() {
  1010. return loyaltyTitle;
  1011. }
  1012.  
  1013. public void setLoyaltyTitle(LoyaltyTitles loyaltyTitle) {
  1014. this.loyaltyTitle = loyaltyTitle;
  1015. }
  1016.  
  1017. public void setWalkableInterfaceId(int interfaceId2) {
  1018. this.walkableInterfaceId = interfaceId2;
  1019. }
  1020.  
  1021. public PlayerInteractingOption getPlayerInteractingOption() {
  1022. return playerInteractingOption;
  1023. }
  1024.  
  1025. public Player setPlayerInteractingOption(PlayerInteractingOption playerInteractingOption) {
  1026. this.playerInteractingOption = playerInteractingOption;
  1027. return this;
  1028. }
  1029.  
  1030. public int getMultiIcon() {
  1031. return multiIcon;
  1032. }
  1033.  
  1034. public Player setMultiIcon(int multiIcon) {
  1035. this.multiIcon = multiIcon;
  1036. return this;
  1037. }
  1038.  
  1039. public int getWalkableInterfaceId() {
  1040. return walkableInterfaceId;
  1041. }
  1042.  
  1043. public boolean soundsActive() {
  1044. return soundsActive;
  1045. }
  1046.  
  1047. public void setSoundsActive(boolean soundsActive) {
  1048. this.soundsActive = soundsActive;
  1049. }
  1050.  
  1051. public boolean musicActive() {
  1052. return musicActive;
  1053. }
  1054.  
  1055. public void setMusicActive(boolean musicActive) {
  1056. this.musicActive = musicActive;
  1057. }
  1058.  
  1059. public BonusManager getBonusManager() {
  1060. return bonusManager;
  1061. }
  1062.  
  1063. public int getRunEnergy() {
  1064. return runEnergy;
  1065. }
  1066.  
  1067. public Player setRunEnergy(int runEnergy) {
  1068. this.runEnergy = runEnergy;
  1069. return this;
  1070. }
  1071.  
  1072. public Stopwatch getLastRunRecovery() {
  1073. return lastRunRecovery;
  1074. }
  1075.  
  1076. public Player setRunning(boolean isRunning) {
  1077. this.isRunning = isRunning;
  1078. return this;
  1079. }
  1080.  
  1081. public boolean isRunning() {
  1082. return isRunning;
  1083. }
  1084.  
  1085. public Player setResting(boolean isResting) {
  1086. this.isResting = isResting;
  1087. return this;
  1088. }
  1089.  
  1090. public boolean isResting() {
  1091. return isResting;
  1092. }
  1093.  
  1094. public void setMoneyInPouch(long moneyInPouch) {
  1095. this.moneyInPouch = moneyInPouch;
  1096. }
  1097.  
  1098. public long getMoneyInPouch() {
  1099. return moneyInPouch;
  1100. }
  1101.  
  1102. public int getMoneyInPouchAsInt() {
  1103. return moneyInPouch > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)moneyInPouch;
  1104. }
  1105.  
  1106. public boolean experienceLocked() {
  1107. return experienceLocked;
  1108. }
  1109.  
  1110. public void setExperienceLocked(boolean experienceLocked) {
  1111. this.experienceLocked = experienceLocked;
  1112. }
  1113.  
  1114. public void setClientExitTaskActive(boolean clientExitTaskActive) {
  1115. this.clientExitTaskActive = clientExitTaskActive;
  1116. }
  1117.  
  1118. public boolean isClientExitTaskActive() {
  1119. return clientExitTaskActive;
  1120. }
  1121.  
  1122. public Player setCurrentClanChat(ClanChat clanChat) {
  1123. this.currentClanChat = clanChat;
  1124. return this;
  1125. }
  1126.  
  1127. public ClanChat getCurrentClanChat() {
  1128. return currentClanChat;
  1129. }
  1130.  
  1131. public String getClanChatName() {
  1132. return clanChatName;
  1133. }
  1134.  
  1135. public Player setClanChatName(String clanChatName) {
  1136. this.clanChatName = clanChatName;
  1137. return this;
  1138. }
  1139.  
  1140. public void setInputHandling(Input inputHandling) {
  1141. this.inputHandling = inputHandling;
  1142. }
  1143.  
  1144. public Input getInputHandling() {
  1145. return inputHandling;
  1146. }
  1147.  
  1148. public boolean isDrainingPrayer() {
  1149. return drainingPrayer;
  1150. }
  1151.  
  1152. public void setDrainingPrayer(boolean drainingPrayer) {
  1153. this.drainingPrayer = drainingPrayer;
  1154. }
  1155.  
  1156. public Stopwatch getClickDelay() {
  1157. return clickDelay;
  1158. }
  1159.  
  1160. public int[] getLeechedBonuses() {
  1161. return leechedBonuses;
  1162. }
  1163.  
  1164. public Stopwatch getLastItemPickup() {
  1165. return lastItemPickup;
  1166. }
  1167.  
  1168. public Stopwatch getLastSummon() {
  1169. return lastSummon;
  1170. }
  1171.  
  1172. public BankSearchAttributes getBankSearchingAttribtues() {
  1173. return bankSearchAttributes;
  1174. }
  1175.  
  1176. public AchievementAttributes getAchievementAttributes() {
  1177. return achievementAttributes;
  1178. }
  1179.  
  1180. public BankPinAttributes getBankPinAttributes() {
  1181. return bankPinAttributes;
  1182. }
  1183.  
  1184. public int getCurrentBankTab() {
  1185. return currentBankTab;
  1186. }
  1187.  
  1188. public Player setCurrentBankTab(int tab) {
  1189. this.currentBankTab = tab;
  1190. return this;
  1191. }
  1192.  
  1193. public boolean isBanking() {
  1194. return isBanking;
  1195. }
  1196.  
  1197. public Player setBanking(boolean isBanking) {
  1198. this.isBanking = isBanking;
  1199. return this;
  1200. }
  1201.  
  1202. public void setNoteWithdrawal(boolean noteWithdrawal) {
  1203. this.noteWithdrawal = noteWithdrawal;
  1204. }
  1205.  
  1206. public boolean withdrawAsNote() {
  1207. return noteWithdrawal;
  1208. }
  1209.  
  1210. public void setSwapMode(boolean swapMode) {
  1211. this.swapMode = swapMode;
  1212. }
  1213.  
  1214. public boolean swapMode() {
  1215. return swapMode;
  1216. }
  1217. public boolean isShopping() {
  1218. return shopping;
  1219. }
  1220.  
  1221. public void setShopping(boolean shopping) {
  1222. this.shopping = shopping;
  1223. }
  1224.  
  1225. public Shop getShop() {
  1226. return shop;
  1227. }
  1228.  
  1229. public Player setShop(Shop shop) {
  1230. this.shop = shop;
  1231. return this;
  1232. }
  1233.  
  1234. public GameObject getInteractingObject() {
  1235. return interactingObject;
  1236. }
  1237.  
  1238. public Player setInteractingObject(GameObject interactingObject) {
  1239. this.interactingObject = interactingObject;
  1240. return this;
  1241. }
  1242.  
  1243. public Item getInteractingItem() {
  1244. return interactingItem;
  1245. }
  1246.  
  1247. public void setInteractingItem(Item interactingItem) {
  1248. this.interactingItem = interactingItem;
  1249. }
  1250.  
  1251. public Dialogue getDialogue() {
  1252. return this.dialogue;
  1253. }
  1254.  
  1255. public void setDialogue(Dialogue dialogue) {
  1256. this.dialogue = dialogue;
  1257. }
  1258.  
  1259. public int getDialogueActionId() {
  1260. return dialogueActionId;
  1261. }
  1262.  
  1263. public void setDialogueActionId(int dialogueActionId) {
  1264. this.dialogueActionId = dialogueActionId;
  1265. }
  1266.  
  1267. public void setSettingUpCannon(boolean settingUpCannon) {
  1268. this.settingUpCannon = settingUpCannon;
  1269. }
  1270.  
  1271. public boolean isSettingUpCannon() {
  1272. return settingUpCannon;
  1273. }
  1274.  
  1275. public Player setCannon(DwarfCannon cannon) {
  1276. this.cannon = cannon;
  1277. return this;
  1278. }
  1279.  
  1280. public DwarfCannon getCannon() {
  1281. return cannon;
  1282. }
  1283.  
  1284. public int getOverloadPotionTimer() {
  1285. return overloadPotionTimer;
  1286. }
  1287.  
  1288. public void setOverloadPotionTimer(int overloadPotionTimer) {
  1289. this.overloadPotionTimer = overloadPotionTimer;
  1290. }
  1291.  
  1292. public int getPrayerRenewalPotionTimer() {
  1293. return prayerRenewalPotionTimer;
  1294. }
  1295.  
  1296. public void setPrayerRenewalPotionTimer(int prayerRenewalPotionTimer) {
  1297. this.prayerRenewalPotionTimer = prayerRenewalPotionTimer;
  1298. }
  1299.  
  1300. public Stopwatch getSpecialRestoreTimer() {
  1301. return specialRestoreTimer;
  1302. }
  1303.  
  1304. public boolean[] getUnlockedLoyaltyTitles() {
  1305. return unlockedLoyaltyTitles;
  1306. }
  1307.  
  1308. public void setUnlockedLoyaltyTitles(boolean[] unlockedLoyaltyTitles) {
  1309. this.unlockedLoyaltyTitles = unlockedLoyaltyTitles;
  1310. }
  1311.  
  1312. public void setUnlockedLoyaltyTitle(int index) {
  1313. unlockedLoyaltyTitles[index] = true;
  1314. }
  1315.  
  1316. public Stopwatch getEmoteDelay() {
  1317. return emoteDelay;
  1318. }
  1319.  
  1320. public MinigameAttributes getMinigameAttributes() {
  1321. return minigameAttributes;
  1322. }
  1323.  
  1324. public int getFireImmunity() {
  1325. return fireImmunity;
  1326. }
  1327.  
  1328. public Player setFireImmunity(int fireImmunity) {
  1329. this.fireImmunity = fireImmunity;
  1330. return this;
  1331. }
  1332.  
  1333. public int getFireDamageModifier() {
  1334. return fireDamageModifier;
  1335. }
  1336.  
  1337. public Player setFireDamageModifier(int fireDamageModifier) {
  1338. this.fireDamageModifier = fireDamageModifier;
  1339. return this;
  1340. }
  1341.  
  1342. public boolean hasVengeance() {
  1343. return hasVengeance;
  1344. }
  1345.  
  1346. public void setHasVengeance(boolean hasVengeance) {
  1347. this.hasVengeance = hasVengeance;
  1348. }
  1349.  
  1350. public Stopwatch getLastVengeance() {
  1351. return lastVengeance;
  1352. }
  1353.  
  1354. public Stopwatch getTolerance() {
  1355. return tolerance;
  1356. }
  1357.  
  1358. public boolean isTargeted() {
  1359. return targeted;
  1360. }
  1361.  
  1362. public void setTargeted(boolean targeted) {
  1363. this.targeted = targeted;
  1364. }
  1365.  
  1366. public Stopwatch getLastYell() {
  1367. return lastYell;
  1368. }
  1369.  
  1370. public int getAmountDonated() {
  1371. return amountDonated;
  1372. }
  1373. public int getDonorPoints() {
  1374. return DonorPoints;
  1375. }
  1376.  
  1377. public void incrementAmountDonated(int amountDonated) {
  1378. this.amountDonated += amountDonated;
  1379. }
  1380. public void incrementDonorPoints(int donorPoints) {
  1381. this.amountDonorPoints += donorPoints;
  1382. }
  1383.  
  1384. public long getTotalPlayTime() {
  1385. return totalPlayTime;
  1386. }
  1387.  
  1388. public void setTotalPlayTime(long amount) {
  1389. this.totalPlayTime = amount;
  1390. }
  1391.  
  1392. public Stopwatch getRecordedLogin() {
  1393. return recordedLogin;
  1394. }
  1395.  
  1396. public Player setRegionChange(boolean regionChange) {
  1397. this.regionChange = regionChange;
  1398. return this;
  1399. }
  1400.  
  1401. public boolean isChangingRegion() {
  1402. return this.regionChange;
  1403. }
  1404.  
  1405. public void setAllowRegionChangePacket(boolean allowRegionChangePacket) {
  1406. this.allowRegionChangePacket = allowRegionChangePacket;
  1407. }
  1408.  
  1409. public boolean isAllowRegionChangePacket() {
  1410. return allowRegionChangePacket;
  1411. }
  1412.  
  1413. public boolean isKillsTrackerOpen() {
  1414. return killsTrackerOpen;
  1415. }
  1416.  
  1417. public void setKillsTrackerOpen(boolean killsTrackerOpen) {
  1418. this.killsTrackerOpen = killsTrackerOpen;
  1419. }
  1420.  
  1421. public boolean isCoughing() {
  1422. return isCoughing;
  1423. }
  1424.  
  1425. public void setCoughing(boolean isCoughing) {
  1426. this.isCoughing = isCoughing;
  1427. }
  1428.  
  1429. public int getShadowState() {
  1430. return shadowState;
  1431. }
  1432.  
  1433. public void setShadowState(int shadow) {
  1434. this.shadowState = shadow;
  1435. }
  1436.  
  1437. public GameMode getGameMode() {
  1438. return gameMode;
  1439. }
  1440.  
  1441. public void setGameMode(GameMode gameMode) {
  1442. this.gameMode = gameMode;
  1443. }
  1444.  
  1445. public boolean isPlayerLocked() {
  1446. return playerLocked;
  1447. }
  1448.  
  1449. public Player setPlayerLocked(boolean playerLocked) {
  1450. this.playerLocked = playerLocked;
  1451. return this;
  1452. }
  1453.  
  1454. public Stopwatch getSqlTimer() {
  1455. return sqlTimer;
  1456. }
  1457.  
  1458. public Stopwatch getFoodTimer() {
  1459. return foodTimer;
  1460. }
  1461.  
  1462. public Stopwatch getPotionTimer() {
  1463. return potionTimer;
  1464. }
  1465.  
  1466. public Item getUntradeableDropItem() {
  1467. return untradeableDropItem;
  1468. }
  1469.  
  1470. public void setUntradeableDropItem(Item untradeableDropItem) {
  1471. this.untradeableDropItem = untradeableDropItem;
  1472. }
  1473.  
  1474. public boolean isRecoveringSpecialAttack() {
  1475. return recoveringSpecialAttack;
  1476. }
  1477.  
  1478. public void setRecoveringSpecialAttack(boolean recoveringSpecialAttack) {
  1479. this.recoveringSpecialAttack = recoveringSpecialAttack;
  1480. }
  1481.  
  1482. public CombatType getLastCombatType() {
  1483. return lastCombatType;
  1484. }
  1485.  
  1486. public void setLastCombatType(CombatType lastCombatType) {
  1487. this.lastCombatType = lastCombatType;
  1488. }
  1489.  
  1490. public int getEffigy() {
  1491. return this.effigy;
  1492. }
  1493.  
  1494. public void setEffigy(int effigy) {
  1495. this.effigy = effigy;
  1496. }
  1497.  
  1498. public int getDfsCharges() {
  1499. return dfsCharges;
  1500. }
  1501.  
  1502. public void incrementDfsCharges(int amount) {
  1503. this.dfsCharges += amount;
  1504. }
  1505.  
  1506. public void setNewPlayer(boolean newPlayer) {
  1507. this.newPlayer = newPlayer;
  1508. }
  1509.  
  1510. public boolean newPlayer() {
  1511. return newPlayer;
  1512. }
  1513.  
  1514. public Stopwatch getLogoutTimer() {
  1515. return lougoutTimer;
  1516. }
  1517.  
  1518. public Player setUsableObject(Object[] usableObject) {
  1519. this.usableObject = usableObject;
  1520. return this;
  1521. }
  1522.  
  1523. public Player setUsableObject(int index, Object usableObject) {
  1524. this.usableObject[index] = usableObject;
  1525. return this;
  1526. }
  1527.  
  1528. public Object[] getUsableObject() {
  1529. return usableObject;
  1530. }
  1531.  
  1532. public int getPlayerViewingIndex() {
  1533. return playerViewingIndex;
  1534. }
  1535.  
  1536. public void setPlayerViewingIndex(int playerViewingIndex) {
  1537. this.playerViewingIndex = playerViewingIndex;
  1538. }
  1539.  
  1540. public boolean hasStaffOfLightEffect() {
  1541. return staffOfLightEffect > 0;
  1542. }
  1543.  
  1544. public int getStaffOfLightEffect() {
  1545. return staffOfLightEffect;
  1546. }
  1547.  
  1548. public void setStaffOfLightEffect(int staffOfLightEffect) {
  1549. this.staffOfLightEffect = staffOfLightEffect;
  1550. }
  1551.  
  1552. public void decrementStaffOfLightEffect() {
  1553. this.staffOfLightEffect--;
  1554. }
  1555.  
  1556. public boolean openBank() {
  1557. return openBank;
  1558. }
  1559.  
  1560. public void setOpenBank(boolean openBank) {
  1561. this.openBank = openBank;
  1562. }
  1563.  
  1564. public int getMinutesBonusExp() {
  1565. return minutesBonusExp;
  1566. }
  1567.  
  1568. public void setMinutesBonusExp(int minutesBonusExp, boolean add) {
  1569. this.minutesBonusExp = (add ? this.minutesBonusExp + minutesBonusExp : minutesBonusExp);
  1570. }
  1571.  
  1572. public void setInactive(boolean inActive) {
  1573. this.inActive = inActive;
  1574. }
  1575.  
  1576. public boolean isInActive() {
  1577. return inActive;
  1578. }
  1579.  
  1580. public int getSelectedGeItem() {
  1581. return selectedGeItem;
  1582. }
  1583.  
  1584. public void setSelectedGeItem(int selectedGeItem) {
  1585. this.selectedGeItem = selectedGeItem;
  1586. }
  1587.  
  1588. public int getGeQuantity() {
  1589. return geQuantity;
  1590. }
  1591.  
  1592. public void setGeQuantity(int geQuantity) {
  1593. this.geQuantity = geQuantity;
  1594. }
  1595.  
  1596. public int getGePricePerItem() {
  1597. return gePricePerItem;
  1598. }
  1599.  
  1600. public void setGePricePerItem(int gePricePerItem) {
  1601. this.gePricePerItem = gePricePerItem;
  1602. }
  1603.  
  1604. public GrandExchangeSlot[] getGrandExchangeSlots() {
  1605. return grandExchangeSlots;
  1606. }
  1607.  
  1608. public void setGrandExchangeSlots(GrandExchangeSlot[] GrandExchangeSlots) {
  1609. this.grandExchangeSlots = GrandExchangeSlots;
  1610. }
  1611.  
  1612. public void setGrandExchangeSlot(int index, GrandExchangeSlot state) {
  1613. this.grandExchangeSlots[index] = state;
  1614. }
  1615.  
  1616. public void setSelectedGeSlot(int slot) {
  1617. this.selectedGeSlot = slot;
  1618. }
  1619.  
  1620. public int getSelectedGeSlot() {
  1621. return selectedGeSlot;
  1622. }
  1623.  
  1624. public Task getCurrentTask() {
  1625. return currentTask;
  1626. }
  1627.  
  1628. public void setCurrentTask(Task currentTask) {
  1629. this.currentTask = currentTask;
  1630. }
  1631.  
  1632. public int getSelectedSkillingItem() {
  1633. return selectedSkillingItem;
  1634. }
  1635.  
  1636. public void setSelectedSkillingItem(int selectedItem) {
  1637. this.selectedSkillingItem = selectedItem;
  1638. }
  1639.  
  1640. public boolean shouldProcessFarming() {
  1641. return processFarming;
  1642. }
  1643.  
  1644. public void setProcessFarming(boolean processFarming) {
  1645. this.processFarming = processFarming;
  1646. }
  1647.  
  1648. public Pouch getSelectedPouch() {
  1649. return selectedPouch;
  1650. }
  1651.  
  1652. public void setSelectedPouch(Pouch selectedPouch) {
  1653. this.selectedPouch = selectedPouch;
  1654. }
  1655.  
  1656. public int getCurrentBookPage() {
  1657. return currentBookPage;
  1658. }
  1659.  
  1660. public void setCurrentBookPage(int currentBookPage) {
  1661. this.currentBookPage = currentBookPage;
  1662. }
  1663.  
  1664.  
  1665. public int getStoredRuneEssence() {
  1666. return storedRuneEssence;
  1667. }
  1668.  
  1669. public void setStoredRuneEssence(int storedRuneEssence) {
  1670. this.storedRuneEssence = storedRuneEssence;
  1671. }
  1672.  
  1673. public int getStoredPureEssence() {
  1674. return storedPureEssence;
  1675. }
  1676.  
  1677. public void setStoredPureEssence(int storedPureEssence) {
  1678. this.storedPureEssence = storedPureEssence;
  1679. }
  1680.  
  1681. public int getTrapsLaid() {
  1682. return trapsLaid;
  1683. }
  1684.  
  1685. public void setTrapsLaid(int trapsLaid) {
  1686. this.trapsLaid = trapsLaid;
  1687. }
  1688.  
  1689. public boolean isCrossingObstacle() {
  1690. return crossingObstacle;
  1691. }
  1692.  
  1693. public Player setCrossingObstacle(boolean crossingObstacle) {
  1694. this.crossingObstacle = crossingObstacle;
  1695. return this;
  1696. }
  1697.  
  1698. public boolean[] getCrossedObstacles() {
  1699. return crossedObstacles;
  1700. }
  1701.  
  1702. public boolean getCrossedObstacle(int i) {
  1703. return crossedObstacles[i];
  1704. }
  1705.  
  1706. public Player setCrossedObstacle(int i, boolean completed) {
  1707. crossedObstacles[i] = completed;
  1708. return this;
  1709. }
  1710.  
  1711. public void setCrossedObstacles(boolean[] crossedObstacles) {
  1712. this.crossedObstacles = crossedObstacles;
  1713. }
  1714.  
  1715. public int getSkillAnimation() {
  1716. return skillAnimation;
  1717. }
  1718.  
  1719. public Player setSkillAnimation(int animation) {
  1720. this.skillAnimation = animation;
  1721. return this;
  1722. }
  1723.  
  1724. public int[] getOres() {
  1725. return ores;
  1726. }
  1727.  
  1728. public void setOres(int[] ores) {
  1729. this.ores = ores;
  1730. }
  1731.  
  1732. public void setResetPosition(Position resetPosition) {
  1733. this.resetPosition = resetPosition;
  1734. }
  1735.  
  1736. public Position getResetPosition() {
  1737. return resetPosition;
  1738. }
  1739.  
  1740. public Slayer getSlayer() {
  1741. return slayer;
  1742. }
  1743.  
  1744. public Summoning getSummoning() {
  1745. return summoning;
  1746. }
  1747.  
  1748. public Farming getFarming() {
  1749. return farming;
  1750. }
  1751.  
  1752. public boolean inConstructionDungeon() {
  1753. return inConstructionDungeon;
  1754. }
  1755.  
  1756. public void setInConstructionDungeon(boolean inConstructionDungeon) {
  1757. this.inConstructionDungeon = inConstructionDungeon;
  1758. }
  1759.  
  1760. public int getHouseServant() {
  1761. return houseServant;
  1762. }
  1763.  
  1764. public void setHouseServant(int houseServant) {
  1765. this.houseServant = houseServant;
  1766. }
  1767.  
  1768. public int getHouseServantCharges() {
  1769. return this.houseServantCharges;
  1770. }
  1771.  
  1772. public void setHouseServantCharges(int houseServantCharges) {
  1773. this.houseServantCharges = houseServantCharges;
  1774. }
  1775.  
  1776. public void incrementHouseServantCharges() {
  1777. this.houseServantCharges++;
  1778. }
  1779.  
  1780. public int getServantItemFetch() {
  1781. return servantItemFetch;
  1782. }
  1783.  
  1784. public void setServantItemFetch(int servantItemFetch) {
  1785. this.servantItemFetch = servantItemFetch;
  1786. }
  1787.  
  1788. public int getPortalSelected() {
  1789. return portalSelected;
  1790. }
  1791.  
  1792. public void setPortalSelected(int portalSelected) {
  1793. this.portalSelected = portalSelected;
  1794. }
  1795.  
  1796. public boolean isBuildingMode() {
  1797. return this.isBuildingMode;
  1798. }
  1799.  
  1800. public void setIsBuildingMode(boolean isBuildingMode) {
  1801. this.isBuildingMode = isBuildingMode;
  1802. }
  1803.  
  1804. public int[] getConstructionCoords() {
  1805. return constructionCoords;
  1806. }
  1807.  
  1808. public void setConstructionCoords(int[] constructionCoords) {
  1809. this.constructionCoords = constructionCoords;
  1810. }
  1811.  
  1812. public int getBuildFurnitureId() {
  1813. return this.buildFurnitureId;
  1814. }
  1815.  
  1816. public void setBuildFuritureId(int buildFuritureId) {
  1817. this.buildFurnitureId = buildFuritureId;
  1818. }
  1819.  
  1820. public int getBuildFurnitureX() {
  1821. return this.buildFurnitureX;
  1822. }
  1823.  
  1824. public void setBuildFurnitureX(int buildFurnitureX) {
  1825. this.buildFurnitureX = buildFurnitureX;
  1826. }
  1827.  
  1828. public int getBuildFurnitureY() {
  1829. return this.buildFurnitureY;
  1830. }
  1831.  
  1832. public void setBuildFurnitureY(int buildFurnitureY) {
  1833. this.buildFurnitureY = buildFurnitureY;
  1834. }
  1835.  
  1836. public int getCombatRingType() {
  1837. return this.combatRingType;
  1838. }
  1839.  
  1840. public void setCombatRingType(int combatRingType) {
  1841. this.combatRingType = combatRingType;
  1842. }
  1843.  
  1844. public Room[][][] getHouseRooms() {
  1845. return houseRooms;
  1846. }
  1847.  
  1848. public ArrayList<Portal> getHousePortals() {
  1849. return housePortals;
  1850. }
  1851.  
  1852. public ArrayList<HouseFurniture> getHouseFurniture() {
  1853. return houseFurniture;
  1854. }
  1855.  
  1856. public int getConstructionInterface() {
  1857. return this.constructionInterface;
  1858. }
  1859.  
  1860. public void setConstructionInterface(int constructionInterface) {
  1861. this.constructionInterface = constructionInterface;
  1862. }
  1863.  
  1864. public int[] getBrawlerChargers() {
  1865. return this.brawlerCharges;
  1866. }
  1867.  
  1868. public void setBrawlerCharges(int[] brawlerCharges) {
  1869. this.brawlerCharges = brawlerCharges;
  1870. }
  1871.  
  1872. public int getRecoilCharges() {
  1873. return this.recoilCharges;
  1874. }
  1875.  
  1876. public int setRecoilCharges(int recoilCharges) {
  1877. return this.recoilCharges = recoilCharges;
  1878. }
  1879.  
  1880. public boolean voteMessageSent() {
  1881. return this.voteMessageSent;
  1882. }
  1883.  
  1884. public void setVoteMessageSent(boolean voteMessageSent) {
  1885. this.voteMessageSent = voteMessageSent;
  1886. }
  1887.  
  1888. public boolean didReceiveStarter() {
  1889. return receivedStarter;
  1890. }
  1891. public void setDonorPoints(long points, boolean add) {
  1892. if(add)
  1893. this.DonorPoints += points;
  1894. if(!add)
  1895. this.DonorPoints = (int) points;
  1896. }
  1897.  
  1898.  
  1899.  
  1900. public void setReceivedStarter(boolean receivedStarter) {
  1901. this.receivedStarter = receivedStarter;
  1902. }
  1903. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement