Example #1
0
 /*********
 ** Private methods
 *********/
 /// <summary>The method to call before <see cref="NPC.receiveGift"/>.</summary>
 /// <returns>Returns whether to run the original method.</returns>
 private static bool Before_ReceiveGift(NPC __instance, SObject o, Farmer giver, bool updateGiftLimitInfo, float friendshipChangeMultiplier, bool showResponse)
 {
     if (o is CustomObject customObj)
     {
         NpcPatcher.DoReceiveGift(__instance, customObj, giver, updateGiftLimitInfo, friendshipChangeMultiplier, showResponse);
         SpaceEvents.InvokeAfterGiftGiven(__instance, o, giver);
         return(false);
     }
     return(true);
 }