| 3916 | } |
| 3917 | |
| 3918 | void ModifyPlrStr(int p, int l) |
| 3919 | { |
| 3920 | int max; |
| 3921 | |
| 3922 | if ((DWORD)p >= MAX_PLRS) { |
| 3923 | app_fatal("ModifyPlrStr: illegal player %d", p); |
| 3924 | } |
| 3925 | |
| 3926 | max = MaxStats[plr[p]._pClass][ATTRIB_STR]; |
| 3927 | if (plr[p]._pBaseStr + l > max) { |
| 3928 | l = max - plr[p]._pBaseStr; |
| 3929 | } |
| 3930 | |
| 3931 | plr[p]._pStrength += l; |
| 3932 | plr[p]._pBaseStr += l; |
| 3933 | |
| 3934 | if (plr[p]._pClass == PC_ROGUE) { |
| 3935 | plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pStrength + plr[p]._pDexterity) / 200; |
| 3936 | } else { |
| 3937 | plr[p]._pDamageMod = plr[p]._pLevel * plr[p]._pStrength / 100; |
| 3938 | } |
| 3939 | |
| 3940 | CalcPlrInv(p, TRUE); |
| 3941 | |
| 3942 | if (p == myplr) { |
| 3943 | NetSendCmdParam1(FALSE, CMD_SETSTR, plr[p]._pBaseStr); //60 |
| 3944 | } |
| 3945 | } |
| 3946 | |
| 3947 | void ModifyPlrMag(int p, int l) |
| 3948 | { |
no test coverage detected