From 394b894fe2a7131b1816d9799fc6a49fba33a108 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 十二月 2023 14:39:55 +0800
Subject: [PATCH] 3191 删除推送
---
/dev/null | 310 --------------------------------------------
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 5
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 7
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py | 8 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 4
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py | 26 ---
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 3
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py | 20 --
12 files changed, 2 insertions(+), 393 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
index f2fe0b7..dcf9430 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -315,8 +315,6 @@
TYPE_WorldBossOnlineCntTick = 26 # 定时世界BOSS刷新时间计算 在线玩家数量
TYPE_TimeShopProcessTick = 27 # 定时商店处理间隔
TYPE_WorldBossProcessTick = 28 # BOSS重生检查间隔
-TYPE_WorldBossGeTuiTick = 29 # BOSS个推
-TYPE_WorldNewGuyGeTuiTick = 30 # 低级新玩家离开5分钟后唤回
TYPE_Tick_Time = [
1000 * 60 * 3 , #0 查看地图的活动人数 3分钟/次
@@ -348,8 +346,6 @@
1000 * 60 * 5 , #26 定时世界BOSS刷新时间计算 在线玩家数量
1000 * 60 , #27 定时商店处理间隔
1000 * 1 , #28 BOSS重生检查间隔
- 1000*45, #29 BOSS个推
- 1000*60, #30 低级新玩家离开5分钟后唤回
]
TYPE_Tick_Count = len(TYPE_Tick_Time)
@@ -368,7 +364,6 @@
Def_WorldKey_ExamSendSubjectCnt = 'ExamSendSubjectCnt' #当前发题总数
Def_WorldKey_BossIsAlive = 'BossIsAlive_%s' #boss是否活着
Def_WorldKey_IsGameWorldInit = 'IsGameWorldInit' #GameWold是否初始化完成
-Def_WorldKey_BossIsGeTui = "BossGeTui%s" #当前复活通知
Def_WorldKey_OperationActionState = "State_%s" #运营活动状态,参数为(运营活动名)
Def_WorldKey_BossRebornNeedPoint = "BossRebornNeedPoint" #boss复活需要总点数
Def_WorldKey_CrossBossIsAlive = 'CrossBossIsAlive_%s_%s' #跨服boss是否活着,参数(zoneID, bossID)
@@ -653,9 +648,6 @@
Def_ForbiddenTalk = "ForbiddenTalk" # 禁言
Def_TalkTick = "ForbiddenTalk" # 聊天间隔
-
-Def_PDict_GeTuiSet = "GetuiSet" # 推送提醒的设置
-Def_PDict_NoGeTuiTime = "NoGetuiTime" # 推送提醒免打扰时间,将字符串组合数字
Def_PlayerKey_ViewCrossPKBillboardTick = "ViewCrossPKBillboardTick_%s_%s" #查询PK排行榜tick,参数(zoneID, seasonID)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index 79bce76..08e1c29 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -45,7 +45,6 @@
import CrossRealmMsg
import CommFunc
import PyGameData
-import PlayerGeTui
import IPY_GameServer
import PlayerTeam
import CrossBoss
@@ -456,7 +455,6 @@
break
#此处只处理复活的
- #PlayerGeTui.GeTuiBossReborn(bossID)
__SetIsAlive(bossID, 1)
syncBOSSIDList.append(bossID)
@@ -467,30 +465,6 @@
if syncBOSSIDList:
Sync_BossInfo(None, syncBOSSIDList)
return
-
-
-#BOSS个推提前倒计时通知处理, 复活由DoCheckWorldBossReborn处理
-def ProcessBossGeTui(tick):
- return
-# if not GameWorld.SetWorldDictKey(ChConfig.TYPE_WorldBossGeTuiTick, tick):
-# #间隔未到
-# return
-# if GameWorld.IsCrossServer():
-# return
-# curTime = int(time.time())
-# for bossInfo in PyGameData.g_sortBOSSRefreshList:
-# bossID, killedTime, refreshTime = bossInfo
-# isAlive = __GetIsAlive(bossID)
-# if isAlive:
-# #GameWorld.DebugLog(" bossID=%s,未被击杀!" % bossID)
-# continue
-# rebornSecond = max(0, refreshTime - (curTime - killedTime))
-# if not rebornSecond:
-# #不处理复活BOSS
-# continue
-#
-# PlayerGeTui.GeTuiBoss(bossID, rebornSecond)
-
def GetBossIsAliveOrCanReborn(bossID):
##BOSS是否活着或者可重生
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index d1fc6ae..4e3f6e9 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -81,7 +81,6 @@
import ShareDefine
import GameWorldAverageLv
import PlayerDBOper
-import PlayerGeTui
import GameWorldBoss
import PlayerCompensation
import ReadChConfig
@@ -176,7 +175,6 @@
GameWorldOpenServerCampaign.DoOnDay()
#清理过期补偿
PlayerCompensation.ClearUpTimeOutCompensation()
- #PlayerGeTui.ClearFMTGeTuiLimit()
import PlayerBourse
PlayerBourse.OverTimeItemsDeal()
# 仙盟联赛
@@ -312,8 +310,7 @@
CrossRealmPK.OnPKMatchProcess(tick)
GameWorldBoss.DoCheckWorldBossReborn(tick)
- #GameWorldBoss.ProcessBossGeTui(tick)
- #PlayerGeTui.ProcessNewGuyCallBackGeTui(tick)
+
#组队副本版本
PlayerTeam.DoTeamProcess(tick)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
index f018be2..d6f8b0a 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -51,7 +51,6 @@
import PlayerFamilySWRH
import IpyGameDataPY
import PlayerTalk
-import PlayerGeTui
import PlayerStore
import GameWorldActionControl
import GameWorldFamilyWar
@@ -186,7 +185,6 @@
PlayerFamilySWRH.OnLogin(curPlayer)
PlayerTalk.LoginChatMi(curPlayer)
PlayerTalk.NotifyTalkCache(curPlayer)
- #PlayerGeTui.CleanNewGuyCallBackGeTui(curPlayer.GetID())
#活动
GameWorldActionControl.OnPlayerLogin(curPlayer)
#玩家等级记录
@@ -590,7 +588,6 @@
PlayerFriend.OnPlayerDisconnect(curPlayer, tick)
__UpdOnedayJobPlayerLoginoffTime(curPlayer)
- #PlayerGeTui.NewGuyCallBackGeTui(curPlayer, tick)
# 设置家族成员离线时间
SetPlayerOfflineTime(curPlayer)
#拍卖行
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py
deleted file mode 100644
index 28611ad..0000000
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py
+++ /dev/null
@@ -1,403 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#
-##@package
-#
-# @todo: 个推逻辑
-#
-# @author: Alee
-# @date 2018-5-20 下午02:10:00
-# @version 1.0
-#
-# @note:
-#
-#---------------------------------------------------------------------
-
-import GameWorld
-#import ChConfig
-import ReadChConfig
-import IpyGameDataPY
-import datetime
-import PlayerViewCache
-import urllib
-import ChConfig
-import PlayerControl
-import PyDataManager
-import time
-import json
-# VIP权限
-Def_Onoff_VIPCount = 5
-(
-Def_Onoff_Time, #免打扰时间开关
-Def_Onoff_Boss, #关注BOSS
-Def_Onoff_Chat, #私聊
-Def_Onoff_TJGDead, #脱机死亡
-Def_Onoff_TJGTimeLess, #脱机时间不足1小时
-) = range(Def_Onoff_VIPCount)
-
-#非VIP权限
-Def_GeTui_FMT = -2 # 封魔坛
-Def_GeTui_ZhuXianBoss = -3 # 诛仙BOSS
-
-# 新玩家还没有脱机时间 有利于挽回流失玩家
-g_NewGuyNoTJGTime = {} # {playerID:[playername,getuiid, tick]}
-
-g_FMTGeTuiLimit = {} # 封魔坛推送限制 过于频繁控制下短时间通知
-
-def ClearFMTGeTuiLimit():
- global g_FMTGeTuiLimit
- g_FMTGeTuiLimit = {}
-
-
-
-def GetTimeLimit(timeStr):
- # 检查格式后转数字
- timeList = timeStr.split("-")
- if len(timeList) != 2:
- return
-
- numList = timeList[0].split(":")
- if len(numList) != 2:
- return
-
- num1 = GameWorld.ToIntDef(numList[0], 0)
- num2 = GameWorld.ToIntDef(numList[1], 0)
-
- if num1 < 0 or num1 > 24:
- return
- if num2 < 0 or num2 > 60:
- return
-
- numList2 = timeList[1].split(":")
- if len(numList2) != 2:
- return
-
- num3 = GameWorld.ToIntDef(numList2[0], 0)
- num4 = GameWorld.ToIntDef(numList2[1], 0)
-
- if num3 < 0 or num3 > 24:
- return
- if num4 < 0 or num4 > 60:
- return
-
- return num1*1000000 + num2*10000 + num3*100 + num4
-
-
-
-# 检查是否可以个推,geTuiType小于0的代表默认可推,无VIP限制
-def CheckCanGeTui(playerCache, geTuiType=-1):
-
- if not playerCache.get("VIPLV", 0):
- if geTuiType < 0:
- return True
- return False
-
- if geTuiType in [Def_GeTui_FMT, Def_GeTui_ZhuXianBoss]:
- # 封魔坛受VIP的关注BOSS开关影响
- geTuiType = Def_Onoff_Boss
-
- # 检查时间和开关
- if geTuiType >= 0 and playerCache.get(ChConfig.Def_PDict_GeTuiSet, 0)&pow(2, geTuiType) == 0:
- return False
-
- # 没有开启免打扰
- if playerCache.get(ChConfig.Def_PDict_GeTuiSet, 0)&pow(2, Def_Onoff_Time) == 0:
- return True
-
- limitTimt = playerCache.get(ChConfig.Def_PDict_NoGeTuiTime, 0)
-
- curTime = GameWorld.GetServerTime()
- dateStr = str(curTime).split()[0]
- #时间格式 '%Y-%m-%d %H:%M'
- try:
- startTimeStr = '%s %s:%s'%(dateStr, limitTimt/1000000, limitTimt/10000%100)
- startTime = datetime.datetime.strptime(startTimeStr, "%Y-%m-%d %H:%M")
-
- endTimeStr = '%s %s:%s'%(dateStr, limitTimt/100%100, limitTimt%100)
- endTime = datetime.datetime.strptime(endTimeStr, "%Y-%m-%d %H:%M")
- except:
- return False
-
- if startTime == endTime:
- # 时间一致代表不限制
- return True
-
- # 如 13:00-23:00
- elif startTime < endTime:
- if startTime <= curTime and curTime <= endTime:
- return False
-
- # 如 23:00 - 8:00
- else:
- if endTime < curTime < startTime:
- return True
- else:
- return False
-
- return True
-
-
-#===============================================================================
-# import urllib
-# getUrl = "http://127.0.0.1:53000/getui/index.php"
-# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(0)
-# postInfo = urllib.urlencode({"PlayerName": curPlayer.GetName(), "NotifyMsg":"BOSS---", "RegID":"101d8559091575fb3da", "OSName":"ios"})
-# GameWorld.GetGameWorld().EventReport_EventReport(postInfo, "", "", "", 1, getUrl)
-#===============================================================================
-
-
-# 群推类定时活动由客户端自己处理
-# 服务端群推暂不由游戏服务器推送,可从第三方个推网站推送
-# 游戏服务器只推送具有变化性的内容
-# 支持单推和多人推送
-# appIDDict 混服使用对应不同key {平台ID:[[玩家个推ID, 玩家名],[玩家个推ID2, 玩家名2]。。。]}
-# 如果玩家名存在则必须与个推ID一一对应,若不存在则是多推,若存在则会一一单推
-# 带名字会被组合成 格式如【玩家名】您关注的BOSSxx已复活
-# EventReport_EventReport 向游戏服务器的个推小程序发送 webbottle
-def GeTuiNotify(appIDDict, notifyMsg):
- if not appIDDict:
- return
- #osName = ReadChConfig.GetPyMongoConfig("GeTui", "OSName") 混服无法配置系统
- geTuiUrl = ReadChConfig.GetPyMongoConfig("GeTui", "GeTuiUrl")
-
- playerInfo = json.dumps(appIDDict, ensure_ascii=False)
- #含中文部分要urlencode
- postInfo = urllib.urlencode({"PlayerInfo": playerInfo, "NotifyMsg":notifyMsg})
-
- GameWorld.GetGameWorld().EventReport_EventReport(postInfo, "", "", "", 1, geTuiUrl)
- return
-
-
-# 倒计时通知, 复活通知GeTuiBossReborn处理
-def GeTuiBoss(bossID, rebornSecond):
- if GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_BossIsGeTui%bossID) == 1:
- return
-
- bossData = IpyGameDataPY.GetIpyGameData('BOSSInfo', bossID)
- if not bossData:
- return
-
- if bossData.GetRebornPreNotifyTime() == 0:
- return
-
- if bossData.GetRebornPreNotifyTime() < rebornSecond:
- return
-
- #个推
- BossAttentionGeTui(bossData, bossID)
-
- GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_BossIsGeTui%bossID, 1)
- return
-
-
-# 外层保证当前复活的不会二次调用 Def_WorldKey_BossIsAlive
-def GeTuiBossReborn(bossID):
- bossData = IpyGameDataPY.GetIpyGameData('BOSSInfo', bossID)
- if not bossData:
- return
-
- # 复活的BOSS恢复通知
- GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_BossIsGeTui%bossID, 0)
-
- if bossData.GetRebornPreNotifyTime() != 0:
- return
-
- #个推
- BossAttentionGeTui(bossData, bossID)
- return
-
-
-
-
-# 判断BOSS剩余次数, 避免通知频繁
-# 注意玩家次数用完第二天未上线则不会同步BOSS次数,则不推送
-def CheckBossGeTuiCnt(playerID, bossID, geTuiType, cacheDict):
- global g_FMTGeTuiLimit
-
- if geTuiType == Def_GeTui_FMT:
- if not cacheDict.get("CntMark_%s"%ChConfig.Def_FBMapID_SealDemon, 0):
- return False
-
- # 封魔坛比较频繁默认1小时通知一次
- if playerID not in g_FMTGeTuiLimit:
- g_FMTGeTuiLimit[playerID] = {}
-
- lastTime = g_FMTGeTuiLimit[playerID].get(bossID, 0)
- if lastTime != 0 and time.time() - lastTime < 3600:
- # 离上次通知还没超过1小时
- return False
-
- g_FMTGeTuiLimit[playerID][bossID] = int(time.time())
- elif geTuiType == Def_GeTui_ZhuXianBoss:
- if not cacheDict.get("CntMark_%s"%ChConfig.Def_FBMapID_ZhuXianBoss, 0):
- return False
-
- # 比较频繁默认1小时通知一次
- if playerID not in g_FMTGeTuiLimit:
- g_FMTGeTuiLimit[playerID] = {}
-
- lastTime = g_FMTGeTuiLimit[playerID].get(bossID, 0)
- if lastTime != 0 and time.time() - lastTime < 3600:
- # 离上次通知还没超过1小时
- return False
-
- g_FMTGeTuiLimit[playerID][bossID] = int(time.time())
-
- elif geTuiType == Def_Onoff_Boss:
- #重生boss
- killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 1, {})
- for bidlist, bkey in killBossCntLimitDict.items():
- if bossID not in bidlist:
- continue
- if not cacheDict.get("CntMark_%s"%bkey, 0):
- return False
- else:
- return True
- return True
-
-# 个推基础判定
-def CanGeTuiByCache(curCache):
- if not curCache.GeTuiID:
- return False
-
- # 离线超过24小时不再推送,目前极光推送的特点是推送ID同机器不同包都是同一个ID
- if time.time() - curCache.OffTime > 24*60*60:
- return False
- return True
-
-def BossAttentionGeTui(bossData, bossID):
- if bossData.GetMapID() == ChConfig.Def_FBMapID_SealDemon:
- # 非VIP玩家 封魔坛个推
- geTuiType = Def_GeTui_FMT
- elif bossData.GetMapID() == ChConfig.Def_FBMapID_ZhuXianBoss:
- # 非VIP玩家 诛仙BOSS个推
- geTuiType = Def_GeTui_ZhuXianBoss
- else:
- geTuiType = Def_Onoff_Boss
-
- #找到关注这只BOSS的玩家
- pdict = PyDataManager.GetBossAttentionManager().GetBossAttentionDict()
-
- appIDDict = {} # 混服需要推到不同的个推应用
- for playerID, bossAttentionData in pdict.items():
- curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
- if curPlayer and not PlayerControl.GetIsTJG(curPlayer):
- continue
-
- # 离线玩家
- curCache = PlayerViewCache.FindViewCache(playerID)
- if not curCache:
- continue
-
- if not CanGeTuiByCache(curCache):
- #无推送资格,减少检索和eval
- continue
-
- recordDict = eval(bossAttentionData.RecordData)
- if recordDict.get(bossID, 0) in [0, 9]:
- #0-默认未关注, 1-主动关注, 2-自动关注, 9-主动取消关注
- continue
-
- cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
- if not CheckCanGeTui(cacheDict, geTuiType):
- # 个推逻辑检查
- continue
-
- if not CheckBossGeTuiCnt(playerID, bossID, geTuiType, cacheDict):
- # 判断BOSS剩余次数, 避免通知频繁
- continue
-
- appID = cacheDict.get("AppID", "")
- if appID not in appIDDict:
- appIDDict[appID] = []
-
- appIDDict[appID].append([curCache.GeTuiID, cacheDict.get("Name", "")])
-
-
- if not appIDDict:
- return
-
- npcName = GameWorld.GetNPCData(bossID).GetNPCName()
- npcLV = GameWorld.GetNPCData(bossID).GetLV()
-
- if geTuiType == Def_GeTui_FMT:
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 1)%(npcName, npcLV)) # 文字信息
- elif geTuiType == Def_GeTui_ZhuXianBoss:
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 5)%(npcName, npcLV)) # 文字信息
- elif geTuiType == Def_Onoff_Boss:
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 2)%(bossData.GetSourceName(), npcName, npcLV)) # 文字信息
-
- GeTuiNotify(appIDDict, showStr)
-
-
-# 私聊
-def ChatMiGeTui(playerID, playerName, tagPlayerName):
- curCache = PlayerViewCache.FindViewCache(playerID)
- if not curCache:
- return
-
- if not CanGeTuiByCache(curCache):
- #无推送资格,基础判定
- return
-
- cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
- if not CheckCanGeTui(cacheDict, Def_Onoff_Chat):
- # 过滤个推
- return
-
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 3))%(tagPlayerName) # 文字信息
- GeTuiNotify({cacheDict.get("AppID", ""):[[curCache.GeTuiID, playerName]]}, showStr)
- return
-
-# 下线时,低级玩家没有离线时间的玩家提示, 上线清空
-def NewGuyCallBackGeTui(curPlayer, tick):
- global g_NewGuyNoTJGTime
- if PlayerControl.GetTJGTime(curPlayer):
- return
- if curPlayer.GetLV() > 100:
- return
- playerID = curPlayer.GetID()
- g_NewGuyNoTJGTime[playerID] = [curPlayer.GetName(), curPlayer.GetGeTuiClientID(), tick,
- GameWorld.GetPlayerPlatform(curPlayer)] # curPlayer.GetGeTuiClientID()
- return
-
-# 上线清除
-def CleanNewGuyCallBackGeTui(playerID):
- global g_NewGuyNoTJGTime
- if playerID not in g_NewGuyNoTJGTime:
- return
-
- g_NewGuyNoTJGTime.pop(playerID)
-
-# 延迟5分钟提示
-def ProcessNewGuyCallBackGeTui(tick):
- if not GameWorld.SetWorldDictKey(ChConfig.TYPE_WorldNewGuyGeTuiTick, tick):
- #间隔未到
- return
-
- global g_NewGuyNoTJGTime
-
- playerIDList = []
- appIDDict = {}
-
- for playerID, getuiInfo in g_NewGuyNoTJGTime.items():
- if tick - getuiInfo[2] < 300000:
- continue
- playerIDList.append(playerID)
-
- appID = getuiInfo[3]
- if appID not in appIDDict:
- appIDDict[appID] = []
-
- appIDDict[appID].append([getuiInfo[1],getuiInfo[0]])
-
-
- if not appIDDict:
- return
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiOffLine", 4)) # 文字信息
- GeTuiNotify(appIDDict, showStr)
-
- for playerID in playerIDList:
- CleanNewGuyCallBackGeTui(playerID)
- return
-
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
index c6f24d8..0a3d524 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
@@ -26,7 +26,6 @@
import CrossRealmMsg
import ChNetSendPack
import NetPackCommon
-import PlayerGeTui
import PyGameData
import re
@@ -146,8 +145,6 @@
if len(g_ChatMi[tagPlayerID]) > 8:
g_ChatMi[tagPlayerID].pop(0)
return
-
- #PlayerGeTui.ChatMiGeTui(tagPlayerID, tagPlayerName, curPlayer.GetName())
# 登录时将离线消息下发
def LoginChatMi(curPlayer):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
index 917f241..93d0bc6 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -192,12 +192,7 @@
return
curCache.LV = curPackData.PlayerLV
curCache.OffTime = curPackData.OffTime
- if isLogout:
- curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
- if curPlayer:
- curCache.GeTuiID = curPlayer.GetGeTuiClientID()
- curCache.GeTuiIDSize = len(curCache.GeTuiID)
-
+
curCache.PropDataDict = {} # 每次更新数据时,重置字典缓存,下次获取时重新eval缓存
curCache.PropData = curPackData.PropData
curCache.PropDataSize = curPackData.PropDataSize
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
index 2472fe5..3ab6448 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -40,7 +40,6 @@
import ChNetSendPack
import NetPackCommon
import PassiveBuffEffMng
-import PlayerGeTui
import IpyGameDataPY
#---------------------------------------------------------------------
g_skillHurtList = IPY_GameWorld.IPY_HurtList()
@@ -363,7 +362,6 @@
if GameObj.GetHP(defender) <= 0:
defender.SetDict(ChConfig.Def_NPCDead_KillerType, attacker.GetGameObjType())
defender.SetDict(ChConfig.Def_NPCDead_KillerID, attacker.GetID())
- #PlayerGeTui.TJGDead(defender, attacker.GetName())
if defender.GetGameObjType() == IPY_GameWorld.gotNPC:
skillID = 0 if not useSkill else useSkill.GetSkillID()
# 记录死亡原因
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 18ff3d2..ea6b866 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3462,8 +3462,6 @@
Def_PDict_BackupTime = "BackupTime" # 最近一次数据备档时间
Def_QuDao_DoubleBillGold = "qddbGold" # 渠道返利的仙玉
Def_QuDao_DoubleBillCount = "qddbCount" # 渠道返利的仙玉领取次数 日期+次数组合数字
-Def_PDict_GeTuiSet = "GetuiSet" # 推送提醒的设置
-Def_PDict_NoGeTuiTime = "NoGetuiTime" # 推送提醒免打扰时间,将字符串组合数字
Def_PlayerKey_TJGNPC = "TJGNPC" # 脱机挂机NPC点
Def_PDict_OnHour = "OnHour"
Def_PDict_OnDay = "OnDay" # 0点过天
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 46365fd..be4e983 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -140,7 +140,6 @@
import PlayerArena
import PyGameData
import PlayerCoin
-import PlayerGeTui
import PlayerCharm
import PlayerDogz
import PlayerCoat
@@ -645,9 +644,6 @@
#大师
PlayerGreatMaster.MasterOnLogin(curPlayer)
-
- # 推送提醒
- PlayerGeTui.LoginNotifySetting(curPlayer)
#通知VIP
PlayerVip.DoOnLogin(curPlayer, tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGeTui.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGeTui.py
deleted file mode 100644
index 0da4ee1..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGeTui.py
+++ /dev/null
@@ -1,310 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#
-##@package
-#
-# @todo: 个推逻辑
-#
-# @author: Alee
-# @date 2018-5-20 下午02:10:00
-# @version 1.0
-#
-# @note:
-#
-#---------------------------------------------------------------------
-
-import PlayerControl
-import GameWorld
-import ChConfig
-import ReadChConfig
-import datetime
-import IpyGameDataPY
-import IPY_GameWorld
-import ChPyNetSendPack
-import NetPackCommon
-import PlayerTJG
-import PlayerViewCacheTube
-import urllib
-import PlayerVip
-import json
-#===============================================================================
-# //B2 05 推送提醒设置 tagCMPushNotificationsSetting
-#
-# struct tagCMPushNotificationsSetting
-# {
-# tagHead Head;
-# DWORD OnoffBit; // 按位约定开关
-# BYTE TimeLen;
-# char TimeStr[TimeLen]; // 时间字符串 01:02-05:00
-# };
-#===============================================================================
-
-# VIP权限
-Def_Onoff_VIPCount = 5
-(
-Def_Onoff_Time, #免打扰时间开关
-Def_Onoff_Boss, #关注BOSS
-Def_Onoff_Chat, #私聊
-Def_Onoff_TJGDead, #脱机死亡
-Def_Onoff_TJGTimeLess, #脱机时间不足1小时
-) = range(Def_Onoff_VIPCount)
-
-#非VIP权限
-Def_GeTui_FMT = -2 # 封魔坛
-
-
-# 推送提醒设置
-def GeTuiSetting(index, pack, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- if not PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_5):
- #清空前4位 VIP权限
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GeTuiSet, pack.OnoffBit>>Def_Onoff_VIPCount<<Def_Onoff_VIPCount)
- return
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GeTuiSet, pack.OnoffBit)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NoGeTuiTime, GetTimeLimit(pack.TimeStr))
-
- # 客户端需控制下发送频率
- PlayerViewCacheTube.UpdateGameServerPlayerCache(curPlayer, tick, False)
- return
-
-
-def GetTimeLimit(timeStr):
- # 检查格式后转数字
- timeList = timeStr.split("-")
- if len(timeList) != 2:
- return
-
- numList = timeList[0].split(":")
- if len(numList) != 2:
- return
-
- num1 = GameWorld.ToIntDef(numList[0], 0)
- num2 = GameWorld.ToIntDef(numList[1], 0)
-
- if num1 < 0 or num1 > 24:
- return
- if num2 < 0 or num2 > 60:
- return
-
- numList2 = timeList[1].split(":")
- if len(numList2) != 2:
- return
-
- num3 = GameWorld.ToIntDef(numList2[0], 0)
- num4 = GameWorld.ToIntDef(numList2[1], 0)
-
- if num3 < 0 or num3 > 24:
- return
- if num4 < 0 or num4 > 60:
- return
-
- return num1*1000000 + num2*10000 + num3*100 + num4
-
-# 便于测试
-def GetGeTuiClientID(curPlayer):
- #return "13165ffa4e5a8fbf6d0"
- return curPlayer.GetAccountData().GetGeTuiClientID()
-
-# 检查是否可以个推,geTuiType小于0的代表默认可推,无VIP限制
-def CheckCanGeTui(curPlayer, geTuiType=-1):
- if not GetGeTuiClientID(curPlayer):
- return False
-
- if not PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_5):
- if geTuiType < 0:
- return True
- return False
-
- if geTuiType == Def_GeTui_FMT:
- # 封魔坛受VIP的关注BOSS开关影响
- geTuiType = Def_Onoff_Boss
-
- # 检查时间和开关
- if geTuiType >= 0 and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)&pow(2, geTuiType) == 0:
- return False
-
- # 没有开启免打扰
- if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)&pow(2, Def_Onoff_Time) == 0:
- return True
-
- limitTimt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NoGeTuiTime)
-
- curTime = GameWorld.GetCurrentTime()
- dateStr = str(curTime).split()[0]
- #时间格式 '%Y-%m-%d %H:%M'
- try:
- startTimeStr = '%s %s:%s'%(dateStr, limitTimt/1000000, limitTimt/10000%100)
- startTime = datetime.datetime.strptime(startTimeStr, "%Y-%m-%d %H:%M")
-
- endTimeStr = '%s %s:%s'%(dateStr, limitTimt/100%100, limitTimt%100)
- endTime = datetime.datetime.strptime(endTimeStr, "%Y-%m-%d %H:%M")
- except:
- return False
-
- if startTime == endTime:
- # 时间一致代表不限制
- return True
-
- # 如 13:00-23:00
- elif startTime < endTime:
- if startTime <= curTime and curTime <= endTime:
- return False
-
- # 如 23:00 - 8:00
- else:
- if endTime < curTime < startTime:
- return True
- else:
- return False
-
- return True
-
-#===============================================================================
-# //B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
-#
-# struct tagMCPushNotificationsSetting
-# {
-# tagHead Head;
-# DWORD OnoffBit; // 按位约定开关
-# BYTE TimeLen;
-# char TimeStr[TimeLen]; // 时间字符串 01:02-05:00
-# };
-#===============================================================================
-def LoginNotifySetting(curPlayer):
-
- sendPack = ChPyNetSendPack.tagMCPushNotificationsSetting()
- sendPack.OnoffBit = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)
-
- limitTimt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NoGeTuiTime)
- timeStr = "%s:%s-%s:%s"%(limitTimt/1000000, limitTimt/10000%100, limitTimt/100%100, limitTimt%100)
- sendPack.TimeStr = timeStr
- sendPack.TimeLen = len(timeStr)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
- return
-
-
-#===============================================================================
-# import urllib
-# getUrl = "http://127.0.0.1:53000/getui/index.php"
-# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(0)
-# postInfo = urllib.urlencode({"PlayerName": curPlayer.GetName(), "NotifyMsg":"BOSS---", "RegID":"101d8559091575fb3da", "OSName":"ios"})
-# GameWorld.GetGameWorld().EventReport_EventReport(postInfo, "", "", "", 1, getUrl)
-#===============================================================================
-
-
-# 群推类定时活动由客户端自己处理
-# 服务端群推暂不由游戏服务器推送,可从第三方个推网站推送
-# 游戏服务器只推送具有变化性的内容
-# 支持单推和多人推送
-# appIDDict 混服使用对应不同key {平台ID:[[玩家个推ID, 玩家名],[玩家个推ID2, 玩家名2]。。。]}
-# 如果玩家名存在则必须与个推ID一一对应,若不存在则是多推,若存在则会一一单推
-# 带名字会被组合成 格式如【玩家名】您关注的BOSSxx已复活
-# EventReport_EventReport 向游戏服务器的个推小程序发送 webbottle
-def GeTuiNotify(appIDDict, notifyMsg):
- if not appIDDict:
- return
- #osName = ReadChConfig.GetPyMongoConfig("GeTui", "OSName") 混服无法配置系统
- geTuiUrl = ReadChConfig.GetPyMongoConfig("GeTui", "GeTuiUrl")
-
- playerInfo = json.dumps(appIDDict, ensure_ascii=False)
- #含中文部分要urlencode
- postInfo = urllib.urlencode({"PlayerInfo": playerInfo, "NotifyMsg":notifyMsg})
-
- GameWorld.GetGameWorld().EventReport_EventReport(postInfo, "", "", "", 1, geTuiUrl)
- return
-
-
-# 时间不足
-def TJGTimeLess(curPlayer):
- # 通知脱机挂,只处理一次
- if curPlayer.GetDictByKey("TJGTimeLess"):
- return
-
- tjgTime = PlayerTJG.GetTJGTime(curPlayer)
- if tjgTime > 3600:
- return
-
- curPlayer.SetDict("TJGTimeLess", 1)
-
- if not CheckCanGeTui(curPlayer, Def_Onoff_TJGTimeLess):
- return
-
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 4)) # 文字信息
- GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) :[[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, showStr)
- return
-
-
-#[玩家名]脱机外挂已开始托管角色挂机,角色当前经验效率:9999亿9999万经验/分,剩余脱机外挂时间:**小时**分钟
-def TJGEfficiency(curPlayer, times, exp):
- # 通知脱机挂效益,只处理一次
- if curPlayer.GetDictByKey("TJGEfficiency"):
- return
- curPlayer.SetDict("TJGEfficiency", 1)
-
- if not CheckCanGeTui(curPlayer):
- return
-
- showStr = IpyGameDataPY.GetFuncCfg("GeTuiTJG") # 文字信息
- wanStr = IpyGameDataPY.GetFuncCfg("Coins1", 1) # 万
- yiStr = IpyGameDataPY.GetFuncCfg("Coins1", 2) # 亿
-
- # 此为中式显示法,翻译成英文因考虑显示逻辑不同而变
- Hundred_Million = 100000000
- Ten_Thousand = 10000
-
- exp = exp/max(times, 1)*60
-
- if exp >= Hundred_Million:
- expStr = "%s%s"%(exp/Hundred_Million, yiStr)
- if exp/Ten_Thousand%Ten_Thousand != 0:
- expStr += "%s%s"%(exp/Ten_Thousand%Ten_Thousand, wanStr)
- elif exp >= Ten_Thousand:
- if exp < Ten_Thousand*100:
- expStr = "%.1f%s"%(exp*1.0/Ten_Thousand, wanStr)
- else:
- expStr = "%s%s"%(exp/Ten_Thousand, wanStr)
- else:
- expStr = exp
-
- tjgTime = PlayerTJG.GetTJGTime(curPlayer)
-
- GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]},
- GameWorld.GbkToCode(showStr%(expStr, tjgTime/60/60, tjgTime/60%60)))
- return
-
-#您被[其他玩家名]杀死,剩余脱机外挂时间:**小时**分钟
-def TJGDead(curPlayer, tagName):
- if curPlayer.GetGameObjType() != IPY_GameWorld.gotPlayer:
- return
- if not PlayerTJG.GetIsTJG(curPlayer):
- return
-
- if not CheckCanGeTui(curPlayer):
- return
-
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 2)) # 文字信息
- tjgTime = PlayerTJG.GetTJGTime(curPlayer)
-
- GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]},
- showStr%(tagName, tjgTime/60/60, tjgTime/60%60))
- return
-
-# [玩家名]当前背包已满,赶快上线查收战利品吧
-def FullPack(curPlayer):
- # 背包满只处理一次,外层已拦截
- #===========================================================================
- # if curPlayer.GetDictByKey("GTFullPack"):
- # return
- # curPlayer.SetDict("GTFullPack", 1)
- #===========================================================================
-
- if not CheckCanGeTui(curPlayer):
- return
-
- showStr = GameWorld.GbkToCode(IpyGameDataPY.GetFuncCfg("GeTuiTJG", 3)) # 文字信息
- GeTuiNotify({GameWorld.GetPlayerPlatform(curPlayer) : [[GetGeTuiClientID(curPlayer), curPlayer.GetName()]]}, showStr)
-
-
-
-
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
index b94a061..fa9088c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTJG.py
@@ -48,7 +48,6 @@
import math
import PassiveBuffEffMng
import PlayerPet
-import PlayerGeTui
import ChEquip
import QuestCommon
import random
@@ -283,9 +282,6 @@
#优先执行换守护
ChangeGuard(curPlayer, tick)
times, finalAddExp = CalcPlayerTJG(curPlayer, tick)
-
- #PlayerGeTui.TJGEfficiency(curPlayer, times, finalAddExp)
- #PlayerGeTui.TJGTimeLess(curPlayer)
return
def GetTJGTime(curPlayer): return curPlayer.GetHappyPoint()
@@ -619,7 +615,6 @@
def CheckPackFull(curPlayer):
if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
curPlayer.SetDict(ChConfig.Def_PlayerKey_TJGPackFullAfterEat, 1)
- #PlayerGeTui.FullPack(curPlayer)
# 可执行吞噬操作
def CanEatItemsOper(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
index 935717b..fa6ba4e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
@@ -227,26 +227,6 @@
curPlayerPropDict["AtkBackHP"] = GameObj.GetAtkBackHP(curPlayer) # 攻击回复血量固定值
curPlayerPropDict["PVPAtkBackHP"] = PlayerControl.GetPVPAtkBackHP(curPlayer) # PVP攻击回血
- #推送提醒
- curPlayerPropDict[ChConfig.Def_PDict_GeTuiSet] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GeTuiSet)
- curPlayerPropDict[ChConfig.Def_PDict_NoGeTuiTime] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NoGeTuiTime)
-
- # 各类功能 BOSS次数, BOSS相关对应B.Boss信息.xlsx的CntMark
- # 封魔坛剩余次数
- enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_SealDemon)
- maxCnt = FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_SealDemon)
- curPlayerPropDict['CntMark_%s' % ChConfig.Def_FBMapID_SealDemon] = max(maxCnt - enterCnt, 0)
- # 诛仙BOSS剩余次数
- enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % ChConfig.Def_FBMapID_ZhuXianBoss)
- maxCnt = FBCommon.GetEnterFBMaxCnt(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss)
- curPlayerPropDict['CntMark_%s' % ChConfig.Def_FBMapID_ZhuXianBoss] = max(maxCnt - enterCnt, 0)
- # 世界BOSS剩余次数
- curPlayerPropDict['CntMark_%s' % ShareDefine.Def_Boss_Func_World] = BossHurtMng.GetCanKillBossCnt(curPlayer, ShareDefine.Def_Boss_Func_World)[0]
- # BOSS之家剩余次数
- curPlayerPropDict['CntMark_%s' % ShareDefine.Def_Boss_Func_Home] = BossHurtMng.GetCanKillBossCnt(curPlayer, ShareDefine.Def_Boss_Func_Home)[0]
- # 神兽BOSS剩余次数
- curPlayerPropDict['CntMark_%s' % ShareDefine.Def_Boss_Func_Dogz] = BossHurtMng.GetCanKillBossCnt(curPlayer, ShareDefine.Def_Boss_Func_Dogz)[0]
-
#-----------
#扩展属性缓存
curPlayerPlusDict = {}
--
Gitblit v1.8.0