From 98628e52c80ea22ed6c0ea5a2890d88bd5c14ffc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 17 六月 2019 14:54:09 +0800
Subject: [PATCH] 7193 【2.0】仙盟联赛修改(无人参赛时所有成员获得拍品收益,不含中途转盟过来的;修复仙盟拍品无人收益时报错bug)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 38 +++++++++++++++++++++++++++++---------
1 files changed, 29 insertions(+), 9 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 a3c589a..ad3c8f9 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
@@ -227,7 +227,7 @@
GameWorldProcess.CloseFB(tick)
else:
#FBCommon.DoLogicAreaReward("FamilyPartyAreaAward", tick)
- FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 10000)
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 5000)
mapID = GameWorld.GetMap().GetMapID()
notifyIndex = gameFB.GetGameFBDictByKey(ChConfig.Map_FBDict_NotifyStart)
@@ -251,13 +251,13 @@
# if mapID != ChConfig.Def_FBMapID_FamilyParty:
# return
#
-
+
addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward', 2)
#仙盟贡献度
PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty, True)
#答题经验更新
- PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
-
+ PlayerControl.PlayerControl(curPlayer).AddExp(addExp, ShareDefine.Def_ViewExpType_SysEx)
+ PlayerControl.FamilyNotify(curPlayer.GetFamilyID(), 'Party_Answer', [curPlayer.GetName(), addPoint])
curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, curAnswerCnt + 1)
@@ -354,9 +354,7 @@
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, "hasSit":hasSit}
+ helpDict = {FBCommon.Help_exp:exp, FBCommon.Help_expPoint:expPoint, FBCommon.Help_score:totalPoint, "hasCollect":hasCollect, "hasSit":hasSit}
if PyGameData.g_familyPartyInfo:
rankList = []
for i, info in enumerate(PyGameData.g_familyPartyInfo[0], 1):
@@ -425,6 +423,28 @@
DoFBHelp(curPlayer, 0)
return
+## 获得经验
+# @param curPlayer 当前玩家
+# @param addExp 获得的经验
+# @param expViewType 经验类型
+# @return True or False
+def OnGetExp(curPlayer, addExp, expViewType):
+
+ if expViewType != ShareDefine.Def_ViewExpType_SysEx:
+ return
+ gameWorld = GameWorld.GetGameWorld()
+ playerID = curPlayer.GetID()
+ exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp % playerID)
+ expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint % playerID)
+ newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+addExp
+ gameWorld.SetGameWorldDict(FBPlayerDict_TotalExp % playerID, newTotalExp%ChConfig.Def_PerPointValue)
+ gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, newTotalExp/ChConfig.Def_PerPointValue)
+
+
+ GameWorld.DebugLog("OnGetExp() addExp=%s,updTotalExp=%s"
+ % (addExp, newTotalExp), playerID)
+
+ return
##玩家退出副本
# @param curPlayer 玩家实例
# @param tick 时间戳
@@ -482,7 +502,7 @@
DoFBHelp(curPlayer, 0)
-
+
return
def __GiveSitAward(curPlayer):
@@ -507,7 +527,7 @@
reExp = PlayerControl.GetPlayerReExp(curPlayer)
giveExp = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward'))
if giveExp:
- PlayerControl.PlayerControl(curPlayer).AddExp(giveExp)
+ 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+addExp
--
Gitblit v1.8.0