CharSelectInfoPackage.java 6.1 KB

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