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
44
45
46
47
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.CutTree
#
# @todo:¿³Ê÷Ïà¹Ø
# @author hxp
# @date 2024-04-25
# @version 1.0
#
# ÏêϸÃèÊö: ¿³Ê÷Ïà¹Ø
#
#-------------------------------------------------------------------------------
#"""Version = 2024-04-25 17:30"""
#-------------------------------------------------------------------------------
 
import GameWorld
import PlayerCutTree
import PlayerControl
import ChConfig
 
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "ÉèÖö¨ÖÆ´ÎÊý: CutTree a ´ÎÊý")
        GameWorld.DebugAnswer(curPlayer, "Ôö¼Ó¿³Ê÷´ÎÊý: CutTree ´ÎÊý")
        GameWorld.DebugAnswer(curPlayer, "×¢: ½öÖ´Ðгý×°±¸²ú³öÍâÂß¼­")
        return
    
    value = msgList[0]
    if value == "a":
        appointCutCount = msgList[1] if len(msgList) > 1 else 0
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AppointCutTreeCount, appointCutCount)
        GameWorld.DebugAnswer(curPlayer, "ÉèÖÿ³Ê÷¶¨ÖƲú³ö´ÎÊý: %s" % appointCutCount)
        return
    
    if value > 0:
        addCount = value
        PlayerCutTree.OnAddCutTreeCnt(curPlayer, addCount)
        
    return