public override void ItemRightClick(ItemSlotTrading p_slot)
 {
     SelectItemSlot(p_slot);
     if (m_identifyScreen != null)
     {
         if (m_currentMode == EMode.IDENTIFY && ((Equipment)p_slot.Item).Identified)
         {
             return;
         }
         if (m_currentMode == EMode.REPAIR && !((Equipment)p_slot.Item).Broken)
         {
             return;
         }
         m_identifyScreen.OnSingleItemButtonClicked(null);
     }
 }
 public override void SelectItemSlot(ItemSlotTrading p_slot)
 {
     if (m_selectedItem != null)
     {
         m_selectedItem.SetSelected(false);
     }
     if (p_slot != null)
     {
         p_slot.SetSelected(true);
         m_selectedItem = p_slot;
         Boolean   flag      = CanBuyConditionsMet(p_slot.Item.Price, LegacyLogic.Instance.WorldManager.Party.Gold);
         Equipment equipment = (Equipment)p_slot.Item;
         if (m_buyButton != null)
         {
             if (m_currentMode == EMode.IDENTIFY)
             {
                 m_buyButton.isEnabled = (flag && !equipment.Identified);
                 m_buyButtonText.color = ((!flag || equipment.Identified) ? Color.gray : Color.white);
             }
             else
             {
                 m_buyButton.isEnabled = (flag && equipment.Broken);
                 m_buyButtonText.color = ((!flag || !equipment.Broken) ? Color.gray : Color.white);
             }
         }
     }
     else
     {
         m_selectedItem = null;
         if (m_buyButton != null)
         {
             m_buyButton.isEnabled = false;
             m_buyButtonText.color = Color.gray;
         }
     }
 }