From 22349866372ce1b603b8eebcf5d43e7772ac0ddb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 20 九月 2018 14:41:25 +0800
Subject: [PATCH] 3660 【后端】后台新增聊天黑名单功能
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 68 ++++++++++++++++++++++-----------
1 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
index 2460d51..289e5ff 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -26,8 +26,9 @@
import GameWorldProcess
import PlayerFairyCeremony
import EventReport
-
-
+import PyGameData
+import ItemCommon
+import ItemControler
#当前副本地图的状态
(
@@ -193,7 +194,8 @@
FBCommon.SetFBStep(FB_Step_Fighting, tick)
elif fbStep == FB_Step_Fighting:
if not FBCommon.GetFBFuncOpenState(ChConfig.Def_FBMapID_FamilyParty):
- GiveJoinPrize()
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
+ PyGameData.g_familyPartyInfo = []
FBCommon.SetFBStep(FB_Step_Over, tick)
FBCommon.DoLogic_FBKickAllPlayer()
GameWorldProcess.CloseFB(tick)
@@ -229,7 +231,7 @@
addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward',2)
#仙盟贡献度
- PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)
+ PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty, True)
#答题经验更新
PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
@@ -243,10 +245,22 @@
def OnFamilyPartyStateChange(state, tick):
#活动状态变更
+ GameWorld.DebugLog(' 仙盟宴会活动状态变更 state=%s'%state)
+# if state == 0:
+# playerManager = GameWorld.GetPlayerManager()
+# for i in xrange(playerManager.GetPlayerCount()):
+# curPlayer = playerManager.GetPlayerByIndex(i)
+# if not curPlayer or curPlayer.IsEmpty():
+# continue
+# #答对题或者进过图的给参与奖励
+# curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
+# if FBCommon.GetEnterFBCount(curPlayer, ChConfig.Def_FBMapID_FamilyParty) or curAnswerCnt:
+# GiveJoinPrize(curPlayer)
+
+
mapID = GameWorld.GetMap().GetMapID()
if mapID != ChConfig.Def_FBMapID_FamilyParty:
return
- GameWorld.DebugLog(' 仙盟宴会活动状态变更 state=%s'%state)
if state == 1:
GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, tick)
@@ -254,21 +268,15 @@
return
-
-def GiveJoinPrize():
- #参与奖
- joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
- if not joinAward:
- return
- copyMapPlayerManager = GameWorld.GetMapCopyPlayerManager()
- for i in xrange(copyMapPlayerManager.GetPlayerCount()):
-
- curPlayer = copyMapPlayerManager.GetPlayerByIndex(i)
-
- if curPlayer == None or curPlayer.IsEmpty():
- continue
- PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
- return
+#
+#def GiveJoinPrize(curPlayer):
+# #参与奖
+# joinAward = IpyGameDataPY.GetFuncCfg('PartyReward')
+# if not joinAward:
+# return
+#
+# PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, joinAward, True, ShareDefine.Def_AddFAVReason_FamilyParty)
+# return
@@ -318,14 +326,20 @@
expPoint = totalExp / ChConfig.Def_PerPointValue
totalPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalPoint%playerID)
- totalPoint += IpyGameDataPY.GetFuncCfg('PartyReward') #加参与奖
+ #totalPoint += IpyGameDataPY.GetFuncCfg('PartyReward') #加参与奖
totalPoint += addPoint * curAnswerCnt
hasCollect = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasCollect%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}
+ if PyGameData.g_familyPartyInfo:
+ rankList = []
+ for i, info in enumerate(PyGameData.g_familyPartyInfo[0], 1):
+ rankList.append({"rank":i, "name":info[1], "cnt":info[2]})
+ 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
@@ -340,6 +354,11 @@
hasCollect = GameWorld.GetGameWorld().GetGameWorldDictByKey(FBPlayerDict_HasCollect%curPlayer.GetID())
if hasCollect:
PlayerControl.NotifyCode(curPlayer, 'Party_HadCollected')
+ return
+ needSpace = len(IpyGameDataPY.GetFuncEvalCfg('FamilyPartyDesk', 3))
+ packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
+ if needSpace > packSpace:
+ PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
return
return True
@@ -363,6 +382,9 @@
GameWorld.DebugLog(' 宴会采集成功!', playerID)
#给奖励
+ itemAward = IpyGameDataPY.GetFuncEvalCfg('FamilyPartyDesk', 3)
+ for itemID, itemCount, isBind in itemAward:
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
addPoint = IpyGameDataPY.GetFuncCfg('FamilyPartyDesk')
PlayerControl.NotifyCode(curPlayer, 'Party_CollectSuccess', [addPoint])
PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)
--
Gitblit v1.8.0