Exemple #1
0
 public UpgradeUnitCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
     UnitData   = (CombatItemData)br.ReadDataReference();
     Unknown2   = br.ReadUInt32WithEndian();
 }
Exemple #2
0
 public DonateAllianceUnitCommand(CoCSharpPacketReader br)
 {
     Unknown1 = br.ReadUInt32WithEndian();
     PlayerId = br.ReadUInt32WithEndian();
     UnitType = br.ReadUInt32WithEndian();
     Unknown2 = br.ReadUInt32WithEndian();
     Unknown3 = br.ReadUInt32WithEndian();
 }
Exemple #3
0
 public TrainUnitCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
     UnitType   = br.ReadInt32WithEndian();
     Count      = br.ReadInt32WithEndian();
     Unknown3   = br.ReadUInt32WithEndian();
     br.ReadInt32WithEndian();
 }
Exemple #4
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();
 }
        public override void Decode()
        {
            using (var br = new CoCSharpPacketReader(new MemoryStream(GetData())))
            {
                Subtick          = br.ReadUInt32WithEndian();
                Checksum         = br.ReadUInt32WithEndian();
                NumberOfCommands = br.ReadUInt32WithEndian();

                if (NumberOfCommands > 0 && NumberOfCommands < 20)
                {
                    NestedCommands = br.ReadBytes(GetLength());
                }
            }
        }
Exemple #6
0
 public BuyTrapCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     TrapId   = br.ReadInt32WithEndian();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Exemple #7
0
 public PlaceAttackerCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     Unit     = (CharacterData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Exemple #8
0
 public MoveBuildingCommand(CoCSharpPacketReader br)
 {
     X          = br.ReadInt32WithEndian();
     Y          = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #9
0
 public BuyBuildingCommand(CoCSharpPacketReader br)
 {
     X          = br.ReadInt32WithEndian();
     Y          = br.ReadInt32WithEndian();
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #10
0
 public CastSpellCommand(CoCSharpPacketReader br)
 {
     X        = br.ReadInt32WithEndian();
     Y        = br.ReadInt32WithEndian();
     Spell    = (SpellData)br.ReadDataReference();
     Unknown1 = br.ReadUInt32WithEndian();
 }
Exemple #11
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();
        }
Exemple #12
0
        public static object Read(CoCSharpPacketReader br)
        {
            var cm = br.ReadUInt32WithEndian();

            if (m_vCommands.ContainsKey(cm))
            {
                _Logger.Print("[UCS]    Processing " + m_vCommands[cm], Types.INFO);
                return(Activator.CreateInstance(m_vCommands[cm], br));
            }
            _Logger.Print("\t The command '" + cm + "' has been ignored", Types.INFO);
            return(null);
        }
Exemple #13
0
        public static object Read(CoCSharpPacketReader br)
        {
            var cm = br.ReadUInt32WithEndian();

            if (m_vCommands.ContainsKey(cm))
            {
                //Console.WriteLine("[UCS]    Processing " + m_vCommands[cm]);
                return(Activator.CreateInstance(m_vCommands[cm], br));
            }
            //Console.WriteLine("\t The command '" + cm + "' has been ignored");
            return(null);
        }
 public RequestAllianceUnitsCommand(CoCSharpPacketReader br)
 {
     Unknown1 = br.ReadUInt32WithEndian();
     FlagHasRequestMessage = br.ReadByte();
     if (FlagHasRequestMessage == 0x01)
     {
         Message = br.ReadScString();
     }
     else
     {
         Message = "I need reinforcements !";
     }
 }
 public CancelConstructionCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
 public CollectResourcesCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian(); //buildingId - 0x1DCD6500;
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #17
0
 public UpgradeBuildingCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown2   = br.ReadByte();
     Unknown1   = br.ReadUInt32WithEndian();
 }
 public ClaimAchievementRewardCommand(CoCSharpPacketReader br)
 {
     AchievementId = br.ReadInt32WithEndian();
     Unknown1      = br.ReadUInt32WithEndian();
 }
Exemple #19
0
 public ClearObstacleCommand(CoCSharpPacketReader br)
 {
     ObstacleId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #20
0
 public UnlockBuildingCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadInt32WithEndian();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #21
0
 public SellBuildingCommand(CoCSharpPacketReader br)
 {
     m_vBuildingId = br.ReadInt32WithEndian();
     br.ReadUInt32WithEndian();
 }
Exemple #22
0
 public ToggleHeroSleepCommand(CoCSharpPacketReader br)
 {
     BuildingId = br.ReadUInt32WithEndian(); //buildingId - 0x1DCD6500;
     FlagSleep  = br.ReadByte();
     Unknown1   = br.ReadUInt32WithEndian();
 }
Exemple #23
0
 public LoadTurretCommand(CoCSharpPacketReader br)
 {
     m_vUnknown1   = br.ReadUInt32WithEndian();
     m_vBuildingId = br.ReadInt32WithEndian();
     m_vUnknown2   = br.ReadUInt32WithEndian();
 }
Exemple #24
0
 public BuyShieldCommand(CoCSharpPacketReader br)
 {
     ShieldId = br.ReadInt32WithEndian(); //= shieldId - 0x01312D00;
     Unknown1 = br.ReadUInt32WithEndian();
 }