Browse Source

Apply enums to SpawnQuestItem

pull/133/head
Anders Jenbo 7 years ago
parent
commit
635deebbd4
  1. 2
      Source/items.cpp
  2. 9
      Source/objects.cpp
  3. 2
      Source/quests.cpp

2
Source/items.cpp

@ -277,7 +277,7 @@ void InitItems()
if (QuestStatus(QTYPE_INFRA))
SpawnRock();
if (QuestStatus(QTYPE_ANVIL))
SpawnQuestItem(16, 2 * setpc_x + 27, 2 * setpc_y + 27, 0, 1);
SpawnQuestItem(IDI_ANVIL, 2 * setpc_x + 27, 2 * setpc_y + 27, 0, 1);
if (currlevel > 0u && currlevel < 0x10u)
AddInitItems();
}

9
Source/objects.cpp

@ -2185,7 +2185,6 @@ void OperateL2LDoor(int pnum, int oi, BOOL sendflag)
PlaySfxLoc(IS_DOORCLOS, object[oi]._ox, object[oi]._oy);
return;
}
xp = object[oi]._ox;
yp = object[oi]._oy;
if (object[oi]._oVar4 == 0) {
@ -2514,9 +2513,9 @@ void OperateBookLever(int pnum, int i)
quests[QTYPE_BLOOD]._qactive = 2;
quests[QTYPE_BLOOD]._qlog = 1;
quests[QTYPE_BLOOD]._qvar1 = 1;
SpawnQuestItem(21, 2 * setpc_x + 19, 2 * setpc_y + 26, 0, 1);
SpawnQuestItem(21, 2 * setpc_x + 31, 2 * setpc_y + 26, 0, 1);
SpawnQuestItem(21, 2 * setpc_x + 25, 2 * setpc_y + 33, 0, 1);
SpawnQuestItem(IDI_BLDSTONE, 2 * setpc_x + 19, 2 * setpc_y + 26, 0, 1);
SpawnQuestItem(IDI_BLDSTONE, 2 * setpc_x + 31, 2 * setpc_y + 26, 0, 1);
SpawnQuestItem(IDI_BLDSTONE, 2 * setpc_x + 25, 2 * setpc_y + 33, 0, 1);
}
object[i]._otype = object[i]._otype;
if (object[i]._otype == OBJ_STEELTOME && !quests[QTYPE_WARLRD]._qvar1) {
@ -3753,7 +3752,7 @@ void OperateLazStand(int pnum, int i)
object[i]._oAnimFrame++;
object[i]._oSelFlag = 0;
GetSuperItemLoc(object[i]._ox, object[i]._oy, &xx, &yy);
SpawnQuestItem(33, xx, yy, 0, 0);
SpawnQuestItem(IDI_LGTFORGE, xx, yy, 0, 0);
}
}

2
Source/quests.cpp

@ -662,7 +662,7 @@ void ResyncQuests()
}
if (currlevel == quests[QTYPE_VEIL]._qlevel + 1 && quests[QTYPE_VEIL]._qactive == 2 && !quests[QTYPE_VEIL]._qvar1) {
quests[QTYPE_VEIL]._qvar1 = 1;
SpawnQuestItem(15, 0, 0, 5, 1);
SpawnQuestItem(IDI_GLDNELIX, 0, 0, 5, 1);
}
if (setlevel && setlvlnum == 5) {
if (quests[QTYPE_VB]._qvar1 >= 4u)

Loading…
Cancel
Save