такой вопрос: а сколько точно ПвП-пенальти?
а то встречал чуть разные цифры - 0.17, 1/6, 0.167...
Ровно 0.17. Вот функция из D2Game.dll, которая вычисляет пенальти (тупой копипаст из ИДЫ):
- Код: Выделить всё
.text:6FC99F80 sub_6FC99F80 proc near ; CODE XREF: sub_6FC9B460+CFp
.text:6FC99F80 push esi
.text:6FC99F81 mov esi, eax
.text:6FC99F83 mov ecx, [esi+8]
.text:6FC99F86 test ecx, ecx
.text:6FC99F88 jz loc_6FC9A05B
.text:6FC99F8E mov eax, [esi+0Ch]
.text:6FC99F91 test eax, eax
.text:6FC99F93 jz loc_6FC9A05B
.text:6FC99F99 cmp ecx, eax
.text:6FC99F9B jz loc_6FC9A05B
.text:6FC99FA1 cmp dword ptr [eax], 0
.text:6FC99FA4 jnz short loc_6FC99FDE
.text:6FC99FA6 cmp dword ptr [ecx], 0
.text:6FC99FA9 jz short loc_6FC99FD7
.text:6FC99FAB push ecx
.text:6FC99FAC call D2Common_10328
.text:6FC99FB1 test eax, eax
.text:6FC99FB3 jnz short loc_6FC99FD7
.text:6FC99FB5 mov esi, [esi+8]
.text:6FC99FB8 test esi, esi
.text:6FC99FBA jz short loc_6FC99FC9
.text:6FC99FBC mov eax, [esi+0C4h]
.text:6FC99FC2 shr eax, 1Fh
.text:6FC99FC5 test eax, eax
.text:6FC99FC7 jnz short loc_6FC99FD7
.text:6FC99FC9
.text:6FC99FC9 loc_6FC99FC9: ; CODE XREF: sub_6FC99F80+3Aj
.text:6FC99FC9 push esi
.text:6FC99FCA call D2Common_10328
.text:6FC99FCF test eax, eax
.text:6FC99FD1 jz loc_6FC9A05B
.text:6FC99FD7
.text:6FC99FD7 loc_6FC99FD7: ; CODE XREF: sub_6FC99F80+29j
.text:6FC99FD7 ; sub_6FC99F80+33j ...
.text:6FC99FD7 mov eax, 11h
.text:6FC99FDC pop esi
.text:6FC99FDD retn
.text:6FC99FDE ; ---------------------------------------------------------------------------
.text:6FC99FDE
.text:6FC99FDE loc_6FC99FDE: ; CODE XREF: sub_6FC99F80+24j
.text:6FC99FDE push eax
.text:6FC99FDF call D2Common_10328
.text:6FC99FE4 test eax, eax
.text:6FC99FE6 jz short loc_6FC99FFC
.text:6FC99FE8 mov eax, [esi+8]
.text:6FC99FEB push eax
.text:6FC99FEC call D2Common_10328
.text:6FC99FF1 test eax, eax
.text:6FC99FF3 jz short loc_6FC99FFC
.text:6FC99FF5 mov eax, 19h
.text:6FC99FFA pop esi
.text:6FC99FFB retn
.text:6FC99FFC ; ---------------------------------------------------------------------------
.text:6FC99FFC
.text:6FC99FFC loc_6FC99FFC: ; CODE XREF: sub_6FC99F80+66j
.text:6FC99FFC ; sub_6FC99F80+73j
.text:6FC99FFC mov ecx, [esi+8]
.text:6FC99FFF push ecx
.text:6FC9A000 call D2Common_10328
.text:6FC9A005 test eax, eax
.text:6FC9A007 jz short loc_6FC9A024
.text:6FC9A009 mov edx, [esi+0Ch]
.text:6FC9A00C push edx
.text:6FC9A00D push 0
.text:6FC9A00F call D2Common_11056
.text:6FC9A014 test eax, eax
.text:6FC9A016 jz short loc_6FC9A024
.text:6FC9A018 mov esi, [esi+4]
.text:6FC9A01B test esi, esi
.text:6FC9A01D jz short loc_6FC9A05B
.text:6FC9A01F mov eax, [esi+38h]
.text:6FC9A022 pop esi
.text:6FC9A023 retn
.text:6FC9A024 ; ---------------------------------------------------------------------------
.text:6FC9A024
.text:6FC9A024 loc_6FC9A024: ; CODE XREF: sub_6FC99F80+87j
.text:6FC9A024 ; sub_6FC99F80+96j
.text:6FC9A024 mov eax, [esi+8]
.text:6FC9A027 push eax
.text:6FC9A028 call D2Common_10529
.text:6FC9A02D test eax, eax
.text:6FC9A02F jz short loc_6FC9A05B
.text:6FC9A031 mov esi, [esi+0Ch]
.text:6FC9A034 test esi, esi
.text:6FC9A036 jz short loc_6FC9A05B
.text:6FC9A038 mov eax, [esi+0C4h]
.text:6FC9A03E shr eax, 1Fh
.text:6FC9A041 test eax, eax
.text:6FC9A043 jz short loc_6FC9A05B
.text:6FC9A045 push esi
.text:6FC9A046 call D2Common_10328
.text:6FC9A04B neg eax
.text:6FC9A04D sbb eax, eax
.text:6FC9A04F and eax, 0FFFFFF38h
.text:6FC9A054 add eax, 190h
.text:6FC9A059 pop esi
.text:6FC9A05A retn
.text:6FC9A05B ; ---------------------------------------------------------------------------
.text:6FC9A05B
.text:6FC9A05B loc_6FC9A05B: ; CODE XREF: sub_6FC99F80+8j
.text:6FC9A05B ; sub_6FC99F80+13j ...
.text:6FC9A05B mov eax, 64h
.text:6FC9A060 pop esi
.text:6FC9A061 retn
.text:6FC9A061 sub_6FC99F80 endp
Обрати внимание на этот кусочек, где возвращается для плееров значение 0х11 (десятичное 17):
- Код: Выделить всё
.text:6FC99FD7 mov eax, 11h
.text:6FC99FDC pop esi
.text:6FC99FDD retn