| | |
| | | DailyActionID_SkyTower, # 天星塔 23
|
| | | DailyActionID_HorsePetBoss, # 骑宠BOSS 24
|
| | | DailyActionID_FairyDomain, # 缥缈仙域 25
|
| | | ) = range(1, 25 + 1)
|
| | | DailyActionID_LVUP, # 玩家等级提升 26
|
| | | ) = range(1, 26 + 1)
|
| | |
|
| | |
|
| | |
|
| | |
| | |
|
| | | # 每日活跃度
|
| | | 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
|
| | |
| | | ipyData = IpyGameDataPY.InterpolationSearch('FairyAdventures', 'OpenServerDay', openServerDay, {'EventID':fdEventID})
|
| | | if ipyData:
|
| | | conditionList = ipyData.GetCondition()
|
| | | 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)
|
| | |
|
| | | #设置寻访中
|
| | |
| | | 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"
|
| | |
| | | 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
|
| | |
| | | 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
|
| | |
| | | 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])
|
| | |
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
|
| | | #神秘限购
|
| | | FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
|
| | |
|
| | | #不需要做升级任务, 设置玩家经验
|
| | | SetPlayerTotalExp(curPlayer, curTotalExp)
|
| | | return
|
| | |
| | | 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
|
| | |
|
| | | #随机事件 重置事件状态
|
| | |
| | | continue
|
| | | conditionList = ipyData.GetCondition()
|
| | | if not conditionList:
|
| | | fdEventIDList.remove(fdEventID)
|
| | | continue
|
| | | index = 0
|
| | | else:
|
| | | condition = random.choice(conditionList)
|
| | | index = conditionList.index(condition)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
|
| | |
| | | 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))
|
| | |
| | | DailyActionID_SkyTower, # 天星塔 23
|
| | | DailyActionID_HorsePetBoss, # 骑宠BOSS 24
|
| | | DailyActionID_FairyDomain, # 缥缈仙域 25
|
| | | ) = range(1, 25 + 1)
|
| | | DailyActionID_LVUP, # 玩家等级提升 26
|
| | | ) = range(1, 26 + 1)
|
| | |
|
| | |
|
| | |
|