本文整理汇总了C#中UltimaXNA.Core.Network.PacketReader.ReadString方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.ReadString方法的具体用法?C# PacketReader.ReadString怎么用?C# PacketReader.ReadString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UltimaXNA.Core.Network.PacketReader
的用法示例。
在下文中一共展示了PacketReader.ReadString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AsciiMessagePacket
public AsciiMessagePacket(PacketReader reader)
: base(0x1C, "Ascii Message")
{
m_serial = reader.ReadInt32();
m_graphic = reader.ReadInt16();
m_type = (MessageTypes)reader.ReadByte();
m_hue = reader.ReadInt16();
m_font = reader.ReadInt16();
m_name = reader.ReadString(30);
m_text = reader.ReadString();
}
示例2: AsciiMessagePacket
public AsciiMessagePacket(PacketReader reader)
: base(0x1C, "Ascii Message")
{
Serial = reader.ReadInt32();
Model = reader.ReadInt16();
MsgType = (MessageTypes)reader.ReadByte();
Hue = reader.ReadUInt16();
Font = reader.ReadInt16();
SpeakerName = reader.ReadString(30).Trim();
Text = reader.ReadString();
}
示例3: UnicodeMessagePacket
public UnicodeMessagePacket(PacketReader reader)
: base(0xAE, "Unicode Message")
{
Serial = reader.ReadInt32();
Model = reader.ReadInt16();
MsgType = (MessageTypes)reader.ReadByte();
Hue = reader.ReadUInt16();
Font = reader.ReadInt16();
Language = reader.ReadString(4).Trim();
SpeakerName = reader.ReadString(30).Trim();
Text = reader.ReadUnicodeString((reader.Buffer.Length - 48) / 2);
}
示例4: BookHeaderNewPacket
public BookHeaderNewPacket(PacketReader reader)
: base(0xD4, "Book Header (New)")
{
Serial = reader.ReadInt32();
Flag0 = reader.ReadByte();
Flag1 = reader.ReadByte();
Pages = reader.ReadInt16();
TitleLength = reader.ReadInt16();
Title = reader.ReadString();
AuthorLength = reader.ReadInt16();
Author = reader.ReadString();
}
示例5: ChatPacket
public ChatPacket(PacketReader reader)
: base(0xB3, "Chat Packet")
{
m_language = reader.ReadString(3);
reader.ReadInt16(); // unknown.
m_commandtype = reader.ReadByte();
}
示例6: ServerListEntry
public ServerListEntry(PacketReader reader)
{
Index = (ushort)reader.ReadInt16();
Name = reader.ReadString(32);
PercentFull = reader.ReadByte();
Timezone = reader.ReadByte();
Address = (uint)reader.ReadInt32();
}
示例7: ServerListEntry
public ServerListEntry(PacketReader reader)
{
index = (ushort)reader.ReadInt16();
name = reader.ReadString(30);
percentFull = reader.ReadByte();
timezone = reader.ReadByte();
address = (uint)reader.ReadInt32();
}
示例8: VendorSellItem
public VendorSellItem(PacketReader reader)
{
ItemSerial = reader.ReadInt32();
ItemID = reader.ReadUInt16();
Hue = reader.ReadUInt16();
Amount = reader.ReadUInt16();
Price = reader.ReadUInt16();
ushort nameLength = reader.ReadUInt16();
Name = reader.ReadString(nameLength);
}
示例9: MessageLocalizedPacket
public MessageLocalizedPacket(PacketReader reader)
: base(0xC1, "Message Localized")
{
Serial = reader.ReadInt32(); // 0xffff for system message
Body = reader.ReadInt16(); // (0xff for system message
MessageType = (MessageTypes)reader.ReadByte(); // 6 - lower left, 7 on player
Hue = reader.ReadUInt16();
Font = reader.ReadInt16();
CliLocNumber = reader.ReadInt32();
SpeakerName = reader.ReadString(30).Trim();
Arguements = reader.ReadUnicodeStringSafeReverse();
}
示例10: UnicodeMessagePacket
public UnicodeMessagePacket(PacketReader reader)
: base(0xAE, "Unicode Message")
{
m_serial = reader.ReadInt32();
m_model = reader.ReadInt16();
m_msgType = (MessageTypes)reader.ReadByte();
m_hue = reader.ReadInt16();
m_font = reader.ReadInt16();
m_language = reader.ReadInt32();
m_speakerName = reader.ReadString(30);
m_spokenText = reader.ReadUnicodeString((reader.Buffer.Length - 48) / 2);
}
示例11: StatusInfoPacket
public StatusInfoPacket(PacketReader reader)
: base(0x11, "StatusInfo")
{
Serial = reader.ReadInt32();
PlayerName = reader.ReadString(30);
CurrentHealth = reader.ReadInt16();
MaxHealth = reader.ReadInt16();
NameChangeFlag = reader.ReadByte() != 0x00; // 0x1 = allowed, 0 = not allowed
StatusTypeFlag = reader.ReadByte();
if (StatusTypeFlag > 0)
{
Sex = (Genders)reader.ReadByte(); // 0=male, 1=female
Strength = reader.ReadInt16();
Dexterity = reader.ReadInt16();
Intelligence = reader.ReadInt16();
CurrentStamina = reader.ReadInt16();
MaxStamina = reader.ReadInt16();
CurrentMana = reader.ReadInt16();
MaxMana = reader.ReadInt16();
GoldInInventory = reader.ReadInt32();
ArmorRating = reader.ReadInt16();
Weight = reader.ReadInt16();
if (StatusTypeFlag >= 5)
{
MaxWeight = reader.ReadInt16();
Race = (Races)reader.ReadByte();
}
if (StatusTypeFlag >= 3)
{
StatCap = reader.ReadInt16();
Followers = reader.ReadByte();
MaxFollowers = reader.ReadByte();
}
if (StatusTypeFlag >= 4)
{
ResistFire = reader.ReadInt16();
ResistCold = reader.ReadInt16();
ResistPoison = reader.ReadInt16();
ResistEnergy = reader.ReadInt16();
Luck = reader.ReadInt16();
DmgMin = reader.ReadInt16();
DmgMax = reader.ReadInt16();
TithingPoints = reader.ReadInt16();
}
}
}
示例12: VendorBuyListPacket
public VendorBuyListPacket(PacketReader reader)
: base(0x74, "Open Buy Window")
{
m_vendorPackSerial = reader.ReadInt32();
m_itemCount = reader.ReadByte();
m_prices = new int[m_itemCount];
m_descriptions = new string[m_itemCount];
for (int i = 0; i < m_itemCount; i++)
{
m_prices[i] = reader.ReadInt32();
int descriptionLegnth = reader.ReadByte();
m_descriptions[i] = reader.ReadString(descriptionLegnth);
}
}
示例13: VendorBuyListPacket
public VendorBuyListPacket(PacketReader reader)
: base(0x74, "Open Buy Window")
{
VendorPackSerial = reader.ReadInt32();
int count = reader.ReadByte();
Items = new List<VendorBuyItem>();
for (int i = 0; i < count; i++)
{
int price = reader.ReadInt32();
int descriptionLegnth = reader.ReadByte();
string description = reader.ReadString(descriptionLegnth);
Items.Add(new VendorBuyItem(price, description));
}
}
示例14: MobileStatusCompactPacket
public MobileStatusCompactPacket(PacketReader reader)
: base(0x11, "StatusInfo")
{
m_serial = reader.ReadInt32();
m_playerName = reader.ReadString(30);
m_currentHealth = reader.ReadInt16();
m_maxHealth = reader.ReadInt16();
m_nameChangeFlag = reader.ReadByte(); // 0x1 = allowed, 0 = not allowed
m_statusTypeFlag = reader.ReadByte();
sex = (Genders)reader.ReadByte(); // 0=male, 1=female
m_strength = reader.ReadInt16();
m_dexterity = reader.ReadInt16();
m_intelligence = reader.ReadInt16();
m_currentStamina = reader.ReadInt16();
m_maxStamina = reader.ReadInt16();
m_currentMana = reader.ReadInt16();
m_maxMana = reader.ReadInt16();
m_goldInInventory = reader.ReadInt32();
m_armorRating = reader.ReadInt16();
m_weight = reader.ReadInt16();
if (m_statusTypeFlag >= 5)
{
m_maxWeight = reader.ReadInt16();
m_race = (Races)reader.ReadByte();
}
if (m_statusTypeFlag >= 3)
{
m_statCap = reader.ReadInt16();
m_followers = reader.ReadByte();
m_maxFollowers = reader.ReadByte();
}
if (m_statusTypeFlag >= 4)
{
m_resistFire = reader.ReadInt16();
m_resistCold = reader.ReadInt16();
m_resistPoison = reader.ReadInt16();
m_resistEnergy = reader.ReadInt16();
m_luck = reader.ReadInt16();
m_dmgMin = reader.ReadInt16();
m_dmgMax = reader.ReadInt16();
m_tithingPoints = reader.ReadInt16();
}
}
示例15: BookPagesPacket
public BookPagesPacket(PacketReader reader)
: base(0x66, "Book Pages")
{
Serial = reader.ReadInt32();
PageCount = reader.ReadInt16();
Pages = new BaseBook.BookPageInfo[PageCount];
for (int i = 0; i < PageCount; ++i)
{
int page = reader.ReadInt16();
int length = reader.ReadInt16();
string[] lines = new string[length];
for (int j = 0; j < length; j++)
{
lines[j] = reader.ReadString();
}
Pages[i] = new BaseBook.BookPageInfo(lines);
}
}