From e852ca15d3d08743c816d14d0959f274c5015573 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期六, 22 六月 2019 16:07:46 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复追神摄魂计算命中个数问题 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py | 52 +++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 39 insertions(+), 13 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 d40365b..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 @@ -25,6 +25,8 @@ import IpyGameDataPY import GameWorldProcess import PlayerFairyCeremony +import PlayerNewFairyCeremony +import PlayerActLogin import EventReport import PyGameData import ItemCommon @@ -175,6 +177,8 @@ PlayerFamily.AddFamilyActivity(curPlayer, ShareDefine.FamilyActive_Party) EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_FamilyParty, 0, ChConfig.CME_Log_Start) PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_FamilyParty, 1) + PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_FamilyParty, 1) + PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_FamilyParty, 1) lineID = GameWorld.GetGameWorld().GetLineID() if lineID not in g_familyMapPlayerIDDict: g_familyMapPlayerIDDict[lineID] = [] @@ -223,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) @@ -247,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) @@ -280,9 +284,11 @@ if mapID != ChConfig.Def_FBMapID_FamilyParty: return - if state == 1: - GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, tick) - + if state: + if not GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FamilyPartyFB_StartTick): + GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, tick) + else: + GameWorld.GetGameWorld().SetGameWorldDict(Map_FamilyPartyFB_StartTick, 0) return # @@ -348,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): @@ -408,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) @@ -419,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 时间戳 @@ -476,7 +502,7 @@ DoFBHelp(curPlayer, 0) - + return def __GiveSitAward(curPlayer): @@ -501,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