CharSelectInfoPackage.java 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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. /**
  56. * @param int1
  57. */
  58. public CharSelectInfoPackage(int objectId, String name)
  59. {
  60. setObjectId(objectId);
  61. _name = name;
  62. _paperdoll = PcInventory.restoreVisibleInventory(objectId);
  63. }
  64. public int getObjectId()
  65. {
  66. return _objectId;
  67. }
  68. public void setObjectId(int objectId)
  69. {
  70. _objectId = objectId;
  71. }
  72. public int getCharId()
  73. {
  74. return _charId;
  75. }
  76. public void setCharId(int charId)
  77. {
  78. _charId = charId;
  79. }
  80. public int getClanId()
  81. {
  82. return _clanId;
  83. }
  84. public void setClanId(int clanId)
  85. {
  86. _clanId = clanId;
  87. }
  88. public int getClassId()
  89. {
  90. return _classId;
  91. }
  92. public int getBaseClassId()
  93. {
  94. return _baseClassId;
  95. }
  96. public void setClassId(int classId)
  97. {
  98. _classId = classId;
  99. }
  100. public void setBaseClassId(int baseClassId)
  101. {
  102. _baseClassId = baseClassId;
  103. }
  104. public double getCurrentHp()
  105. {
  106. return _currentHp;
  107. }
  108. public void setCurrentHp(double currentHp)
  109. {
  110. _currentHp = currentHp;
  111. }
  112. public double getCurrentMp()
  113. {
  114. return _currentMp;
  115. }
  116. public void setCurrentMp(double currentMp)
  117. {
  118. _currentMp = currentMp;
  119. }
  120. public long getDeleteTimer()
  121. {
  122. return _deleteTimer;
  123. }
  124. public void setDeleteTimer(long deleteTimer)
  125. {
  126. _deleteTimer = deleteTimer;
  127. }
  128. public long getLastAccess()
  129. {
  130. return _lastAccess;
  131. }
  132. public void setLastAccess(long lastAccess)
  133. {
  134. _lastAccess = lastAccess;
  135. }
  136. public long getExp()
  137. {
  138. return _exp;
  139. }
  140. public void setExp(long exp)
  141. {
  142. _exp = exp;
  143. }
  144. public int getFace()
  145. {
  146. return _face;
  147. }
  148. public void setFace(int face)
  149. {
  150. _face = face;
  151. }
  152. public int getHairColor()
  153. {
  154. return _hairColor;
  155. }
  156. public void setHairColor(int hairColor)
  157. {
  158. _hairColor = hairColor;
  159. }
  160. public int getHairStyle()
  161. {
  162. return _hairStyle;
  163. }
  164. public void setHairStyle(int hairStyle)
  165. {
  166. _hairStyle = hairStyle;
  167. }
  168. public int getPaperdollObjectId(int slot)
  169. {
  170. return _paperdoll[slot][0];
  171. }
  172. public int getPaperdollItemId(int slot)
  173. {
  174. return _paperdoll[slot][1];
  175. }
  176. public int getLevel()
  177. {
  178. return _level;
  179. }
  180. public void setLevel(int level)
  181. {
  182. _level = level;
  183. }
  184. public int getMaxHp()
  185. {
  186. return _maxHp;
  187. }
  188. public void setMaxHp(int maxHp)
  189. {
  190. _maxHp = maxHp;
  191. }
  192. public int getMaxMp()
  193. {
  194. return _maxMp;
  195. }
  196. public void setMaxMp(int maxMp)
  197. {
  198. _maxMp = maxMp;
  199. }
  200. public String getName()
  201. {
  202. return _name;
  203. }
  204. public void setName(String name)
  205. {
  206. _name = name;
  207. }
  208. public int getRace()
  209. {
  210. return _race;
  211. }
  212. public void setRace(int race)
  213. {
  214. _race = race;
  215. }
  216. public int getSex()
  217. {
  218. return _sex;
  219. }
  220. public void setSex(int sex)
  221. {
  222. _sex = sex;
  223. }
  224. public int getSp()
  225. {
  226. return _sp;
  227. }
  228. public void setSp(int sp)
  229. {
  230. _sp = sp;
  231. }
  232. public int getEnchantEffect()
  233. {
  234. if (_paperdoll[Inventory.PAPERDOLL_RHAND][2] > 0)
  235. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  236. return _paperdoll[Inventory.PAPERDOLL_LRHAND][2];
  237. }
  238. public void setKarma(int k)
  239. {
  240. _karma = k;
  241. }
  242. public int getKarma()
  243. {
  244. return _karma;
  245. }
  246. public void setAugmentationId(int augmentationId)
  247. {
  248. _augmentationId = augmentationId;
  249. }
  250. public int getAugmentationId()
  251. {
  252. return _augmentationId;
  253. }
  254. public void setPkKills(int PkKills)
  255. {
  256. _pkKills = PkKills;
  257. }
  258. public int getPkKills()
  259. {
  260. return _pkKills;
  261. }
  262. public void setPvPKills(int PvPKills)
  263. {
  264. _pvpKills = PvPKills;
  265. }
  266. public int getPvPKills()
  267. {
  268. return _pvpKills;
  269. }
  270. public int getTransformId()
  271. {
  272. return _transformId;
  273. }
  274. public void setTransformId(int id)
  275. {
  276. _transformId = id;
  277. }
  278. public int getX()
  279. {
  280. return _x;
  281. }
  282. public int getY()
  283. {
  284. return _y;
  285. }
  286. public int getZ()
  287. {
  288. return _z;
  289. }
  290. public void setX(int x)
  291. {
  292. _x = x;
  293. }
  294. public void setY(int y)
  295. {
  296. _y = y;
  297. }
  298. public void setZ(int z)
  299. {
  300. _z = z;
  301. }
  302. }