| | |
| | | FBCommon.Notify_FB_Over(curPlayer, overDict)
|
| | | return
|
| | |
|
| | | ## 可否扫荡
|
| | | def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
|
| | | return True
|
| | |
|
| | | ## 扫荡结果
|
| | | def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, isFinish, dataEx):
|
| | | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | |
| | | enterLV = curPlayer.GetLV()
|
| | | GameWorld.DebugLog("仙界秘境扫荡: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt), playerID)
|
| | | |
| | | totalExp = 0
|
| | | fairylandNPCList = IpyGameDataPY.GetFuncEvalCfg('FairylandNPC', 1)
|
| | | for npcID, npcCount in fairylandNPCList:
|
| | | npcData = GameWorld.GetGameData().FindNPCDataByID(npcID)
|
| | | if not npcData:
|
| | | continue
|
| | | baseExp = npcData.GetExp()
|
| | | reExp = PlayerControl.GetPlayerReExp(curPlayer)
|
| | | expMulti = IpyGameDataPY.GetFuncCfg("XjmjMonsterExp", 2)
|
| | | addExp = eval(IpyGameDataPY.GetFuncCompileCfg("XjmjMonsterExp", 1))
|
| | | addExpT = addExp * npcCount
|
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | finalAddExp = playerControl.AddExp(addExpT, ShareDefine.Def_ViewExpType_KillNPC)
|
| | | totalExp += finalAddExp
|
| | | GameWorld.DebugLog(" reExp=%s,npcID=%s,baseExp=%s,expMulti=%s,addExp=%s,npcCount=%s,addExpT=%s,finalAddExp=%s,totalExp=%s"
|
| | | % (reExp, npcID, baseExp, expMulti, addExp, npcCount, addExpT, finalAddExp, totalExp), playerID)
|
| | | |
| | | rewardRateList = FBCommon.GetFBGradeRewardRateList(ChConfig.Def_FBMapID_BZZD)
|
| | | maxGrade = len(rewardRateList)
|
| | | grade = maxGrade # 扫荡直接取最高评级
|
| | | gradeAddExpRate = rewardRateList[maxGrade - grade]
|
| | | gradeExp = int(totalExp * gradeAddExpRate / 100.0)
|
| | | totalExp += gradeExp
|
| | | |
| | | GameWorld.DebugLog(" totalExp=%s,gradeExp=%s,gradeAddExpRate=%s" % (totalExp, gradeExp, gradeAddExpRate), playerID)
|
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | playerControl.AddExp(gradeExp)
|
| | | |
| | | expRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_TotalFightExp)
|
| | | expPointRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_TotalFightExpPoint)
|
| | | totalExpRecord = expPointRecord * ChConfig.Def_PerPointValue + expRecord
|
| | | upPer = 0 #提升比例
|
| | | if totalExp > totalExpRecord:#超过旧记录
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_TotalFightExp, totalExp % ChConfig.Def_PerPointValue)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_TotalFightExpPoint, totalExp / ChConfig.Def_PerPointValue)
|
| | | upPer = (totalExp - totalExpRecord) * 100 / totalExpRecord if totalExpRecord else 0
|
| | | |
| | | # 通知结果
|
| | | overDict = {FBCommon.Over_enterLV:enterLV, FBCommon.Over_exp:totalExp % ChConfig.Def_PerPointValue, |
| | | FBCommon.Over_expPoint: totalExp / ChConfig.Def_PerPointValue, |
| | | 'gradeExp':gradeExp % ChConfig.Def_PerPointValue, 'gradeExpPoint':gradeExp / ChConfig.Def_PerPointValue,
|
| | | 'upPer':upPer, FBCommon.Over_grade:grade, FBCommon.Over_isSweep:1}
|
| | | __SendBZZDOverInfo(curPlayer, overDict)
|
| | | return
|
| | |
|
| | | ## 副本行为
|
| | | def DoFBAction(curPlayer, actionType, actionInfo, tick):
|