Пример #1
0
        public override void OnDoubleClick(Mobile m)
        {
            if (IsChildOf(m.Backpack))
            {
                VvVBattle battle = ViceVsVirtueSystem.Instance.Battle;

                if (!ViceVsVirtueSystem.IsVvV(m))
                {
                    m.SendLocalizedMessage(1155496); // This item can only be used by VvV participants!
                }
                else if (battle == null || !battle.OnGoing || !battle.IsInActiveBattle(m))
                {
                    m.SendLocalizedMessage(1155406); // This item can only be used in an active VvV battle region!
                }
                else if (battle.TurretCount > VvVBattle.MaxTurrets)
                {
                    m.SendLocalizedMessage(1155502); // The turret limit for this battle has been reached!
                }
                else
                {
                    CannonTurret t = new CannonTurret(m);
                    t.MoveToWorld(m.Location, m.Map);

                    battle.Turrets.Add(t);

                    Delete();
                }
            }
        }
Пример #2
0
 public void AddCannonTurret(CannonTurret turret)
 {
     if (!Turrets.Contains(turret))
     {
         Turrets.Add(turret);
     }
 }
Пример #3
0
            public CannonBase(CannonTurret turret)
                : base(1822, 1822)
            {
                Level  = ItemLevel.Hard;
                Turret = turret;

                Name = "a cannon turret";
            }