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

Function OperateMushPatch

Source/objects.cpp:2578–2607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2576}
2577
2578void OperateMushPatch(int pnum, int i)
2579{
2580 int x, y;
2581
2582 if (quests[QTYPE_BLKM]._qactive != 2 || quests[QTYPE_BLKM]._qvar1 < QS_TOMEGIVEN) {
2583 if (!deltaload && pnum == myplr) {
2584 if (plr[myplr]._pClass == PC_WARRIOR) {
2585 PlaySFX(PS_WARR13);
2586#ifndef SPAWN
2587 } else if (plr[myplr]._pClass == PC_ROGUE) {
2588 PlaySFX(PS_ROGUE13);
2589 } else if (plr[myplr]._pClass == PC_SORCERER) {
2590 PlaySFX(PS_MAGE13);
2591#endif
2592 }
2593 }
2594 } else {
2595 if (object[i]._oSelFlag != 0) {
2596 if (!deltaload)
2597 PlaySfxLoc(IS_CHEST, object[i]._ox, object[i]._oy);
2598 object[i]._oSelFlag = 0;
2599 object[i]._oAnimFrame++;
2600 if (!deltaload) {
2601 GetSuperItemLoc(object[i]._ox, object[i]._oy, &x, &y);
2602 SpawnQuestItem(IDI_MUSHROOM, x, y, 0, 0);
2603 quests[QTYPE_BLKM]._qvar1 = QS_MUSHSPAWNED;
2604 }
2605 }
2606 }
2607}
2608
2609void OperateInnSignChest(int pnum, int i)
2610{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 4

PlaySFXFunction · 0.85
PlaySfxLocFunction · 0.85
GetSuperItemLocFunction · 0.85
SpawnQuestItemFunction · 0.85

Tested by

no test coverage detected