| | |
| | | import GMCommon
|
| | | import DataRecordPack
|
| | | import PlayerMail
|
| | | import IpyGameDataPY
|
| | | import ShareDefine
|
| | | import CommFunc
|
| | |
|
| | | ## 收到gm命令执行
|
| | | # @param gmCmdDict:gm命令字典
|
| | |
| | | itemCount = GameWorld.ToIntDef(gmCmdDict.get('ItemCnt%s' % itemIndexStr, '0'))
|
| | | if not itemCount:
|
| | | continue
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
|
| | | if not itemData:
|
| | | GameWorld.ErrLog("GM发送邮件物品不存在! itemID=%s,itemCount=%s" % (itemID, itemCount))
|
| | | continue
|
| | | isBind = GameWorld.ToIntDef(gmCmdDict.get('IsBind%s' % itemIndexStr, '0'))
|
| | | |
| | | appointID = GameWorld.ToIntDef(gmCmdDict.get('AppointID%s' % itemIndexStr, '0'))
|
| | | userData = ""
|
| | | if appointID:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("AppointItem", appointID)
|
| | | if not ipyData:
|
| | | continue
|
| | | userData = CommFunc.JsonDump({ShareDefine.Def_CItemKey_AppointID:appointID})
|
| | | |
| | | #添加到物品信息列表
|
| | | itemList.append([itemID, itemCount, isBind])
|
| | | itemList.append([itemID, itemCount, isBind, userData])
|
| | |
|
| | | GameWorld.DebugLog("GetGMTMailItemList %s" % itemList)
|
| | | return itemList
|