From 47eb171907516123892ea3f5d1888c6394c72382 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 30 十月 2025 16:50:20 +0800
Subject: [PATCH] 16 卡牌服务端(宝箱开启、物品合成通知;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 39 +++++++++++++++++++++++++++------------
1 files changed, 27 insertions(+), 12 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 60ad60c..c96e621 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
@@ -27,6 +27,7 @@
import IPY_GameWorld
import NetPackCommon
import PlayerArena
+import PlayerLLMJ
import ItemCommon
import PlayerTask
import NPCCommon
@@ -80,17 +81,23 @@
def __doKillAward(curPlayer, atkObj, killObjList):
## 计算击杀奖励
if not killObjList:
- GameWorld.DebugLog("没有击杀不需要处理!")
+ #GameWorld.DebugLog("没有击杀不需要处理主线奖励!")
return
# 结算经验
unXiantaoCntExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntExp)
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
@@ -450,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:
@@ -466,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)
@@ -479,9 +493,10 @@
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
--
Gitblit v1.8.0