public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(experienceCharacter);
     writer.WriteDouble(experienceMount);
     writer.WriteDouble(experienceGuild);
     writer.WriteDouble(experienceIncarnation);
 }
Esempio n. 2
0
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteSByte(jobId);
     writer.WriteSByte(jobLevel);
     writer.WriteDouble(jobXP);
     writer.WriteDouble(jobXpLevelFloor);
     writer.WriteDouble(jobXpNextLevelFloor);
 }
Esempio n. 3
0
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, enabled);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, abandonnedPaddock);
            writer.WriteByte(flag1);
            writer.WriteByte(level);
            writer.WriteDouble(expLevelFloor);
            writer.WriteDouble(experience);
            writer.WriteDouble(expNextLevelFloor);
            writer.WriteInt(creationDate);
        }
Esempio n. 4
0
        public virtual void Serialize(BigEndianWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, sex);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, isRideable);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 2, isWild);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 3, isFecondationReady);
            writer.WriteByte(flag1);
            writer.WriteDouble(id);
            writer.WriteInt(model);
            writer.WriteUShort((ushort)ancestor.Length);
            foreach (var entry in ancestor)
            {
                writer.WriteInt(entry);
            }
            writer.WriteUShort((ushort)behaviors.Length);
            foreach (var entry in behaviors)
            {
                writer.WriteInt(entry);
            }
            writer.WriteUTF(name);
            writer.WriteInt(ownerId);
            writer.WriteDouble(experience);
            writer.WriteDouble(experienceForLevel);
            writer.WriteDouble(experienceForNextLevel);
            writer.WriteSByte(level);
            writer.WriteInt(maxPods);
            writer.WriteInt(stamina);
            writer.WriteInt(staminaMax);
            writer.WriteInt(maturity);
            writer.WriteInt(maturityForAdult);
            writer.WriteInt(energy);
            writer.WriteInt(energyMax);
            writer.WriteInt(serenity);
            writer.WriteInt(aggressivityMax);
            writer.WriteInt(serenityMax);
            writer.WriteInt(love);
            writer.WriteInt(loveMax);
            writer.WriteInt(fecondationTime);
            writer.WriteInt(boostLimiter);
            writer.WriteDouble(boostMax);
            writer.WriteInt(reproductionCount);
            writer.WriteInt(reproductionCountMax);
            writer.WriteUShort((ushort)effectList.Length);
            foreach (var entry in effectList)
            {
                entry.Serialize(writer);
            }
        }
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, hasRights);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, wasAlreadyConnected);
            writer.WriteByte(flag1);
            writer.WriteUTF(login);
            writer.WriteUTF(nickname);
            writer.WriteInt(accountId);
            writer.WriteSByte(communityId);
            writer.WriteUTF(secretQuestion);
            writer.WriteDouble(subscriptionEndDate);
            writer.WriteDouble(accountCreation);
        }
Esempio n. 6
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(subAreaId);
     writer.WriteDouble(fightId);
     writer.WriteShort(attacker.TypeId);
     attacker.Serialize(writer);
 }
Esempio n. 7
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(subAreaId);
     writer.WriteDouble(fightId);
     writer.WriteInt(fighterId1);
     writer.WriteInt(fighterId2);
 }
Esempio n. 8
0
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag = new byte();

            BooleanByteWrapper.SetFlag(0, flag, m_hasRights);
            BooleanByteWrapper.SetFlag(1, flag, m_wasAlreadyConnected);
            writer.WriteByte(flag);
            writer.WriteUTF(m_login);
            writer.WriteUTF(m_nickname);
            writer.WriteInt(m_accountId);
            writer.WriteByte(m_communityId);
            writer.WriteUTF(m_secretQuestion);
            writer.WriteDouble(m_accountCreation);
            writer.WriteDouble(m_subscriptionElapsedDuration);
            writer.WriteDouble(m_subscriptionEndDate);
        }
Esempio n. 9
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteSByte(delayTypeId);
     writer.WriteDouble(delayEndTime);
     writer.WriteShort(objectGID);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(mountUid);
     writer.WriteSByte(mountLocation);
     writer.WriteInt(mountFoodUid);
     writer.WriteInt(quantity);
 }
Esempio n. 11
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort((ushort)alliances.Length);
     foreach (var entry in alliances)
     {
         entry.Serialize(writer);
     }
     writer.WriteUShort((ushort)allianceNbMembers.Length);
     foreach (var entry in allianceNbMembers)
     {
         writer.WriteVarShort(entry);
     }
     writer.WriteUShort((ushort)allianceRoundWeigth.Length);
     foreach (var entry in allianceRoundWeigth)
     {
         writer.WriteVarInt(entry);
     }
     writer.WriteUShort((ushort)allianceMatchScore.Length);
     foreach (var entry in allianceMatchScore)
     {
         writer.WriteSByte(entry);
     }
     allianceMapWinner.Serialize(writer);
     writer.WriteVarInt(allianceMapWinnerScore);
     writer.WriteVarInt(allianceMapMyAllianceScore);
     writer.WriteDouble(nextTickTime);
 }
Esempio n. 12
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(mountId);
     writer.WriteDouble(date);
     writer.WriteShort(modelId);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(kamas);
     writer.WriteDouble(experience);
     writer.WriteInt(pods);
     writer.WriteInt(itemsValue);
 }
Esempio n. 14
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteVarUhShort(m_ObjectId);
     writer.WriteByte(m_status);
     writer.WriteByte(m_completion);
     writer.WriteBoolean(m_isSelectable);
     writer.WriteByte(m_charactersCount);
     writer.WriteDouble(m_date);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(fightId);
     writer.WriteUShort((ushort)playerInfo.Length);
     foreach (var entry in playerInfo)
     {
         entry.Serialize(writer);
     }
 }
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort(id);
     writer.WriteSByte(status);
     writer.WriteSByte(completion);
     writer.WriteBoolean(isSelectable);
     writer.WriteSByte(charactersCount);
     writer.WriteDouble(date);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(rideId);
     writer.WriteUShort((ushort)boostToUpdateList.Length);
     foreach (var entry in boostToUpdateList)
     {
         writer.WriteShort(entry.TypeId);
         entry.Serialize(writer);
     }
 }
Esempio n. 18
0
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(id);
     writer.WriteVarInt(model);
     writer.WriteUShort((ushort)ancestor.Length);
     foreach (var entry in ancestor)
     {
         writer.WriteInt(entry);
     }
     writer.WriteUShort((ushort)behaviors.Length);
     foreach (var entry in behaviors)
     {
         writer.WriteInt(entry);
     }
     writer.WriteUTF(name);
     writer.WriteInt(ownerId);
     writer.WriteVarLong(experience);
     writer.WriteVarLong(experienceForLevel);
     writer.WriteDouble(experienceForNextLevel);
     writer.WriteSByte(level);
     writer.WriteVarInt(maxPods);
     writer.WriteVarInt(stamina);
     writer.WriteVarInt(staminaMax);
     writer.WriteVarInt(maturity);
     writer.WriteVarInt(maturityForAdult);
     writer.WriteVarInt(energy);
     writer.WriteVarInt(energyMax);
     writer.WriteInt(serenity);
     writer.WriteInt(aggressivityMax);
     writer.WriteVarInt(serenityMax);
     writer.WriteVarInt(love);
     writer.WriteVarInt(loveMax);
     writer.WriteInt(fecondationTime);
     writer.WriteInt(boostLimiter);
     writer.WriteDouble(boostMax);
     writer.WriteInt(reproductionCount);
     writer.WriteVarInt(reproductionCountMax);
     writer.WriteUShort((ushort)effectList.Length);
     foreach (var entry in effectList)
     {
         entry.Serialize(writer);
     }
 }
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteVarLong(experience);
     writer.WriteVarLong(experienceLevelFloor);
     writer.WriteDouble(experienceNextLevelFloor);
     writer.WriteVarInt(experienceFightDelta);
     writer.WriteVarInt(experienceForGuild);
     writer.WriteVarInt(experienceForMount);
     writer.WriteSByte(rerollExperienceMul);
 }
Esempio n. 20
0
        public override void Serialize(BigEndianWriter writer)
        {
            base.Serialize(writer);
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, showExperience);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, showExperienceLevelFloor);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 2, showExperienceNextLevelFloor);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 3, showExperienceFightDelta);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 4, showExperienceForGuild);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 5, showExperienceForMount);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 6, isIncarnationExperience);
            writer.WriteByte(flag1);
            writer.WriteDouble(experience);
            writer.WriteDouble(experienceLevelFloor);
            writer.WriteDouble(experienceNextLevelFloor);
            writer.WriteInt(experienceFightDelta);
            writer.WriteInt(experienceForGuild);
            writer.WriteInt(experienceForMount);
            writer.WriteInt(rerollExperienceMul);
        }
Esempio n. 21
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(maxPods);
     writer.WriteShort(prospecting);
     writer.WriteShort(wisdom);
     writer.WriteSByte(taxCollectorsCount);
     writer.WriteInt(taxCollectorAttack);
     writer.WriteInt(kamas);
     writer.WriteDouble(experience);
     writer.WriteInt(pods);
     writer.WriteInt(itemsValue);
 }
Esempio n. 22
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteUTF(collectorName);
     writer.WriteShort(worldX);
     writer.WriteShort(worldY);
     writer.WriteInt(mapId);
     writer.WriteShort(subAreaId);
     writer.WriteUTF(userName);
     writer.WriteDouble(experience);
     writer.WriteUShort((ushort)objectsInfos.Length);
     foreach (var entry in objectsInfos)
     {
         entry.Serialize(writer);
     }
 }
Esempio n. 23
0
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, autoconnect);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, useCertificate);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 2, useLoginToken);
            writer.WriteByte(flag1);
            version.Serialize(writer);
            writer.WriteUTF(lang);
            writer.WriteVarInt(credentials.Length);
            foreach (var entry in credentials)
            {
                writer.WriteSByte(entry);
            }
            writer.WriteShort(serverId);
            writer.WriteDouble(sessionOptionalSalt);
        }
Esempio n. 24
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteSByte(breed);
     writer.WriteBoolean(sex);
     writer.WriteShort(rank);
     writer.WriteDouble(givenExperience);
     writer.WriteSByte(experienceGivenPercent);
     writer.WriteUInt(rights);
     writer.WriteSByte(connected);
     writer.WriteSByte(alignmentSide);
     writer.WriteUShort(hoursSinceLastConnection);
     writer.WriteSByte(moodSmileyId);
     writer.WriteInt(accountId);
     writer.WriteInt(achievementPoints);
     writer.WriteShort(status.TypeId);
     status.Serialize(writer);
 }
Esempio n. 25
0
        private static void _writeMethod(string write_method, dynamic value, ref BigEndianWriter writer)
        {
            switch (write_method)
            {
            case "WriteByte": writer.WriteByte((byte)value); return;

            case "WriteUnsignedByte": writer.WriteUnsignedByte((sbyte)value); return;

            case "WriteShort": writer.WriteShort((short)value); return;

            case "WriteUnsignedShort": writer.WriteUnsignedShort((ushort)value); return;

            case "WriteVarShort": writer.WriteVarShort((short)value); return;

            case "WriteVarUhShort": writer.WriteVarUhShort((ushort)value); return;

            case "WriteInt": writer.WriteInt((int)value); return;

            case "WriteUnsignedInt": writer.WriteUnsignedInt((uint)value); return;

            case "WriteVarInt": writer.WriteVarInt((int)value); return;

            case "WriteVarUhInt": writer.WriteVarUhInt((uint)value); return;

            case "WriteLong": writer.WriteLong(value); return;

            case "WriteUnsignedLong": writer.WriteUnsignedLong(value); return;

            case "WriteVarLong": writer.WriteVarLong(value); return;

            case "WriteVarUhLong": writer.WriteVarUhLong(value); return;

            case "WriteUTF": writer.WriteUTF(value); return;

            case "WriteDouble": writer.WriteDouble((double)value); return;

            case "WriteFloat": writer.WriteFloat((float)value); return;

            case "WriteBoolean": writer.WriteBoolean(value); return;

            default:
                throw new NotImplementedException($"Method : '{write_method}' is not implemented");
            }
        }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(id);
     writer.WriteDouble(time);
 }
Esempio n. 27
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteByte(emoteId);
     writer.WriteDouble(emoteStartTime);
 }
Esempio n. 28
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteDouble(mountId);
 }
 public void WriteAmf0Object(Amf0Object obj)
 {
     bw.WriteMapleString(obj.name);
     if (obj.data == null)
     {
         bw.WriteByte(5);
     }
     else if (obj.data is List <Amf0Object> )
     {
         if (obj.type == Amf0Object.Amf0Type.AMF0_ECMA_ARRAY)
         {
             bw.WriteByte((byte)obj.type);
             var list = obj.data as List <Amf0Object>;
             bw.WriteInt(list.Count);
             int counter = 0;
             foreach (var lobj in list)
             {
                 if (lobj.name == null)
                 {
                     lobj.name = counter++.ToString(Program.Culture);
                 }
                 WriteAmf0Object(lobj);
             }
             bw.WriteShort(0);
             bw.WriteByte(9);
         }
         else                //OBJECT
         {
             obj.type = Amf0Object.Amf0Type.AMF0_OBJECT;
             bw.WriteByte((byte)obj.type);
             var list    = obj.data as List <Amf0Object>;
             int counter = 0;
             foreach (var lobj in list)
             {
                 if (lobj.name == null)
                 {
                     lobj.name = counter++.ToString(Program.Culture);
                 }
                 WriteAmf0Object(lobj);
             }
             bw.WriteShort(0);
             bw.WriteByte(9);
         }
     }
     else if (obj.data is int || obj.data is double || obj.data is float)
     {
         if (!(obj.data is double))
         {
             var data = Convert.ToDouble(obj.data);
             obj.data = data;
         }
         obj.type = Amf0Object.Amf0Type.AMF0_NUMBER;
         bw.WriteByte((byte)obj.type);
         bw.WriteDouble((double)obj.data);
     }
     else if (obj.data is string)
     {
         obj.type = Amf0Object.Amf0Type.AMF0_STRING;
         bw.WriteByte((byte)obj.type);
         bw.WriteMapleString((string)obj.data);
     }
     else if (obj.data is bool)
     {
         bw.WriteByte((byte)Amf0Object.Amf0Type.AMF0_BOOLEAN);
         bw.WriteByte(Convert.ToByte(obj.data));
     }
     else
     {
         throw new Exception("Unable to write type to sol file");
     }
 }
Esempio n. 30
0
 private static void WriteFieldDouble(BigEndianWriter writer, double value)
 {
     writer.WriteDouble(value);
 }