| | |
| | | import BuffSkill
|
| | | import EventShell
|
| | | import PyGameData
|
| | | import SkillCommon
|
| | |
|
| | |
|
| | | #---副本配置对应key值---
|
| | |
| | | FBPlayerDict_TotalExp = 'FBPlayerDict_TotalExp' # 获得的总经验
|
| | | FBPlayerDict_TotalExpPoint = 'FBPlayerDict_TotalExpPoint' # 获得的总经验点
|
| | | FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV' # 鼓舞等级
|
| | |
|
| | | def OnFBPlayerOnLogin(curPlayer):
|
| | | ReduceExpBuffOnLogin(curPlayer)
|
| | | return
|
| | |
|
| | | ## 是否能够通过活动查询进入
|
| | | def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
|
| | |
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_BZZD, 0, ChConfig.CME_Log_Start, logType)
|
| | | historyEnterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_HistoryEnterCnt)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_HistoryEnterCnt, min(historyEnterCnt + 1, 999))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_NeedReduceExpBuff, 1) # 进入的时候标记需要扣除
|
| | | __GiveFirstEnterPrize(curPlayer, historyEnterCnt + 1)
|
| | |
|
| | | # 初始化所需击杀NPC
|
| | |
| | |
|
| | | ## 玩家主动离开副本
|
| | | def DoPlayerLeaveFB(curPlayer, tick):
|
| | | if GameWorld.GetGameFB().GetFBStep() <= FB_Step_Fighting:
|
| | | GameWorld.DebugLog("经验副本进行中,玩家主动退出,直接扣除经验层级buff!", curPlayer.GetPlayerID())
|
| | | DoReduceExpBuff(curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家升级
|
| | |
| | | continue
|
| | | playerID = curPlayer.GetPlayerID()
|
| | |
|
| | | DoReduceExpBuff(curPlayer)
|
| | | |
| | | # 记录最高总经验
|
| | | exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
|
| | | expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
|
| | |
| | | playerID = curPlayer.GetPlayerID()
|
| | |
|
| | | enterLV = curPlayer.GetLV()
|
| | | GameWorld.DebugLog("仙界秘境扫荡: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt), playerID)
|
| | | expRateEx = 0
|
| | | expRateLayerBuff = SkillCommon.FindBuffByID(curPlayer, ChConfig.Def_SkillID_BZZDBuff)[0]
|
| | | if expRateLayerBuff:
|
| | | hasEffect = SkillCommon.GetSkillEffectByEffectID(expRateLayerBuff.GetSkill(), ChConfig.TYPE_Calc_AttrFightExpRate)
|
| | | if hasEffect:
|
| | | expRateEx = hasEffect.GetEffectValue(0) # 能叠加的最大上限
|
| | | DoReduceExpBuff(curPlayer, expRateLayerBuff)
|
| | | |
| | | GameWorld.DebugLog("仙界秘境扫荡: mapID=%s,lineID=%s,sweepCnt=%s,expRateEx=%s" % (mapID, lineID, sweepCnt, expRateEx), playerID)
|
| | |
|
| | | totalExp = 0
|
| | | fairylandNPCList = IpyGameDataPY.GetFuncEvalCfg('FairylandNPC', 1)
|
| | |
| | | addExp = eval(IpyGameDataPY.GetFuncCompileCfg("XjmjMonsterExp", 1))
|
| | | addExpT = addExp * npcCount
|
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | finalAddExp = playerControl.AddExp(addExpT, ShareDefine.Def_ViewExpType_KillNPC)
|
| | | finalAddExp = playerControl.AddExp(addExpT, ShareDefine.Def_ViewExpType_KillNPC, expRateEx=expRateEx)
|
| | | 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)
|
| | |
| | | __SendBZZDOverInfo(curPlayer, overDict)
|
| | | return
|
| | |
|
| | | def DoReduceExpBuff(curPlayer, buff=None):
|
| | | BuffSkill.ReduceBuffLayer(curPlayer, buff, ChConfig.Def_SkillID_BZZDBuff, 1)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BZZD_NeedReduceExpBuff, 0)
|
| | | return
|
| | |
|
| | | def ReduceExpBuffOnLogin(curPlayer):
|
| | | if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BZZD_NeedReduceExpBuff):
|
| | | return
|
| | | |
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | if mapID == ChConfig.Def_FBMapID_BZZD and GameWorld.GetGameFB().GetFBStep() <= FB_Step_Fighting:
|
| | | GameWorld.DebugLog("经验副本进行中,还不需要扣除经验层级buff!", curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | DoReduceExpBuff(curPlayer)
|
| | | return
|
| | |
|
| | | ## 副本行为
|
| | | def DoFBAction(curPlayer, actionType, actionInfo, tick):
|
| | | if actionType == 0:
|