Skip to content

Commit

Permalink
Fix Underministic Item Generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 authored and AJenbo committed Sep 15, 2024
1 parent e26e576 commit e58ba95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4604,6 +4604,8 @@ void TalktoMonster(Player &player, Monster &monster)
Quests[Q_ZHAR]._qactive = QUEST_ACTIVE;
Quests[Q_ZHAR]._qlog = true;
Quests[Q_ZHAR]._qvar1 = QS_ZHAR_ITEM_SPAWNED;
SetRndSeed(monster.rndItemSeed);
DiscardRandomValues(10);
CreateTypeItem(monster.position.tile + Displacement { 1, 1 }, false, ItemType::Misc, IMISC_BOOK, false, false, true);
monster.flags |= MFLAG_QUEST_COMPLETE;
NetSendCmdQuest(true, Quests[Q_ZHAR]);
Expand All @@ -4617,6 +4619,8 @@ void TalktoMonster(Player &player, Monster &monster)
NetSendCmdQuest(true, Quests[Q_GARBUD]);
}
if (monster.talkMsg == TEXT_GARBUD2 && (monster.flags & MFLAG_QUEST_COMPLETE) == 0) {
SetRndSeed(monster.rndItemSeed);
DiscardRandomValues(10);
SpawnItem(monster, monster.position.tile + Displacement { 1, 1 }, false, true);
monster.flags |= MFLAG_QUEST_COMPLETE;
Quests[Q_GARBUD]._qvar1 = QS_GHARBAD_FIRST_ITEM_SPAWNED;
Expand Down

0 comments on commit e58ba95

Please sign in to comment.