From 94e2b6d3f93f5b25b788d4ee48c5cd15042b1f5e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 22 九月 2018 02:19:17 +0800
Subject: [PATCH] 3724 【开发】加下拾取无法放入背包日志
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 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 c4a5642..5a574e2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -72,9 +72,10 @@
NPCAttr_ParamDict, # 过程参数公式
NPCAttr_AttrStrengthenList, # 等级成长属性公式
NPCAttr_PlayerCntCoefficient, # 地图人数对应属性额外成长系数 {mapID:{"属性名":{组队进入人数:系数, ...}, ...}, ...}
+NPCAttr_NPCPlayerCntCoefficient, # NPC特殊成长人数对应属性额外成长系数 {npcID:{"属性名":{人数:系数, ...}, ...}, ...}, 优先级大于地图人数系数
NPCAttr_DynNPCLVMap, # 动态等级的地图ID列表,默认已刷新出来的NPC等级不会再变更,下次刷出来的怪物等级变更 [地图ID, ...]
NPCAttr_DynPCCoefficientMap, # 动态人数系数的地图ID {地图ID:是否马上刷新属性, ...}
-) = range(5)
+) = range(6)
#---------------------------------------------------------------------
##NPC初始化->出生调用
@@ -140,11 +141,14 @@
gameFB = GameWorld.GetGameFB()
if strengthenIpyData.GetIsStrengthenByPlayerCount():
- strengthenPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
- if not strengthenPlayerCnt:
- GameWorld.ErrLog("NPC配置了按玩家人数成长类型,但是无法获取到对应的玩家人数!npcID=%s" % (npcID))
- return
-
+ if FamilyRobBoss.IsHorsePetRobBoss(npcID):
+ strengthenPlayerCnt = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_HorsePetRobBossPlayerCount)
+ else:
+ strengthenPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
+ if not strengthenPlayerCnt:
+ GameWorld.ErrLog("NPC配置了按玩家人数成长类型,但是无法获取到对应的玩家人数!npcID=%s" % (npcID))
+ return
+
lvStrengthenType = strengthenIpyData.GetLVStrengthenType()
# 根据世界等级
if lvStrengthenType == 3:
@@ -219,6 +223,7 @@
paramDict = attrStrengthenInfo[NPCAttr_ParamDict] # 过程参数公式字典
attrStrengthenList = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
playerCntCoefficient = attrStrengthenInfo[NPCAttr_PlayerCntCoefficient] # 人数系数
+ npcIDPlayerCntCoefficient = attrStrengthenInfo[NPCAttr_NPCPlayerCntCoefficient] # 特殊NPC人数系数
baseMaxHP = npcData.GetHPEx() * ShareDefine.Def_PerPointValue + npcData.GetHP()
if strengthenLV:
@@ -296,6 +301,8 @@
playerCntAttrCoefficient = playerCntCoefficient.get(mapID, {})
if not playerCntAttrCoefficient and dataMapID in playerCntCoefficient:
playerCntAttrCoefficient = playerCntCoefficient[dataMapID]
+ if npcID in npcIDPlayerCntCoefficient:
+ playerCntAttrCoefficient = npcIDPlayerCntCoefficient[npcID]
for attrKey, coefficientDict in playerCntAttrCoefficient.items():
if attrKey in attrDict:
attrValue = attrDict[attrKey]
@@ -3090,10 +3097,13 @@
curNPC = self.__Instance
#清除状态
self.__ClearNPCAllState(False)
- #初始化召唤兽
- self.__InitNPCSummon()
- #重置技能CD
- self.__NormalNPCInItCD()
+ #只在重生或者满血的状态下才重置以下内容
+ if isReborn or GameObj.GetHP(curNPC) >= GameObj.GetMaxHP(curNPC):
+ #初始化召唤兽
+ self.__InitNPCSummon()
+ #重置技能CD
+ self.__NormalNPCInItCD()
+
#重刷属性
self.RefreshNPCState(isReborn=isReborn)
#通知血量, 复活的情况不通知血量,由NPC出现包通知
@@ -4759,7 +4769,10 @@
#掉落归属
if mapFBType != IPY_GameWorld.fbtNull:
FBLogic.DoFB_DropOwner(curPlayer , curNPC)
-
+ else:
+ if curNPC.GetLV()>=curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
+ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC)
+
killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
if limitIndex != None:
@@ -4788,8 +4801,7 @@
PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_BOSSHome, 1)
PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_BossHome, 1)
- #击杀特定NPC成就
- PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillSpecificNPC, 1, [npcID])
+
return
#---------------------------------------------------------------------
@@ -4811,10 +4823,10 @@
#不是普通NPC
elif npcObjType != IPY_GameWorld.gnotNormal:
return
-
+ npcID = curNPC.GetNPCID()
#GameWorld.DebugLog("__MissionOnKillNPC isFeel=%s" % (isFeel), curPlayer.GetPlayerID())
killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
- limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, curNPC.GetNPCID())
+ limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
isWorldBoos = limitIndex == 0
if isFeel:
#击杀NPC触发摸怪任务事件
@@ -4826,7 +4838,8 @@
EventShell.EventRespons_OnKillById(curPlayer, curNPC)
if isWorldBoos:
EventShell.EventRespons_KillWorldBoss(curPlayer)
-
+ #击杀特定NPC成就
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillSpecificNPC, 1, [npcID])
return
def __GetIsLog(self):
--
Gitblit v1.8.0