From cda5e4e81f17542946ac53e77d2cd625ac2ea3d4 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 19 二月 2019 17:12:51 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 43 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 35 insertions(+), 8 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 b1cf919..c17651a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py @@ -52,7 +52,9 @@ import PlayerMagicWeapon import PlayerBossReborn import PlayerFairyCeremony +import PlayerNewFairyCeremony import PlayerWeekParty +import PlayerActLogin import FamilyRobBoss import IpyGameDataPY import PlayerState @@ -508,7 +510,19 @@ ## 直接掉地板上 if dropItemMapInfo: - dropPosX, dropPosY, isOnlySelfSee = dropItemMapInfo + dropPosX, dropPosY, isOnlySelfSee = dropItemMapInfo[:3] + isDropDisperse = dropItemMapInfo[3] if len(dropItemMapInfo) > 3 else False # 堆叠的物品是否散开掉落 + if isDropDisperse: + dropItemList = [] + for itemInfo in prizeItemList: + if isinstance(itemInfo, list): + itemID, itemCount, isBind = itemInfo + for _ in xrange(itemCount): + dropItemList.append([itemID, 1, isBind]) + else: + dropItemList.append(itemInfo) + else: + dropItemList = prizeItemList index = 0 playerID = curPlayer.GetPlayerID() gameMap = GameWorld.GetMap() @@ -520,10 +534,10 @@ #玩家不可移动这个点 continue - if index > len(prizeItemList) - 1: + if index > len(dropItemList) - 1: break - curItem = prizeItemList[index] + curItem = dropItemList[index] index += 1 if isinstance(curItem, list): itemID, itemCount, isBind = curItem @@ -2068,7 +2082,7 @@ if ChConfig.IsGameBoss(curNPC): # 通知GameServer boss状态 封魔坛在副本里单独处理 ipyData = IpyGameDataPY.GetIpyGameDataNotLog('BOSSInfo', npcid) - if ipyData and ipyData.GetMapID() != ChConfig.Def_FBMapID_SealDemon: + if ipyData and ipyData.GetMapID() not in [ChConfig.Def_FBMapID_SealDemon, ChConfig.Def_FBMapID_ZhuXianBoss]: GameServe_GameWorldBossState(npcid, 0) #GameWorld.GetGameWorld().SetGameWorldDict(ChConfig.Map_NPC_WorldBossDeadTick % npcid, GameWorld.GetGameWorld().GetTick()) #因为存在boss分流,所以用gameFB字典,但是存活状态还是用GameWorld字典 @@ -2113,8 +2127,8 @@ GameWorld.DebugLog("Boss状态变更: bossID=%s,isAlive=%s,dataMapID=%s,realMapID=%s,copyMapID=%s" % (bossID, isAlive, dataMapID, realMapID, copyMapID)) if not isAlive: - if dataMapID in ChConfig.Def_CrossZoneTableName: - tableName = ChConfig.Def_CrossZoneTableName[dataMapID] + if dataMapID in ChConfig.Def_CrossZoneMapTableName: + tableName = ChConfig.Def_CrossZoneMapTableName[dataMapID] realMapID = GameWorld.GetGameWorld().GetRealMapID() copyMapID = GameWorld.GetGameWorld().GetCopyMapID() zoneIpyData = IpyGameDataPY.GetIpyGameData(tableName, realMapID, dataMapID, copyMapID) @@ -2140,6 +2154,7 @@ dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt, "AccID":curPlayer.GetAccID(), "PlayerID":curPlayer.GetPlayerID()} DataRecordPack.SendEventPack("AddKillBossCnt", dataDict, curPlayer) + PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillBoss, 1, [limitIndex]) if isCrossServer: return @@ -2151,7 +2166,9 @@ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_WorldBOSS) PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_WorldBOSS, 1) PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_WorldBoss, 1) + PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_WorldBoss, 1) PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_WorldBOSS, 1) + PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_WorldBOSS, 1) if mapID == ChConfig.Def_FBMapID_BossHome: #BOSS之家 @@ -2161,6 +2178,7 @@ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_BOSSHome) PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_BOSSHome, 1) PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_BossHome, 1) + PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_BossHome, 1) PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_BOSSHome, 1) return @@ -3013,6 +3031,10 @@ # GameWorld.DebugLog("伤血玩家血量为0,清除该伤血!playerID=%s" % hurtID) # return True + if hurtPlayer.GetInitOK() and not hurtPlayer.GetVisible(): + GameWorld.DebugLog("伤血玩家不可见,清除该伤血!playerID=%s" % hurtID) + return True + if not self.GetIsInRefreshPoint(hurtPlayer.GetPosX(), hurtPlayer.GetPosY(), refreshPoint): GameWorld.DebugLog("伤血玩家不在boss范围里,清除该伤血!playerID=%s" % hurtID) return True @@ -3046,6 +3068,10 @@ #GameWorld.DebugLog("队员不在本线路,不计!playerID=%s" % playerID) continue + if curTeamPlayer.GetInitOK() and not curTeamPlayer.GetVisible(): + #GameWorld.DebugLog("队员不可见,不计!playerID=%s" % playerID) + continue + if curTeamPlayer.GetHP() <= 0 or curTeamPlayer.GetPlayerAction() == IPY_GameWorld.paDie: deadTime = curTeamPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_DeadTime) if time.time() - deadTime >= IpyGameDataPY.GetFuncCfg("BossHurtValue", 1): @@ -3063,7 +3089,7 @@ teamHurtPlayerIDList.append(playerID) if not teamHurtPlayerIDList: - GameWorld.DebugLog("伤血队伍没有活着的队员在boss区域内,清除该伤血!teamID=%s,mapTeamPlayerIDList=%s" % (teamID, mapTeamPlayerIDList)) + GameWorld.DebugLog("伤血队伍没有符合条件的队员在boss区域内,清除该伤血!teamID=%s,mapTeamPlayerIDList=%s" % (teamID, mapTeamPlayerIDList)) return teamHurtPlayerIDList def RefreshHurtList(self, tick, refreshInterval=3000): @@ -5023,6 +5049,7 @@ else: if curNPC.GetLV()>=curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'): PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC) + PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillSpecificNPC, 1, [npcID]) if ChConfig.IsGameBoss(curNPC): OnPlayerKillBoss(curPlayer, npcID, mapID, False) @@ -5163,7 +5190,7 @@ #=========================================================================================== # 在地上添加物品(统一接口) - dropNPCID = 0 if not curNPC.GetIsBoss() else curNPCID + dropNPCID = 0 if not ChConfig.IsGameBoss(curNPC) else curNPCID specOwnerIDList = self.__AllKillerDict.keys() if (len(self.__AllKillerDict) > 1 or dropType == ChConfig.Def_NPCHurtTypeSpecial) else [] curMapItem = ChItem.AddMapDropItem(posX, posY, curItem, ownerInfo=[dropType, ownerID, specOwnerIDList], dropNPCID=dropNPCID) -- Gitblit v1.8.0