• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IO.BigEndianReader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BlueSheep.Common.IO.BigEndianReader的典型用法代码示例。如果您正苦于以下问题:C# BigEndianReader类的具体用法?C# BigEndianReader怎么用?C# BigEndianReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BigEndianReader类属于BlueSheep.Common.IO命名空间,在下文中一共展示了BigEndianReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     timestamp = reader.ReadDouble();
     if (timestamp < 0 || timestamp > 9.007199254740992E15)
         throw new Exception("Forbidden value on timestamp = " + timestamp + ", it doesn't respect the following condition : timestamp < 0 || timestamp > 9.007199254740992E15");
     timezoneOffset = reader.ReadShort();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:BasicTimeMessage.cs


示例2: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     guestId = reader.ReadVarInt();
     if (guestId < 0)
         throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:PartyCancelInvitationMessage.cs


示例3: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     spellId = reader.ReadVarShort();
     if (spellId < 0)
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameActionFightDispellSpellMessage.cs


示例4: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     characterId = reader.ReadInt();
     if (characterId < 0)
         throw new Exception("Forbidden value on characterId = " + characterId + ", it doesn't respect the following condition : characterId < 0");
     secretAnswerHash = reader.ReadUTF();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:CharacterDeletionRequestMessage.cs


示例5: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
      byte b= reader.ReadByte();
      this.showExperience = BooleanByteWrapper.GetFlag(b,0);
      this.showExperienceLevelFloor = BooleanByteWrapper.GetFlag(b, 1);
      this.showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(b, 2);
      this.showExperienceFightDelta = BooleanByteWrapper.GetFlag(b, 3);
      this.showExperienceForGuild = BooleanByteWrapper.GetFlag(b, 4);
      this.showExperienceForMount = BooleanByteWrapper.GetFlag(b, 5);
      this.isIncarnationExperience = BooleanByteWrapper.GetFlag(b, 6);
     experience = reader.ReadVarUhLong();
     if (experience < 0 || experience > 9.007199254740992E15)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15");
     experienceLevelFloor = reader.ReadVarUhLong();
     if (experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15)
         throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15");
     experienceNextLevelFloor = reader.ReadDouble();
     if (experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15)
         throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15");
     experienceFightDelta = reader.ReadVarInt();
     experienceForGuild = reader.ReadVarInt();
     if (experienceForGuild < 0)
         throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0");
     experienceForMount = reader.ReadVarInt();
     if (experienceForMount < 0)
         throw new Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0");
     rerollExperienceMul = reader.ReadSByte();
     if (rerollExperienceMul < 0)
         throw new Exception("Forbidden value on rerollExperienceMul = " + rerollExperienceMul + ", it doesn't respect the following condition : rerollExperienceMul < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:31,代码来源:FightResultExperienceData.cs


示例6: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     wrongFlagCount = reader.ReadSByte();
     if (wrongFlagCount < 0)
         throw new Exception("Forbidden value on wrongFlagCount = " + wrongFlagCount + ", it doesn't respect the following condition : wrongFlagCount < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:TreasureHuntDigRequestAnswerFailedMessage.cs


示例7: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     actorEventId = reader.ReadSByte();
     if (actorEventId < 0)
         throw new Exception("Forbidden value on actorEventId = " + actorEventId + ", it doesn't respect the following condition : actorEventId < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameRolePlayShowActorWithEventMessage.cs


示例8: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     cells = reader.ReadVarShort();
     if (cells < 0 || cells > 559)
         throw new Exception("Forbidden value on cells = " + cells + ", it doesn't respect the following condition : cells < 0 || cells > 559");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:ObjectUseOnCellMessage.cs


示例9: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     enabled = BooleanByteWrapper.GetFlag(flag1, 0);
     abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
     level = reader.ReadByte();
     if (level < 0 || level > 255)
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0 || level > 255");
     expLevelFloor = reader.ReadVarUhLong();
     if (expLevelFloor < 0 || expLevelFloor > 9.007199254740992E15)
         throw new Exception("Forbidden value on expLevelFloor = " + expLevelFloor + ", it doesn't respect the following condition : expLevelFloor < 0 || expLevelFloor > 9.007199254740992E15");
     experience = reader.ReadVarUhLong();
     if (experience < 0 || experience > 9.007199254740992E15)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15");
     expNextLevelFloor = reader.ReadVarUhLong();
     if (expNextLevelFloor < 0 || expNextLevelFloor > 9.007199254740992E15)
         throw new Exception("Forbidden value on expNextLevelFloor = " + expNextLevelFloor + ", it doesn't respect the following condition : expNextLevelFloor < 0 || expNextLevelFloor > 9.007199254740992E15");
     creationDate = reader.ReadInt();
     if (creationDate < 0)
         throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0");
     nbTotalMembers = reader.ReadVarShort();
     if (nbTotalMembers < 0)
         throw new Exception("Forbidden value on nbTotalMembers = " + nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0");
     nbConnectedMembers = reader.ReadVarShort();
     if (nbConnectedMembers < 0)
         throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:27,代码来源:GuildInformationsGeneralMessage.cs


示例10: FromId

 // Methods
 public static Map FromId(int id)
 {
     lock (MapsManager.CheckLock)
     {
         if (MapsManager.MapId_Map.ContainsKey(id))
         {
             return MapsManager.MapId_Map[id];
         }
         string str = ((id % 10).ToString() + "/" + id.ToString() + ".dlm");
         if (MapsManager.D2pFileManager.MapExists(str))
         {
             MemoryStream stream = new MemoryStream(MapsManager.D2pFileManager.method_1(str)) { Position = 2 };
             DeflateStream stream2 = new DeflateStream(stream, CompressionMode.Decompress);
             byte[] buffer = new byte[50001];
             MemoryStream destination = new MemoryStream(buffer);
             stream2.CopyTo(destination);
             destination.Position = 0;
             BigEndianReader reader = new BigEndianReader(destination);
             Map map2 = new Map();
             map2.Init(reader);
             MapsManager.MapId_Map.Add(id, map2);
             if ((MapsManager.MapId_Map.Count > 1000))
             {
                 MapsManager.MapId_Map.Remove(MapsManager.MapId_Map.Keys.First());
             }
             return map2;
         }
         MapsManager.MapId_Map.Add(id, null);
         if ((MapsManager.MapId_Map.Count > 1000))
         {
             MapsManager.MapId_Map.Remove(MapsManager.MapId_Map.Keys.First());
         }
         return null;
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:36,代码来源:MapsManager.cs


示例11: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     storageMaxSlot = reader.ReadVarInt();
     if (storageMaxSlot < 0)
         throw new Exception("Forbidden value on storageMaxSlot = " + storageMaxSlot + ", it doesn't respect the following condition : storageMaxSlot < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:ExchangeStartedWithStorageMessage.cs


示例12: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     name = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameFightFighterNamedInformations.cs


示例13: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     remainingTime = reader.ReadVarInt();
     if (remainingTime < 0)
         throw new Exception("Forbidden value on remainingTime = " + remainingTime + ", it doesn't respect the following condition : remainingTime < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameFightTurnResumeMessage.cs


示例14: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     spellId = reader.ReadInt();
     cooldown = reader.ReadSByte();
     if (cooldown < 0)
         throw new Exception("Forbidden value on cooldown = " + cooldown + ", it doesn't respect the following condition : cooldown < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameFightSpellCooldown.cs


示例15: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     monsterCount = reader.ReadVarInt();
     if (monsterCount < 0)
         throw new Exception("Forbidden value on monsterCount = " + monsterCount + ", it doesn't respect the following condition : monsterCount < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:ObjectEffectLadder.cs


示例16: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     quantity = reader.ReadVarInt();
     if (quantity < 0)
         throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:ObjectUseMultipleMessage.cs


示例17: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     quantities = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          quantities[i] = reader.ReadVarInt();
     }
     limit = reader.ReadUShort();
     types = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          types[i] = reader.ReadVarInt();
     }
     taxPercentage = reader.ReadFloat();
     taxModificationPercentage = reader.ReadFloat();
     maxItemLevel = reader.ReadByte();
     if (maxItemLevel < 0 || maxItemLevel > 255)
         throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0 || maxItemLevel > 255");
     maxItemPerAccount = reader.ReadVarInt();
     if (maxItemPerAccount < 0)
         throw new Exception("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0");
     npcContextualId = reader.ReadInt();
     unsoldDelay = reader.ReadVarShort();
     if (unsoldDelay < 0)
         throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:27,代码来源:SellerBuyerDescriptor.cs


示例18: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     portalId = reader.ReadVarShort();
     if (portalId < 0)
         throw new Exception("Forbidden value on portalId = " + portalId + ", it doesn't respect the following condition : portalId < 0");
     areaId = reader.ReadShort();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:PortalInformation.cs


示例19: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     targetId = reader.ReadInt();
     entityLook = new Types.EntityLook();
     entityLook.Deserialize(reader);
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:GameActionFightChangeLookMessage.cs


示例20: GameActionFightDispellableEffectMessageTreatment

 public static void GameActionFightDispellableEffectMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
 {
     GameActionFightDispellableEffectMessage msg = (GameActionFightDispellableEffectMessage)message;
     using (BigEndianReader reader = new BigEndianReader(packetDatas))
     {
         msg.Deserialize(reader);
     }
     if (msg.effect is FightTemporaryBoostStateEffect)
     {
         FightTemporaryBoostStateEffect effect = (FightTemporaryBoostStateEffect)msg.effect;
         if (effect.targetId == account.Fight.Fighter.Id)
         {
             if (account.Fight.DurationByEffect.ContainsKey(effect.stateId))
                 account.Fight.DurationByEffect.Remove(effect.stateId);
             account.Fight.DurationByEffect.Add(effect.stateId, effect.turnDuration);
         }
     }
     else if (msg.effect is FightTemporaryBoostEffect)
     {
         FightTemporaryBoostEffect effect = (FightTemporaryBoostEffect)msg.effect;
         if (msg.actionId == 168)
             ((BFighter)account.Fight.Fighter).ActionPoints = account.Fight.Fighter.ActionPoints - effect.delta;
         else if (msg.actionId == 169)
             ((BFighter)account.Fight.Fighter).MovementPoints = account.Fight.Fighter.MovementPoints - effect.delta;
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:26,代码来源:FightHandler.cs



注:本文中的BlueSheep.Common.IO.BigEndianReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IO.BigEndianWriter类代码示例发布时间:2022-05-24
下一篇:
C# Book.HtmlDom类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap