From a451e68aed69b3c936d4afe50a0cf3c43680e90c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 27 十月 2025 11:01:10 +0800
Subject: [PATCH] 302 【公会】BOSS讨伐-服务端(Taofa命令增加添加家成员讨伐数据)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
index 15c11a5..c09cd7f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
@@ -21,11 +21,13 @@
import ShareDefine
import IpyGameDataPY
import PlayerControl
+import PlayerActivity
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
import NetPackCommon
import PlayerArena
+import PlayerLLMJ
import ItemCommon
import PlayerTask
import NPCCommon
@@ -86,10 +88,16 @@
if unXiantaoCntExp:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntExp, 0)
perExp = IpyGameDataPY.GetFuncCfg("Mainline", 1) # 每个战锤增加经验
- totalExp = unXiantaoCntExp * perExp
- GameWorld.DebugLog("增加经验: totalExp=%s,unXiantaoCntExp=%s" % (totalExp, unXiantaoCntExp))
- PlayerControl.PlayerControl(curPlayer).AddExp(totalExp, ShareDefine.Def_ViewExpType_KillNPC)
-
+ baseExp = unXiantaoCntExp * perExp
+ mjExPer, exRemain = PlayerLLMJ.GetAddExpPerInfo(curPlayer)
+ mjEx = min(int(baseExp * mjExPer / 100.0), exRemain)
+ totalExp = baseExp + mjEx
+ GameWorld.DebugLog("增加经验: totalExp=%s,unXiantaoCntExp=%s,baseExp=%s,mjEx=%s,mjExPer=%s,exRemain=%s"
+ % (totalExp, unXiantaoCntExp, baseExp, mjEx, mjExPer, exRemain))
+ finalAddExp = PlayerControl.PlayerControl(curPlayer).AddExp(totalExp, ShareDefine.Def_ViewExpType_KillNPC)
+ if mjEx and finalAddExp:
+ PlayerLLMJ.AddExpEx(curPlayer, mjEx)
+
__doMainDrop(curPlayer, killObjList)
return
@@ -449,14 +457,16 @@
equipCnt = len(equipDict)
unXiantaoCntEquip = PlayerControl.GetUnXiantaoCntEquip(curPlayer)
- perEquipXiantao = unXiantaoCntEquip / float(equipCnt) if equipCnt > 1 else unXiantaoCntEquip
+ perEquipXiantao = unXiantaoCntEquip / float(equipCnt) if equipCnt > 1 else unXiantaoCntEquip # 均分支持小数
decomposeMoney = max(1, moneyBase * perEquipXiantao) # 至少1个
+ mjExPer, exRemain = PlayerLLMJ.GetAddDecomposePer(curPlayer)
+ mjEx = int(decomposeMoney * mjExPer / 100.0)
GameWorld.DebugLog("unXiantaoCntEquip=%s,equipCnt=%s,perEquipXiantao=%s,equipIndexList=%s"
% (unXiantaoCntEquip, equipCnt, perEquipXiantao, equipDict.keys()), playerID)
- GameWorld.DebugLog("moneyBase=%s,decomposeMoney=%s" % (moneyBase, decomposeMoney), playerID)
+ GameWorld.DebugLog("moneyBase=%s,decomposeMoney=%s,mjExPer=%s,exRemain=%s,mjEx=%s" % (moneyBase, decomposeMoney, mjExPer, exRemain, mjEx), playerID)
moneyTotal = 0
-
+ mjExTotal = 0
decomposeCnt = 0
decomposeIndexList = []
for itemIndex in itemIndexList:
@@ -465,8 +475,13 @@
curEquip = equipDict[itemIndex]
moneyTotal += decomposeMoney
- GameWorld.DebugLog(" itemIndex=%s,moneyBase=%s,perEquipXiantao=%s,decomposeMoney=%s,总:%s"
- % (itemIndex, moneyBase, perEquipXiantao, decomposeMoney, moneyTotal), playerID)
+ if mjEx > 0:
+ mjEx = min(mjEx, exRemain)
+ exRemain -= mjEx
+ moneyTotal += mjEx
+ mjExTotal += mjEx
+ GameWorld.DebugLog(" itemIndex=%s,moneyBase=%s,perEquipXiantao=%s,decomposeMoney=%s,mjEx=%s,exRemain=%s,总:%s"
+ % (itemIndex, moneyBase, perEquipXiantao, decomposeMoney, mjEx, exRemain, moneyTotal), playerID)
ItemCommon.DelItem(curPlayer, curEquip, curEquip.GetCount(), True, ChConfig.ItemDel_EquipDecompose)
decomposeIndexList.append(itemIndex)
@@ -478,10 +493,12 @@
moneyTotal = int(round(moneyTotal)) # 四舍五入取整
unXiantaoCntEquip = PlayerControl.SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip)
- GameWorld.DebugLog("moneyTotal=%s,unXiantaoCntEquip=%s" % (moneyTotal, unXiantaoCntEquip), playerID)
-
+ GameWorld.DebugLog("moneyTotal=%s,mjExTotal=%s,unXiantaoCntEquip=%s" % (moneyTotal, mjExTotal, unXiantaoCntEquip), playerID)
+
PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, "DecomposeMainEquip", isSysHint=False)
+ PlayerLLMJ.AddExpDecompose(curPlayer, mjExTotal)
PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_EquipDecompose, decomposeCnt)
+ PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_EquipDecompose, decomposeCnt)
return
def __doPickupMainItem(curPlayer, itemIndexList):
--
Gitblit v1.8.0