From 03fdb924f00ceb435105d23f1ef4be488cc03b0a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 11 六月 2024 19:35:49 +0800
Subject: [PATCH] 8605 【主干】【港台】【越南】【砍树】【后端】集字活动boss掉字优化,支持单次掉落多种字;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItem.py |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItem.py
index 3f43d34..7357f5b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItem.py
@@ -23,6 +23,7 @@
 import GameWorld
 import ChConfig
 import ChItem
+import PlayerControl
 
 ## GM命令执行入口
 #  @param curPlayer 当前玩家
@@ -32,26 +33,28 @@
 def OnExec(curPlayer, msgList):
     #输入命令格式错误
     if len(msgList) < 1:
-        GameWorld.DebugAnswer(curPlayer, "MakeItem ItemID 可选(个数 归属类型 归属ID)")
+        GameWorld.DebugAnswer(curPlayer, "MakeItem ID (个数 是否拍品 归属类型 归属ID)")
         GameWorld.DebugAnswer(curPlayer, "归属类型:1-玩家,2-队伍,5-阵营,6-指定多个玩家")
         return
     
     itemID = msgList[0]
-    count = msgList[1] if len(msgList) > 1 else 1
-    dropType = msgList[2] if len(msgList) > 2 else ChConfig.Def_NPCHurtTypeAll
+    itemCount = msgList[1] if len(msgList) > 1 else 1
+    isAuctionItem = msgList[2] if len(msgList) > 2 else 0
+    dropType = msgList[3] if len(msgList) > 3 else ChConfig.Def_NPCHurtTypeAll
     ownerID = 0
     specOwnerIDList = []
     
     if dropType == ChConfig.Def_NPCHurtTypeSpecial:
-        specOwnerIDList = msgList[3:] if len(msgList) > 3 else []
+        specOwnerIDList = msgList[4:] if len(msgList) > 4 else []
     else:
-        ownerID = msgList[3] if len(msgList) > 3 else 0
-        
+        ownerID = msgList[4] if len(msgList) > 4 else 0
+      
     gameMap = GameWorld.GetMap()
     dropPosX, dropPosY = curPlayer.GetPosX(), curPlayer.GetPosY() # 以玩家为中心点开始掉落
     doCount = 0
     dropCount = 0
     index = 0
+    sightLevel = PlayerControl.GetMapRealmDifficulty(curPlayer)
     for posX, posY in ChConfig.Def_DropItemAreaMatrix:
         doCount += 1
         resultX = dropPosX + posX
@@ -61,17 +64,17 @@
             #玩家不可移动这个点
             continue
             
-        if index > count - 1:
+        if index > itemCount - 1:
             break
         index += 1
         
-        curItem = ItemControler.GetOutPutItemObj(itemID)
+        curItem = ItemControler.GetOutPutItemObj(itemID, 1, isAuctionItem, curPlayer=curPlayer)
         if curItem == None:
             GameWorld.DebugAnswer(curPlayer, '无法查找物品 = %s' % (itemID))
             continue
         
         # 在地上添加物品
-        ChItem.AddMapDropItem(resultX, resultY, curItem, ownerInfo=[dropType, ownerID, specOwnerIDList])
+        ChItem.AddMapDropItem(resultX, resultY, curItem, ownerInfo=[dropType, ownerID, specOwnerIDList], sightLevel=sightLevel)
         dropCount += 1
     
     GameWorld.DebugAnswer(curPlayer, "检测坐标数:%s 掉落数: %s" % (doCount, dropCount))

--
Gitblit v1.8.0