hxp
2025-02-06 a90833bf05d8f4a338b0224a956a3794c106bb48
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerGeTui.py
@@ -257,11 +257,11 @@
    
# 个推基础判定
def CanGeTuiByCache(curCache):
    if not curCache.GetGeTuiID():
    if not curCache.GeTuiID:
        return False
    
    # 离线超过24小时不再推送,目前极光推送的特点是推送ID同机器不同包都是同一个ID
    if time.time() - curCache.GetOffTime() > 24*60*60:
    if time.time() - curCache.OffTime > 24*60*60:
        return False
    return True
    
@@ -285,7 +285,7 @@
            continue
        
        # 离线玩家
        curCache = PlayerViewCache.ViewCacheMgr.FindCache(playerID)
        curCache = PlayerViewCache.FindViewCache(playerID)
        if not curCache:
            continue
        
@@ -298,7 +298,7 @@
            #0-默认未关注, 1-主动关注, 2-自动关注, 9-主动取消关注
            continue
        
        cacheDict = eval(curCache.GetPropData())
        cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
        if not CheckCanGeTui(cacheDict, geTuiType):
            # 个推逻辑检查
            continue
@@ -311,7 +311,7 @@
        if appID not in appIDDict:
            appIDDict[appID] = []
            
        appIDDict[appID].append([curCache.GetGeTuiID(), cacheDict.get("Name", "")])
        appIDDict[appID].append([curCache.GeTuiID, cacheDict.get("Name", "")])
             
    if not appIDDict:
@@ -332,7 +332,7 @@
# 私聊
def ChatMiGeTui(playerID, playerName, tagPlayerName):
    curCache = PlayerViewCache.ViewCacheMgr.FindCache(playerID)
    curCache = PlayerViewCache.FindViewCache(playerID)
    if not curCache:
        return
@@ -340,13 +340,13 @@
        #无推送资格,基础判定
        return
    cacheDict = eval(curCache.GetPropData())
    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.GetGeTuiID(), playerName]]}, showStr)
    GeTuiNotify({cacheDict.get("AppID", ""):[[curCache.GeTuiID, playerName]]}, showStr)
    return
# 下线时,低级玩家没有离线时间的玩家提示, 上线清空