| | |
| | |
|
| | | #删除物品
|
| | | #ItemManager.DeleteItem(curItem)
|
| | | curMapItem = AddMapDropItem(dropPosX, dropPosY, curItem.GetItem())
|
| | | sightLevel = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | curMapItem = AddMapDropItem(dropPosX, dropPosY, curItem.GetItem(), sightLevel=sightLevel)
|
| | | curMapItem.SetOwnerType(ChConfig.Def_NPCHurtTypePlayer)
|
| | | curMapItem.SetOwnerID(curPlayer.GetPlayerID())
|
| | |
|
| | |
| | | index = 0
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | gameMap = GameWorld.GetMap()
|
| | | sightLevel = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | for posX, posY in ChConfig.Def_DropItemAreaMatrix:
|
| | | resultX = dropPosX + posX
|
| | | resultY = dropPosY + posY
|
| | |
| | | continue
|
| | |
|
| | | AddMapDropItem(resultX, resultY, curItem, ownerInfo=[ChConfig.Def_NPCHurtTypePlayer, playerID],
|
| | | dropNPCID=npcID, isOnlySelfSee=isOnlySelfSee) |
| | | dropNPCID=npcID, isOnlySelfSee=isOnlySelfSee, sightLevel=sightLevel) |
| | | return
|
| | |
|
| | | ## 在地上添加物品(统一接口)
|
| | |
| | | # @param effIndex 要显示的特效索引
|
| | | # @param ownerInfo 掉落归属信息[归属类型, 归属ID, [特殊归属玩家ID列表]]
|
| | | # @return 返回值无意义
|
| | | def AddMapDropItem(itemPosX, itemPosY, curItem, effIndex=0, ownerInfo=[], dropNPCID=0, isOnlySelfSee=False):
|
| | | def AddMapDropItem(itemPosX, itemPosY, curItem, effIndex=0, ownerInfo=[], dropNPCID=0, isOnlySelfSee=False, sightLevel=0):
|
| | | itemDataStr = GetMapDropItemDataStr(curItem, effIndex, ownerInfo, dropNPCID, isOnlySelfSee)
|
| | |
|
| | | curMapItem = GameWorld.GetMapItemManager().AddDropItem(itemPosX, itemPosY, curItem,
|
| | |
| | | curMapItem.SetOwnerType(ownerType)
|
| | | curMapItem.SetOwnerID(ownerID)
|
| | |
|
| | | if sightLevel > 0:
|
| | | curMapItem.SetSightLevel(sightLevel)
|
| | | |
| | | if dropNPCID:
|
| | | itemNoteDict = ItemCommon.GetItemNoteDict(curItem, curItem.GetCount())
|
| | | GameWorld.Log("AddMapDropItem mapItemID=%s,ownerType=%s,ownerID=%s,mapItemDataStr=%s,itemNoteDict=%s"
|