Change Item Quantity on Equip
Jump to navigation
Jump to search
001208b8: 308403ff andi r4,r4,0x03ff 001208bc: 1080000c beq r4,r0,0x001208f0 branch if item ID = 0 001208c0: 00001021 addu r2,r0,r0 return r2 = 0 001208c4: 3c018006 lui r1,0x8006 001208c8: 00240821 addu r1,r1,r4 001208cc: 902296e0 lbu r2,-0x6920(r1) load item's quantity 001208d0: 00000000 nop 001208d4: 00451021 addu r2,r2,r5 change item quantity by r5 001208d8: 04410002 bgez r2,0x001208e4 branch if item quantity is legal 001208dc: 00000000 nop 001208e0: 00001021 addu r2,r0,r0 if item amount <=0, set item quantity to 0 001208e4: 3c018006 lui r1,0x8006 001208e8: 00240821 addu r1,r1,r4 001208ec: a02296e0 sb r2,-0x6920(r1) store new item quantity 001208f0: 03e00008 jr r31 001208f4: 00000000 nop