The fastest way to get the currently selected weapon is to use this:
"OakCameraInputs City_P.City_P.PersistentLevel.BPCameraManager_Default_C_1.CameraModesManager_1.OakCameraInputs_1"
The code that does the retrieval is here:
Code: Select all
Borderlands3.exe+9032AE2 - 48 8B 01 - mov rax,[rcx]
Borderlands3.exe+9032AE5 - 31 D2 - xor edx,edx
Borderlands3.exe+9032AE7 - FF 90 F0000000 - call qword ptr [rax+000000F0]
Borderlands3.exe+9032AED - 48 89 83 B8000000 - mov [rbx+000000B8],rax
RCX is "BPChar_Operative_C City_P.City_P.PersistentLevel.BPChar_Operative_C_1" + 0xD78. The result of the function, in RAX, is this for me: "BPWeap_SM_Dahl_C City_P.City_P.PersistentLevel.BPWeap_SM_Dahl_C_1".
This:
I must admit I like this weapon
Will see if I can find the Incendiary version of it (don't really like the cryo part of it).
Actually, even more simplified, it goes like this:
Code: Select all
xor edx,edx
mov rcx,[OakCharacter]
lea rcx,[rcx+1508]
call CharGetCurrWeapon
Code: Select all
CharGetCurrWeapon:
movzx eax,dl
cmp eax,[rcx+8]
jnl short @f
movzx eax,dl
imul rdx,rax,F0
mov rax,[rcx]
mov rax,[rdx+rax+8]
ret
@@:
xor eax,eax
ret
EDIT: Looks like there isn't any. It switches effect based on TimeOfDay -
[Link]