From bd9dce2d66b5086712596b8dac6d9116be65bafd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 十二月 2025 16:53:47 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(去除常规功能封包对象池使用;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 37 +++++++++++++++++++------------------
1 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 68d42a3..8ed50d0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -44,12 +44,11 @@
import GameFuncComm
import IpyGameDataPY
import PyGameData
-import PlayerFeastTravel
import PlayerActTurntable
import PlayerCostRebate
import PlayerActLunhuidian
import GY_Query_CrossRealmReg
-import PlayerGoldInvest
+import OpenServerActivity
import CrossRealmPlayer
import CrossPlayerData
import PlayerActivity
@@ -2450,17 +2449,12 @@
return
def GetUnXiantaoCntEquip(curPlayer):
- '''因为战锤对应装备是1个战锤可能对应多个装备掉落,所以分解装备的时候1个战锤需要支持可拆分
- 所以需要支持小数存储,暂定以支持3位小数存储
- '''
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntEquip) / 1000.0
+ return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntEquip)
def AddUnXiantaoCntEquip(curPlayer, addCnt):
- unXiantaoCntEquip = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntEquip) + addCnt * 1000
+ unXiantaoCntEquip = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntEquip) + addCnt
return NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, unXiantaoCntEquip)
def SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip):
- ## 保存装备未结算战锤数,保留3位小数
- # @param unXiantaoCntEquip: 实际的未结算数量,支持小数
- unXiantaoCntEquip = int(round(unXiantaoCntEquip, 3) * 1000) # 保留3为小数
+ ## 保存装备未结算战锤数
return NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, unXiantaoCntEquip)
##玩家是否有钱款
@@ -2845,7 +2839,6 @@
# 消费返利
if costType not in ChConfig.CostRebate_DisableType:
PlayerCostRebate.AddCostRebateGold(curPlayer, costType, price, infoDict)
- PlayerFeastTravel.AddFeastTravelTaskValue(curPlayer, ChConfig.Def_FeastTravel_UseGold, price)
else:
GameWorld.DebugLog("不计入消费活动的消费类型!costType=%s" % costType, curPlayer.GetPlayerID())
@@ -2953,8 +2946,9 @@
return
SetMoney(curPlayer, priceType, updPlayerGold)
- if isGiveBourseMoney and updPlayerGold > 0:
- GiveMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney, min(value, updPlayerGold))
+ #废弃交易所额度
+ #if isGiveBourseMoney and updPlayerGold > 0:
+ # GiveMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney, min(value, updPlayerGold))
addDataDict["BourseMoney"] = GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
elif priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
@@ -3024,9 +3018,12 @@
PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_GetMoney, value, [priceType])
PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_GetMoney, value, [priceType])
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAGetMoney, value, [priceType])
if priceType == ShareDefine.TYPE_Price_FamilyCoin:
PlayerFamily.AddFamilyContrib(curPlayer, value) # 公会币同步增加公会贡献
+ elif priceType == ShareDefine.TYPE_Price_OSAPoint:
+ OpenServerActivity.AddOSACelebrationPoint(curPlayer, value)
if priceType not in [IPY_GameWorld.TYPE_Price_Gold_Money, IPY_GameWorld.TYPE_Price_Gold_Paper, ShareDefine.TYPE_Price_PayCoin] \
and giveType == ChConfig.Def_GiveMoney_Unknown:
@@ -4141,7 +4138,6 @@
def Sync_ExpRateChange(curPlayer):
totalExpRate = GetPlayerExpRate(curPlayer)
fightExpRate = curPlayer.GetFightExpRate() # 系统及功能累加
- fightExpRate += PlayerGoldInvest.GetAddFightExpRate(curPlayer)
actExpRateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ExpRate, {})# 多倍经验活动加成
if actExpRateInfo.get(ShareDefine.ActKey_State):
@@ -4197,11 +4193,11 @@
return totalExpRate
-##外观额外数据: 其他 * 100 + 坐骑外观
-def GetHorseSkinID(curPlayer): return GameWorld.GetValue(curPlayer.GetEquipShowSwitch(), 2, 2)
+##外观额外数据: 其他 * 1000 + 坐骑外观
+def GetHorseSkinID(curPlayer): return GameWorld.GetValue(curPlayer.GetEquipShowSwitch(), 3, 3)
def SetHorseSkinID(curPlayer, horseSkinID):
showValue = curPlayer.GetEquipShowSwitch()
- updShowValue = GameWorld.SetValue(showValue, 2, 2, min(horseSkinID, 99))
+ updShowValue = GameWorld.SetValue(showValue, 3, 3, min(horseSkinID, 999))
curPlayer.SetEquipShowSwitch(updShowValue)
GameWorld.DebugLog("使用坐骑外观: horseSkinID=%s,showValue=%s,updShowValue=%s" % (horseSkinID, showValue, updShowValue))
return
@@ -4323,7 +4319,9 @@
## 主线关卡过关进度值 = 章节*10000+关卡编号*100+第x波
def GetMainLevelPassValue(curPlayer): return curPlayer.GetExAttr1()
-def SetMainLevelPassValue(curPlayer, value): curPlayer.SetExAttr1(value, False, False) # 不通知GameServer
+def SetMainLevelPassValue(curPlayer, value):
+ curPlayer.SetExAttr1(value, False, False) # 不通知GameServer
+ GameFuncComm.DoFuncOpenLogic(curPlayer)
def SetMainLevelPassInfo(curPlayer, chapterID, levelNum, wave=0):
## 设置主线关卡过关进度
# @param chapterID: 章节ID
@@ -4336,6 +4334,9 @@
PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_MainLevel, lvID)
PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevel)
PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_MainLevel, lvID)
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_OSAMainLevel, lvID)
+ if OpenServerActivity.GetOSAState(curPlayer, ShareDefine.Def_BT_OSA_MainLevel) == 1:
+ PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_OSA_MainLevel, lvID)
return value
def GetMainLevelPassInfo(curPlayer):
## 获取主线关卡过关进度信息
--
Gitblit v1.8.0