Load Job Level
Jump to navigation
Jump to search
0017ea28: 24a2ffb5 addiu r2,r5,0xffb5 Job ID - 0x4b (Chemist) 0017ea2c: 2c420013 sltiu r2,r2,0x0013 0017ea30: 10400003 beq r2,r0,0x0017ea40 Branch if Job ID isn't generic 0017ea34: 24a2ffb6 addiu r2,r5,0xffb6 Job ID - 0x4a (Squire) 0017ea38: 0805fa91 j 0x0017ea44 0017ea3c: acc20000 sw r2,0x0000(r6) Generic ID = Generic ID (sans squire) 0017ea40: acc00000 sw r0,0x0000(r6) Generic ID = 0 (squire) 0017ea44: 8cc30000 lw r3,0x0000(r6) Load Generic Job ID 0017ea48: 00000000 nop 0017ea4c: 000317c2 srl r2,r3,0x1f 0017ea50: 00621021 addu r2,r3,r2 0017ea54: 00021043 sra r2,r2,0x01 ID / 2 0017ea58: 00821021 addu r2,r4,r2 0017ea5c: 30630001 andi r3,r3,0x0001 r3 = ID AND 1 0017ea60: 904200d2 lbu r2,0x00d2(r2) Load Unit's Current Job Level 0017ea64: 14600003 bne r3,r0,0x0017ea74 Branch if Job uses low nybble 0017ea68: 00000000 nop 0017ea6c: 0805fa9e j 0x0017ea78 0017ea70: 00021103 sra r2,r2,0x04 r2 = High nybble Level 0017ea74: 3042000f andi r2,r2,0x000f r2 = Low nybble Level 0017ea78: 03e00008 jr r31 0017ea7c: 00000000 nop