Beispiel #1
0
        public override bool CanEquip(Mobile from)
        {
            if (!Ethic.CheckEquip(from, this))
            {
                return(false);
            }
            else if (!from.CanBeginAction(typeof(BaseWeapon)))
            {
                return(false);
            }

            return(base.CanEquip(from));
        }
Beispiel #2
0
        public override bool CanEquip(Mobile from)
        {
            if (!Ethic.CheckEquip(from, this))
            {
                return(false);
            }
            else if (!from.CanBeginAction(typeof(BaseWeapon)))
            {
                return(false);
            }
            else if (_Owner != null && _Owner != from)
            {
                from.SendLocalizedMessage(501023); // You must be the owner to use this item.
                return(false);
            }
            else if (IsVvVItem && !Engines.VvV.ViceVsVirtueSystem.IsVvV(from))
            {
                from.SendLocalizedMessage(1155496); // This item can only be used by VvV participants!
                return(false);
            }

            return(base.CanEquip(from));
        }
Beispiel #3
0
        public override bool CanEquip(Mobile from)
        {
            if (!Ethic.CheckEquip(from, this))
            {
                return(false);
            }

            if (Amount > 1)
            {
                from.SendAsciiMessage("You can only equip one clothing at a time");
                return(false);
            }

            if (DonationItem)
            {
                if (Owner == null)
                {
                    Owner = from;
                }
                else if (Owner != from && (LootType == LootType.Blessed || LootType == LootType.Newbied))
                {
                    from.SendAsciiMessage("This is not your clothing");
                    return(false);
                }

                /*
                 * if (Owner != from)
                 * {
                 *  from.SendAsciiMessage("This is not your clothing");
                 *  return false;
                 * }*/
            }

            /*
             *          if( from.AccessLevel < AccessLevel.GameMaster )
             *          {
             *                  if( RequiredRace != null && from.Race != RequiredRace )
             *                  {
             *                          if( RequiredRace == Race.Elf )
             *                                  from.SendLocalizedMessage( 1072203 ); // Only Elves may use this.
             *                          else
             *                                  from.SendMessage( "Only {0} may use this.", RequiredRace.PluralName );
             *
             *                          return false;
             *                  }
             *                  else if( !AllowMaleWearer && !from.Female )
             *                  {
             *                          if( AllowFemaleWearer )
             *                                  from.SendLocalizedMessage( 1010388 ); // Only females can wear this.
             *                          else
             *                                  from.SendMessage( "You may not wear this." );
             *
             *                          return false;
             *                  }
             *                  else if( !AllowFemaleWearer && from.Female )
             *                  {
             *                          if( AllowMaleWearer )
             *                                  from.SendLocalizedMessage( 1063343 ); // Only males can wear this.
             *                          else
             *                                  from.SendMessage( "You may not wear this." );
             *
             *                          return false;
             *                  }
             *                  else
             *                  {
             *                          int strBonus = ComputeStatBonus( StatType.Str );
             *                          int strReq = ComputeStatReq( StatType.Str );
             *
             *                          if( from.Str < strReq || (from.Str + strBonus) < 1 )
             *                          {
             *                                  from.SendLocalizedMessage( 500213 ); // You are not strong enough to equip that.
             *                                  return false;
             *                          }
             *                  }
             *          }
             */

            return(true);       // return base.CanEquip(from);
        }