hxp
2025-09-28 54d9849e67665b6a20dc723adaf91b5455054165
219 【付费内容】首充-服务端(支持给定制属性装备)
2个文件已修改
22 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -2328,7 +2328,11 @@
def CheckPackSpaceEnough(curPlayer, itemList, isNotify=True):
    ## 检查玩家对应背包是否足够放入物品
    needPackSpaceDict = {}
    for itemID, itemCnt, isAuctionItem in itemList:
    for itemInfo in itemList:
        if not itemInfo:
            continue
        itemID, itemCnt = itemInfo[:2]
        isAuctionItem = itemInfo[2] if len(itemInfo) > 2 else 0
        curItem = GameWorld.GetGameData().GetItemByTypeID(itemID)
        if not curItem:
            return False
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
@@ -24,6 +24,7 @@
import ChPyNetSendPack
import NetPackCommon
import IpyGameDataPY
import ShareDefine
import CommFunc
import ObjPool
@@ -115,14 +116,23 @@
        return
    awardList = getattr(ipyData, "GetAwardListDay%s" % giftDay)()
    
    if not ItemControler.CheckPackSpaceEnough(curPlayer, [itemInfo[:2] for itemInfo in awardList]):
        return
    # 更新已领取成功标记
    updGetRecord = getRecord | pow(2, giftDay)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstChargeRecord % firstID, updGetRecord)
    GameWorld.DebugLog("领取首充奖励: firstID=%s,giftDay=%s,getRecord=%s,updGetRecord=%s, %s" % (firstID, giftDay, getRecord, updGetRecord, awardList))
    ItemControler.GivePlayerItemOrMail(curPlayer, awardList, event=["FirstCharge", False, {}])
    Sync_FirstChargeInfo(curPlayer)
    isAuctionItem = 0
    notifyAwardList = []
    for itemID, itemCount, appointID in awardList:
        setAttrDict = {ShareDefine.Def_CItemKey_AppointID:appointID} if appointID else {}
        if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, event=["FirstCharge", False, {}], setAttrDict=setAttrDict):
            continue
        notifyAwardList.append([itemID, itemCount, isAuctionItem])
    ItemControler.NotifyGiveAwardInfo(curPlayer, notifyAwardList, "FirstCharge")
    return
def Sync_FirstChargeInfo(curPlayer):