# Original patch by Soly, in Blue Burst Patch Project # https://github.com/Solybum/Blue-Burst-Patch-Project # GC port by fuzziqersoftware .versions 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 .meta name="No rare selling" .meta description="Stops you from\naccidentally\nselling rares\nto shops" entry_ptr: reloc0: .offsetof start start: .include WriteCodeBlocksGC # See comments in the 59NL version of this patch for details on how it works. .data .data 0x00000004 li r29, 0 .data .data 0x00000004 li r29, 0 .data .data 0x00000004 li r29, 0 .label tool_check_hook_loc, 0x800041A0 .data tool_check_hook_loc .deltaof tool_check_hook_start, tool_check_hook_end .address tool_check_hook_loc tool_check_hook_start: lwz r29, [r3 + 0x10] # Flags xori r29, r29, 0x0080 andi. r29, r29, 0x0080 bnelr # Not rare; r29 (returned price) is zero already lwz r29, [r3 + 0x0C] # Cost blr tool_check_hook_end: .label tool_check_hook_call, .data tool_check_hook_call .data 0x00000004 .address tool_check_hook_call bl tool_check_hook_start .data 0x00000000 .data 0x00000000