From 828ac10fd533a60f7f2da90a526e42490cd8537f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 22 十月 2025 11:37:52 +0800
Subject: [PATCH] 16 卡牌服务端(删除反外挂验证)
---
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