hxp
2018-11-25 ae8e857873ba53e55392ab06237cd7b16426d93e
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
@@ -44,6 +44,7 @@
import Operate_EquipSuitCompose
import PlayerDogz
import QuestCommon
import DataRecordPack
## 获取成就字典信息值
@@ -237,52 +238,50 @@
#  @param None
#  @return
def __CheckOldPlayerSuccess(curPlayer):
    ''' 成就版本更新老玩家检查
        正式上线后,成就的修改或者增加,一般是增加新成就,则需要对老玩家成就版本进行校正,检查成就完成情况
        成就版本号递增
    ''' 成就版本更新老玩家检查  每次启动服务后 玩家第一次上线检查成就完成情况
    '''
    Versions = 2 #版本号,往上增加
    #Versions = 2 #版本号,往上增加
    initGameWorldTime = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_InitGameWorldTime)
    # 上线需要检查老玩家成就完成情况类型{成就类型:维护版本号, ...}
    NeedCheckSuccTypeDict = {
                            ShareDefine.SuccType_GetMagicWeapon:2,
                            ShareDefine.SuccType_PassRuneTower:2,
                            ShareDefine.SuccType_GodWeapon:2,
                            ShareDefine.SuccType_HorseAllLV:2,
                            ShareDefine.SuccType_EquipPlusLV:2,
                            ShareDefine.SuccType_EquipColorItem:2,
                            ShareDefine.SuccType_EquipArmor:2,
                            ShareDefine.SuccType_EquipWeapon:2,
                            ShareDefine.SuccType_InlayRune:2,
                            ShareDefine.SuccType_RuneLvUp:2,
                            ShareDefine.SuccType_RealmlvUp:2,
                            ShareDefine.SuccType_PetClassLV:2,
                            ShareDefine.SuccType_InlayStone1:2,
                            ShareDefine.SuccType_InlayStone2:2,
                            ShareDefine.SuccType_XJMJGetExp:2,
                            ShareDefine.SuccType_EquipWashLV1:2,
                            ShareDefine.SuccType_EquipWashLV2:2,
                            ShareDefine.SuccType_EquipWashLV3:2,
                            ShareDefine.SuccType_EquipWing:2,
                            ShareDefine.SuccType_MWSkillUp:2,
                            ShareDefine.SuccType_EquipSuit:2,
                            ShareDefine.SuccType_FamilyTechLV:2,
                            ShareDefine.SuccType_AlchemyLV:2,
                            ShareDefine.SuccType_VIPLV:2,
                            ShareDefine.SuccType_StoneTotalLV:2,
                            ShareDefine.SuccType_XBXZ:2,
                            ShareDefine.SuccType_DogzBattle:2,
                            ShareDefine.SuccType_DogzEquipPlus:2,
                            ShareDefine.SuccType_MainTaskNode:2,
                             }
    NeedCheckSuccTypeList = [
                            ShareDefine.SuccType_GetMagicWeapon,
                            ShareDefine.SuccType_PassRuneTower,
                            ShareDefine.SuccType_GodWeapon,
                            ShareDefine.SuccType_HorseAllLV,
                            #ShareDefine.SuccType_EquipPlusLV,
                            ShareDefine.SuccType_EquipColorItem,
                            ShareDefine.SuccType_EquipArmor,
                            ShareDefine.SuccType_EquipWeapon,
                            ShareDefine.SuccType_InlayRune,
                            ShareDefine.SuccType_RuneLvUp,
                            ShareDefine.SuccType_RealmlvUp,
                            ShareDefine.SuccType_PetClassLV,
                            ShareDefine.SuccType_InlayStone1,
                            ShareDefine.SuccType_InlayStone2,
                            ShareDefine.SuccType_XJMJGetExp,
                            ShareDefine.SuccType_EquipWashLV1,
                            ShareDefine.SuccType_EquipWashLV2,
                            ShareDefine.SuccType_EquipWashLV3,
                            ShareDefine.SuccType_EquipWing,
                            ShareDefine.SuccType_MWSkillUp,
                            ShareDefine.SuccType_EquipSuit,
                            ShareDefine.SuccType_FamilyTechLV,
                            ShareDefine.SuccType_AlchemyLV,
                            ShareDefine.SuccType_VIPLV,
                            ShareDefine.SuccType_StoneTotalLV,
                            ShareDefine.SuccType_XBXZ,
                            ShareDefine.SuccType_DogzBattle,
                            ShareDefine.SuccType_DogzEquipPlus,
                            ShareDefine.SuccType_MainTaskNode,
                             ]
    
    curCheckVersion = GetPDictValue(curPlayer, ChConfig.Def_PDict_Success_CheckVersion)
    if curCheckVersion == initGameWorldTime:
        GameWorld.DebugLog('    本次开启服务器处理过成就检查,不再处理 ', curPlayer.GetID())
        return
    GameWorld.DebugLog("更新老玩家上线检查成就curCheckVersion=%s" % (curCheckVersion))
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for succType, version in NeedCheckSuccTypeDict.items():
        if curCheckVersion >= version:
            continue
    for succType in NeedCheckSuccTypeList:
        if succType == ShareDefine.SuccType_GetMagicWeapon:
            
            for i in xrange(ipyDataMgr.GetTreasureCount()):
@@ -388,9 +387,10 @@
                missionID = succData.condition[0]
                if QuestCommon.GetHadFinishMainMission(curPlayer, missionID):
                    DoAddSuccessProgress(curPlayer, succType, 1, [missionID])
    SetPDictValue(curPlayer, ChConfig.Def_PDict_Success_CheckVersion, Versions)
    GameWorld.DebugLog("更新老玩家上线检查成就updCheckVersions=%s" % (Versions))
    DataRecordPack.DR_CheckOldPlayerSuccess(curPlayer)
    SetPDictValue(curPlayer, ChConfig.Def_PDict_Success_CheckVersion, initGameWorldTime)
    GameWorld.DebugLog("更新老玩家上线检查成就updCheckVersions=%s" % (initGameWorldTime), curPlayer.GetID())
    return
## 成就OnWeek