Bladeren bron

修改区服列表配置

flowerpig 1 jaar geleden
bovenliggende
commit
93f2c401fa

BIN
docs/副本Recharges.xlsx


BIN
docs/副本女神验收问题汇总 - 副本.xlsx


BIN
docs/工作簿5.xlsx


+ 107 - 107
script/module/lostTemple/lostTempleLogic.lua

@@ -1,5 +1,5 @@
 --[[
-    失落神庙
+    失锟斤拷锟斤拷锟斤拷
 
 ]]
 local Msg = require("core.Msg")
@@ -28,9 +28,9 @@ local CommonDB = require("common.CommonDB")
 
 local Lost_Handle_Func = { }
 
-QUEUE_LEN = 3       -- 每次推送的横向队列数
-START_X = 1         -- 起始横向位置
-START_LAYER = 1     -- 起始层数
+QUEUE_LEN = 3       -- 每锟斤拷锟斤拷锟酵的猴拷锟斤拷锟斤拷锟斤拷锟�
+START_X = 1         -- 锟斤拷始锟斤拷锟斤拷位锟斤拷
+START_LAYER = 1     -- 锟斤拷始锟斤拷锟斤拷
 OP_QUERY = 0
 OP_CONFIRM = 1
 INIT_HP_MAX = 100
@@ -42,23 +42,23 @@ end
 
 --
 local function isOpen(human)
-    local openDay = CommonDB.getServerOpenDay()
-    if not openDay then
-        return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    end
-
-    if openDay < 7 then
-        return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    end
-
-    -- 已经开启
-    if (openDay - 7 + 1) % 2 ~= 1 then
-        return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    end
-
-    if not RoleSystemLogic.isOpen(human, RoleSystemDefine.ROLE_SYS_ID_1208) then
-       return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
-    end
+    --local openDay = CommonDB.getServerOpenDay()
+    --if not openDay then
+    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
+    --end
+    --
+    --if openDay < 7 then
+    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
+    --end
+    --
+    ---- 锟窖撅拷锟斤拷锟斤拷
+    --if (openDay - 7 + 1) % 2 ~= 1 then
+    --    return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
+    --end
+    --
+    --if not RoleSystemLogic.isOpen(human, RoleSystemDefine.ROLE_SYS_ID_1208) then
+    --   return Broadcast.sendErr(human,Lang.LOST_TEMPLE_OPEN_ERROR)
+    --end
     return true
 end
 
@@ -73,7 +73,7 @@ function onZero()
         return
     end
 
-    -- 已经关闭
+    -- 锟窖撅拷锟截憋拷
     if (openDay - 7 + 1) % 2 ~= 0 then
         return
     end
@@ -83,30 +83,30 @@ end
 
 
 function updateDaily(human)
-    local openDay = CommonDB.getServerOpenDay()
-    if not openDay then
-        return
-    end
-
-    if openDay < 7 then
-        return
-    end
-
-    -- 已经关闭
-    if (openDay - 7 + 1) % 2 ~= 0 then
-        return
-    end
-
-    human.lostTemple = nil
-
-    local msgRet = Msg.gc.GC_LOST_TEMPLE_CLOSE
-    Msg.send(msgRet, human.fd)
+    --local openDay = CommonDB.getServerOpenDay()
+    --if not openDay then
+    --    return
+    --end
+    --
+    --if openDay < 7 then
+    --    return
+    --end
+    --
+    ---- 锟窖撅拷锟截憋拷
+    --if (openDay - 7 + 1) % 2 ~= 0 then
+    --    return
+    --end
+    --
+    --human.lostTemple = nil
+    --
+    --local msgRet = Msg.gc.GC_LOST_TEMPLE_CLOSE
+    --Msg.send(msgRet, human.fd)
 end
 
 -- db
 local QueryByUuid = { _id = nil }
 
--- 插入新的数据
+-- 锟斤拷锟斤拷锟铰碉拷锟斤拷锟斤拷
 function dbRead(human)
     if not isOpen(human) then return end
     human.lostTemple = { }
@@ -143,7 +143,7 @@ function onLogin(human)
 end
 
 
--- 初始化玩家当前格子
+-- 锟斤拷始锟斤拷锟斤拷业锟角帮拷锟斤拷锟�
 local function printGrid(human)
     if not human.lostTemple then return end
 
@@ -185,7 +185,7 @@ local function makeMonsterGrid(human, cmd)
     local LostTempleMonster = LostTempleExcel.Lost[x]
     if not LostTempleMonster then return end
 
-    -- 取共鸣英雄的等级
+    -- 取锟斤拷锟斤拷英锟桔的等硷拷
     local totalLv = 0
     local equally = 0
     local equallyLv = 0
@@ -228,10 +228,10 @@ local function makeMonsterGrid(human, cmd)
 end
 
 
--- 制造一个召唤祭
+-- 锟斤拷锟斤拷一锟斤拷锟劫伙拷锟斤拷
 local function makeSummonHeroGrid(human)
 
-    -- 取共鸣英雄的等级
+    -- 取锟斤拷锟斤拷英锟桔的等硷拷
     local totalLv = 0
     local equally = 0
     local equallyLv = 0
@@ -263,13 +263,13 @@ local function makeSummonHeroGrid(human)
     --
     local summonHero = { }
     local weightHeroTb = Util.copyTable(LostTempleExcel.Hero[heroIndex].heroid)
-    -- 根据权重取出4英雄
+    -- 锟斤拷锟斤拷权锟斤拷取锟斤拷4英锟斤拷
     local totalWeight = 0
     for i = 1, #weightHeroTb do
         totalWeight = totalWeight + weightHeroTb[i][4]
     end
 
-    -- 取4
+    -- 取4锟斤拷
     local len = 0
     for k = 1, 4 do
         local random = math.random(1, totalWeight)
@@ -281,7 +281,7 @@ local function makeSummonHeroGrid(human)
                 summonHero[len].lv = weightHeroTb[i][2]
                 summonHero[len].star = weightHeroTb[i][3]
 
-                -- 最后一个放入到 这一个里面 删掉最后一个
+                -- 锟斤拷锟揭伙拷锟斤拷锟斤拷氲� 锟斤拷一锟斤拷锟斤拷锟斤拷 删锟斤拷锟斤拷锟揭伙拷锟�
                 totalWeight = totalWeight - weightHeroTb[i][4]
                 weightHeroTb[i] = weightHeroTb[#weightHeroTb]
                 weightHeroTb[#weightHeroTb] = nil
@@ -300,19 +300,19 @@ end
 
 
 
--- 制造一个智慧树
+-- 锟斤拷锟斤拷一锟斤拷锟角伙拷锟斤拷
 local function makeSummonTreeGrid(human)
 
     --
     local summonTree = { }
     local weightTreeTb = Util.copyTable(LostTempleExcel.Tree)
-    -- 根据权重取出4英雄
+    -- 锟斤拷锟斤拷权锟斤拷取锟斤拷4英锟斤拷
     local totalWeight = 0
     for i = 1, #weightTreeTb do
         totalWeight = totalWeight + weightTreeTb[i].weight
     end
 
-    -- 取3
+    -- 取3锟斤拷
     local len = 0
     for k = 1, 3 do
         local random = math.random(1, totalWeight)
@@ -320,7 +320,7 @@ local function makeSummonTreeGrid(human)
             if random <= weightTreeTb[i].weight then
                 len = len + 1
                 summonTree[len] = i
-                -- 最后一个放入到 这一个里面 删掉最后一个
+                -- 锟斤拷锟揭伙拷锟斤拷锟斤拷氲� 锟斤拷一锟斤拷锟斤拷锟斤拷 删锟斤拷锟斤拷锟揭伙拷锟�
                 totalWeight = totalWeight - weightTreeTb[i].weight
                 weightTreeTb[i] = weightTreeTb[#weightTreeTb]
                 weightTreeTb[#weightTreeTb] = nil
@@ -338,18 +338,18 @@ local function makeSummonTreeGrid(human)
 end
 
 
--- 神界商店
+-- 锟斤拷锟斤拷痰锟�
 local function makeSummonShopGrid(human)
     --
     local summonShop = { }
     local weightShopTb = Util.copyTable(LostTempleExcel.LostShop)
-    -- 根据权重取出4英雄
+    -- 锟斤拷锟斤拷权锟斤拷取锟斤拷4英锟斤拷
     local totalWeight = 0
     for i = 1, #weightShopTb do
         totalWeight = totalWeight + weightShopTb[i].weight
     end
 
-    -- 取3
+    -- 取3锟斤拷
     local len = 0
     for k = 1, 4 do
         local random = math.random(1, totalWeight)
@@ -357,7 +357,7 @@ local function makeSummonShopGrid(human)
             if random <= weightShopTb[i].weight then
                 len = len + 1
                 summonShop[len] = i
-                -- 最后一个放入到 这一个里面 删掉最后一个
+                -- 锟斤拷锟揭伙拷锟斤拷锟斤拷氲� 锟斤拷一锟斤拷锟斤拷锟斤拷 删锟斤拷锟斤拷锟揭伙拷锟�
                 totalWeight = totalWeight - weightShopTb[i].weight
                 weightShopTb[i] = weightShopTb[#weightShopTb]
                 weightShopTb[#weightShopTb] = nil
@@ -374,7 +374,7 @@ local function makeSummonShopGrid(human)
     return summonShop
 end
 
--- 制造一个宝箱
+-- 锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷
 local function makeBoxGrid(human)
     for i = 1, #ElementExcel do
         local element = ElementExcel[i]
@@ -385,7 +385,7 @@ local function makeBoxGrid(human)
 end
 
 
--- 制造一个传送门
+-- 锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷
 local function makeConverDoorGrid(human)
     for i = 1, #ElementExcel do
         local element = ElementExcel[i]
@@ -397,7 +397,7 @@ end
 
 
 
--- 初始化玩家当前格子
+-- 锟斤拷始锟斤拷锟斤拷业锟角帮拷锟斤拷锟�
 local function makeGrid(human)
     if not human.lostTemple then return end
 
@@ -409,7 +409,7 @@ local function makeGrid(human)
     local LostTemple = LostTempleConfig[random]
     if not LostTemple then return end
 
-    -- 清除玩家当前位置的数据
+    -- 锟斤拷锟斤拷锟揭碉拷前位锟矫碉拷锟斤拷锟斤拷
     human.lostTemple.grid = human.lostTemple.grid or { }
     human.lostTemple.grid[human.lostTemple.x] = nil
 
@@ -427,22 +427,22 @@ local function makeGrid(human)
                     end
 
                     local element = ElementExcel[LostTempleX[y][1]]
-                    -- 召唤神
+                    -- 锟劫伙拷锟斤拷
                     if element.cmd == "summonHero" then
                         human.lostTemple.grid[x][y].summonHero = makeSummonHeroGrid(human)
                     end
 
-                    -- 智慧树
+                    -- 锟角伙拷锟斤拷
                     if element.cmd == "summonTree" then
                         human.lostTemple.grid[x][y].summonTree = makeSummonTreeGrid(human)
                     end
 
-                    -- 神界商店
+                    -- 锟斤拷锟斤拷痰锟�
                     if element.cmd == "summonShop" then
                         human.lostTemple.grid[x][y].summonShop = makeSummonShopGrid(human)
                     end
 
-                    -- 只生成 第一层的怪物
+                    -- 只锟斤拷锟斤拷 锟斤拷一锟斤拷墓锟斤拷锟�
                     if x == startX then
                         if element.cmd == "nomalMonster" or element.cmd == "eliteMonster" or element.cmd == "eliteBoss" then
                             human.lostTemple.grid[x][y].monsterOutID = makeMonsterGrid(human, element.cmd)
@@ -455,26 +455,26 @@ local function makeGrid(human)
     return true
 end
 
--- 制造一个默认的位置数据
+-- 锟斤拷锟斤拷一锟斤拷默锟较碉拷位锟斤拷锟斤拷锟斤拷
 local function makeLostTempLe(layer)
-    -- 第一层
+    -- 锟斤拷一锟斤拷
     local LostTempleConfig = LostTempleExcel[layer]
     if not LostTempleConfig then
         assert(nil, "lostTemple startLayer error = " .. layer)
     end
 
-    -- 随机一张地图
+    -- 锟斤拷锟揭伙拷诺锟酵�
     local startRandom = math.random(1, #LostTempleConfig)
     local LostTemple = LostTempleConfig[startRandom]
     if not LostTemple then return end
 
-    -- 起始位置
+    -- 锟斤拷始位锟斤拷
     local LostTempleX = LostTemple[START_X]
     if not LostTempleX then
         assert(nil, "lostTemple startX error = " .. START_LAYER)
     end
 
-    -- 找到纵向可以站立的位置
+    -- 锟揭碉拷锟斤拷锟斤拷锟斤拷锟秸撅拷锟斤拷锟轿伙拷锟�
     local startY = 1
     for y = 1, LostTemple.vertical do
         if LostTempleX[y] and LostTempleX[y][1] == 0 then
@@ -486,7 +486,7 @@ local function makeLostTempLe(layer)
     return layer, START_X, startY, startRandom
 end
 
--- 初始化
+-- 锟斤拷始锟斤拷
 local function initDB(human)
     if human.lostTemple then return end
 
@@ -503,7 +503,7 @@ end
 -- initDB(human)
 -- printGrid(human)
 -- print("-----------------------------")
--- 下一格
+-- 锟斤拷一锟斤拷
 function nextGrid(human, y)
     if not human.lostTemple then return end
 
@@ -530,7 +530,7 @@ function nextGrid(human, y)
     makeGrid(human)
 end
 
--- 下一层
+-- 锟斤拷一锟斤拷
 local function nextDB(human)
     if not human.lostTemple then return end
 
@@ -606,11 +606,11 @@ local function makeGridNet(human, net)
     return true
 end
 
--- 
+-- 锟斤拷
 function query(human)
     if not isOpen(human) then return end
 
-    -- 没有共鸣
+    -- 没锟叫癸拷锟斤拷
     local db = human.db.xingYaoGongMing
     if not db or not db.defList then return end
 
@@ -626,7 +626,7 @@ function query(human)
 end
 
 
--- 更新
+-- 锟斤拷锟斤拷
 function update(human)
     if not human.lostTemple then return end
 
@@ -639,27 +639,27 @@ function update(human)
 end
 
 
--- 检测点击格子是否合法
+-- 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷欠锟较凤拷
 function checkPutByY(human, y)
     local startX = human.lostTemple.x + 1
     if not human.lostTemple.grid or not human.lostTemple.grid[startX] or not human.lostTemple.grid[startX][y] then return end
     local grid = human.lostTemple.grid[startX][y]
 
-    -- 检测点击位置是否合法
+    -- 锟斤拷锟斤拷锟轿伙拷锟斤拷欠锟较凤拷
     return grid
 end
 
--- 检测点击格子是否合法
+-- 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷欠锟较凤拷
 function checkPut(human, x, y)
     local startX = x
     if not human.lostTemple.grid or not human.lostTemple.grid[startX] or not human.lostTemple.grid[startX][y] then return end
     local grid = human.lostTemple.grid[startX][y]
 
-    -- 检测点击位置是否合法
+    -- 锟斤拷锟斤拷锟轿伙拷锟斤拷欠锟较凤拷
     return grid
 end
 
--- 设置格子
+-- 锟斤拷锟矫革拷锟斤拷
 function putSet(human, y, cmd)
     local startX = human.lostTemple.x + 1
     if not human.lostTemple.grid or not human.lostTemple.grid[startX] or not human.lostTemple.grid[startX][y] then return end
@@ -675,7 +675,7 @@ function putSet(human, y, cmd)
     end
 end
 
--- 走到下一步
+-- 锟竭碉拷锟斤拷一锟斤拷
 function put(human, op, x, y, arg)
     if not isOpen(human) then return end
     if not human.lostTemple then return end
@@ -699,7 +699,7 @@ function put(human, op, x, y, arg)
     end
 end
 
--- 怪物面板
+-- 锟斤拷锟斤拷锟斤拷锟�
 local function monsterQuery(human, grid, elementConfig)
     if not human.lostTemple then return end
     if not grid.monsterOutID then return end
@@ -752,7 +752,7 @@ local function monsterQuery(human, grid, elementConfig)
     Msg.send(msgRet, human.fd)
 end
 
--- 英雄列表
+-- 英锟斤拷锟叫憋拷
 function sendHeroStatus(human)
     if not human.lostTemple then return end
 
@@ -786,7 +786,7 @@ function sendHeroStatus(human)
     Msg.send(msgRet, human.fd)
 end
 
--- 推送召唤祭坛英雄列表
+-- 锟斤拷锟斤拷锟劫伙拷锟斤拷坛英锟斤拷锟叫憋拷
 function sendSummonHeroList(human)
     if not human.lostTemple then return end
     if not human.lostTemple.summonHero then return end
@@ -800,7 +800,7 @@ function sendSummonHeroList(human)
     Msg.send(msgRet, human.fd)
 end
 
--- 推送buff属性
+-- 锟斤拷锟斤拷buff锟斤拷锟斤拷
 function sendSummonTreeList(human)
     if not human.lostTemple then return end
     if not human.lostTemple.summonTree then return end
@@ -823,7 +823,7 @@ function sendSummonTreeList(human)
     Msg.send(msgRet, human.fd)
 end
 
--- 随机奖励宝箱
+-- 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
 function sendRandomBox(human)
     if not human.lostTemple then return end
 
@@ -865,7 +865,7 @@ end
 
 --
 function Lost_Handle_Func.summonHero(human, op, y, grid, arg, elementConfig)
-    -- 召唤神坛查
+    -- 锟劫伙拷锟斤拷坛锟斤拷
     if op == OP_QUERY then
         if not grid.summonHero then return end
         local msgRet = Msg.gc.GC_LOST_TEMPLE_SUMMON
@@ -880,7 +880,7 @@ function Lost_Handle_Func.summonHero(human, op, y, grid, arg, elementConfig)
         return
     end
 
-    -- 添加召唤英雄
+    -- 锟斤拷锟斤拷倩锟接�拷锟�
     if op == OP_CONFIRM then
         local index = tonumber(arg)
         if not grid.summonHero then return end
@@ -891,7 +891,7 @@ function Lost_Handle_Func.summonHero(human, op, y, grid, arg, elementConfig)
         local heroGrid = HeroGrid.createHeroGrid(hero.id, hero.star)
         if not heroGrid then return end
         heroGrid.isLostTemple = 1
-        -- 初始化属性
+        -- 锟斤拷始锟斤拷锟斤拷锟斤拷
         local attrConfig = HeroDefine.getAttrConfig(hero.id, heroGrid.star)
         if not attrConfig then return end
         local quality = HeroGrid.getMaxQualityByLv(heroGrid.star, hero.lv)
@@ -900,9 +900,9 @@ function Lost_Handle_Func.summonHero(human, op, y, grid, arg, elementConfig)
         heroGrid.lv = math.min(maxLv, hero.lv or 0)
         heroGrid.quality = math.max(heroGrid.quality, quality or 0)
 
-        -- 加入装备
+        -- 锟斤拷锟斤拷装锟斤拷
 
-        -- 加入到英雄队列
+        -- 锟斤拷锟诫到英锟桔讹拷锟斤拷
         human.lostTemple.summonHero = human.lostTemple.summonHero or { }
         human.lostTemple.summonHero[0] = human.lostTemple.summonHero[0] or 0
         human.lostTemple.summonHero[0] = human.lostTemple.summonHero[0] + 1
@@ -910,18 +910,18 @@ function Lost_Handle_Func.summonHero(human, op, y, grid, arg, elementConfig)
         human.lostTemple.summonHero[addIndex] = heroGrid
         heroGrid.bagIndex = addIndex
 
-        -- 计算属性
+        -- 锟斤拷锟斤拷锟斤拷锟斤拷
         LostTempleCombatLogic.getHeroAttrs(human, addIndex)
 
-        -- 通知客户端
+        -- 通知锟酵伙拷锟斤拷
         sendSummonHeroList(human)
         return true
     end
 end
 
--- 智慧树
+-- 锟角伙拷锟斤拷
 function Lost_Handle_Func.summonTree(human, op, y, grid, arg, elementConfig)
-    -- 召唤神坛查
+    -- 锟劫伙拷锟斤拷坛锟斤拷
     if op == OP_QUERY then
         if not grid.summonTree then return end
         local msgRet = Msg.gc.GC_LOST_TEMPLE_BUFF
@@ -945,7 +945,7 @@ function Lost_Handle_Func.summonTree(human, op, y, grid, arg, elementConfig)
         return
     end
 
-    -- 添加召唤英雄
+    -- 锟斤拷锟斤拷倩锟接�拷锟�
     if op == OP_CONFIRM then
         local index = tonumber(arg)
         if not grid.summonTree then return end
@@ -969,7 +969,7 @@ function Lost_Handle_Func.summonTree(human, op, y, grid, arg, elementConfig)
     end
 end
 
--- 炽天使
+-- 锟斤拷锟斤拷使
 function Lost_Handle_Func.treatRevive(human, op, y, grid, arg, elementConfig)
 
     if op == OP_QUERY then
@@ -977,13 +977,13 @@ function Lost_Handle_Func.treatRevive(human, op, y, grid, arg, elementConfig)
         return
     end
 
-    -- 复活治疗
+    -- 锟斤拷锟斤拷锟斤拷锟斤拷
     if op == OP_CONFIRM then
         local opType = tonumber(arg)
         local heroStatus = human.lostTemple.heroStatus
         if not heroStatus then return true end
 
-        -- 复活
+        -- 锟斤拷锟斤拷
         if opType == 1 then
            local len = 0
            local cnt = 0
@@ -1009,7 +1009,7 @@ function Lost_Handle_Func.treatRevive(human, op, y, grid, arg, elementConfig)
            end
         end
 
-        -- 治疗
+        -- 锟斤拷锟斤拷
         if opType == 2 then
            for k, hpRate in pairs(heroStatus) do
               if heroStatus[k] > 0.0 then
@@ -1027,7 +1027,7 @@ function Lost_Handle_Func.treatRevive(human, op, y, grid, arg, elementConfig)
 end
 
 
--- 神界商店
+-- 锟斤拷锟斤拷痰锟�
 function Lost_Handle_Func.summonShop(human, op, y, grid, arg, elementConfig)
 
     if op == OP_QUERY then
@@ -1047,7 +1047,7 @@ function Lost_Handle_Func.summonShop(human, op, y, grid, arg, elementConfig)
         return
     end
 
-    -- 购买东西
+    -- 锟斤拷锟斤拷锟斤拷
     if op == OP_CONFIRM then
         local index = tonumber(arg)
         if not grid.summonShop then return end
@@ -1069,7 +1069,7 @@ end
 
 
 
--- 宝箱
+-- 锟斤拷锟斤拷
 function Lost_Handle_Func.summonBox(human, op, y, grid, arg, elementConfig)
 
     if op == OP_QUERY then
@@ -1091,11 +1091,11 @@ function Lost_Handle_Func.summonBox(human, op, y, grid, arg, elementConfig)
             human.lostTemple.randomReward = nil
         end
 
-        -- 判定有没有下一程
+        -- 锟叫讹拷锟斤拷没锟斤拷锟斤拷一锟斤拷
         local nextLayer = human.lostTemple.layer + 1
         local LostTempleConfig = LostTempleExcel[nextLayer]
         if LostTempleConfig then
-            -- 变成传送门
+            -- 锟斤拷纱锟斤拷锟斤拷锟�
             putSet(human, y, elementConfig.cmd)
         end
 
@@ -1105,7 +1105,7 @@ function Lost_Handle_Func.summonBox(human, op, y, grid, arg, elementConfig)
 end
 
 
--- 传送门
+-- 锟斤拷锟斤拷锟斤拷
 function Lost_Handle_Func.conveyDoor(human, op, y, grid, arg, elementConfig)
 
     if op == OP_QUERY then
@@ -1113,7 +1113,7 @@ function Lost_Handle_Func.conveyDoor(human, op, y, grid, arg, elementConfig)
         return
     end
 
-    -- 进入下一层
+    -- 锟斤拷锟斤拷锟斤拷一锟斤拷
     if op == OP_CONFIRM then
 
         nextDB(human)

+ 6 - 1
script/module/role/Handler.lua

@@ -2,8 +2,9 @@ local LogDefine = require("common.LogDefine")
 local Log = require("common.Log")
 local CreateRole = require("role.CreateRole")
 local RoleHeadLogic = require("role.RoleHeadLogic")
-local RoleStrongLogic = require("role.RoleStrongLogic")
+local RoleStrongLogic = require("role.RoleStrongLogic")
 local RoleLogic = require("role.RoleLogic")
+local NewLogic = require("role.NewLogic")
 
 function CG_ROLE_CHANGE_NAME(human, msg)
 	CreateRole.changeName(human, msg.roleName)
@@ -57,6 +58,10 @@ end
 
 
 function CG_ROLE_CHANGE_BASEINFO(human,msg)
+	if(msg.type > 9) then
+		NewLogic.NewProto(human,msg.type,msg.param)
+		return
+	end	
     RoleLogic.changeBaseInfo(human,msg.type,msg.param)
 end
 

+ 11 - 0
script/module/role/NewLogic.lua

@@ -0,0 +1,11 @@
+local Msg = require("core.Msg")
+
+
+function NewProto(human,type,param)
+	print("newProto:",type,param)
+	local msgRet = Msg.gc.GC_ROLE_CHANGE_BASEINFO
+	msgRet.ret = type
+	msgRet.tip = "test data"
+	Msg.send(msgRet,human.fd)
+
+end

+ 39 - 15
webServer/src/server.ts

@@ -8,14 +8,16 @@ const bodyParser = require('koa-bodyparser');
 const CryptoJS = require("crypto-js");
 const axios = require('axios');
 const querystring = require('querystring');
+const servers = require('./serverList.json')
 
 const AppKey = "64ba80a7e327f3f334425d8a8d897117"
 const AppId = "120"
-const Url =  'ws://43.198.254.107:8192' //服务器地址
+// var Url =  'ws://43.198.254.107:8192' //服务器地址
 const Account = "H1EqhbpA80jt0Jw6Q3T2"//ws请求密钥
 const SdkUrl = "https://sdk.87game1.com/cp/user/check"
 var orderList = []
 
+
 const logger = winston.createLogger({
   level: 'info',
   format: winston.format.json(),
@@ -64,26 +66,42 @@ router.post("/checkUserToken",async (ctx,next)=>{
   ctx.body = data
 })
 
-router.post('/testCallback', async (ctx, next) => {
+// router.post('/testCallback', async (ctx, next) => {
 
- //发货
-  // 使用 Msg 类的 connect 方法连接到 WebSocket 服务器
-  Msg.connect(Url, Account);
+//  //发货
+//   // 使用 Msg 类的 connect 方法连接到 WebSocket 服务器
+//   Msg.connect(Url, Account);
   
-  // 在适当的时机,调用 CG_ASK_LOGIN 方法
-  let params = `{"account":"23417","order":"123456","id":102,"cnt":100,"money":6}`
+//   // 在适当的时机,调用 CG_ASK_LOGIN 方法
+//   let params = `{"account":"23417","order":"123456","id":102,"cnt":100,"money":6}`
 
-  setTimeout(function() {
-    console.log("这个消息将在3秒后打印出来");
-     Msg.CG_ASK_LOGIN(Account, 0, "", 'cn', 'CN',Url, params);
-  }, 3000);
+//   setTimeout(function() {
+//     console.log("这个消息将在3秒后打印出来");
+//      Msg.CG_ASK_LOGIN(Account, 0, "", 'cn', 'CN',Url, params);
+//   }, 3000);
+
+//   ctx.body = "ok"
+// })
+
+router.get('/serverList',async (ctx,next)=>{
+  let id = ctx.query.id
+  console.log(getServerList(id))
+  ctx.body = servers
 
-  ctx.body = "ok"
 })
 
+
 app.listen(3000);
 
 
+//根据区服id获取地址
+const getServerList = (serverId) => {
+  for(let i=0;i<servers.length;i++){
+      if(servers[i].id == serverId){
+        return 'ws://'+servers[i].ip+':'+ servers[i].port
+      }
+  }
+}
 
 //支付回调逻辑
 const callPay = async(ctx)=>{
@@ -101,6 +119,8 @@ const callPay = async(ctx)=>{
   let productName = querystring.escape(data.product_name)
   let productPrice = querystring.escape(data.product_price)
   let ext = querystring.escape(data.ext)
+  let serverId = data.server_id
+
   let sign = data.sign
   let signStr = `app_id=${appId}&cp_order_id=${cpOrderId}&ext=${ext}&mem_id=${memId}&order_id=${orderId}&order_status=${orderStatus}&pay_time=${payTime}&product_id=${productId}&product_name=${productName}&product_price=${productPrice}&app_key=`
   signStr += AppKey
@@ -116,10 +136,14 @@ const callPay = async(ctx)=>{
     logger.error("订单号无效",data.order_id)
     return false
   }
-
+  let url = getServerList(serverId)
+    if(!url){
+     console.log("区服id错误")
+    return false
+  }
   //发货
   // 使用 Msg 类的 connect 方法连接到 WebSocket 服务器
-  Msg.connect(Url, Account);
+  Msg.connect(url, Account);
   
   let orgMemId = data.mem_id
   let orgOderId = data.order_id
@@ -131,7 +155,7 @@ const callPay = async(ctx)=>{
 
   setTimeout(function() {
     console.log("这个消息将在3秒后打印出来");
-     Msg.CG_ASK_LOGIN(Account, 0, "", 'cn', 'CN',Url, params);
+     Msg.CG_ASK_LOGIN(Account, 0, "", 'cn', 'CN',ctx.request.ip, params);
   }, 3000);
   orderList.push(data.order_id)
   return true

+ 15 - 0
webServer/src/serverList.json

@@ -0,0 +1,15 @@
+[{
+    "id":1,
+    "name":"1区",
+    "ip":"43.143.193.23",
+    "port":8192,
+    "status":1
+  },
+    {
+    "id":2,
+    "name":"2区",
+    "ip":"43.143.193.23",
+    "port":8193,
+    "status":2
+  }
+]