public static void Load(ReceiveGPacket p) { long id1 = p.readQ(); int num1 = (int)p.readC(); Account account = AccountManager.getInstance().getAccount(id1, true); if (account == null) { return; } switch (num1) { case 0: ClanInfo.ClearList(account); break; case 1: long pId = p.readQ(); string str = p.readS((int)p.readC()); byte[] buffer = p.readB(4); byte num2 = p.readC(); Account member = new Account() { player_id = pId, player_name = str, _rank = (int)num2 }; member._status.SetData(buffer, pId); ClanInfo.AddMember(account, member); break; case 2: long id2 = p.readQ(); ClanInfo.RemoveMember(account, id2); break; case 3: int num3 = p.readD(); int num4 = (int)p.readC(); account.clan_id = num3; account.clanAccess = num4; break; } }
public static void Load(ReceiveGPacket p) { long playerId = p.readQ(), memberId; int type = p.readC(); Account player = AccountManager.getInstance().getAccount(playerId, true); if (player == null) { return; } if (type == 0) { ClanInfo.ClearList(player); } else if (type == 1) { memberId = p.readQ(); string name = p.readS(p.readC()); byte[] status = p.readB(4); byte rank = p.readC(); Account member = new Account { player_id = memberId, player_name = name, _rank = rank }; member._status.SetData(status, memberId); ClanInfo.AddMember(player, member); } else if (type == 2) { memberId = p.readQ(); ClanInfo.RemoveMember(player, memberId); } else if (type == 3) { int clanId = p.readD(); int clanAccess = p.readC(); player.clan_id = clanId; player.clanAccess = clanAccess; } }