From dfa4555080d7fe179aec06e63d045f244e755884 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 08 八月 2019 17:32:10 +0800
Subject: [PATCH] 0312 脱机分解蓝白装备不判断评分高低
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index 5c5933f..dfe8ab3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -1508,7 +1508,8 @@
if curPack == None:
#GameWorld.Log("重整背包类型不对")
return
-
+ if endIndex == 0:
+ endIndex = curPack.GetCount() - 1
#检查是否能整理
for i in range(0, curPack.GetCount()):
curItem = curPack.GetAt(i)
@@ -2288,7 +2289,7 @@
''' 获取功能产出的物品实例
@param isAuctionItem: 是否拍品,默认非拍品
@param expireTime: 有效时间,时间单位由时效类型决定
- @param curPlayer: 产出该物品时的玩家,非拍品时需传入该值,物品某些属性由玩家等级决定,如传奇属性
+ @param curPlayer: 产出该物品时的玩家,物品某些属性由玩家等级决定,如传奇属性
@param isAllAttr: 是否生成该装备所有属性,GM创建物品时用,需验证相关权限
'''
curItem = ItemCommon.CreateSingleItem(itemID, itemCount, isAuctionItem, expireTime)
@@ -2344,11 +2345,13 @@
if not legendAttrCountInfoList:
return
- if not curPlayer:
- GameWorld.ErrLog("生成装备传奇属性时玩家不存在!itemID=%s" % (itemID))
- return
-
- playerID, playerLV = curPlayer.GetPlayerID(), curPlayer.GetLV()
+ if curPlayer:
+ playerID, playerLV = curPlayer.GetPlayerID(), curPlayer.GetLV()
+ else:
+ playerID = 0
+ playerLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
+ GameWorld.Log("生成装备传奇属性时没有玩家等级, 取当前世界等级! itemID=%s,worldLV=%s" % (itemID, playerLV))
+
# 2. 定属性ID
attrTypeIpyData = IpyGameDataPY.GetIpyGameData("EquipLegendAttrType", itemType)
if not attrTypeIpyData:
--
Gitblit v1.8.0