CharSelectInfoPackage.java 5.8 KB

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