#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.test_OnHour # # @todo:ģʽ¹ýСʱ # @author hxp # @date 2025-05-15 # @version 1.0 # # ÏêϸÃèÊö: ģʽ¹ýСʱ # #------------------------------------------------------------------------------- #"""Version = 2025-05-15 10:35""" #------------------------------------------------------------------------------- import GameWorld import PlayerEventCounter import GameWorldEvent import CrossMgr def GetGMServerIDList(curPlayer): ## »ñÈ¡ÃüÁî¶îÍâ·¢Ë͵½ÆäËû·þÎñÆ÷£¬Èç¿ç·þ centerID = CrossMgr.GetSSServerMgr().GetCrossCenterID() return [centerID] if centerID else [] def OnExecCross(crossPlayer, gmList): GameWorldEvent.OnGM_CrossCenterEvent("GMOnHour") return def OnExec(curPlayer, gmList): __DoExec(GameWorld.GetGameWorld().GetTick()) return def __DoExec(tick): playerManager = GameWorld.GetPlayerManager() for i in xrange(playerManager.GetPlayerCount()): curPlayer = playerManager.GetPlayerByIndex(i) if not GameWorld.IsNormalPlayer(curPlayer): continue PlayerEventCounter.GMDateTime(curPlayer, "GMOnHour") GameWorldEvent.OnHour(tick) return