BugFixAddItem.ItemGrabMenuPatches.receiveRightClick_Prefix C# (CSharp) Метод

receiveRightClick_Prefix() публичный статический Метод

public static receiveRightClick_Prefix ( int x, int y, bool playSound, Item &___sourceItem, TemporaryAnimatedSprite &___poof, ItemGrabMenu.behaviorOnItemSelect ___behaviorFunction, bool ___essential, ItemGrabMenu __instance ) : bool
x int
y int
playSound bool
___sourceItem Item
___poof TemporaryAnimatedSprite
___behaviorFunction ItemGrabMenu.behaviorOnItemSelect
___essential bool
__instance ItemGrabMenu
Результат bool
        public static bool receiveRightClick_Prefix(int x, int y, bool playSound, // Original arguments
            ref Item ___sourceItem, ref TemporaryAnimatedSprite ___poof,
            ItemGrabMenu.behaviorOnItemSelect ___behaviorFunction, bool ___essential, // Private fields
            ItemGrabMenu __instance) // Special
        {
            try
            {
                Monitor.Log($"Invoked ItemGrabMenu.receiveRightClick_Prefix", LogLevel.Debug);

                // Reimplemented game code
                return true;
            }
            catch (Exception ex)
            {
                Monitor.Log($"Failed in {nameof(receiveRightClick_Prefix)}:\n{ex}", LogLevel.Error);
                return true; // Run original code
            }
        }