c1_lua/lua/app/server/manager/server_formation_manager.lua
2023-04-11 20:05:03 +08:00

27 lines
665 B
Lua

local ServerFormationManager = {}
function ServerFormationManager:updateFormation(params, callback)
local result = {
status = 1
}
if params == nil then
if callback then
callback(result)
end
return
end
local formationType = params.formationType
local matchType = tostring(params.matchType)
local heroId = params.heroId
if formationType and matchType and heroId then
local ServerGameData = require "app/server/server_game_data"
if ServerGameData.FormationData:upHeroToFormation(formationType, matchType, heroId) then
result.status = 0
end
end
if callback then
callback(result)
end
end
return ServerFormationManager