本文整理汇总了C#中SharpTibiaProxy.Network.InMessage.ReadUShort方法的典型用法代码示例。如果您正苦于以下问题:C# InMessage.ReadUShort方法的具体用法?C# InMessage.ReadUShort怎么用?C# InMessage.ReadUShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpTibiaProxy.Network.InMessage
的用法示例。
在下文中一共展示了InMessage.ReadUShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseClientSay
private void ParseClientSay(InMessage message)
{
string receiver = null;
ushort channelId = 0;
MessageClasses type = (MessageClasses)message.ReadByte();
switch (type)
{
case MessageClasses.PRIVATE_TO:
case MessageClasses.GAMEMASTER_PRIVATE_TO:
receiver = message.ReadString();
break;
case MessageClasses.CHANNEL:
case MessageClasses.CHANNEL_HIGHLIGHT:
case MessageClasses.GAMEMASTER_CHANNEL:
channelId = message.ReadUShort();
break;
default:
break;
}
string text = message.ReadString();
client.Chat.OnPlayerSpeak(receiver, channelId, type, text);
}
示例2: ParseServerOpenRuleViolation
//private void ParseServerRuleViolationB1(InMessage message)
//{
// message.ReadUShort();
//}
//private void ParseServerRuleViolationB0(InMessage message)
//{
// message.ReadUShort();
//}
//private void ParseServerRuleViolationAF(InMessage message)
//{
// message.ReadUShort();
//}
private void ParseServerOpenRuleViolation(InMessage message)
{
message.ReadUShort();
}
示例3: ParseInitialize
private void ParseInitialize(InMessage message)
{
if (minorVersion >= 10)
message.ReadByte(); //?
int count = message.ReadUShort();
for (int i = 0; i < count; i++)
{
var creature = new Creature(message.ReadUInt());
creature.Type = (CreatureType)message.ReadByte();
creature.Name = message.ReadString();
//Trace.WriteLine(String.Format("Creature[{0}]: {1}", i, creature.Name));
creature.Health = message.ReadByte();
var direction = (Direction)message.ReadByte();
creature.LookDirection = direction;
creature.TurnDirection = direction;
//Outfit
creature.Outfit = message.ReadOutfit();
creature.LightLevel = message.ReadByte();
creature.LightColor = message.ReadByte();
creature.Speed = message.ReadUShort();
creature.Skull = message.ReadByte();
creature.Shield = message.ReadByte();
creature.Emblem = message.ReadByte();
creature.IsImpassable = message.ReadByte() == 0x01;
//10.20+ includes an extra 4 bytes per creature
//These bytes could alter the read order, but since I don't know what they are for yet, I'll read them out of the way.
message.ReadUInt();
//speech category?
if (client.Version.Number >= ClientVersion.Version1036.Number)
message.ReadByte();
client.BattleList.AddCreature(creature);
}
ParseTibiaPackets(message);
}
示例4: ParseServerOpenChannel
private void ParseServerOpenChannel(InMessage message)
{
var channelId = message.ReadUShort();
var name = message.ReadString();
var num = message.ReadUShort();
for (int i = 0; i < num; i++)
message.ReadString();
num = message.ReadUShort();
for (int i = 0; i < num; i++)
message.ReadString();
}
示例5: ParseServerMarketDetail
private void ParseServerMarketDetail(InMessage message)
{
message.ReadUShort();
for (int i = 0; i < 15; i++)
message.ReadString();
var num2 = message.ReadByte();
if (num2 > 0)
message.ReadBytes(num2 * 16);
num2 = message.ReadByte();
if (num2 > 0)
message.ReadBytes(num2 * 16);
}
示例6: ParseServerItemTextWindow
private void ParseServerItemTextWindow(InMessage message)
{
var windowID = message.ReadUInt();
var itemID = message.ReadUShort();
var maxlen = message.ReadUShort();
var text = message.ReadString();
var writter = message.ReadString();
var date = message.ReadString();
}
示例7: ParseServerCreatureSpeed
private void ParseServerCreatureSpeed(InMessage message)
{
var creatureID = message.ReadUInt();
var speed = message.ReadUShort();
}
示例8: ParseServerCreatePrivateChannel
private void ParseServerCreatePrivateChannel(InMessage message)
{
var channelId = message.ReadUShort();
var name = message.ReadString();
message.ReadUShort();
message.ReadString();
message.ReadUShort();
}
示例9: ParseServerSelfAppear
private void ParseServerSelfAppear(InMessage message)
{
client.BattleList.Clear();
client.Map.Clear();
client.PlayerId = message.ReadUInt();
message.ReadUShort();
client.PlayerCanReportBugs = message.ReadByte() != 0;
}
示例10: ParseServerQuestPartList
private void ParseServerQuestPartList(InMessage message)
{
var questsID = message.ReadUShort();
var nMission = message.ReadByte();
for (uint i = 0; i < nMission; ++i)
{
var questsName = message.ReadString();
var questsDesc = message.ReadString();
}
}
示例11: ParseServerQuestList
private void ParseServerQuestList(InMessage message)
{
var nQuests = message.ReadUShort();
for (uint i = 0; i < nQuests; ++i)
{
var questsID = message.ReadUShort();
var questsName = message.ReadString();
var questsState = message.ReadByte();
}
}
示例12: ParseServerPlayerStats
private void ParseServerPlayerStats(InMessage message)
{
var health = message.ReadUShort();
var healthMax = message.ReadUShort();
var freeCapacity = message.ReadUInt();
var capacity = message.ReadUInt();
var experience = message.ReadULong();
var level = message.ReadUShort();
var levelPercent = message.ReadByte();
var mana = message.ReadUShort();
var manaMax = message.ReadUShort();
var magicLevel = message.ReadByte();
var baseMagicLevel = message.ReadByte();
var magicLevelPercent = message.ReadByte();
var soul = message.ReadByte();
var stamina = message.ReadUShort();
var speed = message.ReadUShort();
var regeneration = message.ReadUShort();
var offlineTranning = message.ReadUShort();
}
示例13: ParseServerPlayerIcons
private void ParseServerPlayerIcons(InMessage message)
{
message.ReadUShort();
}
示例14: ParseServerOutfitWindow
private void ParseServerOutfitWindow(InMessage message)
{
message.ReadOutfit();
var nOutfits = message.ReadByte();
for (uint i = 0; i < nOutfits; ++i)
{
var outfitID = message.ReadUShort();
var name = message.ReadString();
var addons = message.ReadByte();
}
int mountCount = message.ReadByte();
for (int i = 0; i < mountCount; ++i)
{
int mountId = message.ReadUShort(); // mount type
string mountName = message.ReadString(); // mount name
}
}
示例15: ParseServerOpenShopWindow
private void ParseServerOpenShopWindow(InMessage message)
{
var shop = new Shop(message.ReadString());
var size = message.ReadUShort();
for (uint i = 0; i < size; ++i)
{
var shopItem = new ShopItem();
shopItem.Id = message.ReadUShort();
shopItem.SubType = message.ReadByte();
shopItem.Name = message.ReadString();
shopItem.Weight = message.ReadUInt();
shopItem.BuyPrice = message.ReadUInt();
shopItem.SellPrice = message.ReadUInt();
shop.Items.Add(shopItem);
}
client.OnOpenShopWindow(shop);
}