hxp
2023-07-10 dcec4a9b39a53106bd80dfb41fad83e7319e728e
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/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]