Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace PBServer.network.serverpackets
- {
- using PBServer;
- using PBServer.data.model;
- using PBServer.data.xml.holders;
- using PBServer.managers;
- using PBServer.model.clans;
- using PBServer.src.managers;
- using PBServer.src.model.accounts;
- using System;
- internal class SM_BASE_GET_MYINFO : SendBaseLoginPacket
- {
- private LoginClient _lc;
- public SM_BASE_GET_MYINFO(LoginClient lc)
- {
- this._lc = lc;
- base.makeme();
- }
- protected internal override void write()
- {
- int num;
- Account account = AccountManager.getInstance().get(this._lc.getLogin());
- Clan clan = ClanManager.getInstance().get(account.getClanId());
- if ((account.getPlayerName() == null) || (account.getPlayerName() == ""))
- {
- PlayerTemplate playerTemplate = PlayerTemplateHolder.getPlayerTemplate(Config.PlayerTemplateId);
- account.setRank(playerTemplate._rank);
- account.setExp(playerTemplate._exp);
- account.setGP(playerTemplate._gp);
- account.setMoney(playerTemplate._money);
- }
- base.writeH(0xa06);
- base.writeD(0);
- base.writeC(0xdd);
- base.writeS(account.getPlayerName(), 0x21);
- int num2 = account.getExp() + RankExpInfoHolder.getRankExpInfo(account.getRank())._onAllExp;
- base.writeD(num2);
- base.writeD(account.getRank());
- base.writeD(account.getRank());
- base.writeD(account.getGP());
- base.writeD(account.getMoney());
- base.writeD(((account == null) || (clan == null)) ? 0 : clan.getClanId());
- base.writeD(((account == null) || (clan == null)) ? 0 : clan.getLogoColor());
- base.writeD(0);
- base.writeD(0);
- base.writeH((short)account.getPcCafe());
- base.writeC((byte)account.getNameColor());
- base.writeS(Convert.ToString(((account == null) || (clan == null)) ? "" : clan.getClanName()), 0x10);
- base.writeC(0);
- base.writeH(((account == null) || (clan == null)) ? ((short)0) : ((short)clan.getClanRank()));
- base.writeC(Convert.ToByte(((account == null) || (clan == null)) ? 0xff : clan.getLogo1()));
- base.writeC(Convert.ToByte(((account == null) || (clan == null)) ? 0xff : clan.getLogo2()));
- base.writeC(Convert.ToByte(((account == null) || (clan == null)) ? 0xff : clan.getLogo3()));
- base.writeC(Convert.ToByte(((account == null) || (clan == null)) ? 0xff : clan.getLogo4()));
- base.writeH(((account == null) || (clan == null)) ? ((short)0) : ((short)clan.getLogoColor()));
- base.writeD(0);
- base.writeD(0);
- base.writeD(0);
- base.writeD(account._statistic.getFights_s());
- base.writeD(account._statistic.getWinFights_s());
- base.writeD(account._statistic.getLostFights_s());
- base.writeD(0);
- base.writeD(account._statistic.getKills_s());
- base.writeD(account._statistic.getHeadShotKills());
- base.writeD(account._statistic.getDeaths_s());
- base.writeD(0);
- base.writeD(account._statistic.getKills_s());
- base.writeD(account._statistic.getEscapes_s());
- base.writeD(account._statistic.getFights_s());
- base.writeD(account._statistic.getWinFights_s());
- base.writeD(account._statistic.getLostFights_s());
- base.writeD(0);
- base.writeD(account._statistic.getKills_s());
- base.writeD(account._statistic.getHeadShotKills());
- base.writeD(account._statistic.getDeaths_s());
- base.writeD(0);
- base.writeD(account._statistic.getKills_s());
- base.writeD(account._statistic.getEscapes_s());
- account.setStatus(1);
- AccountManager.getInstance().UpdateStatus(account.getPlayerId(), 1);
- if ((account.getPlayerName() == null) || (account.getPlayerName() == ""))
- {
- account.setCharRed(0x3baa102d);
- account.setCharBlue(0x3baa1416);
- account.setCharHelmet(0x41af3b39);
- account.setCharDino(0x3bf66361);
- account.setCharBeret(0);
- account.setPrimaryWeapon(0xbebd1a6);
- account.setSecondaryWeapon(0x23d29013);
- account.setMeleeWeapon(0x29d7af69);
- account.setThrownNormalWeapon(0x2fdcea19);
- account.setThrownSpecialWeapon(0x35e20d5a);
- account.setTitleSlotCount(1);
- }
- account.CheckCorrectInventory();
- base.writeD(account.getCharRed());
- base.writeD(account.getCharBlue());
- base.writeD(account.getCharHelmet());
- base.writeD(account.getCharBeret());
- base.writeD(account.getCharDino());
- base.writeD(account.getPrimaryWeapon());
- base.writeD(account.getSecondaryWeapon());
- base.writeD(account.getMeleeWeapon());
- base.writeD(account.getThrownNormalWeapon());
- base.writeD(account.getThrownSpecialWeapon());
- base.writeB(new byte[0x29]);
- if ((account.getPlayerName() == null) || (account.getPlayerName() == ""))
- {
- base.writeC(1);
- }
- else
- {
- base.writeC(1);
- }
- if ((account.getPlayerName() == null) || (account.getPlayerName() == ""))
- {
- base.writeD(account.getInvetoryOnlyEquip(2).Count);
- base.writeD(account.getInvetoryOnlyEquip(1).Count);
- base.writeD(account.getInvetoryOnlyEquip(3).Count);
- base.writeD(0);
- }
- else
- {
- base.writeD(account.getInvetoryOnly(2).Count);
- base.writeD(account.getInvetoryOnly(1).Count);
- base.writeD(account.getInvetoryOnly(3).Count);
- base.writeD(0);
- }
- if ((account.getPlayerName() == null) || (account.getPlayerName() == ""))
- {
- for (num = 0; num < account.getInvetoryOnlyEquip(2).Count; num++)
- {
- base.writeD(account.getInvetoryOnlyEquip(2)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(2)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(2)[num].id);
- base.writeC((byte)account.getInvetoryOnlyEquip(2)[num].equip_type);
- base.writeD(account.getInvetoryOnlyEquip(2)[num].count);
- }
- for (num = 0; num < account.getInvetoryOnlyEquip(1).Count; num++)
- {
- base.writeD(account.getInvetoryOnlyEquip(1)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(1)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(1)[num].id);
- base.writeC((byte)account.getInvetoryOnlyEquip(1)[num].equip_type);
- base.writeD(account.getInvetoryOnlyEquip(1)[num].count);
- }
- for (num = 0; num < account.getInvetoryOnlyEquip(3).Count; num++)
- {
- base.writeD(account.getInvetoryOnlyEquip(3)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(3)[num].id);
- base.writeD(account.getInvetoryOnlyEquip(3)[num].id);
- base.writeC((byte)account.getInvetoryOnlyEquip(3)[num].equip_type);
- base.writeD(account.getInvetoryOnlyEquip(3)[num].count);
- }
- }
- else
- {
- num = 0;
- while (num < account.getInvetoryOnly(2).Count)
- {
- base.writeD(account.getInvetoryOnly(2)[num].object_id);
- base.writeD(account.getInvetoryOnly(2)[num].id);
- base.writeD(account.getInvetoryOnly(2)[num].id);
- base.writeC((byte)account.getInvetoryOnly(2)[num].equip_type);
- base.writeD(account.getInvetoryOnly(2)[num].count);
- num++;
- }
- for (num = 0; num < account.getInvetoryOnly(1).Count; num++)
- {
- base.writeD(account.getInvetoryOnly(1)[num].object_id);
- base.writeD(account.getInvetoryOnly(1)[num].id);
- base.writeD(account.getInvetoryOnly(1)[num].id);
- base.writeC((byte)account.getInvetoryOnly(1)[num].equip_type);
- base.writeD(account.getInvetoryOnly(1)[num].count);
- }
- for (num = 0; num < account.getInvetoryOnly(3).Count; num++)
- {
- base.writeD(account.getInvetoryOnly(3)[num].object_id);
- base.writeD(account.getInvetoryOnly(3)[num].id);
- base.writeD(account.getInvetoryOnly(3)[num].id);
- base.writeC((byte)account.getInvetoryOnly(3)[num].equip_type);
- base.writeD(account.getInvetoryOnly(3)[num].count);
- }
- }
- base.writeC((byte)Config.OutpostEnable);
- base.writeD(account.getBrooch());
- base.writeD(account.getInsignia());
- base.writeD(account.getMedal());
- base.writeD(account.getBlueOrder());
- base.writeC(0);
- base.writeC(0);
- base.writeC((byte)account.getCardId());
- byte[] buffer = new byte[] {
- 2, 4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0x10, 6, 7, 8, 9, 5, 0, 0, 0, 4, 3, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0
- };
- buffer[0x53] = (byte)account.getMissionId();
- base.writeB(buffer);
- base.writeB(new byte[] {
- 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2,
- 2, 1, 1, 1, 1, 2, 1, 3, 1, 0, 1, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 5, 4, 3, 2, 1
- });
- base.writeB(new byte[8]);
- base.writeB(new byte[3]);
- base.writeD(1);
- base.writeB(new byte[] {
- 0, 0, 0, 0, 0x39, 0, 0, 0, 0x19, 0, 0, 0, 0x23, 0, 0, 0,
- 1, 0, 0, 0, 0x27, 0, 0, 0, 1, 0, 0, 0, 40, 0, 0, 0,
- 1, 0, 0, 0, 1, 0, 0, 0, 0x2c, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
- });
- base.writeC(60);
- base.writeC(2);
- base.writeB(new byte[] { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 7, 0xfe});
- base.writeB(new byte[] {
- 0, 0, 0x8d, 1, 0x88, 0, 0x89, 0, 0x8d, 0, 0x8d, 0, 0x8d, 0, 0x8d, 1,
- 9, 0, 1, 0, 0, 0, 0x8d, 0, 0x80, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
- 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
- });
- base.writeB(new byte[] {
- 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0
- });
- base.writeB(new byte[] {
- 1, 0xee, 0xdf, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0,
- 110, 0x6f, 110, 0x65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement