feat: death marks (#1205)
Some checks failed
Build Docker image / docker (push) Waiting to run
Build / build (18) (push) Has been cancelled
Build / build (20) (push) Has been cancelled
Build / build (22) (push) Has been cancelled

Reviewed-on: #1205
This commit is contained in:
Sainan 2025-03-16 04:33:21 -07:00
parent b7f05e851c
commit 651ab5f6f1
3 changed files with 21 additions and 1 deletions

View File

@ -1400,7 +1400,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Discount Coupon
PendingCoupon: pendingCouponSchema,
//Like BossAladV,BossCaptainVor come for you on missions % chance
DeathMarks: [String],
DeathMarks: { type: [String], default: [] },
//Zanuka
Harvestable: Boolean,
//Grustag three

View File

@ -294,6 +294,25 @@ export const addMissionInventoryUpdates = async (
inventory.SeasonChallengeHistory.push(...processedCompletions);
break;
}
case "DeathMarks": {
for (const deathMark of value) {
if (!inventory.DeathMarks.find(x => x == deathMark)) {
// It's a new death mark; we have to say the line.
await createMessage(inventory.accountOwnerId.toString(), [
{
sub: "/Lotus/Language/G1Quests/DeathMarkTitle",
sndr: "/Lotus/Language/G1Quests/DeathMarkSender",
msg: "/Lotus/Language/G1Quests/DeathMarkMessage",
icon: "/Lotus/Interface/Icons/Npcs/Stalker_d.png",
highPriority: true
}
]);
// TODO: This type of inbox message seems to automatically delete itself. Figure out under which conditions.
}
}
inventory.DeathMarks = value;
break;
}
default:
// Equipment XP updates
if (equipmentKeys.includes(key as TEquipmentKey)) {

View File

@ -107,6 +107,7 @@ export type IMissionInventoryUpdateRequest = {
DropTable: string;
DROP_MOD: number[];
}[];
DeathMarks?: string[];
} & {
[K in TEquipmentKey]?: IEquipmentClient[];
};