From dc0b92c1e2fe9f3d24c183b325dad54d088735c1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 10 七月 2025 17:01:24 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_ServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py | 62 +++++--------------------------
1 files changed, 10 insertions(+), 52 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 e8c9970..582a8cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerState.py
@@ -25,7 +25,6 @@
import AttackCommon
import ChItem
import PlayerGMOper
-import GameLogInfo
import ItemCommon
import OperControlManager
import ShareDefine
@@ -1054,7 +1053,6 @@
# @return 返回值, 无意义
# @remarks C++封包触发, 全局定时器, 处理玩家状态
def __Func_ProcessState(tick):
- timeClock = time.clock()
#2009-07-01断言tick >=0 ,服务器tick为DWord,超过24天未重启硬件,将导致逻辑不可预知
if tick < 0 :
GameWorld.Log('###服务器运行时间超过24天 tick = %s' % (tick))
@@ -1068,10 +1066,8 @@
if curPlayer.GetID() == 0:
continue
- ProcessPlayerState(curPlayer, tick)
-
- #记录玩家逻辑处理总耗时
- GameLogInfo.LogInfo_PlayerLogicTime(timeClock)
+ ProcessPlayerState(curPlayer, tick)
+
return
#---------------------------------------------------------------------
@@ -1140,13 +1136,13 @@
elif equipPlace == ShareDefine.retWing:
PlayerControl.NotifyCode(curPlayer, 'WingTiyan_Timeout')
- tryItemDict = IpyGameDataPY.GetFuncEvalCfg('FirstGoldTryItem', 1, {})
- tryItemID = tryItemDict.get(curPlayer.GetJob(), 0)
- if tryItemID and ItemControler.GetAppointItemRealID(tryItemID) == equipID:
- #首充试用武器过期并且还没首充的提示()
- if not curPlayer.GetChangeCoinPointTotal():
- PlayerControl.NotifyCode(curPlayer, 'FirstGoldWPOver')
- PlayerGoldGift.FirstGoldTryItemOutTime(curPlayer)
+ #tryItemDict = IpyGameDataPY.GetFuncEvalCfg('FirstGoldTryItem', 1, {})
+ #tryItemID = tryItemDict.get(curPlayer.GetJob(), 0)
+ #if tryItemID and ItemControler.GetAppointItemRealID(tryItemID) == equipID:
+ # #首充试用武器过期并且还没首充的提示()
+ # if not curPlayer.GetChangeCoinPointTotal():
+ # PlayerControl.NotifyCode(curPlayer, 'FirstGoldWPOver')
+ # PlayerGoldGift.FirstGoldTryItemOutTime(curPlayer)
return True
#---------------------------------------------------------------------
@@ -1367,45 +1363,7 @@
# return
#===============================================================================
return
-#---------------------------------------------------------------------
-##GM开关活动, 地图服务器给经验
-# @param curPlayer 玩家实例
-# @param tick 时间戳
-# @return 返回值无意义
-# @remarks GM开关活动, 地图服务器给经验
-def ProcessMapGiveExp(curPlayer, tick):
- gameWorld = GameWorld.GetGameWorld()
- #经验倍率
- exp_Multiple = 0
- if gameWorld.IsEventActive(ChConfig.Def_GY_GM_GameID_MapGiveExp_Ten):
- exp_Multiple = 10
- elif gameWorld.IsEventActive(ChConfig.Def_GY_GM_GameID_MapGiveExp_Fifty):
- exp_Multiple = 50
- else:
- #无活动
- return
-
- mapExpTick = curPlayer.GetTickByType(ChConfig.TYPE_Player_Tick_GiveMapExp)
-
- if mapExpTick == 0:
- #第一次设定当前时间
- curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_GiveMapExp, tick)
- return
-
- if tick - mapExpTick < ChConfig.TYPE_Player_Tick_Time[ChConfig.TYPE_Player_Tick_GiveMapExp]:
- #没有到刷新间隔
- return
-
- curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_GiveMapExp, tick)
-
- reExp = 0
-
- playerControl = PlayerControl.PlayerControl(curPlayer)
- #玩家经验增加 参考经验 * 经验倍率
- playerControl.AddExp(reExp * exp_Multiple)
-
- return
-#---------------------------------------------------------------------
+
##清空玩家连续击杀数量
# @param curPlayer 玩家实例
# @param tick 时间戳
--
Gitblit v1.8.0