Exemplo n.º 1
0
 /// <summary>
 /// Performs additional actions for projectiles.
 /// </summary>
 public void PerformProjectileAction()
 {
     switch (type)
     {
     //Medusa Ray projectile
     case 536:
         foreach (PvPPlayer pvper in PvPController.PvPers.Where(c => c != null))
         {
             if (OwnerProjectile.Index == pvper.Index)
             {
                 continue;
             }
             if (!pvper.TPlayer.hostile || pvper.Dead)
             {
                 continue;
             }
             if (Vector2.Distance(OwnerProjectile.TPlayer.position, pvper.TPlayer.position) <= 300)
             {
                 if (pvper.CheckMedusa())
                 {
                     pvper.DamagePlayer(OwnerProjectile, ItemOriginated, pvper.GetDamageDealt(OwnerProjectile, ItemOriginated, this), 0, PvPUtils.IsCrit(OwnerProjectile.GetCrit(ItemOriginated)));
                     pvper.SetBuff(Database.GetBuffInfo(DbConsts.ProjectileTable, 535, true));
                 }
             }
         }
         break;
     }
 }