CharSelectInfoPackage.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. /*
  2. * Copyright © 2004-2022 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.model;
  20. import com.l2jserver.gameserver.model.itemcontainer.Inventory;
  21. import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
  22. /**
  23. * Used to Store data sent to Client for Character.<br>
  24. * Selection screen.
  25. * @since 2005/03/27 15:29:33
  26. */
  27. public class CharSelectInfoPackage {
  28. private String _name;
  29. private int _objectId = 0;
  30. private long _exp = 0;
  31. private int _sp = 0;
  32. private int _clanId = 0;
  33. private int _race = 0;
  34. private int _classId = 0;
  35. private int _baseClassId = 0;
  36. private long _deleteTimer = 0L;
  37. private long _lastAccess = 0L;
  38. private int _face = 0;
  39. private int _hairStyle = 0;
  40. private int _hairColor = 0;
  41. private int _sex = 0;
  42. private int _level = 1;
  43. private int _maxCp = 0;
  44. private double _currentCp = 0;
  45. private int _maxHp = 0;
  46. private double _currentHp = 0;
  47. private int _maxMp = 0;
  48. private double _currentMp = 0;
  49. private final int[][] _paperdoll;
  50. private int _karma = 0;
  51. private int _pkKills = 0;
  52. private int _pvpKills = 0;
  53. private int _augmentationId = 0;
  54. private int _x = 0;
  55. private int _y = 0;
  56. private int _z = 0;
  57. private String _htmlPrefix = null;
  58. private int _vitalityPoints = 0;
  59. private int _accessLevel = 0;
  60. /**
  61. * Constructor for CharSelectInfoPackage.
  62. * @param objectId character object Id.
  63. * @param name the character's name.
  64. */
  65. public CharSelectInfoPackage(int objectId, String name) {
  66. setObjectId(objectId);
  67. _name = name;
  68. _paperdoll = PcInventory.restoreVisibleInventory(objectId);
  69. }
  70. /**
  71. * @return the character object Id.
  72. */
  73. public int getObjectId() {
  74. return _objectId;
  75. }
  76. public void setObjectId(int objectId) {
  77. _objectId = objectId;
  78. }
  79. /**
  80. * @return the character's access level.
  81. */
  82. public int getAccessLevel() {
  83. return _accessLevel;
  84. }
  85. /**
  86. * @param level the character's access level to be set.
  87. */
  88. public void setAccessLevel(int level) {
  89. _accessLevel = level;
  90. }
  91. public int getClanId() {
  92. return _clanId;
  93. }
  94. public void setClanId(int clanId) {
  95. _clanId = clanId;
  96. }
  97. public int getClassId() {
  98. return _classId;
  99. }
  100. public int getBaseClassId() {
  101. return _baseClassId;
  102. }
  103. public void setClassId(int classId) {
  104. _classId = classId;
  105. }
  106. public void setBaseClassId(int baseClassId) {
  107. _baseClassId = baseClassId;
  108. }
  109. public double getCurrentCp() {
  110. return _currentCp;
  111. }
  112. public void setCurrentCp(double currentCp) {
  113. _currentCp = currentCp;
  114. }
  115. public double getCurrentHp() {
  116. return _currentHp;
  117. }
  118. public void setCurrentHp(double currentHp) {
  119. _currentHp = currentHp;
  120. }
  121. public double getCurrentMp() {
  122. return _currentMp;
  123. }
  124. public void setCurrentMp(double currentMp) {
  125. _currentMp = currentMp;
  126. }
  127. public long getDeleteTimer() {
  128. return _deleteTimer;
  129. }
  130. public void setDeleteTimer(long deleteTimer) {
  131. _deleteTimer = deleteTimer;
  132. }
  133. public long getLastAccess() {
  134. return _lastAccess;
  135. }
  136. public void setLastAccess(long lastAccess) {
  137. _lastAccess = lastAccess;
  138. }
  139. public long getExp() {
  140. return _exp;
  141. }
  142. public void setExp(long exp) {
  143. _exp = exp;
  144. }
  145. public int getFace() {
  146. return _face;
  147. }
  148. public void setFace(int face) {
  149. _face = face;
  150. }
  151. public int getHairColor() {
  152. return _hairColor;
  153. }
  154. public void setHairColor(int hairColor) {
  155. _hairColor = hairColor;
  156. }
  157. public int getHairStyle() {
  158. return _hairStyle;
  159. }
  160. public void setHairStyle(int hairStyle) {
  161. _hairStyle = hairStyle;
  162. }
  163. public int getPaperdollObjectId(int slot) {
  164. return _paperdoll[slot][0];
  165. }
  166. public int getPaperdollItemId(int slot) {
  167. return _paperdoll[slot][1];
  168. }
  169. public int getLevel() {
  170. return _level;
  171. }
  172. public void setLevel(int level) {
  173. _level = level;
  174. }
  175. public int getMaxCp() {
  176. return _maxCp;
  177. }
  178. public void setMaxCp(int maxCp) {
  179. _maxCp = maxCp;
  180. }
  181. public int getMaxHp() {
  182. return _maxHp;
  183. }
  184. public void setMaxHp(int maxHp) {
  185. _maxHp = maxHp;
  186. }
  187. public int getMaxMp() {
  188. return _maxMp;
  189. }
  190. public void setMaxMp(int maxMp) {
  191. _maxMp = maxMp;
  192. }
  193. public String getName() {
  194. return _name;
  195. }
  196. public void setName(String name) {
  197. _name = name;
  198. }
  199. public int getRace() {
  200. return _race;
  201. }
  202. public void setRace(int race) {
  203. _race = race;
  204. }
  205. public int getSex() {
  206. return _sex;
  207. }
  208. public void setSex(int sex) {
  209. _sex = sex;
  210. }
  211. public int getSp() {
  212. return _sp;
  213. }
  214. public void setSp(int sp) {
  215. _sp = sp;
  216. }
  217. public int getEnchantEffect() {
  218. if (_paperdoll[Inventory.PAPERDOLL_RHAND][2] > 0) {
  219. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  220. }
  221. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  222. }
  223. public void setKarma(int k) {
  224. _karma = k;
  225. }
  226. public int getKarma() {
  227. return _karma;
  228. }
  229. public void setAugmentationId(int augmentationId) {
  230. _augmentationId = augmentationId;
  231. }
  232. public int getAugmentationId() {
  233. return _augmentationId;
  234. }
  235. public void setPkKills(int PkKills) {
  236. _pkKills = PkKills;
  237. }
  238. public int getPkKills() {
  239. return _pkKills;
  240. }
  241. public void setPvPKills(int PvPKills) {
  242. _pvpKills = PvPKills;
  243. }
  244. public int getPvPKills() {
  245. return _pvpKills;
  246. }
  247. public int getX() {
  248. return _x;
  249. }
  250. public int getY() {
  251. return _y;
  252. }
  253. public int getZ() {
  254. return _z;
  255. }
  256. public void setX(int x) {
  257. _x = x;
  258. }
  259. public void setY(int y) {
  260. _y = y;
  261. }
  262. public void setZ(int z) {
  263. _z = z;
  264. }
  265. public String getHtmlPrefix() {
  266. return _htmlPrefix;
  267. }
  268. public void setHtmlPrefix(String s) {
  269. _htmlPrefix = s;
  270. }
  271. public void setVitalityPoints(int points) {
  272. _vitalityPoints = points;
  273. }
  274. public int getVitalityPoints() {
  275. return _vitalityPoints;
  276. }
  277. }