Advertisement
Guest User

Untitled

a guest
May 26th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.90 KB | None | 0 0
  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.network.serverpackets;
  16.  
  17. import com.l2jserver.Config;
  18. import com.l2jserver.gameserver.datatables.NpcTable;
  19. import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
  20. import com.l2jserver.gameserver.instancemanager.TerritoryWarManager;
  21. import com.l2jserver.gameserver.model.Elementals;
  22. import com.l2jserver.gameserver.model.L2Transformation;
  23. import com.l2jserver.gameserver.model.actor.L2Summon;
  24. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  25. import com.l2jserver.gameserver.model.itemcontainer.Inventory;
  26. import com.l2jserver.gameserver.skills.AbnormalEffect;
  27. import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
  28.  
  29. /**
  30. * 0000: 04 03 15 00 00 77 ff 00 00 80 f1 ff ff 00 00 00 .....w.......... 0010: 00 2a 89 00 4c 43 00 61 00 6c 00 61 00 64 00 6f .*..LC.a.l.a.d.o 0020: 00 6e 00 00 00 01 00 00 00 00 00 00 00 19 00 00 .n.............. 0030: 00 0d 00 00 00 ee 81 02 00 15 00 00 00 18 00 00 ................ 0040: 00 19
  31. * 00 00 00 25 00 00 00 17 00 00 00 28 00 00 .....%.......(.. 0050: 00 14 01 00 00 14 01 00 00 02 01 00 00 02 01 00 ................ 0060: 00 fa 09 00 00 81 06 00 00 26 34 00 00 2e 00 00 .........&4..... 0070: 00 00 00 00 00 db 9f a1 41 93 26 64 41 de c8 31 ........A.&dA..1 0080: 41 ca 73 c0 41 d5
  32. * 22 d0 41 83 bd 41 41 81 56 10 A.s.A.".A..AA.V. 0090: 41 00 00 00 00 27 7d 30 41 69 aa e0 40 b4 fb d3 A....'}0Ai..@... 00a0: 41 91 f9 63 41 00 00 00 00 81 56 10 41 00 00 00 A..cA.....V.A... 00b0: 00 71 00 00 00 71 00 00 00 76 00 00 00 74 00 00 .q...q...v...t.. 00c0: 00 74 00 00 00 2a 00 00 00 e8
  33. * 02 00 00 00 00 00 .t...*.......... 00d0: 00 5f 04 00 00 ac 01 00 00 cf 01 00 00 62 04 00 ._...........b.. 00e0: 00 00 00 00 00 e8 02 00 00 0b 00 00 00 52 01 00 .............R.. 00f0: 00 4d 00 00 00 2a 00 00 00 2f 00 00 00 29 00 00 .M...*.../...).. 0100: 00 12 00 00 00 82 01 00 00 52 01 00 00 53
  34. * 00 00 .........R...S.. 0110: 00 00 00 00 00 00 00 00 00 7a 00 00 00 55 00 00 .........z...U.. 0120: 00 32 00 00 00 32 00 00 00 00 00 00 00 00 00 00 .2...2.......... 0130: 00 00 00 00 00 00 00 00 00 a4 70 3d 0a d7 a3 f0 ..........p=.... 0140: 3f 64 5d dc 46 03 78 f3 3f 00 00 00 00 00 00 1e
  35. * ?d].F.x.?....... 0150: 40 00 00 00 00 00 00 38 40 02 00 00 00 01 00 00 @......8@....... 0160: 00 00 00 00 00 00 00 00 00 00 00 c1 0c 00 00 01 ................ 0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0180: 00 00 00 00 ....
  36. * dddddSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddffffddddSdddcccdd (h) dddddSddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd ffffddddSdddddcccddh (h) c dc hhdh
  37. * dddddSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddffffddddSdddddcccddh (h) c dc hhdh ddddc c dcc cddd d (from 654) but it actually reads dddddSdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddffffddddSdddddcccddh (h) c dc *dddddddd* hhdh ddddc dcc
  38. * cddd d *...*: here i am not sure at least it looks like it reads that much data (32 bytes), not sure about the format inside because it is not read thanks to the ususal parsing function
  39. * dddddSddddQddddddddddddddddddddddddddddddddddddddddddddddddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhddddddddddddddddddddffffddddSdddddcccddh [h] c dc d hhdh ddddc c dcc cddd d c dd d d @version $Revision: 1.14.2.4.2.12 $ $Date: 2005/04/11 10:05:55 $
  40. */
  41. public final class UserInfo extends L2GameServerPacket
  42. {
  43. private static final String _S__04_USERINFO = "[S] 32 UserInfo";
  44. private final L2PcInstance _activeChar;
  45.  
  46. /**
  47. * Run speed, swimming run speed and flying run speed
  48. */
  49. private final int _runSpd;
  50. /**
  51. * Walking speed, swimming walking speed and flying walking speed
  52. */
  53. private final int _walkSpd;
  54. private int _relation;
  55. private final float _moveMultiplier;
  56. // private int _territoryId;
  57. // private boolean _isDisguised;
  58. private int _airShipHelm;
  59.  
  60. /**
  61. * @param _characters
  62. */
  63. public UserInfo(L2PcInstance character)
  64. {
  65. _activeChar = character;
  66.  
  67. _moveMultiplier = _activeChar.getMovementSpeedMultiplier();
  68. _runSpd = Math.round((_activeChar.getRunSpeed() / _moveMultiplier));
  69. _walkSpd = (int) (_activeChar.getWalkSpeed() / _moveMultiplier);
  70. int _territoryId = TerritoryWarManager.getInstance().getRegisteredTerritoryId(character);
  71. _relation = _activeChar.isClanLeader() ? 0x40 : 0;
  72. if (_activeChar.getSiegeState() == 1)
  73. {
  74. if (_territoryId == 0)
  75. {
  76. _relation |= 0x180;
  77. }
  78. else
  79. {
  80. _relation |= 0x1000;
  81. }
  82. }
  83. if (_activeChar.getSiegeState() == 2)
  84. {
  85. _relation |= 0x80;
  86. }
  87. // _isDisguised = TerritoryWarManager.getInstance().isDisguised(character.getObjectId());
  88. if (_activeChar.isInAirShip() && _activeChar.getAirShip().isCaptain(_activeChar))
  89. {
  90. _airShipHelm = _activeChar.getAirShip().getHelmItemId();
  91. }
  92. else
  93. {
  94. _airShipHelm = 0;
  95. }
  96. }
  97.  
  98. @Override
  99. protected final void writeImpl()
  100. {
  101. writeC(0x32);
  102.  
  103. writeD(_activeChar.getX());
  104. writeD(_activeChar.getY());
  105. writeD(_activeChar.getZ());
  106. if (_activeChar.getVehicle() != null)
  107. {
  108. writeD(_activeChar.getVehicle().getObjectId());
  109. }
  110. else
  111. {
  112. writeD(0);
  113. }
  114. writeD(_activeChar.getObjectId());
  115. writeS(_activeChar.getName());
  116. writeD(_activeChar.getRace().ordinal());
  117. writeD(_activeChar.getAppearance().getSex() ? 1 : 0);
  118.  
  119. if (_activeChar.getClassIndex() == 0)
  120. {
  121. writeD(_activeChar.getClassId().getId());
  122. }
  123. else
  124. {
  125. writeD(_activeChar.getBaseClass());
  126. }
  127.  
  128. writeD(_activeChar.getLevel());
  129. writeQ(_activeChar.getExp());
  130. writeD(_activeChar.getSTR());
  131. writeD(_activeChar.getDEX());
  132. writeD(_activeChar.getCON());
  133. writeD(_activeChar.getINT());
  134. writeD(_activeChar.getWIT());
  135. writeD(_activeChar.getMEN());
  136. writeD(_activeChar.getMaxVisibleHp());
  137. writeD((int) _activeChar.getCurrentHp());
  138. writeD(_activeChar.getMaxMp());
  139. writeD((int) _activeChar.getCurrentMp());
  140. writeD(_activeChar.getSp());
  141. writeD(_activeChar.getCurrentLoad());
  142. writeD(_activeChar.getMaxLoad());
  143.  
  144. writeD(_activeChar.getActiveWeaponItem() != null ? 40 : 20); // 20 no weapon, 40 weapon equippe
  145.  
  146. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
  147. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
  148. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
  149. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
  150. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
  151. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
  152. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
  153. if (_airShipHelm == 0)
  154. {
  155. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
  156. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
  157. }
  158. else
  159. {
  160. writeD(0);
  161. writeD(0);
  162. }
  163. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
  164. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
  165. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
  166. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
  167. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CLOAK));
  168. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
  169. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
  170. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR2));
  171. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RBRACELET));
  172. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LBRACELET));
  173. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO1));
  174. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO2));
  175. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO3));
  176. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO4));
  177. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO5));
  178. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DECO6));
  179. writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BELT)); // CT2.3
  180. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_UNDER));
  181. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
  182. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
  183. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
  184. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
  185. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
  186. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  187. if (_airShipHelm == 0)
  188. {
  189. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  190. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  191. }
  192. else
  193. {
  194. writeD(_airShipHelm);
  195. writeD(0);
  196. }
  197. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
  198. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
  199. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
  200. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
  201. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CLOAK));
  202. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  203. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  204. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
  205. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RBRACELET));
  206. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LBRACELET));
  207. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO1));
  208. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO2));
  209. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO3));
  210. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO4));
  211. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO5));
  212. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DECO6));
  213. writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BELT)); // CT2.3
  214. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_UNDER));
  215. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_REAR));
  216. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_LEAR));
  217. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_NECK));
  218. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_RFINGER));
  219. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_LFINGER));
  220. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_HEAD));
  221. if (_airShipHelm == 0)
  222. {
  223. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
  224. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_LHAND));
  225. }
  226. else
  227. {
  228. writeD(0);
  229. writeD(0);
  230. }
  231. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_GLOVES));
  232. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_CHEST));
  233. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_LEGS));
  234. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_FEET));
  235. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_CLOAK));
  236. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
  237. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_HAIR));
  238. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_HAIR2));
  239. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_RBRACELET));
  240. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_LBRACELET));
  241. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO1));
  242. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO2));
  243. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO3));
  244. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO4));
  245. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO5));
  246. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_DECO6));
  247. writeD(_activeChar.getInventory().getPaperdollAugmentationId(Inventory.PAPERDOLL_BELT)); // CT2.3
  248. writeD(_activeChar.getInventory().getMaxTalismanCount()); // CT2.3
  249. writeD(_activeChar.getInventory().getCloakStatus()); // CT2.3
  250. writeD(_activeChar.getPAtk(null));
  251. writeD(_activeChar.getPAtkSpd());
  252. writeD(_activeChar.getPDef(null));
  253. writeD(_activeChar.getEvasionRate(null));
  254. writeD(_activeChar.getAccuracy());
  255. writeD(_activeChar.getCriticalHit(null, null));
  256. writeD(_activeChar.getMAtk(null, null));
  257.  
  258. writeD(_activeChar.getMAtkSpd());
  259. writeD(_activeChar.getPAtkSpd());
  260.  
  261. writeD(_activeChar.getMDef(null, null));
  262.  
  263. writeD(_activeChar.getPvpFlag()); // 0-non-pvp 1-pvp = violett name
  264. writeD(_activeChar.getKarma());
  265.  
  266. writeD(_runSpd);
  267. writeD(_walkSpd);
  268. writeD(_runSpd); // swim run speed
  269. writeD(_walkSpd); // swim walk speed
  270. writeD(0);
  271. writeD(0);
  272. writeD(_activeChar.isFlying() ? _runSpd : 0); // fly speed
  273. writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly speed
  274. writeF(_moveMultiplier);
  275. writeF(_activeChar.getAttackSpeedMultiplier());
  276.  
  277. L2Summon pet = _activeChar.getPet();
  278. L2Transformation trans;
  279. if ((_activeChar.getMountType() != 0) && (pet != null))
  280. {
  281. writeF(pet.getTemplate().fCollisionRadius);
  282. writeF(pet.getTemplate().fCollisionHeight);
  283. }
  284. else if ((trans = _activeChar.getTransformation()) != null)
  285. {
  286. writeF(trans.getCollisionRadius());
  287. writeF(trans.getCollisionHeight());
  288. }
  289. else
  290. {
  291. writeF(_activeChar.getCollisionRadius());
  292. writeF(_activeChar.getCollisionHeight());
  293. }
  294.  
  295. writeD(_activeChar.getAppearance().getHairStyle());
  296. writeD(_activeChar.getAppearance().getHairColor());
  297. writeD(_activeChar.getAppearance().getFace());
  298. writeD(_activeChar.isGM() ? 1 : 0); // builder level
  299.  
  300. String title = _activeChar.getTitle();
  301. if (_activeChar.getAppearance().getInvisible() && _activeChar.isGM())
  302. {
  303. title = "Invisible";
  304. }
  305. if (_activeChar.getPoly().isMorphed())
  306. {
  307. L2NpcTemplate polyObj = NpcTable.getInstance().getTemplate(_activeChar.getPoly().getPolyId());
  308. if (polyObj != null)
  309. {
  310. title += " - " + polyObj.name;
  311. }
  312. }
  313. writeS(title);
  314.  
  315. writeD(_activeChar.getClanId());
  316. writeD(_activeChar.getClanCrestId());
  317. writeD(_activeChar.getAllyId());
  318. writeD(_activeChar.getAllyCrestId()); // ally crest id
  319. // 0x40 leader rights
  320. // siege flags: attacker - 0x180 sword over name, defender - 0x80 shield, 0xC0 crown (|leader), 0x1C0 flag (|leader)
  321. writeD(_relation);
  322. writeC(_activeChar.getMountType()); // mount type
  323. writeC(_activeChar.getPrivateStoreType());
  324. writeC(_activeChar.hasDwarvenCraft() ? 1 : 0);
  325. writeD(_activeChar.getPkKills());
  326. writeD(_activeChar.getPvpKills());
  327.  
  328. writeH(_activeChar.getCubics().size());
  329. for (int id : _activeChar.getCubics().keySet())
  330. {
  331. writeH(id);
  332. }
  333.  
  334. writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0);
  335.  
  336. if (_activeChar.getAppearance().getInvisible() && _activeChar.isGM())
  337. {
  338. writeD(_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask());
  339. }
  340. else
  341. {
  342. writeD(_activeChar.getAbnormalEffect());
  343. }
  344. writeC(_activeChar.isFlyingMounted() ? 2 : 0);
  345.  
  346. writeD(_activeChar.getClanPrivileges());
  347.  
  348. writeH(_activeChar.getRecomLeft()); // c2 recommendations remaining
  349. writeH(_activeChar.getRecomHave()); // c2 recommendations received
  350. writeD(_activeChar.getMountNpcId() > 0 ? _activeChar.getMountNpcId() + 1000000 : 0);
  351. writeH(_activeChar.getInventoryLimit());
  352.  
  353. writeD(_activeChar.getClassId().getId());
  354. writeD(0x00); // special effects? circles around player...
  355. writeD(_activeChar.getMaxCp());
  356. writeD((int) _activeChar.getCurrentCp());
  357. writeC(_activeChar.isMounted() || (_airShipHelm != 0) ? 0 : _activeChar.getEnchantEffect());
  358.  
  359. if (_activeChar.getTeam() == 1)
  360. {
  361. writeC(0x01); // team circle around feet 1= Blue, 2 = red
  362. }
  363. else if (_activeChar.getTeam() == 2)
  364. {
  365. writeC(0x02); // team circle around feet 1= Blue, 2 = red
  366. }
  367. else
  368. {
  369. writeC(0x00); // team circle around feet 1= Blue, 2 = red
  370. }
  371.  
  372. writeD(_activeChar.getClanCrestLargeId());
  373. writeC(_activeChar.isNoble() ? 1 : 0); // 0x01: symbol on char menu ctrl+I
  374. writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // 0x01: Hero Aura
  375.  
  376. writeC(_activeChar.isFishing() ? 1 : 0); // Fishing Mode
  377. writeD(_activeChar.getFishx()); // fishing x
  378. writeD(_activeChar.getFishy()); // fishing y
  379. writeD(_activeChar.getFishz()); // fishing z
  380. writeD(_activeChar.getAppearance().getNameColor());
  381.  
  382. // new c5
  383. writeC(_activeChar.isRunning() ? 0x01 : 0x00); // changes the Speed display on Status Window
  384.  
  385. writeD(_activeChar.getPledgeClass()); // changes the text above CP on Status Window
  386. writeD(_activeChar.getPledgeType());
  387.  
  388. writeD(_activeChar.getAppearance().getTitleColor());
  389.  
  390. if (_activeChar.isCursedWeaponEquipped())
  391. {
  392. writeD(CursedWeaponsManager.getInstance().getLevel(_activeChar.getCursedWeaponEquippedId()));
  393. }
  394. else
  395. {
  396. writeD(0x00);
  397. }
  398.  
  399. // T1 Starts
  400. writeD(_activeChar.getTransformationId());
  401.  
  402. byte attackAttribute = _activeChar.getAttackElement();
  403. writeH(attackAttribute);
  404. writeH(_activeChar.getAttackElementValue(attackAttribute));
  405. writeH(_activeChar.getDefenseElementValue(Elementals.FIRE));
  406. writeH(_activeChar.getDefenseElementValue(Elementals.WATER));
  407. writeH(_activeChar.getDefenseElementValue(Elementals.WIND));
  408. writeH(_activeChar.getDefenseElementValue(Elementals.EARTH));
  409. writeH(_activeChar.getDefenseElementValue(Elementals.HOLY));
  410. writeH(_activeChar.getDefenseElementValue(Elementals.DARK));
  411.  
  412. writeD(_activeChar.getAgathionId());
  413.  
  414. // T2 Starts
  415. writeD(_activeChar.getFame()); // Fame
  416. writeD(_activeChar.isMinimapAllowed() ? 1 : 0); // Minimap on Hellbound
  417. writeD(_activeChar.getVitalityPoints()); // Vitality Points
  418. writeD(_activeChar.getSpecialEffect());
  419. /*
  420. * writeD(_territoryId); // CT2.3 writeD((_isDisguised ? 0x01: 0x00)); // CT2.3 writeD(_territoryId); // CT2.3
  421. */
  422. }
  423.  
  424. /*
  425. * (non-Javadoc)
  426. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  427. */
  428. @Override
  429. public String getType()
  430. {
  431. return _S__04_USERINFO;
  432. }
  433. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement