From dc0b92c1e2fe9f3d24c183b325dad54d088735c1 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 10 七月 2025 17:01:24 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_ServerCode --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItemCount.py | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItemCount.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItemCount.py index 3f7467e..59bab26 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItemCount.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/MakeItemCount.py @@ -17,9 +17,9 @@ import IPY_GameWorld import ItemControler +import ShareDefine import GameWorld import ChConfig -import ItemCommon #--------------------------------------------------------------------- #全局变量 @@ -38,14 +38,14 @@ #输入命令格式错误 if len(msgList) < 1: - GameWorld.DebugAnswer(curPlayer, "MakeItemCount ID (个数 拍品组数 全部传奇属性)") + GameWorld.DebugAnswer(curPlayer, "MakeItemCount ID [个数 定制ID]") return event = [ChConfig.ItemGive_GMMake, False, {"CMD":"MakeItemCount"}] itemID = msgList[0] itemCount = msgList[1] if len(msgList) > 1 else 1 - auctionGroup = msgList[2] if len(msgList) > 2 else 0 - isAllAttr = msgList[3] if len(msgList) > 3 else 0 + appointID = msgList[2] if len(msgList) > 2 else 0 + auctionGroup = 0 itemData = GameWorld.GetGameData().GetItemByTypeID(itemID) if not itemData: @@ -58,7 +58,7 @@ GameWorld.DebugAnswer(curPlayer, "放入物品失败!") return - playerItemControler = ItemControler.PlayerItemControler(curPlayer) + setAttrDict = {ShareDefine.Def_CItemKey_AppointID:appointID} if appointID else {} # 拍品 if auctionGroup > 0: @@ -66,24 +66,6 @@ if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, True, [IPY_GameWorld.rptItem], event=event): GameWorld.DebugAnswer(curPlayer, "###放入物品失败!") else: - if ItemCommon.GetIsEquip(itemData) or itemData.GetPackCount() <= 1: - for _ in xrange(itemCount): - __DoGMGivePlayerItem(curPlayer, playerItemControler, itemID, 1, False, isAllAttr, event) - else: - if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, False, [IPY_GameWorld.rptItem], event=event): - GameWorld.DebugAnswer(curPlayer, "###放入物品失败!") + if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, False, [IPY_GameWorld.rptItem], event=event, setAttrDict=setAttrDict): + GameWorld.DebugAnswer(curPlayer, "###放入物品失败!") return - -def __DoGMGivePlayerItem(curPlayer, playerItemControler, itemID, count, isAuctionItem, isAllAttr, event): - if ItemControler.GetAppointItemRealID(itemID): - ItemControler.GivePlayerAppointItem(curPlayer, itemID, isAuctionItem, event=event) - return - curItem = ItemControler.GetOutPutItemObj(itemID, count, isAuctionItem, curPlayer=curPlayer, isAllAttr=isAllAttr) - if not playerItemControler.PutInItem(IPY_GameWorld.rptItem, curItem, event=event): - GameWorld.DebugAnswer(curPlayer, "放入物品失败!") - - return - - - - -- Gitblit v1.8.0