Beispiel #1
0
 public BuyTrapCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     TrapId   = br.ReadInt32WithEndian();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Beispiel #2
0
 public MoveBuildingCommand(CoCSharpPacketReader br)
 {
     X          = br.ReadInt32WithEndian();
     Y          = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1   = br.ReadUInt32WithEndian();
 }
Beispiel #3
0
 public PlaceAttackerCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     Unit     = (CharacterData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Beispiel #4
0
 public BuyBuildingCommand(CoCSharpPacketReader br)
 {
     X          = br.ReadInt32WithEndian();
     Y          = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Beispiel #5
0
 public CastSpellCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     Spell    = (SpellData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Beispiel #6
0
 public TrainUnitCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
     UnitType   = br.ReadInt32WithEndian();
     Count      = br.ReadInt32WithEndian();
     Unknown3   = br.ReadUInt32WithEndian();
     br.ReadInt32WithEndian();
 }
Beispiel #7
0
 public CancelUnitProductionCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1   = br.ReadUInt32WithEndian();
     UnitType   = br.ReadInt32WithEndian();
     Count      = br.ReadInt32WithEndian();
     Unknown3   = br.ReadUInt32WithEndian();
     Unknown4   = br.ReadUInt32WithEndian();
 }
Beispiel #8
0
 public BoostBuildingCommand(CoCSharpPacketReader br)
 {
     BuildingIds           = new List <int>();
     BoostedBuildingsCount = br.ReadInt32WithEndian();
     for (var i = 0; i < BoostedBuildingsCount; i++)
     {
         BuildingIds.Add(br.ReadInt32WithEndian());
     }
 }
Beispiel #9
0
        public UpgradeMultipleBuildingsCommand(CoCSharpPacketReader br)
        {
            m_vIsAltResource  = br.ReadByte();
            m_vBuildingIdList = new List <int>();
            var buildingCount = br.ReadInt32WithEndian();

            for (var i = 0; i < buildingCount; i++)
            {
                var buildingId = br.ReadInt32WithEndian();
                m_vBuildingIdList.Add(buildingId);
            }
            br.ReadInt32WithEndian();
        }
Beispiel #10
0
 public override void Decode()
 {
     using (CoCSharpPacketReader br = new CoCSharpPacketReader(new MemoryStream(GetData())))
     {
         m_vAllianceName        = br.ReadString();
         m_vAllianceDescription = br.ReadString();
         m_vAllianceBadgeData   = br.ReadInt32WithEndian();
         m_vAllianceType        = br.ReadInt32WithEndian();
         m_vRequiredScore       = br.ReadInt32WithEndian();
         m_vWarFrequency        = br.ReadInt32WithEndian();
         m_vAllianceOrigin      = br.ReadInt32WithEndian();
         m_vWarLogPublic        = br.ReadByte();
     }
 }
Beispiel #11
0
        public MoveMultipleBuildingsCommand(CoCSharpPacketReader br)
        {
            m_vBuildingsToMove = new List <BuildingToMove>();
            var buildingCount = br.ReadInt32WithEndian();

            for (var i = 0; i < buildingCount; i++)
            {
                var buildingToMove = new BuildingToMove();
                buildingToMove.X            = br.ReadInt32WithEndian();
                buildingToMove.Y            = br.ReadInt32WithEndian();
                buildingToMove.GameObjectId = br.ReadInt32WithEndian();
                m_vBuildingsToMove.Add(buildingToMove);
            }
            br.ReadInt32WithEndian();
        }
Beispiel #12
0
 public UpgradeUnitCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
     UnitData   = (CombatItemData)br.ReadDataReference();
     Unknown2   = br.ReadUInt32WithEndian();
 }
Beispiel #13
0
 public virtual void Decode(byte[] baseData)
 {
     using (var br = new CoCSharpPacketReader(new MemoryStream(baseData)))
     {
         m_vUnknown1 = br.ReadInt32WithEndian();
     }
 }
 public KickAllianceMemberCommand(CoCSharpPacketReader br)
 {
     m_vAvatarId = br.ReadInt64WithEndian();
     br.ReadByte();
     m_vMessage = br.ReadScString();
     br.ReadInt32WithEndian();
 }
 public override void Decode()
 {
     using (var br = new CoCSharpPacketReader(new MemoryStream(GetData())))
     {
         m_vId   = br.ReadInt64WithEndian();
         m_vRole = br.ReadInt32WithEndian();
     }
 }
Beispiel #16
0
        public RemoveUnitsCommand(CoCSharpPacketReader br)
        {
            Unknown1       = br.ReadUInt32WithEndian();
            UnitTypesCount = br.ReadInt32WithEndian();

            UnitsToRemove = new List <UnitToRemove>();
            for (var i = 0; i < UnitTypesCount; i++)
            {
                var unit  = (CharacterData)br.ReadDataReference();
                var count = br.ReadInt32WithEndian();
                var level = br.ReadInt32WithEndian();
                UnitsToRemove.Add(new UnitToRemove {
                    Data = unit, Count = count, Level = level
                });
            }

            Unknown2 = br.ReadUInt32WithEndian();
        }
Beispiel #17
0
        public BuyResourcesCommand(CoCSharpPacketReader br)
        {
            m_vResourceId        = br.ReadInt32WithEndian();
            m_vResourceCount     = br.ReadInt32WithEndian();
            m_vIsCommandEmbedded = br.ReadBoolean();
            if (m_vIsCommandEmbedded)
            {
                Depth++;

                if (Depth >= MaxEmbeddedDepth)
                {
                    throw new ArgumentException(
                              "A command contained embedded command depth was greater than max embedded commands.");
                }
                m_vCommand = CommandFactory.Read(br);
            }
            Unknown1 = br.ReadInt32WithEndian();
        }
Beispiel #18
0
 public FreeWorkerCommand(CoCSharpPacketReader br)
 {
     m_vTimeLeftSeconds   = br.ReadInt32WithEndian();
     m_vIsCommandEmbedded = br.ReadBoolean();
     if (m_vIsCommandEmbedded)
     {
         Depth++;
         if (Depth >= MaxEmbeddedDepth)
         {
             throw new ArgumentException(
                       "A command contained embedded command depth was greater than max embedded commands.");
         }
         m_vCommand = CommandFactory.Read(br);
     }
 }
Beispiel #19
0
 public UpgradeBuildingCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown2   = br.ReadByte();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Beispiel #20
0
 public SpeedUpHeroUpgradeCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     m_vUnknown1   = br.ReadInt32WithEndian();
 }
Beispiel #21
0
 public SendAllianceMailCommand(CoCSharpPacketReader br)
 {
     m_vMailContent = br.ReadScString();
     br.ReadInt32WithEndian();
 }
 public ClaimAchievementRewardCommand(CoCSharpPacketReader br)
 {
     AchievementId = br.ReadInt32WithEndian();
     Unknown1      = br.ReadUInt32WithEndian();
 }
Beispiel #23
0
 public SellBuildingCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadUInt32WithEndian();
 }
 public SpeedUpUpgradeUnitCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
 }
Beispiel #25
0
 public UnlockBuildingCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Beispiel #26
0
 public SpeedUpTrainingCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
 }
 public SearchOpponentCommand(CoCSharpPacketReader br)
 {
     br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
 }
Beispiel #28
0
 public CollectResourcesCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1   = br.ReadUInt32WithEndian();
 }
 public SpeedUpConstructionCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
 }
Beispiel #30
0
 public CancelHeroUpgradeCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadInt32WithEndian();
 }