예제 #1
0
        public override void setMinionStats(Minion minion)
        {
            // Same for all minions
            minion.getStats().setMovementSpeed(325.0f);
            minion.getStats().setBaseAttackSpeed(0.625f);
            minion.getStats().setAttackSpeedMultiplier(1.0f);

            switch (minion.getType())
            {
                case MinionSpawnType.MINION_TYPE_MELEE:
                    minion.getStats().setCurrentHealth(475.0f + ((20.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setMaxHealth(475.0f + ((20.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setBaseAd(12.0f + ((1.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setRange(180.0f);
                    minion.getStats().setBaseAttackSpeed(1.250f);
                    minion.setAutoAttackDelay(11.8f / 30.0f);
                    minion.setMelee(true);
                    break;
                case MinionSpawnType.MINION_TYPE_CASTER:
                    minion.getStats().setCurrentHealth(279.0f + ((7.5f) * (int)(gameTime / (float)(90 * 1000))));
                    minion.getStats().setMaxHealth(279.0f + ((7.5f) * (int)(gameTime / (float)(90 * 1000))));
                    minion.getStats().setBaseAd(23.0f + ((1.0f) * (int)(gameTime / (float)(90 * 1000))));
                    minion.getStats().setRange(600.0f);
                    minion.getStats().setBaseAttackSpeed(0.670f);
                    minion.setAutoAttackDelay(14.1f / 30.0f);
                    minion.setAutoAttackProjectileSpeed(650.0f);
                    break;
                case MinionSpawnType.MINION_TYPE_CANNON:
                    minion.getStats().setCurrentHealth(700.0f + ((27.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setMaxHealth(700.0f + ((27.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setBaseAd(40.0f + ((3.0f) * (int)(gameTime / (float)(180 * 1000))));
                    minion.getStats().setRange(450.0f);
                    minion.getStats().setBaseAttackSpeed(1.0f);
                    minion.setAutoAttackDelay(9.0f / 30.0f);
                    minion.setAutoAttackProjectileSpeed(1200.0f);
                    break;
            }
        }
예제 #2
0
        public MinionSpawn(Minion m) : base(PacketCmdS2C.PKT_S2C_ObjectSpawn, m.getNetId())
        {
            buffer.Write((int)0x00150017); // unk
            buffer.Write((byte)0x03); // SpawnType - 3 = minion
            buffer.Write((int)m.getNetId());
            buffer.Write((int)m.getNetId());
            buffer.Write((int)m.getSpawnPosition());
            buffer.Write((byte)0xFF); // unk
            buffer.Write((byte)1); // wave number ?

            buffer.Write((byte)m.getType());

            if (m.getType() == MinionSpawnType.MINION_TYPE_MELEE)
            {
                buffer.Write((byte)0); // unk
            }
            else {
                buffer.Write((byte)1); // unk
            }

            buffer.Write((byte)0); // unk

            if (m.getType() == MinionSpawnType.MINION_TYPE_CASTER)
            {
                buffer.Write((int)0x00010007); // unk
            }
            else if (m.getType() == MinionSpawnType.MINION_TYPE_MELEE)
            {
                buffer.Write((int)0x0001000A); // unk
            }
            else if (m.getType() == MinionSpawnType.MINION_TYPE_CANNON)
            {
                buffer.Write((int)0x0001000D);
            }
            else {
                buffer.Write((int)0x00010007); // unk
            }
            buffer.Write((int)0x00000000); // unk
            buffer.Write((int)0x00000000); // unk
            buffer.Write((short)0x0000); // unk
            buffer.Write((float)1.0f); // unk
            buffer.Write((int)0x00000000); // unk
            buffer.Write((int)0x00000000); // unk
            buffer.Write((int)0x00000000); // unk
            buffer.Write((short)0x0200); // unk
            buffer.Write((int)Environment.TickCount); // unk

            List<Vector2> waypoints = m.getWaypoints();

            buffer.Write((byte)((waypoints.Count - m.getCurWaypoint() + 1) * 2)); // coordCount
            buffer.Write((int)m.getNetId());
            buffer.Write((byte)0); // movement mask
            buffer.Write((short)MovementVector.targetXToNormalFormat(m.getX()));
            buffer.Write((short)MovementVector.targetYToNormalFormat(m.getY()));
            for (int i = m.getCurWaypoint(); i < waypoints.Count; ++i)
            {
                buffer.Write((short)MovementVector.targetXToNormalFormat(waypoints[i].X));
                buffer.Write((short)MovementVector.targetXToNormalFormat(waypoints[i].Y));
            }
        }