#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#-------------------------------------------------------------------------------  
 | 
#  
 | 
##@package GM.Commands.LuckyCloudBuy  
 | 
#  
 | 
# @todo:ÐÒÔËÔÆ¹º  
 | 
# @author hxp  
 | 
# @date 2021-10-21  
 | 
# @version 1.0  
 | 
#  
 | 
# ÏêϸÃèÊö: ÐÒÔËÔÆ¹º  
 | 
#  
 | 
#-------------------------------------------------------------------------------  
 | 
#"""Version = 2021-10-21 17:00"""  
 | 
#-------------------------------------------------------------------------------  
 | 
  
 | 
import GameWorld  
 | 
import CrossLuckyCloudBuy  
 | 
import IpyGameDataPY  
 | 
import PyGameData  
 | 
import CrossActionControl  
 | 
import ShareDefine  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#È«¾Ö±äÁ¿  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#Â߼ʵÏÖ  
 | 
## Ö´ÐÐÂß¼  
 | 
#  @param curPlayer µ±Ç°Íæ¼Ò  
 | 
#  @param gmList [cmdIndex gmAccID msg]  
 | 
#  @return None  
 | 
#  @remarks º¯ÊýÏêϸ˵Ã÷.  
 | 
def OnExec(curPlayer, gmList):  
 | 
    ## ±¾·þ´¦Àí  
 | 
      
 | 
    value1 = gmList[0]  
 | 
    # ÖØÖÃ  
 | 
    if value1 == 0 and len(gmList) == 1:  
 | 
        PyGameData.g_luckyCloudBuyNumDict = {}  
 | 
        PyGameData.g_luckyCloudBuyLotteryDict = {}  
 | 
        PyGameData.g_unNotifyCloudBuyNumDict = {}  
 | 
          
 | 
    # Ìí¼ÓÔÆ¹º¼Ç¼  
 | 
    elif value1 == 1:  
 | 
        pass  
 | 
      
 | 
    return  
 | 
  
 | 
def OnMergeServerExec(gmList, tick):  
 | 
    ## ¿ç·þ´¦Àí  
 | 
      
 | 
    value1 = gmList[0]  
 | 
    # ÖØÖÃ  
 | 
    if value1 == 0:  
 | 
        GameWorld.DebugLog("GMÖØÖÃÐÒÔËÔÆ¹º!")  
 | 
        PyGameData.g_luckyCloudBuyNumDict = {}  
 | 
        PyGameData.g_luckyCloudBuyLotteryDict = {}  
 | 
          
 | 
        crossActInfoDict = CrossActionControl.GetCrossActInfoDict()  
 | 
        curActInfoDict = crossActInfoDict.get(ShareDefine.CrossActName_LuckyCloudBuy, {})  
 | 
        for cfgID, actInfoDict in curActInfoDict.items():  
 | 
            if not actInfoDict[ShareDefine.ActKey_State]:  
 | 
                continue  
 | 
            CrossLuckyCloudBuy.DoStartNewRoundLuckyCloudBuy(cfgID, True)  
 | 
              
 | 
    # Ìí¼ÓÔÆ¹º¼Ç¼  
 | 
    elif value1 == 1:  
 | 
        buyCount = gmList[1]  
 | 
        serverGroupID = gmList[-1]  
 | 
        CrossLuckyCloudBuy.DoGMLuckyCloudBuy(serverGroupID, buyCount)  
 | 
          
 | 
    return  
 | 
  
 | 
def OnGetMergeParam(curPlayer):  
 | 
    serverGroupID = GameWorld.GetServerGroupID()  
 | 
    return [serverGroupID]  
 | 
  
 |