From 0584da519dfcde7f58caf78b53d1eb0570e34ec3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 14 一月 2026 15:23:49 +0800
Subject: [PATCH] 302 【公会】BOSS讨伐-服务端(修复无讨伐次数无法进行怒气斩杀bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTaofa.py | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTaofa.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTaofa.py
index 510f31e..23cf5e2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTaofa.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamilyTaofa.py
@@ -352,14 +352,19 @@
if not curFamily:
return
- atkCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaCnt)
- itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaItemAddCnt)
- freeCnt = IpyGameDataPY.GetFuncCfg("FamilyTaofaAtk", 1)
- canAtkCnt = freeCnt + itemAddCnt - atkCnt
- if canAtkCnt <= 0:
- GameWorld.DebugLog("公会讨伐没有斩杀次数: atkCnt=%s >= freeCnt(%s) + itemAddCnt(%s)" % (atkCnt, freeCnt, itemAddCnt), playerID)
- return
+ commAddAnger, superAddAnger, maxAnger = IpyGameDataPY.GetFuncEvalCfg("FamilyTaofaAtk", 4)
+ anger = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaAnger)
+ atkType = AtkType_Anger if anger >= maxAnger else AtkType_Normal
+ if atkType == AtkType_Normal:
+ atkCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaCnt)
+ itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaItemAddCnt)
+ freeCnt = IpyGameDataPY.GetFuncCfg("FamilyTaofaAtk", 1)
+ canAtkCnt = freeCnt + itemAddCnt - atkCnt
+ if canAtkCnt <= 0:
+ GameWorld.DebugLog("公会讨伐没有斩杀次数: atkCnt=%s >= freeCnt(%s) + itemAddCnt(%s)" % (atkCnt, freeCnt, itemAddCnt), playerID)
+ return
+
atkTime = int(time.time())
# 计算属性
@@ -372,12 +377,9 @@
if gLayer > 0:
superRate += gLayer * addSuperRatePerLayer
damRatio += gLayer * addDamPerLayer / 10000.0
-
- commAddAnger, superAddAnger, maxAnger = IpyGameDataPY.GetFuncEvalCfg("FamilyTaofaAtk", 4)
- anger = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyTaofaAnger)
- GameWorld.DebugLog("---公会讨伐斩杀: fightPower=%s,gLayer=%s,superRate=%s,superRatio=%s,damRatio=%s,anger=%s/%s"
- % (fightPower, gLayer, superRate, superRatio, damRatio, anger, maxAnger), playerID)
+ GameWorld.DebugLog("---公会讨伐斩杀: fightPower=%s,gLayer=%s,superRate=%s,superRatio=%s,damRatio=%s,anger=%s/%s,atkType=%s"
+ % (fightPower, gLayer, superRate, superRatio, damRatio, anger, maxAnger, atkType), playerID)
familyAction = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, ActionType)
actionData = familyAction.GetActionDataByValue1(playerID, True)
@@ -395,11 +397,9 @@
boxHurtTotalHis = boxHurtHis + boxHurtHisEx * ChConfig.Def_PerPointValue
GameWorld.DebugLog("boxContribCnt=%s,boxHurtTotal=%s,boxHurtTotalHis=%s" % (boxContribCnt, boxHurtTotal, boxHurtTotalHis), playerID)
- atkType = AtkType_Normal
calcHurtCnt = 1 # 计算伤害次数
- if anger >= maxAnger:
+ if atkType == AtkType_Anger: # 怒气攻击
anger -= maxAnger
- atkType = AtkType_Anger # 怒气攻击
calcHurtCnt = IpyGameDataPY.GetFuncCfg("FamilyTaofaAtk", 5)
hurtTotal = 0 # 本次总伤害
--
Gitblit v1.8.0