#!/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
|
|
#---------------------------------------------------------------------
|
#È«¾Ö±äÁ¿
|
#---------------------------------------------------------------------
|
|
#---------------------------------------------------------------------
|
#Â߼ʵÏÖ
|
## Ö´ÐÐÂß¼
|
# @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 = {}
|
|
crossZoneName = GameWorld.GetCrossZoneName()
|
crossZoneList = IpyGameDataPY.GetIpyGameDataByCondition("CrossZonePK", {"CrossZoneName":crossZoneName}, True)
|
if not crossZoneList:
|
return
|
|
for zoneIpyData in crossZoneList:
|
zoneID = zoneIpyData.GetZoneID()
|
CrossLuckyCloudBuy.DoStartNewRoundLuckyCloudBuy(zoneID, 1)
|
|
# Ìí¼ÓÔÆ¹º¼Ç¼
|
elif value1 == 1:
|
buyCount = gmList[1]
|
serverGroupID = gmList[-1]
|
CrossLuckyCloudBuy.DoGMLuckyCloudBuy(serverGroupID, buyCount)
|
|
return
|
|
def OnGetMergeParam(curPlayer):
|
serverGroupID = GameWorld.GetServerGroupID()
|
return [serverGroupID]
|
|