Initial commit

This commit is contained in:
2026-08-24 22:20:36 +02:00
commit 62f7b1278a
251 changed files with 16670 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
const { TASK_TYPES } = require("../Data/constants");
const { TASK_TYPE_DEAL_DAMAGE } = TASK_TYPES;
const Game = require("../Game/Game");
const { players } = Game;
function globalAttackCallback(data) {
const { typeID, entityTypeID, authorID, damage } = data;
const player = players[authorID];
if (!player) return;
/*
* only quest is updated here
* if player is unavailable, it means that they have logged out: damage without player being online???
* conclusion: only overtime damage can cause this issue
*/
const toBeAdjusted = [{ taskCategoryID: TASK_TYPE_DEAL_DAMAGE, typeID, entityTypeID }];
Object.values(player.quests.list).forEach(quest => quest.adjustTask(toBeAdjusted, damage));
};
module.exports = globalAttackCallback;