예제 #1
0
 private static int GetMessageLenght(BigEndianReader data, ushort read)
 {
     switch (read & 3)
     {
         case 1:
             return data.ReadByte();
         case 2:
             return data.ReadUShort();
         case 3:
             return (data.ReadByte() << 16) + (data.ReadByte() << 8) + data.ReadByte();
         default:
             return 0;
     }
 }
예제 #2
0
파일: SpellItem.cs 프로젝트: Riul/emulator
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Position = reader.ReadByte();
     SpellId = reader.ReadInt();
     SpellLevel = reader.ReadSByte();
 }
예제 #3
0
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     Success = BooleanByteWrapper.GetFlag(flag1, 0);
     AutomaticAction = BooleanByteWrapper.GetFlag(flag1, 1);
     ActionId = reader.ReadInt();
 }
예제 #4
0
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     Success = BooleanByteWrapper.GetFlag(flag1, 0);
     Session = BooleanByteWrapper.GetFlag(flag1, 1);
     Name = reader.ReadUTF();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     DeathState = reader.ReadSByte();
     DeathCount = reader.ReadShort();
     DeathMaxLevel = reader.ReadByte();
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     IsEntered = BooleanByteWrapper.GetFlag(flag1, 0);
     IsInRoom = BooleanByteWrapper.GetFlag(flag1, 1);
     AreaId = reader.ReadShort();
     AreaAlignment = reader.ReadSByte();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Level = reader.ReadByte();
     GuildInfo = new BasicGuildInformations();
     GuildInfo.Deserialize(reader);
     ExperienceForGuild = reader.ReadInt();
 }
예제 #8
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     IsSecret = BooleanByteWrapper.GetFlag(flag1, 0);
     IsRestrictedToPartyOnly = BooleanByteWrapper.GetFlag(flag1, 1);
     IsClosed = BooleanByteWrapper.GetFlag(flag1, 2);
     IsAskingForHelp = BooleanByteWrapper.GetFlag(flag1, 3);
 }
예제 #9
0
 public override void Deserialize(BigEndianReader reader)
 {
     Salt = reader.ReadUTF();
     var limit = reader.ReadUShort();
     Key = new byte[limit];
     for (int i = 0; i < limit; i++)
     {
         Key[i] = reader.ReadByte();
     }
 }
 public override void Deserialize(BigEndianReader reader)
 {
     PresetId = reader.ReadSByte();
     Code = reader.ReadSByte();
     var limit = reader.ReadUShort();
     UnlinkedPosition = new byte[limit];
     for (int i = 0; i < limit; i++)
     {
         UnlinkedPosition[i] = reader.ReadByte();
     }
 }
예제 #11
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Level = reader.ReadByte();
     var limit = reader.ReadUShort();
     Additional = new FightResultAdditionalData[limit];
     for (int i = 0; i < limit; i++)
     {
         Additional[i] = Types.ProtocolTypeManager.GetInstance<FightResultAdditionalData>(reader.ReadShort());
         Additional[i].Deserialize(reader);
     }
 }
예제 #12
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Time = reader.ReadByte();
 }
예제 #13
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     HasFriend = BooleanByteWrapper.GetFlag(flag1, 0);
     HasGuildMember = BooleanByteWrapper.GetFlag(flag1, 1);
     HasGroupMember = BooleanByteWrapper.GetFlag(flag1, 2);
     HasMyTaxCollector = BooleanByteWrapper.GetFlag(flag1, 3);
     TeamMembersCount = reader.ReadSByte();
     MeanLevel = reader.ReadInt();
 }
예제 #14
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Id = reader.ReadInt();
     LifePoints = reader.ReadInt();
     MaxLifePoints = reader.ReadInt();
     Prospecting = reader.ReadShort();
     RegenRate = reader.ReadByte();
 }
예제 #15
0
 public override void Deserialize(BigEndianReader reader)
 {
     RegenRate = reader.ReadByte();
 }
예제 #16
0
파일: ObjectItem.cs 프로젝트: Riul/emulator
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Position = reader.ReadByte();
     ObjectGID = reader.ReadShort();
     PowerRate = reader.ReadShort();
     OverMax = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     Effects = new ObjectEffect[limit];
     for (int i = 0; i < limit; i++)
     {
         Effects[i] = Types.ProtocolTypeManager.GetInstance<ObjectEffect>(reader.ReadShort());
         Effects[i].Deserialize(reader);
     }
     ObjectUID = reader.ReadInt();
     Quantity = reader.ReadInt();
 }
예제 #17
0
 public override void Deserialize(BigEndianReader reader)
 {
     LivingUID = reader.ReadInt();
     LivingPosition = reader.ReadByte();
 }
예제 #18
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     Sex = BooleanByteWrapper.GetFlag(flag1, 0);
     IsRideable = BooleanByteWrapper.GetFlag(flag1, 1);
     IsWild = BooleanByteWrapper.GetFlag(flag1, 2);
     IsFecondationReady = BooleanByteWrapper.GetFlag(flag1, 3);
     Id = reader.ReadDouble();
     Model = reader.ReadInt();
     var limit = reader.ReadUShort();
     Ancestor = new int[limit];
     for (int i = 0; i < limit; i++)
     {
         Ancestor[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     Behaviors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
         Behaviors[i] = reader.ReadInt();
     }
     Name = reader.ReadUTF();
     OwnerId = reader.ReadInt();
     Experience = reader.ReadDouble();
     ExperienceForLevel = reader.ReadDouble();
     ExperienceForNextLevel = reader.ReadDouble();
     Level = reader.ReadSByte();
     MaxPods = reader.ReadInt();
     Stamina = reader.ReadInt();
     StaminaMax = reader.ReadInt();
     Maturity = reader.ReadInt();
     MaturityForAdult = reader.ReadInt();
     Energy = reader.ReadInt();
     EnergyMax = reader.ReadInt();
     Serenity = reader.ReadInt();
     AggressivityMax = reader.ReadInt();
     SerenityMax = reader.ReadInt();
     Love = reader.ReadInt();
     LoveMax = reader.ReadInt();
     FecondationTime = reader.ReadInt();
     BoostLimiter = reader.ReadInt();
     BoostMax = reader.ReadDouble();
     ReproductionCount = reader.ReadInt();
     ReproductionCountMax = reader.ReadInt();
     limit = reader.ReadUShort();
     EffectList = new ObjectEffectInteger[limit];
     for (int i = 0; i < limit; i++)
     {
         EffectList[i] = new ObjectEffectInteger();
         EffectList[i].Deserialize(reader);
     }
 }
예제 #19
0
 public override void Deserialize(BigEndianReader reader)
 {
     NewLevel = reader.ReadByte();
 }
예제 #20
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     OwnerName = reader.ReadUTF();
     Level = reader.ReadByte();
 }
예제 #21
0
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     CanBeCancelled = BooleanByteWrapper.GetFlag(flag1, 0);
     CanSayReady = BooleanByteWrapper.GetFlag(flag1, 1);
     IsSpectator = BooleanByteWrapper.GetFlag(flag1, 2);
     IsFightStarted = BooleanByteWrapper.GetFlag(flag1, 3);
     TimeMaxBeforeFightStart = reader.ReadInt();
     FightType = reader.ReadSByte();
 }
예제 #22
0
파일: PresetItem.cs 프로젝트: Riul/emulator
 public virtual void Deserialize(BigEndianReader reader)
 {
     Position = reader.ReadByte();
     ObjGid = reader.ReadInt();
     ObjUid = reader.ReadInt();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     CanChangeName = BooleanByteWrapper.GetFlag(flag1, 0);
     CanChangeEmblem = BooleanByteWrapper.GetFlag(flag1, 1);
 }
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     Enabled = BooleanByteWrapper.GetFlag(flag1, 0);
     AbandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
     Level = reader.ReadByte();
     ExpLevelFloor = reader.ReadDouble();
     Experience = reader.ReadDouble();
     ExpNextLevelFloor = reader.ReadDouble();
     CreationDate = reader.ReadInt();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     FirstNameId = reader.ReadShort();
     LastNameId = reader.ReadShort();
     Level = reader.ReadByte();
     GuildId = reader.ReadInt();
     Uid = reader.ReadInt();
 }
예제 #26
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     ShowExperience = BooleanByteWrapper.GetFlag(flag1, 0);
     ShowExperienceLevelFloor = BooleanByteWrapper.GetFlag(flag1, 1);
     ShowExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(flag1, 2);
     ShowExperienceFightDelta = BooleanByteWrapper.GetFlag(flag1, 3);
     ShowExperienceForGuild = BooleanByteWrapper.GetFlag(flag1, 4);
     ShowExperienceForMount = BooleanByteWrapper.GetFlag(flag1, 5);
     IsIncarnationExperience = BooleanByteWrapper.GetFlag(flag1, 6);
     Experience = reader.ReadDouble();
     ExperienceLevelFloor = reader.ReadDouble();
     ExperienceNextLevelFloor = reader.ReadDouble();
     ExperienceFightDelta = reader.ReadInt();
     ExperienceForGuild = reader.ReadInt();
     ExperienceForMount = reader.ReadInt();
     RerollExperienceMul = reader.ReadInt();
 }
예제 #27
0
 public override void Deserialize(BigEndianReader reader)
 {
     ObjectUID = reader.ReadInt();
     Position = reader.ReadByte();
     Quantity = reader.ReadInt();
 }
예제 #28
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     Grade = reader.ReadByte();
     MinHonorForGrade = reader.ReadUShort();
     MaxHonorForGrade = reader.ReadUShort();
     Honor = reader.ReadUShort();
     HonorDelta = reader.ReadShort();
     Dishonor = reader.ReadUShort();
     DishonorDelta = reader.ReadShort();
 }
예제 #29
0
 public override void Deserialize(BigEndianReader reader)
 {
     RequestId = reader.ReadByte();
     ContactType = reader.ReadSByte();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag1 = reader.ReadByte();
     Enable = BooleanByteWrapper.GetFlag(flag1, 0);
     Invisible = BooleanByteWrapper.GetFlag(flag1, 1);
 }