Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool __thiscall CalcIsShotCriticalHelper(int this)
- {
- int v1; // esi@1
- int v2; // eax@1
- int v3; // ebx@1
- double v5; // st7@4
- int v6; // ecx@6
- int v7; // eax@6
- __int128 v8; // xmm0@7
- float v9; // ST24_4@11
- int v10; // edi@9
- int v11; // eax@9
- int v12; // ST14_4@10
- float v13; // ST24_4@16
- int v14; // edi@14
- int v15; // eax@14
- int v16; // ST14_4@15
- int v17; // [sp+18h] [bp-20h]@0
- int v18; // [sp+1Ch] [bp-1Ch]@0
- int v19; // [sp+20h] [bp-18h]@0
- float v20; // [sp+24h] [bp-14h]@4
- v1 = this;
- v2 = sub_1001D460(this);
- v3 = __RTDynamicCast(
- v2,
- 0,
- (struct _s_RTTICompleteObjectLocator *)&C_BaseCombatCharacter__RTTI_Type_Descriptor_,
- (struct TypeDescriptor *)&C_BasePlayer__RTTI_Type_Descriptor_,
- 0);
- if ( !v3
- || !(unsigned __int8)(*(int (__thiscall **)(int))(*(_DWORD *)v3 + 496))(v3)
- || (v5 = sub_102DCCD0(v3 + 5588),
- v20 = v5,
- !(unsigned __int8)(*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)v1 + 1552))(v1, 0)) )
- return 0;
- if ( (unsigned __int8)sub_102DCB30(v3 + 5588) )
- return 1;
- v6 = *(_DWORD *)(v1 + 2516);
- v7 = *(_DWORD *)(v1 + 2504) << 6;
- *(_BYTE *)(v1 + 2523) = 1;
- if ( *(_BYTE *)(v7 + v6 + 1844) )
- {
- v8 = *(_DWORD *)(LODWORD(off_1084FF2C) + 12);
- if ( *(float *)(v1 + 2536) <= *(float *)&v8 )
- {
- if ( (float)(*(float *)(v1 + 2540) + 1.0) <= *(float *)&v8 )
- {
- sub_10154FA0(LODWORD(off_1084FF2C) + 12);
- sub_1001CD60(
- 1.0 / (float)((float)(2.0 / fminf(fmaxf(v20 * 0.02, 0.0099999998), 0.99000001)) - 2.0),
- (int)"mult_crit_chance",
- v1,
- 0,
- COERCE_FLOAT(1),
- v17,
- v18,
- v19);
- v10 = (*(int (__thiscall **)(int))(*(_DWORD *)(v1 + 8) + 36))(v1 + 8) << 8;
- v11 = v10 | (*(int (__thiscall **)(int))(*(_DWORD *)(v3 + 8) + 36))(v3 + 8);
- if ( (v11 ^ dword_1084C184) != *(_DWORD *)(v1 + 2548) )
- {
- v12 = v11 ^ dword_1084C184;
- *(_DWORD *)(v1 + 2548) = v11 ^ dword_1084C184;
- RandomSeed(v12);
- }
- v9 = v5;
- if ( (float)(v9 * 10000.0) >= (float)RandomInt(0, 9999) )
- {
- *(float *)(v1 + 2536) = *(float *)(LODWORD(off_1084FF2C) + 12) + 2.0;
- return 1;
- }
- }
- return 0;
- }
- return 1;
- }
- sub_1001CD60(v20 * 0.02, (int)"mult_crit_chance", v1, 0, COERCE_FLOAT(1), v17, v18, v19);
- v14 = (*(int (__thiscall **)(int))(*(_DWORD *)(v1 + 8) + 36))(v1 + 8) << 8;
- v15 = v14 | (*(int (__thiscall **)(int))(*(_DWORD *)(v3 + 8) + 36))(v3 + 8);
- if ( (v15 ^ dword_1084C184) != *(_DWORD *)(v1 + 2548) )
- {
- v16 = v15 ^ dword_1084C184;
- *(_DWORD *)(v1 + 2548) = v15 ^ dword_1084C184;
- RandomSeed(v16);
- }
- v13 = v5;
- return (float)(v13 * 10000.0) > (float)RandomInt(0, 9999);
- }
Advertisement
Add Comment
Please, Sign In to add comment