fix: send heart of deimos email when quest is given (#1065)

Fixes #1061

Reviewed-on: OpenWF/SpaceNinjaServer#1065
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-03-03 12:48:11 -08:00 committed by OrdisPrime
parent 3442f15c6d
commit f97bdea447

View File

@ -81,6 +81,18 @@ export const addQuestKey = (inventory: TInventoryDatabaseDocument, questKey: IQu
logger.warn(`Quest key ${questKey.ItemType} already exists. It will not be added`); logger.warn(`Quest key ${questKey.ItemType} already exists. It will not be added`);
return; return;
} }
if (questKey.ItemType == "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain") {
void createMessage(inventory.accountOwnerId.toString(), [
{
sndr: "/Lotus/Language/Bosses/Loid",
icon: "/Lotus/Interface/Icons/Npcs/Entrati/Loid.png",
sub: "/Lotus/Language/InfestedMicroplanet/DeimosIntroQuestInboxTitle",
msg: "/Lotus/Language/InfestedMicroplanet/DeimosIntroQuestInboxMessage"
}
]);
}
const index = inventory.QuestKeys.push(questKey); const index = inventory.QuestKeys.push(questKey);
return inventory.QuestKeys[index - 1].toJSON<IQuestKeyClient>(); return inventory.QuestKeys[index - 1].toJSON<IQuestKeyClient>();