hch
2018-12-26 b6ba2976a06e9d288c740e8ab83186b7feb5dcea
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -244,6 +244,7 @@
        
        isPutInTemp = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PickupItemPutInTemp)
        packIndex = ShareDefine.rptTempItem if isPutInTemp else IPY_GameWorld.rptItem
        packIndex = ChConfig.GetItemPackType(singItem.GetType(), packIndex)
        
        # 是否可放入
        if not itemControl.CanPutInItem(packIndex, curItemID, curItemCount, curItemIsBind):
@@ -260,8 +261,8 @@
        if not itemControl.PutInItem(packIndex, singItem, event=[ChConfig.ItemGive_Pickup, False, {"NPCID":dropItemNPCID}]):
            #物品不能放入
            #PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [packIndex])
            GameWorld.Log("拾取物品放入背包失败!mapItemID=%s,dropItemNPCID=%s,curItemID=%s,packIndex=%s"
                          % (mapItemID, dropItemNPCID, curItemID, packIndex), curPlayer.GetPlayerID())
            GameWorld.ErrLog("拾取物品放入背包失败!mapItemID=%s,dropItemNPCID=%s,curItemID=%s,packIndex=%s"
                             % (mapItemID, dropItemNPCID, curItemID, packIndex), curPlayer.GetPlayerID())
            return
        if dropItemNPCID:
@@ -343,7 +344,7 @@
        mapID = curPlayer.GetMapID()
        fbIpyData = FBCommon.GetFBIpyData(mapID)
        if fbIpyData and not fbIpyData.GetGuardPick():
            GameWorld.DebugLog("该地图守护无法拾取物品! mapID=%s" % mapID, curPlayer.GetPlayerID())
            GameWorld.Log("该地图守护无法拾取物品! mapID=%s" % mapID, curPlayer.GetPlayerID())
            return
        
#    #单人副本一键拾取
@@ -351,15 +352,18 @@
#        SingleFBTPickUP(curPlayer, mapItemID, tick)
#        return
    
    GameWorld.DebugLog("请求拾取物品, isGuard=%s,mapItemIDList=%s" % (isGuard, mapItemIDList), curPlayer.GetPlayerID())
    if not mapItemIDList:
        GameWorld.ErrLog("没有指定要拾取的地图物品ID!", curPlayer.GetPlayerID())
        return
    
    succMapItemIDList = [] # 成功拾取的地图物品
    for mapItemID in mapItemIDList:
        if __DoPickup(curPlayer, mapItemID, tick, isGuard):
            succMapItemIDList.append(mapItemID)
            
    GameWorld.DebugLog("    成功拾取物品, succMapItemIDList=%s" % (succMapItemIDList), curPlayer.GetPlayerID())
    if succMapItemIDList:
        GameWorld.Log("成功拾取地图物品, succMapItemIDList=%s" % (succMapItemIDList), curPlayer.GetPlayerID())
    # 守护拾取的,附加同步守护拾取结果
    if isGuard and succMapItemIDList:
        guradPickupSucc = ChPyNetSendPack.tagMCGuradPickupItemSucc()
@@ -708,6 +712,8 @@
                            ChConfig.Def_Effect_ResetBossKillCnt:"Item_ResetBossKillCnt", # 重置boss击杀疲劳
                            ChConfig.Def_Effect_AddFBCnt:"Item_AddFBCnt", # 增加副本可进入次数
                            ChConfig.Def_Effect_AddKillBossCnt:"Item_AddKillBossCnt", # 增加BOSS可击杀次数
                            ChConfig.Def_Effect_AddMagicWeaponUpExp:"Item_AddMagicWeaponUpExp", # 增加法宝升星经验
                            ChConfig.Def_Effect_ChatBubbleBox:"Item_ChatBubbleBox", # 激活聊天气泡框
                            #ChConfig.Def_PhoneVip_EffID:"Item_AddPhoneVip", # 手机VIP物品卡
                            #ChConfig.Def_Effect_AddZhenQiByTimes:"Item_AddZhenQiByTimes", # 增加真气按一天使用次数减少
                            #ChConfig.Def_Effect_AddPrestige:"Item_AddPrestige",  # 给人物威望
@@ -1781,8 +1787,10 @@
        curMapItem.SetOwnerType(ownerType)
        curMapItem.SetOwnerID(ownerID)
        
    #GameWorld.DebugLog("AddMapDropItem ID=%s,ownerType=%s,ownerID=%s,GetDropTick=%s,isBind=%s"
    #                   % (curMapItem.GetID(), ownerType, ownerID, curMapItem.GetDropTick(), curItem.GetIsBind()))
    if dropNPCID:
        itemNoteDict = ItemCommon.GetItemNoteDict(curItem, curItem.GetCount())
        GameWorld.Log("AddMapDropItem mapItemID=%s,ownerType=%s,ownerID=%s,mapItemDataStr=%s,itemNoteDict=%s"
                      % (curMapItem.GetID(), curMapItem.GetOwnerType(), curMapItem.GetOwnerID(), itemDataStr, itemNoteDict))
    return curMapItem
def GetMapDropItemDataStr(curItem, effIndex=0, ownerInfo=[], dropNPCID=0, isOnlySelfSee=False):