/// <summary> /// Generates the unit server login information from packet /// </summary> /// <param name="p"></param> /// <returns></returns> public static UnitLogin RecvUnitLogin(Packet p) { p.Skip(2); string account = p.ReadString(); int hash = p.ReadShort(); int map = p.ReadShort(); int channel = p.ReadByte(); p.Skip(6); int characterID = p.ReadInt(); UnitLogin u = new UnitLogin() { Account = account, AccountID = hash, Channel = channel, CharacterID = characterID }; return u; }
public static Character RecvCreateCharacter(Packet p) { p.Skip(2); byte cClass = p.ReadByte(); string name = p.ReadString(); Character c = new Character() { Class = cClass, Name = name }; return c; }
/// <summary> /// Handle Game Login packet from client /// </summary> /// <param name="p"></param> /// <param name="c"></param> public static GameLogin RecvGameLogin(Packet p) { p.Skip(2); string account = p.ReadString(); string hash = p.ReadString(); int version = p.ReadShort(); GameLogin g = new GameLogin { AccountName = account, HashCode = hash, Version = version }; return g; }
public static RenamePetInfo RecvRenamePet(Packet p) { p.Skip(2); int mapid = p.ReadInt(); int petid = p.ReadInt(); string newname = p.ReadString(); RenamePetInfo i = new RenamePetInfo { MapID = mapid, PetID = petid, NewName = newname }; return i; }
public static ChatMessageInfo RecvChatMessage(Packet p) { p.Skip(2); byte type = p.ReadByte(); int targetId = p.ReadInt(); string message = p.ReadString(); string targetName = p.ReadString(); // if you dont have id ChatMessageInfo cmi = new ChatMessageInfo { Type = (ChatType)type, TargetID = targetId, Message = message, TargetName = targetName }; return cmi; }
public static GuildChatInfo RecvGuildChat(Packet p) { p.Skip(2); byte type = p.ReadByte(); string message = p.ReadString(); GuildChatInfo i = new GuildChatInfo { Type = type, Message = message }; return i; }
public static CreateGuildInfo RecvCreateGuild(Packet p) { p.Skip(2); string GuildName = p.ReadString(); CreateGuildInfo i = new CreateGuildInfo { GuildName = GuildName }; return i; }
public static ChangeShopInfo RecvChangeShopInfo(Packet p) { p.Skip(2); string name = p.ReadString(); string desc = p.ReadString(); ChangeShopInfo i = new ChangeShopInfo { Name = name, Description = desc }; return i; }
public static RequestGuildChangeNoticeInfo RecvRequestChangeGuildNotice(Packet p) { p.Skip(2); string newNotice = p.ReadString(); RequestGuildChangeNoticeInfo i = new RequestGuildChangeNoticeInfo { NewNotice = newNotice }; return i; }
public static RequestGuildMemberChangeTitleInfo RecvRequestChangeGuildMemberTitle(Packet p) { p.Skip(2); int guildID = p.ReadInt(); int memberID = p.ReadInt(); string newTitle = p.ReadString(); RequestGuildMemberChangeTitleInfo i = new RequestGuildMemberChangeTitleInfo { GuildID = guildID, MemberID = memberID, NewTitle = newTitle }; return i; }