本文整理汇总了C#中ServerEngine.PacketEngine.Packet.ReadString方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadString方法的具体用法?C# Packet.ReadString怎么用?C# Packet.ReadString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServerEngine.PacketEngine.Packet
的用法示例。
在下文中一共展示了Packet.ReadString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecvUnitLogin
/// <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;
}
示例2: RecvCreateCharacter
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;
}
示例3: RecvGameLogin
/// <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;
}
示例4: RecvRenamePet
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;
}
示例5: RecvChatMessage
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;
}
示例6: RecvGuildChat
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;
}
示例7: RecvCreateGuild
public static CreateGuildInfo RecvCreateGuild(Packet p)
{
p.Skip(2);
string GuildName = p.ReadString();
CreateGuildInfo i = new CreateGuildInfo
{
GuildName = GuildName
};
return i;
}
示例8: RecvChangeShopInfo
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;
}
示例9: RecvRequestChangeGuildNotice
public static RequestGuildChangeNoticeInfo RecvRequestChangeGuildNotice(Packet p)
{
p.Skip(2);
string newNotice = p.ReadString();
RequestGuildChangeNoticeInfo i = new RequestGuildChangeNoticeInfo
{
NewNotice = newNotice
};
return i;
}
示例10: RecvRequestChangeGuildMemberTitle
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;
}