From 6c3e47b2e3fd3155b4e04de2065ec60c0e982da5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 八月 2019 19:13:23 +0800
Subject: [PATCH] 8248 【主干】【400】【后端】优化跨服1v1竞技场 机器人匹配(匹配到机器人延迟3~10s通知)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCKillDrop.py | 33 +++++++++------------------------
1 files changed, 9 insertions(+), 24 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCKillDrop.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCKillDrop.py
index 75e794a..31dbf78 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCKillDrop.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetNPCKillDrop.py
@@ -31,7 +31,7 @@
# @remarks 函数详细说明.
def OnExec(curPlayer, msgList):
if not msgList:
- GameWorld.DebugAnswer(curPlayer, "SetNPCKillDrop npcID 击杀次数")
+ GameWorld.DebugAnswer(curPlayer, "设置次数: SetNPCKillDrop npcID 击杀次数")
GameWorld.DebugAnswer(curPlayer, "重置所有: SetNPCKillDrop 0")
return
@@ -41,10 +41,8 @@
for i in xrange(ipyDataMgr.GetNPCDropItemCount()):
ipyData = ipyDataMgr.GetNPCDropItemByIndex(i)
npcID = ipyData.GetNPCID()
- if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NPCKillCountDrop % npcID) \
- and not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NPCKillCount % npcID):
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_NPCKillCount % npcID):
continue
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NPCKillCountDrop % npcID, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NPCKillCount % npcID, 0)
resetNPCIDList.append(npcID)
@@ -66,27 +64,14 @@
if not ipyData:
GameWorld.DebugAnswer(curPlayer, "没有配置掉落:%s" % npcID)
return
- killCountDropInfo = ipyData.GetKillCountDrop()
- if killCountDropInfo:
- needKillCount = killCountDropInfo[0]
- killCount = min(msgList[1], needKillCount - 1) if len(msgList) > 1 else (needKillCount - 1)
- setValue = killCount * 10
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NPCKillCountDrop % npcID, setValue)
- GameWorld.DebugAnswer(curPlayer, "击杀掉落值(%s)=%s" % (npcID, setValue))
-
- killCountDropEquipEx = ipyData.GetKillCountDropEquipEx()
- killCountDropEquipEx2 = ipyData.GetKillCountDropEquipEx2()
- if killCountDropEquipEx or killCountDropEquipEx2:
- if killCountDropEquipEx:
- needKillCount = killCountDropEquipEx[0]
- if killCountDropEquipEx2:
- needKillCount = min(needKillCount, killCountDropEquipEx2[0])
- killCount = min(msgList[1], needKillCount - 1) if len(msgList) > 1 else (needKillCount - 1)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NPCKillCount % npcID, killCount)
- GameWorld.DebugAnswer(curPlayer, "击杀次数=%s" % (npcID, killCount))
-
- if not killCountDropInfo and not killCountDropEquipEx and not killCountDropEquipEx2:
+
+ if not ipyData.GetKillCountDropPri() and not ipyData.GetKillCountDropEquipPub() and not ipyData.GetKillCountDropPub():
GameWorld.DebugAnswer(curPlayer, "不需要设置击杀掉落次数信息!%s" % npcID)
+ else:
+ killCount = msgList[1] if len(msgList) > 1 else 0
+ setValue = killCount * 10000 + killCount * 100 + killCount
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_NPCKillCount % npcID, setValue)
+ GameWorld.DebugAnswer(curPlayer, "击杀掉落值(%s)=%s" % (npcID, killCount))
return
--
Gitblit v1.8.0