Browse Source

OperateBookCase bin exact (#808)

pull/78/head
qndel 7 years ago committed by Anders Jenbo
parent
commit
aa8e183f37
  1. 33
      Source/objects.cpp
  2. 2
      Source/objects.h

33
Source/objects.cpp

@ -4242,38 +4242,27 @@ void __fastcall OperateSkelBook(int pnum, int i, BOOL sendmsg)
}
}
void __fastcall OperateBookCase(int pnum, int i, unsigned char sendmsg)
void __fastcall OperateBookCase(int pnum, int i, BOOL sendmsg)
{
unsigned short v3; // di
int v4; // ebp
int v5; // esi
BOOLEAN v6; // zf
//int v7; // eax
v3 = i;
v4 = pnum;
v5 = i;
if (object[i]._oSelFlag) {
if (!deltaload)
PlaySfxLoc(IS_ISCROL, object[v5]._ox, object[v5]._oy);
object[v5]._oAnimFrame -= 2;
v6 = deltaload == 0;
object[v5]._oSelFlag = 0;
if (v6) {
SetRndSeed(object[v5]._oRndSeed);
CreateTypeItem(object[v5]._ox, object[v5]._oy, 0, ITYPE_MISC, 24, sendmsg, 0);
//_LOBYTE(v7) = QuestStatus(QTYPE_ZHAR);
PlaySfxLoc(IS_ISCROL, object[i]._ox, object[i]._oy);
object[i]._oAnimFrame -= 2;
object[i]._oSelFlag = 0;
if (!deltaload) {
SetRndSeed(object[i]._oRndSeed);
CreateTypeItem(object[i]._ox, object[i]._oy, 0, ITYPE_MISC, IMISC_BOOK, sendmsg, 0);
if (QuestStatus(QTYPE_ZHAR)
&& monster[4].mName == UniqMonst[2].mName
&& monster[4]._msquelch == -1
&& monster[4]._mhitpoints) {
monster[4].mtalkmsg = QUEST_ZHAR2;
M_StartStand(0, monster[4]._mdir);
_LOBYTE(monster[4]._mgoal) = MGOAL_SHOOT;
monster[4]._mgoal = MGOAL_SHOOT;
monster[4]._mmode = MM_TALK;
}
if (v4 == myplr)
NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, v3);
if (pnum == myplr)
NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i);
}
}
}
@ -4883,7 +4872,7 @@ void __fastcall SyncOpObject(int pnum, int cmd, int i)
break;
case OBJ_BOOKCASEL:
case OBJ_BOOKCASER:
OperateBookCase(pnum, i, 0);
OperateBookCase(pnum, i, FALSE);
break;
case OBJ_DECAP:
OperateDecap(pnum, i, 0);

2
Source/objects.h

@ -117,7 +117,7 @@ void __fastcall TryDisarm(int pnum, int i);
int __fastcall ItemMiscIdIdx(int imiscid);
void __fastcall OperateShrine(int pnum, int i, int sType);
void __fastcall OperateSkelBook(int pnum, int i, BOOL sendmsg);
void __fastcall OperateBookCase(int pnum, int i, unsigned char sendmsg);
void __fastcall OperateBookCase(int pnum, int i, BOOL sendmsg);
void __fastcall OperateDecap(int pnum, int i, unsigned char sendmsg);
void __fastcall OperateArmorStand(int pnum, int i, unsigned char sendmsg);
int __fastcall FindValidShrine(int i);

Loading…
Cancel
Save