コード例 #1
0
        public static void Band_OnCommand(CommandEventArgs e)
        {
            Bandage m_Bandage = (Bandage)e.Mobile.Backpack.FindItemByType(typeof(Bandage));

            if (m_Bandage == null)
            {
                e.Mobile.SendMessage("Vous ne possédez pas de bandages.");
                return;
            }

            m_Bandage.OnDoubleClick(e.Mobile);
        }
コード例 #2
0
        public static void Band_OnCommand(CommandEventArgs e)
        {
            Bandage m_Bandage = (Bandage)e.Mobile.Backpack.FindItemByType(typeof(Bandage));

            int m_Exists = e.Mobile.Backpack.GetAmount(typeof(Bandage));

            if (m_Exists == 0)
            {
                e.Mobile.SendMessage("Cannot find bandage");
            }
            else
            {
                e.Mobile.SendMessage("Bandage found");
                m_Bandage.OnDoubleClick(e.Mobile);
            }
        }