public static void Postfix(InventoryGui __instance)
            {
                var player = Player.m_localPlayer;

                if (player == null)
                {
                    return;
                }

                if (QuickSlotGrid != null)
                {
                    var quickSlotInventory = player.GetQuickSlotInventory();
                    if (quickSlotInventory != null)
                    {
                        QuickSlotGrid.UpdateInventory(quickSlotInventory, player, __instance.m_dragItem);
                    }
                }

                if (EquipmentSlotGrid != null)
                {
                    var equipmentSlotInventory = player.GetEquipmentSlotInventory();
                    if (equipmentSlotInventory != null)
                    {
                        EquipmentSlotGrid.UpdateInventory(equipmentSlotInventory, player, __instance.m_dragItem);
                    }
                }
            }
Exemplo n.º 2
0
            public static bool Prefix(InventoryGui __instance, Player player)
            {
                player.m_inventory.Extended().CallBase = true;
                __instance.m_playerGrid.UpdateInventory(player.m_inventory, player, __instance.m_dragItem);
                player.m_inventory.Extended().CallBase = false;

                if (QuickSlotGrid != null)
                {
                    var quickSlotInventory = player.GetQuickSlotInventory();
                    if (quickSlotInventory != null)
                    {
                        QuickSlotGrid.UpdateInventory(quickSlotInventory, player, __instance.m_dragItem);
                    }
                }

                if (EquipmentSlotGrid != null)
                {
                    var equipmentSlotInventory = player.GetEquipmentSlotInventory();
                    if (equipmentSlotInventory != null)
                    {
                        EquipmentSlotGrid.UpdateInventory(equipmentSlotInventory, player, __instance.m_dragItem);
                    }
                }

                return(false);
            }
Exemplo n.º 3
0
            public static bool Prefix(InventoryGui __instance, Player player)
            {
                player.m_inventory.Extended().CallBase = true;
                __instance.m_playerGrid.UpdateInventory(player.m_inventory, player, __instance.m_dragItem);
                player.m_inventory.Extended().CallBase = false;

                if (QuickSlotGrid != null)
                {
                    var quickSlotInventory = player.GetQuickSlotInventory();
                    if (quickSlotInventory != null)
                    {
                        QuickSlotGrid.UpdateInventory(quickSlotInventory, player, __instance.m_dragItem);
                    }
                }

                if (EquipmentSlotGrid != null)
                {
                    var equipmentSlotInventory = player.GetEquipmentSlotInventory();
                    if (equipmentSlotInventory != null)
                    {
                        EquipmentSlotGrid.UpdateInventory(equipmentSlotInventory, player, __instance.m_dragItem);
                    }
                }

                if (EquipmentAndQuickSlots.HasAuga && EAQSPanel != null)
                {
                    var paperdolls = EAQSPanel.transform.Find("Paperdolls");
                    if (player.m_visEquipment.GetModelIndex() == 1)
                    {
                        paperdolls.transform.Find("Male").gameObject.SetActive(false);
                    }
                    else
                    {
                        paperdolls.transform.Find("Female").gameObject.SetActive(false);
                    }
                }

                return(false);
            }