Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const Game = require("../Game/Game");
|
||||
const { players, guildIslands } = Game;
|
||||
|
||||
module.exports = async function (ws, message, player) {
|
||||
if (!player.guild.id) return;
|
||||
|
||||
const guildIslandID = message.getUint8(1);
|
||||
const guildIsland = guildIslands.find(island => island.id === guildIslandID);
|
||||
if (!guildIsland) return console.info("asd");
|
||||
|
||||
const id = message.getUint32(2);
|
||||
const tower = guildIsland.getTower(id);
|
||||
if (!tower) return console.info("asd2");
|
||||
|
||||
tower.initializeRepair();
|
||||
|
||||
console.info("Tower", tower.id, "is being repaired on guild island", guildIslandID);
|
||||
};
|
||||
Reference in New Issue
Block a user