From 4f48659ed51c0e087e55da91ec76cbcdd7a87486 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 15 十一月 2018 17:40:58 +0800
Subject: [PATCH] 4788 【后端】【1.3】洗炼必增由消耗仙玉改为消耗道具
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 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 374823e..d38537a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -1227,17 +1227,17 @@
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "GlobalDropRate", msgInfo, len(msgInfo))
# 4. 指定全服击杀次数必掉,算额外掉落
- globalKillDropDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD", 2) # {NPCID:{击杀次数:[是否本职业, [物品ID, ...], [随机物品ID, ...]]}, ...}
+ globalKillDropDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD", 2) # {NPCID:{击杀次数:[是否本职业, {物品ID:个数, ...}, [[随机物品ID,个数], ...]]}, ...}
if npcID in globalKillDropDict:
killCountDropDict = globalKillDropDict[npcID]
updNPCKilledCount = min(gw.GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_NPCKilledCount % npcID) + 1, ShareDefine.Def_UpperLimit_DWord)
- GameWorld.DebugLog("更新全服击杀次数: %s" % updNPCKilledCount)
+ GameWorld.Log("更新全服击杀次数:npcID=%s, %s" % (npcID, updNPCKilledCount))
# 通知GameServer记录
msgInfo = str([npcID, updNPCKilledCount])
GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "GlobalKillCount", msgInfo, len(msgInfo))
if updNPCKilledCount in killCountDropDict:
- isJobLimit, itemIDList, randItemIDList = killCountDropDict[updNPCKilledCount]
- for itemID in itemIDList:
+ isJobLimit, itemIDCountDict, randItemIDCountList = killCountDropDict[updNPCKilledCount]
+ for itemID, itemCount in itemIDCountDict.items():
if isJobLimit:
itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
if not itemData:
@@ -1247,12 +1247,12 @@
# 非本职业可用,不掉落
GameWorld.DebugLog("全服击杀次数必掉,非本职业可用,不掉落! itemID=%s" % itemID)
continue
- dropItemIDList.append(itemID)
- GameWorld.DebugLog("全服击杀次数必掉物品: itemID=%s" % itemID)
- if randItemIDList:
+ dropItemIDList += [itemID] * itemCount
+ GameWorld.Log("全服击杀次数必掉物品: itemID=%s,itemCount=%s" % (itemID, itemCount))
+ if randItemIDCountList:
if isJobLimit:
randJobItemList = []
- for rItemID in randItemIDList:
+ for rItemID, rItemCount in randItemIDCountList:
itemData = GameWorld.GetGameData().GetItemByTypeID(rItemID)
if not itemData:
continue
@@ -1261,12 +1261,12 @@
# 非本职业可用,不掉落
GameWorld.DebugLog("全服击杀次数必掉随机,非本职业可用,不掉落! rItemID=%s" % rItemID)
continue
- randJobItemList.append(rItemID)
- randItemID = random.choice(randJobItemList)
+ randJobItemList.append([rItemID, rItemCount])
+ randItemID, randItemCount = random.choice(randJobItemList)
else:
- randItemID = random.choice(randItemIDList)
- dropItemIDList.append(randItemID)
- GameWorld.DebugLog("全服击杀次数必掉随机物品: randItemID=%s" % randItemID)
+ randItemID, randItemCount = random.choice(randItemIDCountList)
+ dropItemIDList += [randItemID] * randItemCount
+ GameWorld.Log("全服击杀次数必掉随机物品: randItemID=%s,randItemCount=%s" % (randItemID, randItemCount))
return dropItemIDList
--
Gitblit v1.8.0