9341 【BT5】【主干】【后端】情缘系统(1.删除拉黑伴侣限制提示;2.邮件支持配置物品邮件过天不删除;3.礼物魅力字段改为支持小数;4.合服首登同步魅力榜)
10个文件已修改
71 ■■■■■ 已修改文件
PySysDB/PySysDBG.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCharm.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBG.h
@@ -867,8 +867,8 @@
struct tagLoveGift
{
    BYTE        _GiftNum;    //聘礼ID
    DWORD        AddCharmSelf;    //单个增加自身魅力
    DWORD        AddCharmTag;    //单个增加对方魅力
    float        AddCharmSelf;    //单个增加自身魅力
    float        AddCharmTag;    //单个增加对方魅力
    DWORD        AddIntimacy;    //单个增加双方亲密度
    char        WorldNotifyKey;    //广播key
};
ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -710,8 +710,8 @@
                "LoveGift":(
                        ("BYTE", "GiftNum", 1),
                        ("DWORD", "AddCharmSelf", 0),
                        ("DWORD", "AddCharmTag", 0),
                        ("float", "AddCharmSelf", 0),
                        ("float", "AddCharmTag", 0),
                        ("DWORD", "AddIntimacy", 0),
                        ("char", "WorldNotifyKey", 0),
                        ),
@@ -2211,8 +2211,8 @@
    
    def __init__(self):
        self.GiftNum = 0
        self.AddCharmSelf = 0
        self.AddCharmTag = 0
        self.AddCharmSelf = 0.0
        self.AddCharmTag = 0.0
        self.AddIntimacy = 0
        self.WorldNotifyKey = ""
        return
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -202,13 +202,13 @@
        
    return
def DoPlayerRealLoginOK(curPlayer, tick):
def DoPlayerRealLoginOK(curPlayer, loginMsg, tick):
    ''' 玩家最终登录成功处理, 由  MapServer  DoPlayerRealLoginOK  通知
        该函数为地图最终登录成功才会执行到,以后一些功能类的登录处理建议均写到这里
        旧的功能先不动( __DoPlayerLoginServer 函数中的功能),如果有登录相关的bug再考虑是否移动到此函数
    '''
    GameWorld.Log("GameServer->DoPlayerRealLoginOK", curPlayer.GetPlayerID())
    isMixServerFirstLogin = loginMsg[0]
    GameWorld.Log("GameServer->DoPlayerRealLoginOK, isMixServerFirstLogin=%s" % isMixServerFirstLogin, curPlayer.GetPlayerID())
    
    if not PlayerControl.GetIsTJG(curPlayer):
        #家族副本boss状态通知
@@ -218,6 +218,9 @@
        #情缘
        PlayerLove.OnPlayerLogin(curPlayer)
        
    if isMixServerFirstLogin:
        PlayerCharm.OnMixServerFirstLogin(curPlayer)
    return
def __UpdOnedayJobPlayerLoginoffTime(curPlayer):
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCharm.py
@@ -126,6 +126,21 @@
    Sync_PlayerCharmInfo(curPlayer)
    return
def OnMixServerFirstLogin(curPlayer):
    playerID = curPlayer.GetPlayerID()
    charmValueRecMgr = PyDataManager.GetDBPyCharmValueRecManager()
    if playerID not in charmValueRecMgr.charmTotalDict:
        return
    recTypeValueDict = charmValueRecMgr.charmTotalDict.get(playerID, {})
    charmTotal = recTypeValueDict.get(CharmValueRecType_Total, 0)
    charmWeek = recTypeValueDict.get(CharmValueRecType_Week, 0)
    charmDay = recTypeValueDict.get(CharmValueRecType_Day, 0)
    GameWorld.Log("合服首登同步魅力榜单: charmTotal=%s,charmWeek=%s,charmDay=%s" % (charmTotal, charmWeek, charmDay), playerID)
    PlayerBillboard.UpdatePlayerBillboardEx(curPlayer, playerID, ShareDefine.Def_BT_CharmTotal, charmTotal)
    PlayerBillboard.UpdatePlayerBillboardEx(curPlayer, playerID, ShareDefine.Def_BT_CharmWeek, charmWeek)
    PlayerBillboard.UpdatePlayerBillboardEx(curPlayer, playerID, ShareDefine.Def_BT_CharmDay, charmDay)
    return
def GetPlayerCharmOfferSortList(playerID, recType):
    ## 获取排序后的玩家魅力贡献榜
    
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -1234,13 +1234,15 @@
        mailText = curMail.Text
        # 通知类模板邮件,过天可直接删除
        if tempSign in mailText and tempSignEnd in mailText and CheckCanDelCompensation(curMail, curMail.GUID):
            #tempKey = mailText[mailText.index(tempSign) + len(tempSign):mailText.index(tempSignEnd)]
            #GameWorld.DebugLog("过天删除无附件通知类邮件模板! tempKey=%s %s, %s" % (tempKey, curMail.PlayerID, curMail.GUID))
            needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
            player = GameWorld.GetPlayerManager().FindPlayerByID(curMail.PlayerID)
            if player and player.GetInitOK():
                NotifyCompensationResult(player, curMail.GUID, 1)
            continue
            tempKey = mailText[mailText.index(tempSign) + len(tempSign):mailText.index(tempSignEnd)]
            notClearMailKeyList = IpyGameDataPY.GetFuncEvalCfg("MailSet", 1)
            if tempKey not in notClearMailKeyList:
                #GameWorld.DebugLog("过天删除无附件通知类邮件模板! tempKey=%s %s, %s" % (tempKey, curMail.PlayerID, curMail.GUID))
                needClearGUIDList.append([curMail.PlayerID, curMail.GUID])
                player = GameWorld.GetPlayerManager().FindPlayerByID(curMail.PlayerID)
                if player and player.GetInitOK():
                    NotifyCompensationResult(player, curMail.GUID, 1)
                continue
        
        # 超过接收邮件30天则完全删除此邮件
        limitTime = datetime.datetime.strptime(curMail.CreateTime, ChConfig.TYPE_Time_Format) + datetime.timedelta(days = 30)
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
@@ -216,7 +216,8 @@
    
    couple = PyDataManager.GetDBPyCoupleManager().GetCouple(playerID)
    if couple and couple.GetCoupleID(playerID) == friendID:
        GameWorld.Log('DeleteFriend -> 封包异常 ->伴侣不能删除好友.friendID=%s' % friendID, playerID)
        #GameWorld.Log('DeleteFriend -> 封包异常 ->伴侣不能删除好友.friendID=%s' % friendID, playerID)
        PlayerControl.NotifyCode(curPlayer, "DelFriendCoupleLimit")
        return
    
    #离线好友同时删除记录
@@ -402,7 +403,8 @@
    
    couple = PyDataManager.GetDBPyCoupleManager().GetCouple(curPlayer.GetID())
    if couple and couple.GetCoupleID(curPlayer.GetID()) == tagID:
        GameWorld.DebugLog("伴侣不能加入黑名单! tagID=%s" % tagID, curPlayer.GetID())
        #GameWorld.DebugLog("伴侣不能加入黑名单! tagID=%s" % tagID, curPlayer.GetID())
        PlayerControl.NotifyCode(curPlayer, "AddBlackCoupleLimit")
        return
    
    tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagID)
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
@@ -796,8 +796,8 @@
    if not ipyData:
        return
    
    addCharmSelf = ipyData.GetAddCharmSelf() * giftCount
    addCharmTag = ipyData.GetAddCharmTag() * giftCount
    addCharmSelf = int(ipyData.GetAddCharmSelf() * giftCount)
    addCharmTag = int(ipyData.GetAddCharmTag() * giftCount)
    addIntimacy = ipyData.GetAddIntimacy() * giftCount
    worldNotifyKey = ipyData.GetWorldNotifyKey()
    
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
@@ -503,7 +503,8 @@
        curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(srcPlayerID)
        if not curPlayer:
            return
        ChPlayer.DoPlayerRealLoginOK(curPlayer, tick)
        loginMsg = eval(resultName)
        ChPlayer.DoPlayerRealLoginOK(curPlayer, loginMsg, tick)
        return
    
    if callName == "SendMail":
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3133,6 +3133,7 @@
Def_PlayerKey_LoadMapIsLogin = 'LoadMapIsLogin'    # 本次进入地图是否是登录的
Def_PlayerKey_NotifyAllAttrState = 'NotifyAllAttrState'    # 是否同步过所有属性,切图时第一次刷属性需要同步
Def_PlayerKey_LoginTick = 'PlayerKey_LoginTick'    # 玩家上线的当前服务器tick
Def_PlayerKey_MixServerFirstLogin = 'MixServerFirstLogin'    # 本次登录是否是合服首登
Def_PlayerKey_CalcOLTimeTick = 'CalcOLTimeTick'    # 上一次计算累计在线时长tick
Def_PlayerKey_SitForZhenQi = 'PlayerKey_SitForZhenQi'  # 打坐真气恢复时间
Def_PlayerKey_Muse = 'PlayerKey_Muse'  # 冥想恢复时间
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -873,7 +873,8 @@
    GameWorld.Log("MapServer->DoPlayerRealLoginOK", curPlayer.GetPlayerID())
    
    # 通知GameServer地图最终登录成功了
    msg = ""
    isMixServerFirstLogin = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MixServerFirstLogin)
    msg = str([isMixServerFirstLogin])
    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetID(), 0, 0, "PlayerRealLoginOK", msg, len(msg))
    return
@@ -913,6 +914,8 @@
        GameWorld.Log("    新号不给合服奖励!", playerID)
        return
    
    curPlayer.SetDict(ChConfig.Def_PlayerKey_MixServerFirstLogin, 1)
    # 重置首充双倍
    PlayerCoin.DoResetCTGCount(curPlayer, "MixServer")