Esempio n. 1
0
        private PlayerItem(string key, string name, string description, string[] keywords, int weight, int value, Wearlocation wearLocation,
                           int hpBonus, int armorBonus, int strengthBonus, int dexterityBonus, int constitutionBonus, int intelligenceBonus, int wisdomBonus,
                           int charismaBonus, int luckBonus, bool canPull)
        {
            try
            {
                _guid = new Guid(key);
            }
            catch
            {
                _guid = Guid.NewGuid(); // item is being mapped for the first time
                Server.Current.Log(string.Format("item created KEY: {0} NAME: {1}", _guid, name));
            }

            Name              = name;
            Description       = description;
            Keywords          = keywords;
            Weight            = weight;
            Value             = value;
            WearLocation      = wearLocation;
            CanPull           = canPull;
            HpBonus           = hpBonus;
            ArmorBonus        = armorBonus;
            StrengthBonus     = strengthBonus;
            DexterityBonus    = dexterityBonus;
            ConstitutionBonus = constitutionBonus;
            IntelligenceBonus = intelligenceBonus;
            WisdomBonus       = wisdomBonus;
            CharismaBonus     = charismaBonus;
            LuckBonus         = luckBonus;
        }
Esempio n. 2
0
        public static string GetWearLocation(Wearlocation loc)
        {
            switch (loc)
            {
            case Wearlocation.Arms:
                return("Arms");

            case Wearlocation.BothHands:
                return("Both Hands");

            case Wearlocation.Container:
                return("Container");

            case Wearlocation.Feet:
                return("Feet");

            case Wearlocation.Head:
                return("Head");

            case Wearlocation.Key:
                return("Key");

            case Wearlocation.LeftHand:
                return("Left Hand");

            case Wearlocation.Legs:
                return("Legs");

            case Wearlocation.None:
                return("None");

            case Wearlocation.RightHand:
                return("Right Hand");

            case Wearlocation.Shoulders:
                return("Shoulders");

            case Wearlocation.Torso:
                return("Torso");

            case Wearlocation.Waist:
                return("Waist");

            default:
                return(string.Empty);
            }
        }