| | |
| | | FBPlayerDict_TotalExpPoint = 'XMYH_TotalExpPoint%s' # 获得的总经验点
|
| | | FBPlayerDict_TotalPoint = 'XMYH_TotalPoint%s' # 获得的总仙盟贡献值
|
| | | FBPlayerDict_HasCollect = 'XMYH_HasCollect%s' # 是否已采集
|
| | | FBPlayerDict_HasSit = 'XMYH_HasSit%s' # 是否已传功
|
| | |
|
| | |
|
| | | def OnFBPlayerOnDay(curPlayer):
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, 0)
|
| | | return
|
| | |
|
| | |
|
| | | ##开启副本
|
| | | # @param tick 时间戳
|
| | |
| | | def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):
|
| | | return ipyEnterPosInfo
|
| | |
|
| | | |
| | | ##是否可以进入
|
| | | # @param ask 请求结构体
|
| | | # @param tick 时间戳
|
| | |
| | | # return IPY_GameWorld.cmeCustom, "GeRen_liubo_676165"
|
| | | #可进入
|
| | | return IPY_GameWorld.cmeAccept
|
| | |
|
| | |
|
| | | ##玩家进入副本
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, 0)
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalPoint % playerID, 0)
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_HasCollect % playerID, 0)
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_HasSit % playerID, 0)
|
| | | |
| | | FBCommon.ClearAreaRewardRecord(playerID)
|
| | |
|
| | | FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty)
|
| | |
| | | DoFBHelp(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | | def __GetRemainTick(tick):
|
| | | ##活动剩余毫秒
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | startTick = GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FamilyPartyFB_StartTick)
|
| | | closeFB_RemainTick = max(0, FBCommon.GetFBLineStepTime(mapID)[0]*1000 - (tick - startTick))
|
| | | return closeFB_RemainTick
|
| | |
|
| | |
|
| | | ##副本定时器
|
| | | # @param tick 时间戳
|
| | |
| | | FBCommon.DoLogic_FBKickAllPlayer()
|
| | | GameWorldProcess.CloseFB(tick)
|
| | | else:
|
| | | FBCommon.DoLogicAreaReward("FamilyPartyAreaAward", tick)
|
| | | FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 10000)
|
| | | #FBCommon.DoLogicAreaReward("FamilyPartyAreaAward", tick)
|
| | | #FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 10000)
|
| | |
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | notifyIndex = gameFB.GetGameFBDictByKey(ChConfig.Map_FBDict_NotifyStart)
|
| | |
| | |
|
| | | GameWorld.GetGameFB().SetGameFBDict(ChConfig.Map_FBDict_NotifyStart, notifyIndex + 1)
|
| | |
|
| | | |
| | | return
|
| | | |
| | |
|
| | |
|
| | |
|
| | | def FamilyPartyAnswerRight(curPlayer):
|
| | |
| | | # if FBCommon.GetEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty) or curAnswerCnt:
|
| | | # GiveJoinPrize(curPlayer)
|
| | |
|
| | | |
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | if mapID != ChConfig.Def_FBMapID_FamilyParty:
|
| | | return
|
| | |
|
| | | if state == 1:
|
| | | GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, tick)
|
| | | |
| | |
|
| | | return
|
| | |
|
| | |
| | | # return
|
| | |
|
| | |
|
| | |
|
| | | ##获得玩家传入副本需要携带的信息
|
| | | # @param curPlayer 玩家实例
|
| | | # @param lineId 分线ID
|
| | |
| | | def GetPlayerResetWorldPosFBMsg(curPlayer, lineId):
|
| | | return '%s' % (curPlayer.GetPlayerID())
|
| | |
|
| | |
|
| | | ##玩家退出家族处理
|
| | | # @param curPlayer 玩家实例
|
| | | # @param tick 时间戳
|
| | |
| | | def OnLeaveFamily(curPlayer, tick):
|
| | | #GameWorld.DebugLog("OnLeaveFamily...")
|
| | | curPlayerID = curPlayer.GetPlayerID()
|
| | | |
| | |
|
| | | PlayerControl.PlayerLeaveFB(curPlayer)
|
| | | return
|
| | |
| | | # @return 是否副本复活
|
| | | def OnPlayerReborn():
|
| | | return True
|
| | |
|
| | |
|
| | | ##获得副本帮助信息
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | #totalPoint += IpyGameDataPY.GetFuncCfg('PartyReward') #加参与奖
|
| | | totalPoint += addPoint * curAnswerCnt
|
| | | hasCollect = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasCollect%playerID)
|
| | | hasSit = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasSit % playerID)
|
| | | |
| | | getCnt = gameWorld.GetGameWorldDictByKey(ChConfig.Map_Player_AreaReward_GetCnt%playerID)
|
| | | isFull = 1 if getCnt >= IpyGameDataPY.GetFuncCfg('FamilyPartyAreaAward', 3) else 0
|
| | | helpDict = {FBCommon.Help_exp:exp, FBCommon.Help_expPoint:expPoint,FBCommon.Help_score:totalPoint, "hasCollect":hasCollect, "isFullExp":isFull}
|
| | | helpDict = {FBCommon.Help_exp:exp, FBCommon.Help_expPoint:expPoint, FBCommon.Help_score:totalPoint, "hasCollect":hasCollect, "isFullExp":isFull, "hasSit":hasSit}
|
| | | if PyGameData.g_familyPartyInfo:
|
| | | rankList = []
|
| | | for i, info in enumerate(PyGameData.g_familyPartyInfo[0], 1):
|
| | |
| | | helpDict['familyPartyRank'] = rankList
|
| | | helpDict['familyPartyTop'] = {'name':PyGameData.g_familyPartyInfo[1], "cnt":PyGameData.g_familyPartyInfo[2]}
|
| | |
|
| | | |
| | | GameWorld.DebugLog("DoFBHelp %s" % helpDict, playerID)
|
| | | FBCommon.Notify_FBHelp(curPlayer, helpDict)
|
| | | return
|
| | |
|
| | |
|
| | | ##是否可以采集
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | return
|
| | | return True
|
| | |
|
| | |
|
| | | ##副本中,采集物需要Loading时间.
|
| | | # @param curPlayer 玩家实例
|
| | | # @param curNPC NPC实例
|
| | |
| | | # @remarks 副本中,采集物需要Loading时间
|
| | | def GetFBPrepareTime(curPlayer, curNPC):
|
| | | return IpyGameDataPY.GetFuncCfg('FamilyPartyDesk', 2) * 1000
|
| | |
|
| | |
|
| | | ##玩家收集成功(塔, 旗)
|
| | | # @param curPlayer 玩家实例
|
| | |
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalPoint % playerID, updPoint)
|
| | | DoFBHelp(curPlayer, 0)
|
| | | return |
| | |
|
| | |
|
| | | ## 副本行为
|
| | | # @param curPlayer 玩家
|
| | | # @param actionType 行为类型
|
| | | # @param actionInfo 行为信息
|
| | | # @param tick 当前时间
|
| | | # @return None
|
| | | def DoFBAction(curPlayer, actionType, actionInfo, tick):
|
| | | gameWorld = GameWorld.GetGameWorld()
|
| | | playerID = curPlayer.GetID()
|
| | | if actionType == 0: #邀请打坐
|
| | | tagPlayerID = actionInfo
|
| | | if curPlayer.GetPlayerAction() in [IPY_GameWorld.paSit, IPY_GameWorld.paPreparing]:
|
| | | GameWorld.DebugLog('邀请打坐,玩家已处于打坐或采集状态', playerID)
|
| | | return
|
| | | hasSit = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasSit % playerID)
|
| | | if hasSit:
|
| | | GameWorld.Log('邀请打坐,玩家已打坐过一次', playerID)
|
| | | return
|
| | |
|
| | | copyMapPlayerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | tagPlayer = copyMapPlayerManager.FindPlayerByID(tagPlayerID)
|
| | | if not tagPlayer:
|
| | | GameWorld.DebugLog('邀请%s打坐,该玩家不在副本里' % tagPlayerID, playerID)
|
| | | return
|
| | | curPlayer.StopMove()
|
| | | curPlayer.Sit()
|
| | | if tagPlayer.GetPlayerAction() not in [IPY_GameWorld.paSit, IPY_GameWorld.paPreparing]:
|
| | | tagPlayer.StopMove()
|
| | | tagPlayer.Sit()
|
| | | elif actionType == 1: #打坐结束给奖励
|
| | | reLV = curPlayer.GetLV()
|
| | | reExp = PlayerControl.GetPlayerReExp(curPlayer)
|
| | | worldlv = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | giveExp = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward'))
|
| | | if giveExp:
|
| | | PlayerControl.PlayerControl(curPlayer).AddExp(giveExp)
|
| | | exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp % playerID)
|
| | | expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint % playerID)
|
| | | newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+giveExp
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalExp % playerID, newTotalExp%ChConfig.Def_PerPointValue)
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, newTotalExp/ChConfig.Def_PerPointValue)
|
| | | |
| | | gameWorld.SetGameWorldDict(FBPlayerDict_HasSit % playerID, 1)
|
| | | DoFBHelp(curPlayer, 0)
|
| | | if curPlayer.GetPlayerAction() == IPY_GameWorld.paSit:
|
| | | curPlayer.Stand()
|
| | | GameWorld.DebugLog(' 传功结束,给经验%s, worldlv=%s' % (giveExp, worldlv))
|
| | | return
|