ClassChangeEquipFix

Checks every equipment-slot of an actor if the item can still be equipped when swapping their jobclass instead of just removing equipment entirely.

Originally made and first released by bugmenot.

RPG2003
1.00UNKNOWN1UNKNOWN21.0.2.1
1.0.2.1
1.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.6.0
1.0.6.0
1.0.7.0
1.0.7.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414

Segment 1/2

Offsets

RPG2003
1.0.8.0
1.0.8.0
004B854Dh
000B794Dh

Sourcecode

			JE __004B85AAh
			MOV EAX, [004CDC0Ch]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+C0h], 0
			JE __004B8597h
			XOR ESI, ESI
__004B8561h:
			MOV EDX, ESI
			MOV EAX, EBX
			CALL PROC__004B79BCh
			TEST EAX, EAX
			JZ __004B8591h
			XCHG EAX, EDX
			MOV EAX, [004CDB14h]
			MOV EAX, [EAX]
			CALL PROC__0047E8E8h
			MOV EDX, [EBP-04h]
			INC EDX
			CALL PROC__0047E76Ch
			TEST AL, AL
			JNZ __004B8591h
			MOV EDX, ESI
			MOV EAX, EBX
			CALL PROC__004B8054h
__004B8591h:
			INC ESI
			CMP ESI, 5
			JNE __004B8561h
__004B8597h:
			XOR EDX, EDX
			MOV [EBX+114h], EDX
			LEA EAX, [EBX+118h]
			CALL PROC__004027ACh
__004B85AAh:
			PUSH 98
			POP EDX
			MOV EAX, EBX
			CALL PROC__004B912Ch
			CMP DWORD PTR [EBP-08h], 0
			JNE __004B85E4h
			XOR ECX, ECX
			CMP BYTE PTR [EBP+08h], 0
			JE __004B85D3h
			CMP DWORD PTR [EBP+10h], 0
			JLE __004B85D3h
			CMP BYTE PTR [EBX+154h], 0
			JE __004B85D3h
			MOV CL, 1
__004B85D3h:
			NOP
			MOV EDX, [EBP-14h]
			DEC EDX
			MOV EAX, EBX
			CALL PROC__004B90FCh
__004B85DFh:
			JMP __004B868Ch
__004B85E4h:
			CMP DWORD PTR [EBP+10h], 0
			JLE __004B85DFh
			CMP BYTE PTR [EBX+154h], 0
			JE __004B85DFh
			MOV EAX, [004CDD7Ch]
			MOV EAX, [EAX]
			MOV EDX, [EBP-04h]
			CALL PROC__00480934h
			MOV EAX, [EAX+4C4h]
			CALL PROC__00475714h
			XCHG EAX, EDI
			DEC EDI
			TEST EDI, EDI
			JL __004B85DFh
			INC EDI
			XOR ESI, ESI
__004B8616h:
			MOV EAX, [004CDD7Ch]
			MOV EAX, [EAX]
			MOV EDX, [EBP-04h]
			CALL PROC__00480934h
			MOV EAX, [EAX+4C4h]
			MOV EDX, ESI
			CALL PROC__00480360h
			CMP DWORD PTR [EAX+0Ch], 1
			JNE __004B8684h

Bytes

745B
A10CDC4C00 8B00 83B8C000000000 7438 33F6 8BD6 8BC3 E852F4FFFF
85C0 7423
92 A114DB4C00 8B00 E86D63FCFF
8B55FC 42 E8E861FCFF
84C0 7509
8BD6 8BC3 E8C3FAFFFF
46 83FE05 75CA
33D2 899314010000 8D8318010000 E802A2F4FF
6A62 5A 8BC3 E8780B0000 837DF800 752A
33C9 807D0800 7411
837D1000 7E0B
80BB5401000000 7402
B101 90 8B55EC 4A 8BC3 E81D0B0000
E9A8000000
837D1000 7EF5
80BB5401000000 74EC
A17CDD4C00 8B00 8B55FC E83283FCFF
8B80C4040000 E807D1FBFF
97 4F 85FF 7CCC
47 33F6 A17CDD4C00 8B00 8B55FC E80F83FCFF
8B80C4040000 8BD6 E82E7DFCFF
83780C01 754C

Segment 2/2

Offsets

RPG2003
1.0.8.0
1.0.8.0
004B8686h
000B7A86h

Sourcecode

			JNE __004B8616h

Bytes

0F858AFFFFFF