diff --git a/Source/items.cpp b/Source/items.cpp index a220219aa..6b144e0b7 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3228,7 +3228,7 @@ Item *SpawnUnique(_unique_items uid, Point position, bool sendmsg /*= true*/) return &item; } -void SpawnItem(Monster &monster, Point position, bool sendmsg) +void SpawnItem(Monster &monster, Point position, bool sendmsg, bool spawn /*= false*/) { _item_indexes idx; bool onlygood = true; @@ -3285,6 +3285,8 @@ void SpawnItem(Monster &monster, Point position, bool sendmsg) if (sendmsg) NetSendCmdPItem(false, CMD_DROPITEM, item.position, item); + if (spawn) + NetSendCmdPItem(false, CMD_SPAWNITEM, item.position, item); } void CreateRndItem(Point position, bool onlygood, bool sendmsg, bool delta) diff --git a/Source/items.h b/Source/items.h index d010bbaba..de6152f47 100644 --- a/Source/items.h +++ b/Source/items.h @@ -510,7 +510,7 @@ Point GetSuperItemLoc(Point position); void GetItemAttrs(Item &item, _item_indexes itemData, int lvl); void SetupItem(Item &item); Item *SpawnUnique(_unique_items uid, Point position, bool sendmsg = true); -void SpawnItem(Monster &monster, Point position, bool sendmsg); +void SpawnItem(Monster &monster, Point position, bool sendmsg, bool spawn = false); void CreateRndItem(Point position, bool onlygood, bool sendmsg, bool delta); void CreateRndUseful(Point position, bool sendmsg); void CreateTypeItem(Point position, bool onlygood, ItemType itemType, int imisc, bool sendmsg, bool delta, bool spawn = false); diff --git a/Source/monster.cpp b/Source/monster.cpp index 3fc8c7e8b..7a64e75af 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1415,7 +1415,7 @@ void MonsterTalk(Monster &monster) NetSendCmdQuest(true, Quests[Q_GARBUD]); } if (monster.talkMsg == TEXT_GARBUD2 && (monster.flags & MFLAG_QUEST_COMPLETE) == 0) { - SpawnItem(monster, monster.position.tile + Displacement { 1, 1 }, true); + SpawnItem(monster, monster.position.tile + Displacement { 1, 1 }, false, true); monster.flags |= MFLAG_QUEST_COMPLETE; Quests[Q_GARBUD]._qvar1 = QS_GHARBAD_FIRST_ITEM_SPAWNED; NetSendCmdQuest(true, Quests[Q_GARBUD]);