From e4c2a1b331ef0133a010bce5ccdcf3d19db12726 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 07 十一月 2025 14:46:31 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(增加物品效果281-给活跃度;每日任务奖励改为配置物品;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py | 97 ++++++++++++------------------------------------
1 files changed, 25 insertions(+), 72 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
index e05fd06..81fc54f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -24,9 +24,7 @@
import PlayerGMOper
import OperControlManager
import ShareDefine
-import PlayerGameWallow
import ReadChConfig
-import PlayerDienstgrad
import IpyGameDataPY
import GameObj
import GameMap
@@ -36,13 +34,11 @@
import AICommon
import PlayerSuccess
import PassiveBuffEffMng
-import FunctionNPCCommon
-import FormulaControl
-import PlayerFlashSale
-import PlayerChatBox
-import PlayerFace
import PlayerBackup
import PlayerOnline
+import PlayerGoldRush
+import PlayerHorse
+import PlayerHJG
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -771,7 +767,7 @@
curPlayer.SetDict(ChConfig.Def_PlayerKey_SitForZhenQi, tick)
vipLV = curPlayer.GetVIPLv()
- vipRate = ShareDefine.Def_MaxRateValue#PlayerVip.GetVIPMuseSitRate(vipLV)
+ vipRate = ShareDefine.Def_MaxRateValue
#取得人物当前经验
curTotalExp = PlayerControl.GetPlayerTotalExp(curPlayer) # 超过20亿支持,功能待定
@@ -787,7 +783,7 @@
isSysHint=False)
if vipLV == 0:
- canVipRate = ShareDefine.Def_MaxRateValue#PlayerVip.GetVIPMuseSitRate(ShareDefine.Def_VIPType_Platina)
+ canVipRate = ShareDefine.Def_MaxRateValue
canVipExpValue = int(addExpValue * canVipRate / float(ShareDefine.Def_MaxRateValue))
#GeRen_chenxin_684833:获得经验%s点,成为VIP经验%s
PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_684833", [addExpValue, canVipExpValue])
@@ -867,11 +863,8 @@
# @remarks 刷新玩家在线时间
def ProcessPlayer_OnlineTime(curPlayer, tick):
if not CommonCheckTick(curPlayer, tick, ChConfig.TYPE_Player_Tick_PlayerOnlineTime):
- return
+ return
- #处理防沉迷在线时间,
- PlayerGameWallow.DoLogic_WallowOnlineTime(curPlayer, tick)
-
return
@@ -1009,6 +1002,7 @@
#放在刷buff前
#ProcessPassiveSkill(curPlayer, tick)
+ ProcessPlayerSecond(curPlayer, tick)
ProcessPlayerMinute(curPlayer, tick)
PlayerOnline.GetOnlinePlayer(curPlayer).DoRefreshRoleAttr()
@@ -1031,35 +1025,30 @@
#玩家在线时间刷新
#ProcessPlayer_OnlineTime(curPlayer, tick)
- #反外挂验证
- #PlayerAutoCheckOnline.HackDefense(curPlayer, tick)
-
- #副本相关时间处理
- #PlayerFB.DoPlayerFBTimeProcess(curPlayer, tick)
-
- #挂机收益
- #PlayerGuaji.ProcessGuaji(curPlayer)
-
#恶意攻击时间处理
#AttackCommon.ProcessMaliciousAttackPlayer(curPlayer, tick)
- #成就
- PlayerSuccess.FinishDelayAddSuccessProgress(curPlayer, tick, False)
- #限时抢购
- PlayerFlashSale.ProcessFlashSaleMail(curPlayer, tick)
- #地图经验
- #ProcessAreaExp(curPlayer, tick)
- #神秘商店刷新
- FunctionNPCCommon.CheckMysticalShopRefresh(curPlayer, tick)
- #活跃放置
- #PlayerActivity.ProcessActivityPlace(curPlayer)
- #自定义场景
- #FBLogic.OnCustomSceneProcess(curPlayer, tick)
+
#炼器
#PlayerActLianqi.OnProcess(curPlayer)
#仙盟攻城战
#PlayerActFamilyGCZ.OnProcess(curPlayer)
#跨服数据同步,放最后
#CrossPlayerData.ProcessCrossPlayer(curPlayer, tick)
+ return
+
+def ProcessPlayerSecond(curPlayer, tick):
+ #玩家每秒处理,玩家Process可能每秒多次,所以增加一个每秒处理的,减少执行次数
+ lastTick = curPlayer.GetDictByKey("ProcessPlayerSecond")
+ if tick - lastTick < 1000:
+ return
+ curPlayer.SetDict("ProcessPlayerSecond", tick)
+
+ #成就
+ PlayerSuccess.FinishDelayAddSuccessProgress(curPlayer, tick, False)
+ #限时抢购
+ #PlayerFlashSale.ProcessFlashSaleMail(curPlayer, tick)
+ #淘金
+ PlayerGoldRush.OnProcess(curPlayer)
return
def ProcessPlayerMinute(curPlayer, tick):
@@ -1069,12 +1058,8 @@
return
curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_Minute, tick)
- # 时效称号
- PlayerDienstgrad.CheckDienstgradTimeout(curPlayer)
- # 时效头像
- PlayerFace.OnMinute(curPlayer)
- # 聊天气泡
- PlayerChatBox.OnMinute(curPlayer)
+ PlayerHJG.OnMinute(curPlayer)
+ PlayerHorse.OnMinute(curPlayer)
return
# 一定时间自动释放的被动技能
@@ -1222,36 +1207,4 @@
return
curPlayer.SetDict(ChConfig.Def_PDict_BossStateTick, 0)
PlayerControl.SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_BossState, 0)
- return
-
-def ProcessAreaExp(curPlayer, tick):
- ##给场景经验
- if GameWorld.IsCrossServer():
- return
- if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
- return
- crossMapID = PlayerControl.GetCrossMapID(curPlayer)
- mapID = crossMapID if crossMapID else GameWorld.GetMap().GetMapID()
- if not FBLogic.OnCanGetAreaExp(curPlayer, mapID):
- return
- neutralMapExpAwardDict = IpyGameDataPY.GetFuncEvalCfg('NeutralMapExpAward', 1, {})
- expAwardInfo = GameWorld.GetDictValueByKey(neutralMapExpAwardDict, mapID)
- if not expAwardInfo:
- return
- if len(expAwardInfo) != 2:
- return
- secondCD, expFormula = expAwardInfo
- lastTick = curPlayer.GetDictByKey(ChConfig.Def_PDict_MapAreaExpTick)
- if not lastTick:
- curPlayer.SetDict(ChConfig.Def_PDict_MapAreaExpTick, tick)
- return
- if tick - lastTick < secondCD:
- return
- curPlayer.SetDict(ChConfig.Def_PDict_MapAreaExpTick, tick)
-
- reExp = PlayerControl.GetPlayerReExp(curPlayer)
- reLV = curPlayer.GetLV()
- worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
- addExp = eval(FormulaControl.GetCompileFormula('NeutralMapExpAward%s'%mapID, expFormula))
- PlayerControl.PlayerControl(curPlayer).AddExp(addExp, ShareDefine.Def_ViewExpType_SysEx)
return
--
Gitblit v1.8.0