Ver código fonte

修复站令工会问题

mafei 1 ano atrás
pai
commit
073613158c

+ 3 - 2
script/module/shop/WarOrder.lua

@@ -325,11 +325,12 @@ function warOrderUnlock(human,orderType)
 end
 
 -- 触发战令增加经验
-function trigger(human,orderType)
+function trigger(human,orderType,cnt)
+    cnt = cnt or 1 --默认触发一次
     local orderName = orderNameMap[orderType]
     local orderData = human.db.warOrder[orderName]
     local exp = orderExpMap[orderType]
-    orderData.exp =  orderData.exp + exp
+    orderData.exp =  orderData.exp + (exp * cnt)
     -- 是否需要推送?
     push2Client(human,orderType)
     -- 通知外层红点变更

+ 3 - 3
script/module/union/UnionEctypeLogic.lua

@@ -755,8 +755,6 @@ function onFightEnd(human, result, combatType, bossData, combatInfo)
                 end
             end
         end
-        local WarOrder = require("shop.WarOrder")
-        WarOrder.trigger(human,CLAN_ORDER_TYPE)
     end
     
     if bKill then
@@ -764,6 +762,8 @@ function onFightEnd(human, result, combatType, bossData, combatInfo)
     else
         oneEctypeQuery(human, level)
     end
+    local WarOrder = require("shop.WarOrder")
+    WarOrder.trigger(human,CLAN_ORDER_TYPE)
     UnionLivenessLogic.touchLiveness(human,UnionDefine.UNION_LIVENESS_ECTYPE,1)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_1002)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_1001)
@@ -902,7 +902,7 @@ function saodang(human, level, touch)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_1002)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_1001)
     local WarOrder = require("shop.WarOrder")
-    WarOrder.trigger(human,CLAN_ORDER_TYPE)
+    WarOrder.trigger(human,CLAN_ORDER_TYPE,killCnt or 1)
     YunYingLogic.onCallBack(human, "onUnionEctypeFight", killCnt or 0)
 end