| | |
| | | gameWorld = GameWorld.GetGameWorld()
|
| | | partyActionState = gameWorld.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyParty)
|
| | | if partyActionState:
|
| | | __DoEnterJoinFamilyParty(curPlayer)
|
| | | remainSeconds = PlayerActivity.GetDailyActionRemainSeconds(ShareDefine.DailyActionID_FamilyParty)
|
| | | __DoEnterJoinFamilyParty(curPlayer, remainSeconds)
|
| | |
|
| | | lineID = GameWorld.GetGameWorld().GetLineID()
|
| | | if lineID not in g_familyMapPlayerIDDict:
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def __DoEnterJoinFamilyParty(curPlayer):
|
| | | def __DoEnterJoinFamilyParty(curPlayer, remainSeconds):
|
| | | ## 玩家正式开始参与仙盟宴会,因为多个仙盟活动可能共用该地图,玩家可能活动开始时已经在该地图
|
| | | GameWorld.DebugLog("玩家参加仙盟宴会!remainSeconds=%s" % remainSeconds, curPlayer.GetPlayerID())
|
| | | if remainSeconds:
|
| | | curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, remainSeconds * 1000, True)
|
| | | |
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyJoinSign):
|
| | | return
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyJoinSign, 1)
|
| | |
|
| | | GameWorld.DebugLog("玩家参加仙盟宴会!", curPlayer.GetPlayerID())
|
| | | #FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty)
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyParty)
|
| | | PlayerFamily.AddFamilyActivity(curPlayer, ShareDefine.FamilyActive_Party)
|
| | |
| | | return
|
| | |
|
| | |
|
| | | def FamilyPartyAnswerRight(curPlayer):
|
| | | def FamilyPartyAnswerRight(curPlayer, answerInfo):
|
| | | #回答正确,给奖励
|
| | | |
| | | rightPlayerID = answerInfo[0]
|
| | | |
| | | #给本题答题奖励,本地图中的家族成员才给
|
| | | answerRWItemReward = IpyGameDataPY.GetFuncEvalCfg('PartyReward2', 1)
|
| | | rightItemID, wrongItemID = answerRWItemReward
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | player = playerManager.GetPlayerByIndex(index)
|
| | | if not player:
|
| | | continue
|
| | | if player.GetFamilyID() != curPlayer.GetFamilyID():
|
| | | continue
|
| | | if player.GetPlayerID() == rightPlayerID:
|
| | | giveItemID = rightItemID
|
| | | else:
|
| | | giveItemID = wrongItemID
|
| | | itemCount, isAuctionItem = 1, False
|
| | | ItemControler.GivePlayerItem(player, giveItemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
|
| | | |
| | | if curPlayer.GetPlayerID() != rightPlayerID:
|
| | | return
|
| | |
|
| | | addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward', 2)
|
| | | #仙盟贡献度
|
| | | PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty, True)
|
| | | #答题经验更新
|
| | | PlayerControl.PlayerControl(curPlayer).AddExp(addExp, ShareDefine.Def_ViewExpType_SysEx)
|
| | | PlayerControl.FamilyNotify(curPlayer.GetFamilyID(), 'Party_Answer', [curPlayer.GetName(), addPoint])
|
| | | PlayerControl.FamilyNotify(curPlayer.GetFamilyID(), 'Party_Answer', [curPlayer.GetName(), rightItemID])
|
| | | curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, curAnswerCnt + 1)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, curAnswerCnt + 1) |
| | | |
| | | if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_FamilyParty:
|
| | | DoFBHelp(curPlayer, 0)
|
| | | return
|
| | |
| | |
|
| | | GameWorld.DebugLog('仙盟宴会活动状态变更 state=%s' % state)
|
| | | if state == 1:
|
| | | remainSeconds = PlayerActivity.GetDailyActionRemainSeconds(ShareDefine.DailyActionID_FamilyParty)
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(i)
|
| | | if not curPlayer or curPlayer.IsEmpty():
|
| | | continue
|
| | | __DoEnterJoinFamilyParty(curPlayer)
|
| | | __DoEnterJoinFamilyParty(curPlayer, remainSeconds)
|
| | | else:
|
| | | PyGameData.g_familyPartyInfo = []
|
| | |
|