MCPcopy Create free account
hub / github.com/diasurgical/devilution / OperateArmorStand

Function OperateArmorStand

Source/objects.cpp:3479–3503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3477}
3478
3479void OperateArmorStand(int pnum, int i, BOOL sendmsg)
3480{
3481 BOOL uniqueRnd;
3482
3483 if (object[i]._oSelFlag != 0) {
3484 object[i]._oAnimFrame++;
3485 object[i]._oSelFlag = 0;
3486 if (!deltaload) {
3487 SetRndSeed(object[i]._oRndSeed);
3488 uniqueRnd = random_(0, 2);
3489 if (currlevel <= 5) {
3490 CreateTypeItem(object[i]._ox, object[i]._oy, TRUE, ITYPE_LARMOR, IMISC_NONE, sendmsg, FALSE);
3491 } else if (currlevel >= 6 && currlevel <= 9) {
3492 CreateTypeItem(object[i]._ox, object[i]._oy, uniqueRnd, ITYPE_MARMOR, IMISC_NONE, sendmsg, FALSE);
3493 } else if (currlevel >= 10 && currlevel <= 12) {
3494 CreateTypeItem(object[i]._ox, object[i]._oy, FALSE, ITYPE_HARMOR, IMISC_NONE, sendmsg, FALSE);
3495 } else if (currlevel >= 13 && currlevel <= 16) {
3496 CreateTypeItem(object[i]._ox, object[i]._oy, TRUE, ITYPE_HARMOR, IMISC_NONE, sendmsg, FALSE);
3497 }
3498 if (pnum == myplr)
3499 NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i);
3500 return;
3501 }
3502 }
3503}
3504
3505int FindValidShrine(int i)
3506{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 4

SetRndSeedFunction · 0.85
random_Function · 0.85
CreateTypeItemFunction · 0.85
NetSendCmdParam1Function · 0.85

Tested by

no test coverage detected