| 3980 | } |
| 3981 | |
| 3982 | void ModifyPlrDex(int p, int l) |
| 3983 | { |
| 3984 | int max; |
| 3985 | |
| 3986 | if ((DWORD)p >= MAX_PLRS) { |
| 3987 | app_fatal("ModifyPlrDex: illegal player %d", p); |
| 3988 | } |
| 3989 | |
| 3990 | max = MaxStats[plr[p]._pClass][ATTRIB_DEX]; |
| 3991 | if (plr[p]._pBaseDex + l > max) { |
| 3992 | l = max - plr[p]._pBaseDex; |
| 3993 | } |
| 3994 | |
| 3995 | plr[p]._pDexterity += l; |
| 3996 | plr[p]._pBaseDex += l; |
| 3997 | CalcPlrInv(p, TRUE); |
| 3998 | |
| 3999 | if (plr[p]._pClass == PC_ROGUE) { |
| 4000 | plr[p]._pDamageMod = plr[p]._pLevel * (plr[p]._pDexterity + plr[p]._pStrength) / 200; |
| 4001 | } |
| 4002 | |
| 4003 | if (p == myplr) { |
| 4004 | NetSendCmdParam1(FALSE, CMD_SETDEX, plr[p]._pBaseDex); |
| 4005 | } |
| 4006 | } |
| 4007 | |
| 4008 | void ModifyPlrVit(int p, int l) |
| 4009 | { |
no test coverage detected