UNPKG

ggejs

Version:

A powerful JavaScript library for interacting with the server of Goodgame Empire: Four Kingdoms

27 lines 863 B
module.exports.name = "csm"; /** * @param {Socket} socket * @param {InteractiveMapobject} source * @param {Mapobject | CastlePosition} target * @param {number} spyCount * @param {number} spyTypeId * @param {number} spyEffect * @param {Horse} horse */ module.exports.execute = function (socket, source, target, spyCount, spyTypeId, spyEffect, horse = null) { const C2SSendMessageVO = { getCmdId: "csm", params: { SID: source.objectId, TX: target.position.X, TY: target.position.Y, SC: spyCount, ST: spyTypeId, SE: spyEffect, HBW: horse?.wodId ?? -1, KID: source.kingdomId, PTT: horse?.isPegasusHorse ? 1 : 0, SD: 0, }, } require('../data').sendCommandVO(socket, C2SSendMessageVO); }