From 68e048256ca3e40cbc6e73cfd0937663cd41d63c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 27 十二月 2019 20:50:44 +0800 Subject: [PATCH] Merge branch 'master' of http://mobile.173on.com:10010/r/SnxxServerCode --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py index 4028134..808bd7b 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py @@ -431,8 +431,6 @@ # @return: atkPlayer, hurtID, hurtType curNPC = self.curNPC - if not self.__hurtDict: - return if not isDead: if refreshInterval and tick - curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_LastRefreshHurtTick) < refreshInterval: @@ -742,7 +740,6 @@ self.__assistAwardItemID = liheItemID fbType = GameWorld.GetMap().GetMapFBTypeByMapID(mapID) - friendAddAssistMoneyPer = IpyGameDataPY.GetFuncCfg("AssistAward", 3) GameWorld.DebugLog("执行协助奖励逻辑", self.npcID, self.lineID) copyPlayerManager = GameWorld.GetMapCopyPlayerManager() for playerID, assistPlayerIDList in self.__noAssitPlayerIDDict.items(): @@ -764,16 +761,14 @@ GameWorld.DebugLog("协助方离线或不在本地图,不给活跃令奖励: assistPlayerID=%s" % assistPlayerID, self.npcID, self.lineID) continue isFriend = assistHurtPlayer.GetIsFriend() - addAssistMoney = assistMoney - if isFriend and friendAddAssistMoneyPer: - addAssistMoney += int(assistMoney * friendAddAssistMoneyPer / 100.0) + assistMoneyType = ShareDefine.TYPE_Price_FamilyActivity + addAssistMoney = PlayerAssist.AddTodayAssistMoney(assistPlayer, assistMoneyType, assistMoney, isFriend) GameWorld.DebugLog("协助方给活跃令奖励: assistPlayerID=%s,assistMoney=%s,isFriend=%s,addAssistMoney=%s" % (assistPlayerID, assistMoney, isFriend, addAssistMoney), self.npcID, self.lineID) - PlayerControl.GiveMoney(assistPlayer, ShareDefine.TYPE_Price_FamilyActivity, addAssistMoney) # 给活跃令无视发布方是否在线 if fbType == IPY_GameWorld.fbtNull: PlayerControl.NotifyCode(assistPlayer, "AssistSuccess") else: - overDict = {FBCommon.Over_isAssist:1, FBCommon.Over_money:FBCommon.GetJsonMoneyList({ShareDefine.TYPE_Price_FamilyActivity:addAssistMoney}), + overDict = {FBCommon.Over_isAssist:1, FBCommon.Over_money:FBCommon.GetJsonMoneyList({assistMoneyType:addAssistMoney}), FBCommon.Over_itemInfo:[]} FBCommon.NotifyFBOver(assistPlayer, mapID, PlayerControl.GetFBFuncLineID(assistPlayer), 1, overDict) @@ -782,6 +777,9 @@ assistAwardPlayerDict[assistPlayerID] = {"PlayerName":assistPlayer.GetPlayerName(), "Job":assistPlayer.GetJob(), "LV":assistPlayer.GetLV(), "RealmLV":assistPlayer.GetOfficialRank(), "TodayGiftCount":todayGiftCount} + + notifyParam = [assistPlayer.GetPlayerName(), noAssistPlayer.GetPlayerName(), mapID, self.curNPC.GetLV(), self.npcID] + PlayerControl.FamilyNotify(assistPlayer.GetFamilyID(), "AssistBossFinish", notifyParam) if not noAssistPlayer or not assistAwardPlayerDict: GameWorld.DebugLog("发布方离线或无有效协助玩家在线,不给感谢礼盒奖励: playerID=%s" % playerID, self.npcID, self.lineID) @@ -831,13 +829,15 @@ bossHurtInfoPack.HurtValueList = hurtValueList bossHurtInfoPack.HurtCount = len(hurtValueList) + curNPC = self.curNPC assistHurtValueListDict = {} copyPlayerManager = GameWorld.GetMapCopyPlayerManager() for playerID in syncPlayerIDList: player = copyPlayerManager.FindPlayerByID(playerID) if not player: continue - + if not player.CanSeeOther(curNPC): + continue if playerID in self.__noAssitPlayerIDDict: assTagPlayerID = playerID elif playerID in self.__assistPlayerIDDict: -- Gitblit v1.8.0