From 3d0d0fa39bc4e24094de982640720a49f4cf080b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 22 六月 2019 16:28:34 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复盾值
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 40 ++++++++++++++++++++++++++++++----------
1 files changed, 30 insertions(+), 10 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 92743de..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):
@@ -414,7 +412,7 @@
#给奖励
itemAward = IpyGameDataPY.GetFuncEvalCfg('FamilyPartyDesk', 3)
for itemID, itemCount, isBind in itemAward:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
+ ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
addPoint = IpyGameDataPY.GetFuncCfg('FamilyPartyDesk')
PlayerControl.NotifyCode(curPlayer, 'Party_CollectSuccess', [addPoint])
PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)
@@ -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