Ejemplo n.º 1
0
        public void OnModuleEquip()
        {
            NWPlayer oPC        = NWPlayer.Wrap(_.GetPCItemLastEquippedBy());
            NWItem   oItem      = NWItem.Wrap(_.GetPCItemLastEquipped());
            float    durability = GetDurability(oItem);

            if (durability <= 0 && durability != -1)
            {
                oPC.AssignCommand(() =>
                {
                    _.ClearAllActions();
                    _.ActionUnequipItem(oItem.Object);
                });

                oPC.FloatingText(_color.Red("That item is broken and must be repaired before you can use it."));
            }
        }