xdh
2018-09-03 99c992cba2159ff3b48bc953abb8439c39fb9e70
fix:3222 【后端】仙盟宴会结束后发邮件参与奖励
3个文件已修改
56 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py
@@ -687,6 +687,7 @@
    PlayerTeam.OnPlayerChangeMap(curPlayer, tick)
    GameWorldBoss.OnPlayerChangeMap(curPlayer)
    PlayerFamily.OnPlayerChangeMap(curPlayer, tick)
    PlayerFamilyParty.OnPlayerChangeMap(curPlayer, tick)
    return 
## 玩家切换真实地图
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -41,6 +41,15 @@
    NotifyFamilyPartyQuestion(curPlayer)
    return
def OnPlayerChangeMap(curPlayer, tick):
    if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
        return
    playerID = curPlayer.GetID()
    if playerID not in PyGameData.g_partyheroAnswerDict:
        PyGameData.g_partyheroAnswerDict[playerID] = 0
    return
def NotifyFamilyPartyQuestion(curPlayer):
    #刚登录的或刚进仙盟的补发最近的题目
    gameWorld = GameWorld.GetGameWorld()
@@ -104,6 +113,14 @@
            PlayerCompensation.SendPersonalItemMailEx('', content, day, [topHeroID], itemList)
                
            PlayerControl.WorldNotify(0, 'Party_TopPlayer', [topHeroName])
        #给参与奖励
        joinPlayerIDList = PyGameData.g_partyheroAnswerDict.keys()
        if joinPlayerIDList:
            joinReward = IpyGameDataPY.GetFuncEvalCfg('PartyReward')
            if joinReward:
                PlayerCompensation.SendMailByKey('FamilyParty', joinPlayerIDList, joinReward)
    return
def __GetFamilyAnswerRankList():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -246,16 +246,16 @@
def OnFamilyPartyStateChange(state, tick):
    #活动状态变更
    GameWorld.DebugLog('    仙盟宴会活动状态变更 state=%s'%state)
    if state == 0:
        playerManager = GameWorld.GetPlayerManager()
        for i in xrange(playerManager.GetPlayerCount()):
            curPlayer = playerManager.GetPlayerByIndex(i)
            if not curPlayer or curPlayer.IsEmpty():
                continue
            #答对题或者进过图的给参与奖励
            curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
            if FBCommon.GetEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty) or curAnswerCnt:
                GiveJoinPrize(curPlayer)
#    if state == 0:
#        playerManager = GameWorld.GetPlayerManager()
#        for i in xrange(playerManager.GetPlayerCount()):
#            curPlayer = playerManager.GetPlayerByIndex(i)
#            if not curPlayer or curPlayer.IsEmpty():
#                continue
#            #答对题或者进过图的给参与奖励
#            curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
#            if FBCommon.GetEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty) or curAnswerCnt:
#                GiveJoinPrize(curPlayer)
                
    
    mapID = GameWorld.GetMap().GetMapID()
@@ -268,15 +268,15 @@
    
    return
def GiveJoinPrize(curPlayer):
    #参与奖
    joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
    if not joinAward:
        return
    PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
    return
#
#def GiveJoinPrize(curPlayer):
#    #参与奖
#    joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
#    if not joinAward:
#        return
#
#    PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
#    return