示例#1
0
        private void MapBullet(Bullet b)
        {
            if (!BulletMap.ContainsKey(b.OwnerID))
                BulletMap[b.OwnerID] = new List<Bullet>();

            BulletMap[b.OwnerID].Add(b);
        }
示例#2
0
        private int PredictDamage(Bullet b)
        {
            int def = client.PlayerData.Defense;

            if (EnemyTypeMap.ContainsKey(b.OwnerID) && Bullet.IsArmorBreaking(EnemyTypeMap[b.OwnerID], b.ProjectileID) && !ArmorBroken) {
                ArmorBroken = true;

                if (Config.Default.Debug)
                    PluginUtils.Log("Auto Nexus", "{0}'s armor is broken!", client.PlayerData.Name);
            }

            if (Armored) def *= 2;

            if (ArmorBroken || (EnemyTypeMap.ContainsKey(b.OwnerID) && Bullet.IsPiercing(EnemyTypeMap[b.OwnerID], b.ProjectileID)))
                def = 0;

            return Math.Max(Math.Max(b.Damage - def, 0), (int)(0.15f * b.Damage));
        }
示例#3
0
 public void EnemyShoot(EnemyShootPacket eshoot)
 {
     for (int i = 0; i < eshoot.NumShots; i++) {
         Bullet b = new Bullet {
             OwnerID = eshoot.OwnerId,
             ID = eshoot.BulletId + i,
             ProjectileID = eshoot.BulletType,
             Damage = eshoot.Damage
         };
         MapBullet(b);
     }
 }