From cd1c6abe4db4c87fbd7dcd827d2af58a36496cb0 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期五, 26 四月 2019 22:58:25 +0800 Subject: [PATCH] 6613 子 【开发】【2.0】增加重击字体战斗飘字 / 【后端】【2.0】增加重击属性 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 67 +++++++++++++++++++-------------- 1 files changed, 39 insertions(+), 28 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py index 8296afa..b5607c5 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py @@ -50,7 +50,6 @@ import PlayerBossReborn import PlayerFairyCeremony import PlayerNewFairyCeremony -import GameLogic_CrossDemonKing import GameLogic_CrossGrassland import PlayerWeekParty import PlayerActLogin @@ -1223,7 +1222,7 @@ itemData = GameWorld.GetGameData().GetItemByTypeID(itemID) if not itemData: continue - itemJob = itemData.GetJobLimit() / 100 + itemJob = itemData.GetJobLimit() if itemJob and itemJob != curPlayer.GetJob(): # 非本职业可用,不掉落 GameWorld.DebugLog("全服击杀次数必掉,非本职业可用,不掉落! itemID=%s" % itemID) @@ -1237,7 +1236,7 @@ itemData = GameWorld.GetGameData().GetItemByTypeID(rItemID) if not itemData: continue - itemJob = itemData.GetJobLimit() / 100 + itemJob = itemData.GetJobLimit() if itemJob and itemJob != curPlayer.GetJob(): # 非本职业可用,不掉落 GameWorld.DebugLog("全服击杀次数必掉随机,非本职业可用,不掉落! rItemID=%s" % rItemID) @@ -1276,7 +1275,7 @@ if itemData.GetItemColor() != color: continue suiteID = itemData.GetSuiteID() - itemJob = itemData.GetJobLimit() / 100 + itemJob = itemData.GetJobLimit() itemPlace = itemData.GetEquipPlace() itemID = itemData.GetItemTypeID() if itemPlace not in filterItemIDDict: @@ -1402,7 +1401,7 @@ if not itemData: GameWorld.ErrLog("掉落物品ID不存在, dropItemID=%s" % dropItemID) continue - itemJob = itemData.GetJobLimit() / 100 + itemJob = itemData.GetJobLimit() if isJobLimit and itemJob and itemJob != curPlayer.GetJob(): # 非本职业可用,不掉落 #GameWorld.DebugLog("非本职业可用,不掉落! dropItemID=%s" % dropItemID) @@ -2021,8 +2020,8 @@ return zoneID = zoneIpyData.GetZoneID() GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossRebornCross % (zoneID, bossID), 0) - elif mapID == ChConfig.Def_FBMapID_CrossDemonKing: - zoneID = GameLogic_CrossDemonKing.GetCurFBLineZoneID() + elif mapID in ChConfig.Def_CrossDynamicLineMap: + zoneID = FBCommon.GetCrossDynamicLineMapZoneID() GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossRebornCross % (zoneID, bossID), 0) else: GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossReborn % bossID, 0) @@ -3556,14 +3555,13 @@ def DoHPPerLogic(self, dropType, ownerID): curNPC = self.__Instance curNPCID = curNPC.GetNPCID() - hpPerLogicNPCIDList = ReadChConfig.GetEvalChConfig('HPPerLogicNPCIDList') - if curNPCID not in hpPerLogicNPCIDList: + + hpPerLogicNPCIDDict = IpyGameDataPY.GetFuncEvalCfg('BossHPInformation', 1, {}) + hpPerLogicList = GameWorld.GetDictValueByKey(hpPerLogicNPCIDDict, curNPCID) + if not hpPerLogicList: return - - hpPerLogicDict = ReadChConfig.GetEvalChConfig('HPPerLogic_%s' % curNPCID) - - hpPerList = sorted(hpPerLogicDict.keys(), reverse=True) - + hpPerList, sysMark = hpPerLogicList + hpPerList = sorted(hpPerList, reverse=True) nowHPPer = GameObj.GetHP(curNPC) * 100 / GameObj.GetMaxHP(curNPC) # 当前百分比 hpPerLogicMark = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_HPPerLogicMark) logicHPPerList = hpPerList[hpPerLogicMark:] @@ -3576,16 +3574,12 @@ #GameWorld.DebugLog("DoHPPerLogic npcID=%s,hpPerLogicDict=%s,nowHPPer=%s,hpPerLogicMark=%s,logicHPPerList=%s" # % (curNPCID, str(hpPerLogicDict), nowHPPer, hpPerLogicMark, str(logicHPPerList))) - isNotify, dropItemTemplate, addPrestigeFormat = hpPerLogicDict[hpPer] - if isNotify: - PlayerControl.WorldNotify(0, "FB_liubo_0", [GameWorld.GetMap().GetMapID(), curNPCID, hpPer]) + + PlayerControl.WorldNotify(0, sysMark, [curNPCID, hpPer]) # if dropItemTemplate > 0: # self.__DropItemByTemplate(dropItemTemplate, dropType, ownerID) # PlayerControl.WorldNotify(0, "GeRen_admin_481766", [GameWorld.GetMap().GetMapID(), curNPCID, curNPCID]) - - if addPrestigeFormat != '': - self.__GiveNearbyPlayerPrestige(addPrestigeFormat, ChConfig.Def_Matrix_Six) hpPerLogicMark += 1 #GameWorld.DebugLog("DoHPPerLogic update hpPerLogicMark=%s" % (hpPerLogicMark)) @@ -3895,11 +3889,11 @@ #杀死NPC, 触发任务 self.__EventKillNpc() - #mapID = GameWorld.GetMap().GetMapID() + mapID = GameWorld.GetMap().GetMapID() killerName = "" if not self.__Killer else self.__Killer.GetPlayerName() # 记录boss击杀信息的NPC bossIpyData = IpyGameDataPY.GetIpyGameDataListNotLog('BOSSInfo', npcID) - if bossIpyData: + if bossIpyData and mapID not in [ChConfig.Def_FBMapID_ZhuXianBoss, ChConfig.Def_FBMapID_SealDemon]: if GetDropOwnerType(curNPC) == ChConfig.DropOwnerType_Family: killerName = FamilyRobBoss.FamilyOwnerBossOnKilled(curNPC, self.__OwnerHurtID) #KillerJob = 0 if not self.__Killer else self.__Killer.GetJob() @@ -5525,7 +5519,11 @@ npcID = curNPC.GetNPCID() collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID) if not collectNPCIpyData: - GameWorld.DebugLog("非特定采集NPC...") + #GameWorld.DebugLog("非特定采集NPC...") + return False + + if collectNPCIpyData.GetIsMissionCollectNPC(): + #GameWorld.DebugLog("任务采集物暂不处理") return False if not CheckCanCollectByNPCID(curPlayer, npcID, collectNPCIpyData): @@ -5628,6 +5626,10 @@ GameWorld.DebugLog(" 非特定采集NPC...npcID=%s" % npcID) return + if collectNPCIpyData.GetIsMissionCollectNPC(): + #GameWorld.DebugLog("任务采集物暂不处理") + return + PlayerState.DoCollectingLostHP(curPlayer, collectNPCIpyData, tick, True) if GameWorld.IsCrossServer(): @@ -5675,6 +5677,10 @@ GameWorld.DebugLog("给采集奖励: npcID=%s,collectCnt=%s" % (npcID, collectCnt)) if collectCnt <= 0: return + + if collectNPCIpyData.GetIsMissionCollectNPC(): + #GameWorld.DebugLog("任务采集物暂不处理") + return isMaxTime = False # 是否达到了采集最大次数 limitMaxTime = collectNPCIpyData.GetMaxCollectCount() @@ -5690,7 +5696,7 @@ updCollTime = curCollTime + collectCnt PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTime % npcID, updCollTime) SyncCollNPCTime(curPlayer, [npcID]) - GameWorld.DebugLog(" 增加采集次数: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%s" % (npcID, todayCollTime, curCollTime, updCollTime)) + GameWorld.DebugLog(" 增加采集次数: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%s" % (npcID, todayCollTime, curCollTime, updCollTime)) isMaxTime = todayCollTime + collectCnt >= limitMaxTime awardItemList = [] @@ -5701,7 +5707,7 @@ if collTotalTime in collectAppointAwardCfg: awardItemList.append(collectAppointAwardCfg[collTotalTime]) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTimeTotal % npcID, collTotalTime) - #GameWorld.DebugLog("采集次数定制奖励: collTotalTime=%s,awardItemList=%s" % (collTotalTime, awardItemList)) + GameWorld.DebugLog(" 采集次数定制奖励: collTotalTime=%s,awardItemList=%s" % (collTotalTime, awardItemList)) if not awardItemList: alchemyDiffLV = collectNPCIpyData.GetAlchemyDiffLV() @@ -5719,9 +5725,12 @@ else: giveItemWeightList = collectAwardCfg + GameWorld.DebugLog(" 常规采集物品权重列表: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%s" % (alchemyDiffLV, collectAwardCfg, giveItemWeightList)) giveItemInfo = GameWorld.GetResultByWeightList(giveItemWeightList) - awardItemList.append(giveItemInfo) - + if giveItemInfo: + awardItemList.append(giveItemInfo) + + GameWorld.DebugLog(" 最终采集奖励: awardItemList=%s" % awardItemList) if awardItemList: for itemID, itemCount, isAuctionItem in awardItemList: ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem]) @@ -5736,7 +5745,9 @@ awardPack.AwardItemList.append(awardItem) awardPack.Count = len(awardPack.AwardItemList) NetPackCommon.SendFakePack(curPlayer, awardPack) - + else: + GameWorld.ErrLog("采集物品没有奖励!npcID=%s" % (npcID)) + #采集成就 PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Collect, collectCnt, [npcID]) #SyncCollectionItemInfo(curPlayer, addExp, addMoney, addZhenQi, giveItemInfoList, npcID) -- Gitblit v1.8.0