| | |
| | | singItem.Clear()
|
| | | #===============================================================================================
|
| | | # # (跨服掉落功勋物品, 不给实际物品,转化为功勋值)
|
| | | # elif curEffID == ChConfig.Def_Effect_ItemGiveGongXun and GameWorld.IsMergeServer():
|
| | | # elif curEffID == ChConfig.Def_Effect_ItemGiveGongXun and GameWorld.IsCrossServer():
|
| | | # #=======================================================================
|
| | | # # # 不需要队伍提示
|
| | | # # if not isTeamNotify:
|
| | |
| | | return
|
| | |
|
| | | if dropItemNPCID:
|
| | | serverGroupID = PlayerControl.GetPlayerServerGroupID(curPlayer)
|
| | | mapID = GameWorld.GetGameWorld().GetMapID()
|
| | | NPCCommon.SendGameServerGoodItemRecord(mapID, dropItemNPCID, curPlayer.GetName(),
|
| | | curPlayer.GetPlayerID(), curItemID, equipInfo)
|
| | | curPlayer.GetPlayerID(), curItemID, equipInfo, serverGroupID)
|
| | |
|
| | | # 不需要队伍提示
|
| | | #=======================================================================
|
| | |
| | | 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
|
| | |
|
| | | # #单人副本一键拾取
|
| | |
| | | # 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()
|
| | |
| | | maxCnt = ItemCommon.GetCanUseCountDaily(curItem)
|
| | | if maxCnt <= 0:
|
| | | return -1
|
| | | curItemID = curItem.GetItemTypeID()
|
| | | useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % curItemID)
|
| | | for itemIDList in IpyGameDataPY.GetFuncEvalCfg('ShareUseCntItem'):
|
| | | if curItemID not in itemIDList:
|
| | | continue
|
| | | for itemID in itemIDList:
|
| | | if itemID == curItemID:
|
| | | continue
|
| | | useCnt += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | |
|
| | | itemID = curItem.GetItemTypeID()
|
| | | useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | | canUseCnt = max(0, maxCnt - useCnt)
|
| | |
|
| | | if canUseCnt <= 0:
|
| | | GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (itemID, useCnt, maxCnt))
|
| | | GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (curItemID, useCnt, maxCnt))
|
| | | #PlayerControl.NotifyCode(curPlayer, notifyMark, [itemID])
|
| | |
|
| | | #GameWorld.DebugLog("物品ID(%s)今日已使用次数(%s), maxCnt=%s" % (itemID, useCnt, maxCnt))
|
| | |
| | | ChConfig.Def_ItemType_GiveMoney:"Item_GiveMoney", # 给人物金钱
|
| | | ChConfig.Def_ItemType_AddLimitBuff:"Item_Add_LimitingBuff", # 给限时buff物品
|
| | | ChConfig.Def_ItemType_AddExpBuff:"Item_Add_LimitingBuff", # 给限时buff物品
|
| | | ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint" #单个属性点重置
|
| | | ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint", #单个属性点重置
|
| | | ChConfig.Def_ItemType_AddCrossRealmPKCnt:"Item_AddCrossRealmPKCnt" #增加跨服PK次数
|
| | | }
|
| | |
|
| | | #根据物品效果使用{物品效果ID:call的py名}
|
| | |
| | | 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", # 给人物威望
|
| | |
| | | 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):
|