| | |
| | | import PlayerViewCacheTube
|
| | | import urllib
|
| | | import PlayerVip
|
| | | import json
|
| | | #===============================================================================
|
| | | # //B2 05 推送提醒设置 tagCMPushNotificationsSetting
|
| | | #
|
| | |
| | | # 服务端群推暂不由游戏服务器推送,可从第三方个推网站推送
|
| | | # 游戏服务器只推送具有变化性的内容
|
| | | # 支持单推和多人推送
|
| | | # getuiIDList 玩家个推ID
|
| | | # playerNameList 如果存在则必须与getuiIDList一一对应,若不存在则是多推,若存在则会一一单推
|
| | | # appIDDict 混服使用对应不同key {平台ID:[[玩家个推ID, 玩家名],[玩家个推ID2, 玩家名2]。。。]}
|
| | | # 如果玩家名存在则必须与个推ID一一对应,若不存在则是多推,若存在则会一一单推
|
| | | # 带名字会被组合成 格式如【玩家名】您关注的BOSSxx已复活
|
| | | # EventReport_EventReport 向游戏服务器的个推小程序发送 webbottle
|
| | | def GeTuiNotify(getuiIDList, playerNameList, notifyMsg):
|
| | | if type(getuiIDList) != list:
|
| | | def GeTuiNotify(appIDDict, notifyMsg):
|
| | | if not appIDDict:
|
| | | return
|
| | |
|
| | | osName = ReadChConfig.GetPyMongoConfig("GeTui", "OSName")
|
| | | #osName = ReadChConfig.GetPyMongoConfig("GeTui", "OSName") 混服无法配置系统
|
| | | geTuiUrl = ReadChConfig.GetPyMongoConfig("GeTui", "GeTuiUrl")
|
| | |
|
| | | playerNames = "|".join(playerNameList) #组合成字符串发送
|
| | | getuiIDs = "|".join(getuiIDList)
|
| | | |
| | | playerInfo = json.dumps(appIDDict, ensure_ascii=False)
|
| | | #含中文部分要urlencode
|
| | | postInfo = urllib.urlencode({"PlayerName": playerNames, "NotifyMsg":notifyMsg, |
| | | "RegID":getuiIDs, "OSName":osName})
|
| | | postInfo = urllib.urlencode({"PlayerInfo": playerInfo, "NotifyMsg":notifyMsg})
|
| | |
|
| | |
|
| | | GameWorld.GetGameWorld().EventReport_EventReport(postInfo, "", "", "", 1, geTuiUrl)
|
| | | return
|
| | |
|
| | |
|
| | | # 时间不足
|
| | | def TJGTimeLess(curPlayer):
|
| | |
| | | return
|
| | |
|
| | | showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 4)) # 文字信息
|
| | | |
| | | GeTuiNotify([GetGeTuiClientID(curPlayer)], [curPlayer.GetName()], showStr)
|
| | | GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) :[[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, showStr)
|
| | | return
|
| | |
|
| | |
|
| | |
| | |
|
| | | tjgTime = PlayerTJG.GetTJGTime(curPlayer)
|
| | |
|
| | | GeTuiNotify([GetGeTuiClientID(curPlayer)], [curPlayer.GetName()], |
| | | GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, |
| | | GameWorld.GbkToCode(showStr%(expStr, tjgTime/60/60, tjgTime/60%60)))
|
| | | return
|
| | |
|
| | |
| | | showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 2)) # 文字信息
|
| | | tjgTime = PlayerTJG.GetTJGTime(curPlayer)
|
| | |
|
| | | GeTuiNotify([GetGeTuiClientID(curPlayer)], [curPlayer.GetName()], |
| | | GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, |
| | | showStr%(tagName, tjgTime/60/60, tjgTime/60%60))
|
| | | return
|
| | |
|
| | |
| | | return
|
| | |
|
| | | showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 3)) # 文字信息
|
| | | GeTuiNotify([GetGeTuiClientID(curPlayer)], [curPlayer.GetName()], showStr)
|
| | | GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, showStr)
|
| | |
|
| | |
|
| | |
|