#!/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
|