MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / OperateBookStand

Function OperateBookStand

Source/objects.cpp:3212–3228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3210}
3211
3212void OperateBookStand(Object &bookStand, bool sendmsg, bool sendLootMsg)
3213{
3214 if (bookStand._oSelFlag == 0) {
3215 return;
3216 }
3217
3218 PlaySfxLoc(IS_ISCROL, bookStand.position);
3219 bookStand._oSelFlag = 0;
3220 bookStand._oAnimFrame += 2;
3221 SetRndSeed(bookStand._oRndSeed);
3222 if (FlipCoin(5))
3223 CreateTypeItem(bookStand.position, false, ItemType::Misc, IMISC_BOOK, sendLootMsg, false);
3224 else
3225 CreateTypeItem(bookStand.position, false, ItemType::Misc, IMISC_SCROLL, sendLootMsg, false);
3226 if (sendmsg)
3227 NetSendCmdLoc(MyPlayerId, false, CMD_OPERATEOBJ, bookStand.position);
3228}
3229
3230void OperateBookcase(Object &bookcase, bool sendmsg, bool sendLootMsg)
3231{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 5

SetRndSeedFunction · 0.85
FlipCoinFunction · 0.85
CreateTypeItemFunction · 0.85
NetSendCmdLocFunction · 0.85
PlaySfxLocFunction · 0.70

Tested by

no test coverage detected