| | |
| | | import DataRecordPack
|
| | | import EventReport
|
| | | import ChItem
|
| | | import PlayerMergeEvent
|
| | | import IpyGameDataPY
|
| | | import Operate_EquipStone
|
| | | import PlayerViewCacheTube
|
| | |
| | | #系统提示 LostRes 失去物品
|
| | | #if needSysmsg:
|
| | | # PlayerControl.NotifyCode(curPlayer, 'LostRes', [itemTypeID, totalUseCnt])
|
| | | |
| | | #添加跨服服务器中使用物品事件
|
| | | if itemTypeID in ReadChConfig.GetEvalChConfig("MergeServerCanUseItemID"):
|
| | | eventInfo = [itemTypeID, totalUseCnt, makeItemBind, eventName, saveDataDict]
|
| | | PlayerMergeEvent.AddMSPlayerEvent(curPlayer.GetPlayerID(), PlayerMergeEvent.Def_MSPEvent_DelItem, eventInfo)
|
| | | return makeItemBind
|
| | |
|
| | | def GetCostItemIndexList(costItemInfo, itemPack, bindFirst=True):
|
| | |
| | |
|
| | | def GetShopItemPrice(itemID, priceType):
|
| | | ''' 获取商城物品对应价格 '''
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ItemID":itemID, "MoneyType":priceType}, isLogNone=False)
|
| | | # 系统固定商店类型: 仙玉(2-常用道具,3-成长变强),绑玉(4-绑玉商城)
|
| | | priceTypeShopTypeDict = {IPY_GameWorld.TYPE_Price_Gold_Money:[2, 3],
|
| | | IPY_GameWorld.TYPE_Price_Gold_Paper:[4],
|
| | | }
|
| | | ipyData = None
|
| | | if priceType in priceTypeShopTypeDict:
|
| | | for shopType in priceTypeShopTypeDict[priceType]:
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ShopType":shopType, "ItemID":itemID, "MoneyType":priceType}, isLogNone=False)
|
| | | if ipyData:
|
| | | break
|
| | | else:
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ItemID":itemID, "MoneyType":priceType}, isLogNone=False)
|
| | | if not ipyData:
|
| | | return 0
|
| | | return ipyData.GetMoneyNum()
|
| | |
| | | ItemControler.SetItemCount(curItem, curItemCnt - delCnt,
|
| | | curPlayer.GetPlayerID(), curPlayer.GetAccID(),
|
| | | curPlayer.GetPlayerName())
|
| | | |
| | | #添加跨服服务器中使用物品事件
|
| | | if curItemTypeID in ReadChConfig.GetEvalChConfig("MergeServerCanUseItemID"):
|
| | | eventInfo = [curItemTypeID, delCnt, curItemBind, recordName, saveDataDict]
|
| | | PlayerMergeEvent.AddMSPlayerEvent(curPlayer.GetPlayerID(), PlayerMergeEvent.Def_MSPEvent_DelItem, eventInfo)
|
| | | return
|
| | |
|
| | | def DelVPackItem(curPlayer, packIndex, placeList, eventName=""):
|
| | |
| | | itemName = str(itemID) if not curItemData else curItemData.GetName()
|
| | | itemName = "%s LV%s" % (itemName, plusLV + 1)
|
| | | isNeedRecord = curItemData and ItemControler.IsRuneItemNeedRecord(curItemData, plusLV)
|
| | | if packIndex == ShareDefine.rptGatherSoul:
|
| | | itemID = ItemControler.GetGatherSoulItemID(itemKeyData)
|
| | | plusLV = ItemControler.GetGatherSoulItemPlusLV(itemKeyData)
|
| | | curItemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
|
| | | itemName = str(itemID) if not curItemData else curItemData.GetName()
|
| | | itemName = "%s LV%s" % (itemName, plusLV + 1)
|
| | | isNeedRecord = curItemData and ItemControler.IsGatherSoulItemNeedRecord(curItemData, plusLV)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_VPackItem % (packIndex, place), 0)
|
| | | if isNeedRecord:
|