| | |
| | | #---------------------------------------------------------------------
|
| | |
|
| | | import ChConfig
|
| | | import TurnAttack
|
| | | import PlayerControl
|
| | | import IpyGameDataPY
|
| | | import ReadChConfig
|
| | |
| | |
|
| | | import datetime
|
| | | import urllib
|
| | | import json
|
| | |
|
| | | ## 初始化事件
|
| | | # @param None
|
| | |
| | | "FamilyName": curPlayer.GetFamilyName(),
|
| | | "ReamlLV":curPlayer.GetOfficialRank(),
|
| | | "TreeLV":curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV),
|
| | | "LineupHero":GetReportMainLineupInfo(curPlayer),
|
| | | }
|
| | | for mapID in ChConfig.ReportCenterMapIDList:
|
| | | playerInfo["FBPass%s" % mapID] = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBPassLineID % mapID)
|
| | |
| | | # 第五个参数0代表get发送 1代表post
|
| | | GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
|
| | | return
|
| | |
|
| | | def GetReportMainLineupInfo(curPlayer):
|
| | | lineup = TurnAttack.GetPlayerLineup(curPlayer, ShareDefine.Lineup_Main)
|
| | | if lineup.IsEmpty():
|
| | | return {}
|
| | | |
| | | heroDict = {}
|
| | | curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptHero)
|
| | | for posNum in lineup.GetPosNumList():
|
| | | hero = lineup.GetLineupHero(posNum)
|
| | | heroID = hero.heroID
|
| | | itemIndex = hero.itemIndex
|
| | | heroLV = 1
|
| | | star = 0
|
| | | if itemIndex >= 0 and itemIndex < curPack.GetCount():
|
| | | heroItem = curPack.GetAt(itemIndex)
|
| | | if heroItem and not heroItem.IsEmpty():
|
| | | heroLV = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroLV)
|
| | | star = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroStar)
|
| | | breakLV = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroBreakLV)
|
| | | awakeLV = heroItem.GetUserAttr(ShareDefine.Def_IudetHeroAwakeLV)
|
| | | heroDict[str(posNum)] = {
|
| | | "HeroID":heroID,
|
| | | "SkinID":hero.skinID,
|
| | | "LV":heroLV,
|
| | | "Star":star,
|
| | | "BreakLV":breakLV,
|
| | | "AwakeLV":awakeLV,
|
| | | }
|
| | | return json.dumps(heroDict, ensure_ascii=False).replace(" ", "")
|
| | |
|
| | | ## =================================================================================================
|
| | |
|