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
+26
View File
@@ -0,0 +1,26 @@
const AttackAbortedPacket = require("../Packets/AttackAborted");
const constants = require("../Data/constants");
const { TYPES } = constants;
const { ENTITY_TYPE_NPC } = TYPES;
module.exports = function (ws, message, player) {
const targetIdentifier = player.abortAttack();
if (!targetIdentifier) return;
const packet = AttackAbortedPacket({
authorID: targetIdentifier.id,
authorTypeID: targetIdentifier.typeID,
targetID: player.id,
targetTypeID: player.typeID
});
player.map.registerIndividualNetworkPacket(player.id, packet);
if (targetIdentifier.typeID === ENTITY_TYPE_NPC) {
const target = player.map.getEntityFromSubgroup(targetIdentifier.id);
if (!target) return;
target.determineMovementState();
};
};