xdh
2019-05-27 64a00ad79dbdf44eebca167038a0a278a75a6667
6844 【2.0】【后端】缥缈仙域优化
7个文件已修改
66 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1462,7 +1462,8 @@
DailyActionID_SkyTower, # 天星塔  23
DailyActionID_HorsePetBoss, # 骑宠BOSS  24
DailyActionID_FairyDomain, # 缥缈仙域  25
) = range(1, 25 + 1)
DailyActionID_LVUP, # 玩家等级提升  26
) = range(1, 26 + 1)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3789,11 +3789,13 @@
# 每日活跃度
Def_PDict_Activity_FinishCnt = "Activity_FinishCnt_%s"  # 活跃度类型对应完成次数
Def_PDict_Activity_TotalPoint = "Activity_TotalPoint"  # 当前总活跃值
Def_PDict_Activity_TotalPoint = "Activity_TotalPoint"  # 当前总活跃值(不可消耗)
Def_PDict_ActivityCanCostTotalPoint = "ActivityCanCostTotalPoint"  # 当前总活跃值(可消耗)
Def_PDict_ActivityAwardRecord = "ActivityAwardRecord"  # 活跃度奖励领取记录,按二进制位标识
Def_PDict_Activity_AwardStage = "Activity_AwardStage"  # 当前活跃奖励阶段
Def_PDict_Activity_RealmPoint = "Activity_RealmPoint"  # 当前可领修行点
Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint"  # 多倍活动额外获得的修行点
# 每日活动
Def_PDict_DailyActionDayTimes = "DailyActionDayTimes_%s"  # 每日活动今日完成次数 参数每日活动ID
Def_PDict_DailyActionDayBuyTimes = "DADayBuyTimes_%s"  # 每日活动今日购买次数 参数每日活动ID
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
@@ -54,8 +54,11 @@
                ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
                if ipyData:
                    conditionList = ipyData.GetCondition()
                    condition = random.choice(conditionList)
                    index = conditionList.index(condition)
                    if conditionList:
                        condition = random.choice(conditionList)
                        index = conditionList.index(condition)
                    else:
                        index = 0
                    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
        
    #设置寻访中
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -245,8 +245,7 @@
        addValue = addValue + addExtraPoint
        curTotalPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
        __SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint, curTotalPoint + addValue)
        #realmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
        #__SetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint, realmPoint+addValue)
        AddCanCostActivityPoint(curPlayer, addValue)
        SyncDailyActivityInfo(curPlayer)
        
        GameWorld.DebugLog("增加活跃度任务次数,activityNum=%s,addPbCnt=%s,addValue=%s, multiple=%s, addExtraPoint=%s,curExtraPoint=%s"  
@@ -268,6 +267,21 @@
        return multiple, extraPointLimit
    return actRealmPointIpyData.GetMultiple(), actRealmPointIpyData.GetPointLimit()
def AddCanCostActivityPoint(curPlayer, addValue):
    # 增加可消耗的活跃点
    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint, min(IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint'), curPoint + addValue))
    return
def CostActivityPoint(curPlayer, costPoint):
    # 消耗活跃点
    curPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    if curPoint < costPoint:
        return
    __SetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint,
                    curPoint - costPoint)
    SyncDailyActivityInfo(curPlayer)
    return True
## 同步活跃度信息
#  @param curPlayer
@@ -279,7 +293,7 @@
    sendPack.CurValue = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_TotalPoint)
    sendPack.StageIndex = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_AwardStage)
    sendPack.AwardRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityAwardRecord)
    sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_RealmPoint)
    sendPack.RealmPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_ActivityCanCostTotalPoint)
    sendPack.ExtraPoint = __GetPDictValue(curPlayer, ChConfig.Def_PDict_Activity_ExtraRealmPoint)
    NetPackCommon.SendFakePack(curPlayer, sendPack)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -4035,6 +4035,7 @@
            if aftLV > befLV:
                curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
                PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
                PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_LVUP, aftLV - befLV)
            if aftFreePoint > befFreePoint:
                curPlayer.SetFreePoint(aftFreePoint)
                #NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
@@ -4081,6 +4082,7 @@
            OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
            #神秘限购
            FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
        #不需要做升级任务, 设置玩家经验
        SetPlayerTotalExp(curPlayer, curTotalExp) 
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFairyDomain.py
@@ -135,9 +135,9 @@
    if fairyDomainState == 1:
        GameWorld.DebugLog("    正在寻访仙域中!请先退出寻访")
        return
    if fairyDomainState != 2 and not PlayerActivity.AddDailyActionFinishCnt(curPlayer, dailyID):
        GameWorld.DebugLog("    寻访仙域次数不足!")
    costPoint = IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint', 2)
    if not PlayerActivity.CostActivityPoint(curPlayer, costPoint):
        GameWorld.DebugLog("    寻访仙域需要活跃点不足!costPoint=%s"%costPoint)
        return
    #随机事件 重置事件状态
@@ -196,10 +196,10 @@
            continue
        conditionList = ipyData.GetCondition()
        if not conditionList:
            fdEventIDList.remove(fdEventID)
            continue
        condition = random.choice(conditionList)
        index = conditionList.index(condition)
            index = 0
        else:
            condition = random.choice(conditionList)
            index = conditionList.index(condition)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
    
    if not fdEventIDList:
@@ -444,15 +444,14 @@
                gearAwardList = ipyData.GetGearAward()
                if not gearAwardList:
                    return
                itemRateList = gearAwardList[index] if index < len(gearAwardList) else gearAwardList[-1]
                itemRateList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, itemRateList, 1)
                giveItemList = [GameWorld.GetResultByWeightList(itemRateList)]
                giveItemList = []
                itemRandomList = gearAwardList[index] if index < len(gearAwardList) else gearAwardList[-1]
                for itemRateList in itemRandomList:
                    itemRateList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, itemRateList, 0)
                    giveItemList.append(GameWorld.GetResultByWeightList(itemRateList))
            else:
                giveItemList = [ipyData.GetBasicAward()]
        ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList)
        for itemInfo in giveItemList:
            NPCCommon.SendVirtualItemDrop(curPlayer, itemInfo[0], 0, 0, '')
        NPCCommon.DoGiveItemByVirtualDrop(curPlayer, giveItemList, 0)
        msgDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(giveItemList)}
        FBCommon.Notify_FB_Over(curPlayer, msgDict)
        GameWorld.DebugLog('缥缈奇遇领奖 msgDict=%s, fdeventID=%s' % (msgDict, fdeventID))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1462,7 +1462,8 @@
DailyActionID_SkyTower, # 天星塔  23
DailyActionID_HorsePetBoss, # 骑宠BOSS  24
DailyActionID_FairyDomain, # 缥缈仙域  25
) = range(1, 25 + 1)
DailyActionID_LVUP, # 玩家等级提升  26
) = range(1, 26 + 1)