#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.FeastWish  
 | 
#  
 | 
# @todo:½ÚÈÕ×£¸£  
 | 
# @author hxp  
 | 
# @date 2021-01-29  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ½ÚÈÕ×£¸£  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#"""Version = 2021-01-29 11:30"""  
 | 
#-------------------------------------------------------------------------------  
 | 
  
 | 
import GameWorld  
 | 
import PlayerControl  
 | 
import PlayerFeastWish  
 | 
import ChConfig  
 | 
  
 | 
  
 | 
def __Help(curPlayer):  
 | 
    GameWorld.DebugAnswer(curPlayer, "ÖØÖÃ×£¸£Æ¿: FeastWish 0")  
 | 
    GameWorld.DebugAnswer(curPlayer, "ÉèÖÃ×£¸£Æ¿: FeastWish ±àºÅ ×£¸£Öµ")  
 | 
    GameWorld.DebugAnswer(curPlayer, "×£¸£Æ¿ÁìÈ¡: FeastWish ±àºÅ ¼Ç¼Ë÷Òý ÊÇ·ñÁìÈ¡")  
 | 
    return  
 | 
  
 | 
## GMÃüÁîÖ´ÐÐÈë¿Ú  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param paramList ²ÎÊýÁбí []  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, paramList):  
 | 
      
 | 
    if not paramList:  
 | 
        __Help(curPlayer)  
 | 
        return  
 | 
      
 | 
    if paramList[0] == 0:  
 | 
        bottleNumList = PlayerFeastWish.GetWishBottleNumList()  
 | 
        for bottleNum in bottleNumList:  
 | 
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, 0)  
 | 
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, 0)  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÖØÖÃOK£¡")  
 | 
    elif len(paramList) == 2:  
 | 
        bottleNum, wishValue = paramList  
 | 
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleValue % bottleNum, wishValue)  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÉèÖÃ×£¸£Æ¿(%s),×£¸£Öµ=%s" % (bottleNum, wishValue))  
 | 
    elif len(paramList) == 3:  
 | 
        bottleNum, recordIndex, isGet = paramList  
 | 
        getState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum)  
 | 
        updState = GameWorld.SetBitValue(getState, recordIndex, isGet)  
 | 
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWishBottleGetState % bottleNum, updState)  
 | 
        GameWorld.DebugAnswer(curPlayer, "ÉèÖÃ×£¸£Æ¿(%s),getState=%s,updState=%s" % (bottleNum, getState, updState))  
 | 
    else:  
 | 
        __Help(curPlayer)  
 | 
        return  
 | 
      
 | 
    PlayerFeastWish.Sync_FeastWishActionInfo(curPlayer)  
 | 
    PlayerFeastWish.Sync_FeastWishPlayerInfo(curPlayer)  
 | 
    return  
 | 
  
 |