Bläddra i källkod

Merge branch '360test' of http://43.226.57.217:3000/yishanyou/GongFuServer into 360test

pigflower 1 månad sedan
förälder
incheckning
57dcedf8f5

+ 2 - 0
script/common/Lang.lua

@@ -539,6 +539,8 @@ ABS_ARBORDAY_MAYI_DESC_4 = [[活动期间每进行一竞技场挑战可获得1
 ABS_ZHANBU_LUNPAN_ERR = [[占卜轮盘奖励已全部获取,无法再获取了]]
 ABS_SURPRISE_CHEST_GET_SUCESS = [[领取成功]]
 
+ABS_JYZH_NOT_OPEN = [[服务器≥5天且每周五维护后开启]]
+
 SKIN_CONF_ERR = [[配置错误]]
 SKIN_PARAM_ERR = [[参数错误]]
 

+ 1 - 1
script/module/absAct/AbsActLogic.lua

@@ -300,7 +300,7 @@ function actDetailQuery(human, id)
   
     if startFlag == nil then
         checkAbsActClean(human, id)
-        return Broadcast.sendErr(human, Lang.ACT_NOT_START)
+        return --Broadcast.sendErr(human, Lang.ACT_NOT_START)
     end
 
     -- 确保活动数据已初始化

+ 7 - 1
script/module/absAct/CommonActLoginGift.lua

@@ -175,7 +175,7 @@ function onCharge(human, nBuyID, buyNum)
 end
 
 function updateDaily(human, funcID)
-    if isOpenAct(human, COMMONACT_LOGINGIFT_ID) then
+    if not isOpenAct(human, COMMONACT_LOGINGIFT_ID) then
         return
     end
 
@@ -187,6 +187,9 @@ end
 
 -- 查询
 function CommonActLoginGift_Query(human)
+    if not isOpenAct(human, COMMONACT_LOGINGIFT_ID) then
+        return Broadcast.sendErr(human, Lang.YUNYING_ERR_TIME)
+    end
     local msgRet = Msg.gc.GC_ABS_COMONACT_LOGINGIFT_QUERY
     msgRet.giftDatafree[0] = 0
     msgRet.giftData68[0] = 0
@@ -254,6 +257,9 @@ end
 
 -- 领取奖励
 function CommonActLoginGift_GetReward(human, targetGiftType)
+    if not isOpenAct(human, COMMONACT_LOGINGIFT_ID) then
+        return Broadcast.sendErr(human, Lang.YUNYING_ERR_TIME)
+    end
     local type_2_cfg = transformCfg()
     local giftArr = type_2_cfg[targetGiftType]
     if not giftArr then

+ 3 - 0
script/module/absAct/CommonActMoneyTree.lua

@@ -184,6 +184,9 @@ end
 
 -- 查询
 function CommonActMoneyTree_Query(human)
+    if not isOpenAct(human, COMMONACT_MONEYTREE_ID) then
+        return Broadcast.sendErr(human, Lang.YUNYING_ERR_TIME)
+    end
     local msgRet = Msg.gc.GC_ABS_COMONACT_MONEYTREE_QUERY
     msgRet.rewardBasket[0] = 0
     msgRet.weighMax = BASKET_WEIGHT_MAX

+ 23 - 23
script/module/absAct/MangHeLogic.lua

@@ -381,23 +381,23 @@ function mangHeGift(human, id, buyConf, isFirst, cnt, buyNum)
     AbsActLogic.checkAbsActClean(human, id)
     local config = AbsActExcel.mangHeGift[1]
     local buyCnt = human.db.absAct[id].buyCnt and human.db.absAct[id].buyCnt or 0
-    if config.cnt <= buyCnt then
-        return 
-    end
-
-    -- if buyCnt + buyNum >= config.cnt  then
-    --     return
+    -- if config.cnt <= buyCnt then
+    --     return 
     -- end
+
+    if buyCnt + buyNum > config.cnt  then
+        return Broadcast.sendErr(human, Lang.COPY_BUY_CNT_ERR_CNT)
+    end
     
-    -- human.db.absAct[id].buyCnt = buyCnt + buyNum
-    -- local tItemList = {}
-    -- for index, v in ipairs(config.reward) do
-    --     table.insert(tItemList, {v[1], v[2]*buyNum})
-    -- end
-    -- BagLogic.addItemList(human, tItemList, "abs_manghe")
+    human.db.absAct[id].buyCnt = buyCnt + buyNum
+    local tItemList = {}
+    for index, v in ipairs(config.reward) do
+        table.insert(tItemList, {v[1], v[2]*buyNum})
+    end
+    BagLogic.addItemList(human, tItemList, "abs_manghe")
 
-    human.db.absAct[id].buyCnt = buyCnt + 1
-    BagLogic.addItemList(human, config.reward, "abs_manghe")
+    -- human.db.absAct[id].buyCnt = buyCnt + 1
+    -- BagLogic.addItemList(human, config.reward, "abs_manghe")
     query(human, id)
 end
 
@@ -513,13 +513,13 @@ function isOpen(human, YYInfo, funcConfig)
     return AbsActLogic.isStarted(human, funcConfig.funcID)
 end
 
--- function GetRemainNum(human, nBuyID)
---     local config = AbsActExcel.mangHeGift[1]
---     if config.buyID ~= nBuyID then
---         return 0
---     end
+function GetRemainNum(human, nBuyID)
+    local config = AbsActExcel.mangHeGift[1]
+    if config.buyID ~= nBuyID then
+        return 0
+    end
 
---     AbsActLogic.checkAbsActClean(human, MANGHE_ABS_ID)
---     local buyCnt = human.db.absAct[MANGHE_ABS_ID].buyCnt and human.db.absAct[MANGHE_ABS_ID].buyCnt or 0
---     return buyCnt < config.cnt and (config.cnt - buyCnt) or 0
--- end
+    AbsActLogic.checkAbsActClean(human, MANGHE_ABS_ID)
+    local buyCnt = human.db.absAct[MANGHE_ABS_ID].buyCnt and human.db.absAct[MANGHE_ABS_ID].buyCnt or 0
+    return buyCnt < config.cnt and (config.cnt - buyCnt) or 0
+end

+ 4 - 1
script/module/battle/BattleLogic.lua

@@ -3515,6 +3515,9 @@ function mopupFight(human)
         return Broadcast.sendErr(human, Lang.BATTLE_MOPUP_CNT_OVER)
     end
 
+    local msgRet = Msg.gc.GC_BATTLE_MOPUP_FIGHT
+    msgRet.isDailyFirstMopup = human.db.mopupFreeCnt <= 0 and 1 or 0
+
     local bUseFree = false
     if not TequanShopLogic.isActiveMopup(human) then
         if human.db.mopupDoCnt >= BATTLE_MOPUP_CNT and 0 >= nNowAddFreeCnt then
@@ -3566,7 +3569,7 @@ function mopupFight(human)
 
     -- local config = BattleExcel.node[guajiID]
     local config = tBattleConfig.node[guajiID]
-    local msgRet = Msg.gc.GC_BATTLE_MOPUP_FIGHT
+    -- local msgRet = Msg.gc.GC_BATTLE_MOPUP_FIGHT
 
     local vipExpAdd =(VipLogic.getPowerArgs(human, VipLogic.VIP_POWER7) or 0) / 100
     local vipJinAdd =(VipLogic.getPowerArgs(human, VipLogic.VIP_POWER8) or 0) / 100

+ 1 - 0
script/module/battle/Proto.lua

@@ -248,6 +248,7 @@ GC_BATTLE_MOPUP_FIGHT = {
 	{"qingbao",	      1,	  "int"},	            --情报
     {"item",40,ItemData},
 	{"double",        1,      "byte"},
+	{"isDailyFirstMopup",     1,      "byte"}, 		-- 是否是当天的第一次扫荡, 0-不是, 1-是
 }
 
 -- 扫荡查询

+ 47 - 0
script/module/combat/BeSkill.lua

@@ -504,6 +504,49 @@ local function isCanRevive(obj, attacker , data)
 	return true
 end
 
+-- 连击检测
+local function comboCheck(targetObj, side)
+	if Skill.GroupSkillCnt ~= 1 then return end--技能包首次技能攻击才能触发
+	if CombatImpl.isFanji or CombatImpl.comboType > 0 then return end
+
+	for _,pos in ipairs(CombatDefine.SIDE2POS[side]) do
+		local obj = CombatImpl.objList[pos]
+		if obj and obj.beSkillList then
+			for _, skillInfo in ipairs(obj.beSkillList[BESKILL_TYPE72] or {}) do
+				local skillCfg = Skill.GetSkillConfig(skillInfo[1])
+				if skillCfg and skillCfg.cmd == "comboProb" then
+					local targetType = skillCfg.beSkillArgs[2] or 0
+					local targetList = skillCfg.beSkillArgs[3]
+					if targetType <= 0 or not targetList then
+						return
+					end
+
+					local bl = false
+					if targetType == 1 then -- 职业
+						if table.find(targetList, targetObj.job) then
+							bl = true
+						end
+					elseif targetType == 2 then -- 种族
+						if table.find(targetList, targetObj.camp) then
+							bl = true
+						end
+					end
+
+					if not bl then return end
+
+					local comboProbVal = skillCfg.beSkillArgs[1] or 0
+					local randval = math.random(0, 10000)
+					if comboProbVal >= randval then
+						CombatImpl.comboList[#CombatImpl.comboList + 1] = {targetObj, 1}
+					end
+				end
+			end
+		end
+    end
+end
+
+
+
 function onSkillID(obj,skillID)
 	--local skillConfig = SkillExcel[skillID]
 	local skillConfig = Skill.GetSkillConfig(skillID)
@@ -945,8 +988,12 @@ function onHit(attacker,targets,skillID)
 			end
 		end
 	end
+
+	comboCheck(attacker, side)
 end
 
+
+
 function onHp(obj, hurt, attackPos)
 	if obj.beSkillList[BESKILL_TYPE3] then
 		for _,v in ipairs(obj.beSkillList[BESKILL_TYPE3]) do

+ 45 - 0
script/module/combat/CombatBuff.lua

@@ -306,6 +306,46 @@ local function isMiankong(obj, cmd, attacker, skillKongRate)
 	end
 end
 
+local sp_notBan_buff_list = {
+	["hp"] = true,
+}
+
+-- 是否可能被禁止增加buff
+local function isBanBuff(obj, cmd)
+	if sp_notBan_buff_list[cmd] then
+		return false
+	end
+
+	initCombatBufferType()
+
+	if BUFFER_COMBAT_TYPE[cmd] and BUFFER_COMBAT_TYPE[cmd] == 2 then
+		local res, _, ind = isStatus(obj, { "linglun" })
+		if not res then
+			return false
+		end
+
+		local buffList = getBuffer(obj)
+		local buff = buffList[ind]
+		if not buff then
+			return false
+		end
+
+		local buffCfg = GetBuffConfig(buff.id)
+		if not buffCfg then
+			return false
+		end
+
+		local banProbVal = buffCfg.args[1] or 0
+		local randval = math.random(0, 10000)
+		if banProbVal >= randval then
+			return true
+		end
+	end
+
+	return false
+end
+
+
 function getStatus(obj)
 	return obj.bufferCmd or {}
 end
@@ -635,6 +675,11 @@ local function canAdd(obj, id, random, attacker, skillConfig)
 	-- 		return
 	-- 	end
 	-- end
+
+	if isBanBuff(obj, conf.cmd) then
+		return
+	end
+
 	return true
 end
 --根据cmd删除buff

+ 34 - 0
script/module/combat/TargetMode.lua

@@ -1401,6 +1401,39 @@ local function handler37(attacker,targetMode,skillTargets)
 end
 
 
+-- 从全体中根据职业选择
+--[[
+	@param2 = {
+		handlerID,
+		side    0: 全部双方  1:敌方 2: 己方
+		jobList    -- 职业集合
+		onjCnt 目标数量, 默认1
+	}
+]]
+local function handler38(attacker,targetMode,skillTargets)
+	local targetSide = getTargetSide(attacker,targetMode)
+	local jobList = targetMode[3] or {}
+	local cnt = targetMode[4] or 1
+
+	local targetList = {}
+	for _,pos in ipairs(CombatDefine.DEFAULT_TARGET_POS3[targetSide]) do
+		local obj = getObj(pos)
+		if canTarget(obj) and table.find(jobList, obj.job) then
+			targetList[#targetList+1] = obj
+		end
+	end
+
+
+	for _, obj in ipairs (targetList) do
+		if #targets >= cnt then
+			break
+		end
+
+		targets[#targets + 1] = obj
+	end
+end
+
+
 ------------------------------ 分界线 ------------------------------
 -- 目前是一样了,等策划配置好skill表后删掉 @mafei
 local function handler3(attacker,targetMode)
@@ -1446,5 +1479,6 @@ handler[34] = handler34	--从技能目标中根据职业选择
 handler[35] = handler35	--从全体中根据种族选择
 handler[36] = handler36	--按照属性X排序,选择前Y个目标, 且排除技能施放者,属性值需要比技能施放者高/低
 handler[37] = handler37 -- 在技能目标中选择友方/敌方
+handler[38] = handler38	--从全体中根据职业选择
 
 --对象选择器end

+ 1 - 1
script/module/drawCard/DrawCardLogic.lua

@@ -625,7 +625,7 @@ local function draw(human, id, op, actConfig, skip,isAct)
     local state, endTime, starTime = AbsActLogic.isStarted(human, NewHeroLogic.ABS_ACT_ID)
 
     if id == DRAWCARD_ID8 and not state then
-        return Broadcast.sendErr(human, Lang.DRILL_NOT_OPEN)
+        return Broadcast.sendErr(human, Lang.ABS_JYZH_NOT_OPEN)
     end