From e455fe295670ac74b5cc670ce5cfb5f8069b7e36 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 28 八月 2018 14:46:01 +0800
Subject: [PATCH] fix:3000 仙盟宴会修改为可在任意地图进行答题
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py | 10 +++++-----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 41 ++++++++++++++++-------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 +++
3 files changed, 24 insertions(+), 30 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 04bf6c9..0c297ac 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -196,11 +196,11 @@
ChContent = ChContent.decode(GameWorld.GetCharacterEncoding()).encode(ShareDefine.Def_Game_Character_Encoding)
ChContent = ChContent.strip()
isRight = ChContent in answerList
- if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
- if isRight:
- PlayerControl.FamilyNotify(curFamilyid, 'FamilyPleaseIntoParty')
- PlayerControl.NotifyCode(curPlayer, 'FamilyNoIntoParty')
- return
+# if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
+# if isRight:
+# PlayerControl.FamilyNotify(curFamilyid, 'FamilyPleaseIntoParty')
+# PlayerControl.NotifyCode(curPlayer, 'FamilyNoIntoParty')
+# return
playerID = curPlayer.GetID()
GameWorld.DebugLog(" answer=%s ChContent=%s"%(answerList, ChContent), playerID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 2c1d982..162fee6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3536,6 +3536,9 @@
#上古战场
Def_Player_Dict_ElderBattlefieldStage = "ElderBattlefieldStage" # 本次达到阶段
+#仙盟宴会
+Def_Player_Dict_FamilyPartyAnswerCnt = "FamilyPartyAnswerCnt" # 答题数量
+
#虚拟背包物品数据
Def_PDict_VPackItem = "VPackItem_%s_%s" # 虚拟背包物品数据, 参数(背包类型, 位置索引)
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 4ac8980..2460d51 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
@@ -45,6 +45,9 @@
FBPlayerDict_TotalPoint = 'XMYH_TotalPoint%s' # 获得的总仙盟贡献值
FBPlayerDict_HasCollect = 'XMYH_HasCollect%s' # 是否已采集
+def OnFBPlayerOnDay(curPlayer):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, 0)
+ return
##开启副本
# @param tick 时间戳
@@ -219,35 +222,22 @@
def FamilyPartyAnswerRight(curPlayer):
#回答正确,给奖励
- mapID = GameWorld.GetMap().GetMapID()
- if mapID != ChConfig.Def_FBMapID_FamilyParty:
- return
-
- playerID = curPlayer.GetID()
- gameWorld = GameWorld.GetGameWorld()
+# mapID = GameWorld.GetMap().GetMapID()
+# if mapID != ChConfig.Def_FBMapID_FamilyParty:
+# return
+#
addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward',2)
#仙盟贡献度
PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)
- totalPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalPoint%playerID)
- updPoint = totalPoint + addPoint
- gameWorld.SetGameWorldDict(FBPlayerDict_TotalPoint % playerID, updPoint)
-
-
#答题经验更新
PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
-
- exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp%playerID)
- expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint%playerID)
- totalExp = expPoint * ChConfig.Def_PerPointValue + exp
- updTotalExp = totalExp + addExp
- updExp = updTotalExp % ChConfig.Def_PerPointValue
- updExpPoint = updTotalExp / ChConfig.Def_PerPointValue
- gameWorld.SetGameWorldDict(FBPlayerDict_TotalExp % playerID, updExp)
- gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, updExpPoint)
-
- DoFBHelp(curPlayer, 0)
+ curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt, curAnswerCnt+1)
+
+ if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_FamilyParty:
+ DoFBHelp(curPlayer, 0)
return
@@ -319,16 +309,17 @@
gameWorld = GameWorld.GetGameWorld()
playerID = curPlayer.GetPlayerID()
totalExp = FBCommon.GetFBAreaRewardExp(gameWorld, playerID)
-
+ curAnswerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FamilyPartyAnswerCnt)
+ addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward',2)
exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp%playerID)
expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint%playerID)
- totalExp = totalExp + expPoint * ChConfig.Def_PerPointValue + exp
+ totalExp = totalExp + expPoint * ChConfig.Def_PerPointValue + exp + addExp * curAnswerCnt
exp = totalExp % ChConfig.Def_PerPointValue
expPoint = totalExp / ChConfig.Def_PerPointValue
totalPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalPoint%playerID)
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
--
Gitblit v1.8.0