| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyTotalExp, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyTotalExpPoint, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyTotalPoint, 0)
|
| | | #打坐
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitExpRound, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitTotalExp, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitTotalExpPoint, 0)
|
| | | return
|
| | |
|
| | | ##开启副本
|
| | |
| | | return
|
| | |
|
| | | gameWorld = GameWorld.GetGameWorld()
|
| | | sitActionState = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilySit)
|
| | | partyActionState = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyParty)
|
| | | if partyActionState:
|
| | | |
| | | if sitActionState:
|
| | | Process_SitAction(tick)
|
| | | |
| | | # 由于宴会不需要额外处理,只需要同步Help,所以如果打坐进行中,就不需要再重复处理宴会同步
|
| | | elif partyActionState:
|
| | | FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 5000)
|
| | |
|
| | | return
|
| | |
|
| | | def Process_SitAction(tick):
|
| | | key = "SitActionProcessTick"
|
| | | interval, expRoundMax = IpyGameDataPY.GetFuncEvalCfg("FamilySit", 1)
|
| | | gameFB = GameWorld.GetGameFB()
|
| | | lastTick = gameFB.GetGameFBDictByKey(key)
|
| | | if tick - lastTick < interval * 1000:
|
| | | return
|
| | | gameFB.SetGameFBDict(key, tick)
|
| | | |
| | | worldlv = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | playerCount = playerManager.GetPlayerCount()
|
| | | # 每增加一名仙盟成员加成经验百分比|最高加成百分比,两个人开始算加成
|
| | | perPlayerExpRateAdd, expRateAddMax = IpyGameDataPY.GetFuncEvalCfg("FamilySit", 3)
|
| | | expRateEx = min(expRateAddMax, (playerCount - 1) * perPlayerExpRateAdd) if playerCount > 1 else 0
|
| | | |
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if not curPlayer:
|
| | | continue
|
| | | |
| | | expRound = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitExpRound)
|
| | | if expRound < expRoundMax:
|
| | | expRound += 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitExpRound, expRound)
|
| | | |
| | | # 给经验
|
| | | reLV = curPlayer.GetLV()
|
| | | reExp = PlayerControl.GetPlayerReExp(curPlayer)
|
| | | giveExp = eval(IpyGameDataPY.GetFuncCompileCfg("FamilySit", 2))
|
| | | finalAddExp = PlayerControl.PlayerControl(curPlayer).AddExp(giveExp, ShareDefine.Def_ViewExpType_Sit, expRateEx=expRateEx)
|
| | | |
| | | exp = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitTotalExp)
|
| | | expPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitTotalExpPoint)
|
| | | newTotalExp = expPoint * ChConfig.Def_PerPointValue + exp + finalAddExp
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitTotalExp, newTotalExp % ChConfig.Def_PerPointValue)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilySitTotalExpPoint, newTotalExp / ChConfig.Def_PerPointValue) |
| | | |
| | | #GameWorld.DebugLog("打坐经验: expRound=%s,reLV=%s,reExp=%s,giveExp=%s,expRateEx=%s,finalAddExp=%s" |
| | | # % (expRound, reLV, reExp, giveExp, expRateEx, finalAddExp), curPlayer.GetPlayerID())
|
| | | |
| | | DoFBHelp(curPlayer, tick)
|
| | | |
| | | return
|
| | |
|
| | | def FamilyPartyAnswerRight(curPlayer, answerInfo):
|
| | | #回答正确,给奖励
|
| | |
| | | lineID = GameWorld.GetGameWorld().GetLineID()
|
| | | helpDict['familyPartyPlayer'] = g_familyMapPlayerIDDict.get(lineID, [])
|
| | |
|
| | | # 打坐
|
| | | sitActionState = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilySit)
|
| | | if sitActionState:
|
| | | exp = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitTotalExp)
|
| | | expPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitTotalExpPoint)
|
| | | expRound = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilySitExpRound)
|
| | | playerCount = GameWorld.GetMapCopyPlayerManager().GetPlayerCount()
|
| | | sitInfo = {FBCommon.Help_exp:exp, FBCommon.Help_expPoint:expPoint, "expRound":expRound, "playerCount":playerCount}
|
| | | helpDict["sitInfo"] = sitInfo
|
| | | |
| | | GameWorld.DebugLog("DoFBHelp %s" % helpDict, playerID)
|
| | | FBCommon.Notify_FBHelp(curPlayer, helpDict)
|
| | | return
|