hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#
##@package GM.Commands.SetOnlineTime
#
# @todo:ÉèÖÃÔÚÏßʱ¼ä
# @author ljd
# @date 2015-06-10 10:10
# @version 1.0
#
#
# ÏêϸÃèÊö: ÉèÖÃÔÚÏßʱ¼ä
#
#---------------------------------------------------------------------
#"""Version = 2015-06-10 10:10"""
#---------------------------------------------------------------------
 
import ChConfig
import PlayerOnlinePrize
import PlayerControl
import GameWorld
 
## Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer
#  @param cmdList ²ÎÊýÁбí
#  @return None
def OnExec(curPlayer, cmdList):
    if len(cmdList) < 1:
        GameWorld.DebugAnswer(curPlayer, 'µ±Ç°ÔÚÏßʱ¼äÃë:%s'%PlayerOnlinePrize.GetOnlineTime(curPlayer))
        GameWorld.DebugAnswer(curPlayer, 'SetOnlineTime ·Ö [Ãë]')
        return
    
    minutes = cmdList[0]
    seconds = cmdList[1] if len(cmdList) > 1 else 0
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DayOnlineTime, minutes * 60 + seconds)
    PlayerOnlinePrize.SetStartCalcOnlineTick(curPlayer)
    PlayerOnlinePrize.SendOnlinePrizeInfo(curPlayer)
    GameWorld.DebugAnswer(curPlayer, 'ÉèÖÃÔÚÏßʱ¼äÃë:%s' % PlayerOnlinePrize.GetOnlineTime(curPlayer))
    return