#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package GM.Commands.GMT_QueryBillboardCross
|
#
|
# @todo:²éѯ¿ç·þÅÅÐаñ
|
# @author hxp
|
# @date 2021-01-13
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: ²éѯ¿ç·þÅÅÐаñ
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2021-01-13 17:00"""
|
#-------------------------------------------------------------------------------
|
|
#µ¼Èë
|
import GMCommon
|
import ShareDefine
|
import PyDataManager
|
import GameWorld
|
|
|
#Â߼ʵÏÖ(ÕâÀïcurPlayer = None)
|
## Ö´ÐÐÂß¼
|
# @param curPlayer µ±Ç°Íæ¼Ò
|
# @param gmList [cmdIndex gmAccID forbidAcc]
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def OnExec(orderId, gmCmdDict):
|
|
if not GameWorld.IsCrossServer():
|
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_IsNotCrossServer)
|
return
|
|
billboardType = GameWorld.ToIntDef(gmCmdDict.get('billboardType', ''), None)
|
billType = GameWorld.ToIntDef(gmCmdDict.get('billType', ''), None) # ÆäËûÖ¸¶¨ÀàÐÍ
|
if billType != None:
|
billboardType = billType
|
|
if billboardType == None or billboardType not in ShareDefine.CrossBillboardTypeList:
|
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
|
return
|
|
groupValue1 = GameWorld.ToIntDef(gmCmdDict.get('groupValue1', ''), None)
|
groupValue2 = GameWorld.ToIntDef(gmCmdDict.get('groupValue2', ''), None)
|
|
billboardMgr = PyDataManager.GetCrossBillboardManager()
|
groupList = billboardMgr.GetBillboardGroupList(billboardType)
|
|
backMsg = {"billboardType":billboardType, "groupList":groupList}
|
|
if groupValue1 != None and groupValue2 != None:
|
billboardObj = billboardMgr.GetCrossBillboard(billboardType, groupValue1, groupValue2)
|
|
billboardInfo = []
|
for i in xrange(billboardObj.GetCount()):
|
billboardData = billboardObj.At(i)
|
if not billboardData:
|
continue
|
billboardDict = {
|
"ID":billboardData.ID,
|
"ID2":billboardData.ID2,
|
"Name1":billboardData.Name1,
|
"Name2":billboardData.Name2,
|
"Type2":billboardData.Type2,
|
"Value1":billboardData.Value1,
|
"Value2":billboardData.Value2,
|
"CmpValue":billboardData.CmpValue,
|
"CmpValue2":billboardData.CmpValue2,
|
"CmpValue3":billboardData.CmpValue3,
|
}
|
|
for k, v in billboardDict.items():
|
if not v:
|
billboardDict.pop(k)
|
|
billboardInfo.append(billboardDict)
|
|
backMsg.update({"billboardInfo":billboardInfo, "groupValue1":groupValue1, "groupValue2":groupValue2})
|
|
#Ö´Ðгɹ¦
|
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, backMsg)
|
return
|
|
|
|