| 1400 | } |
| 1401 | |
| 1402 | DWORD On_REQUESTGITEM(TCmd *pCmd, int pnum) |
| 1403 | { |
| 1404 | TCmdGItem *p = (TCmdGItem *)pCmd; |
| 1405 | |
| 1406 | if (gbBufferMsgs != 1 && i_own_level(plr[pnum].plrlevel)) { |
| 1407 | if (GetItemRecord(p->dwSeed, p->wCI, p->wIndx)) { |
| 1408 | int ii = FindGetItem(p->wIndx, p->wCI, p->dwSeed); |
| 1409 | if (ii != -1) { |
| 1410 | NetSendCmdGItem2(FALSE, CMD_GETITEM, myplr, p->bPnum, p); |
| 1411 | if (p->bPnum != myplr) |
| 1412 | SyncGetItem(p->x, p->y, p->wIndx, p->wCI, p->dwSeed); |
| 1413 | else |
| 1414 | InvGetItem(myplr, ii); |
| 1415 | SetItemRecord(p->dwSeed, p->wCI, p->wIndx); |
| 1416 | } else if (!NetSendCmdReq2(CMD_REQUESTGITEM, myplr, p->bPnum, p)) |
| 1417 | NetSendCmdExtra(p); |
| 1418 | } |
| 1419 | } |
| 1420 | |
| 1421 | return sizeof(*p); |
| 1422 | } |
| 1423 | |
| 1424 | BOOL i_own_level(int nReqLevel) |
| 1425 | { |
no test coverage detected