if app.ENABLE_SPECIAL_COSTUME_ATTR:
def __AppendAttributeInformation(self, attrSlot, itemAbsChance = 0, itemVnum = 0):
if 0 != attrSlot:
if app.ENABLE_LOCK_ATTR:
lockIndex=[]
isAddonItem = False
for j in xrange(5):
if attrSlot[j][0] == item.APPLY_NORMAL_HIT_DAMAGE_BONUS or attrSlot[j][0] == item.APPLY_SKILL_DAMAGE_BONUS:
isAddonItem = True
break
for j in xrange(2):
if attrSlot[7+j][1] != 0:
if isAddonItem:
if attrSlot[7+j][1] == 1 or attrSlot[7+j][1] == 2:
lockIndex.append(0)
lockIndex.append(1)
continue
lockIndex.append(attrSlot[7+j][1]-1)
needInfo = False
attrLimit = -1
if itemVnum != 0:
item.SelectItem(itemVnum)
__CanAttrNewAttr = {
item.ITEM_TYPE_COSTUME: {
item.COSTUME_TYPE_BODY : item.SPECIAL_ATTR_COSTUME_BODY_LIMIT,
item.COSTUME_TYPE_HAIR : item.SPECIAL_ATTR_COSTUME_HAIR_LIMIT,
item.COSTUME_TYPE_WEAPON : item.SPECIAL_ATTR_COSTUME_WEAPON_LIMIT,
item.COSTUME_TYPE_MOUNT_SKIN : item.SPECIAL_ATTR_COSTUME_MOUNT_SKIN_LIMIT,
item.COSTUME_TYPE_SKIN_SASH : item.SPECIAL_ATTR_COSTUME_SASH_SKIN_LIMIT,
},
item.ITEM_TYPE_SHINING : {
item.SHINING_WEAPON : item.SPECIAL_ATTR_COSTUME_SHINING_LIMIT,
item.SHINING_ARMOR : item.SPECIAL_ATTR_COSTUME_SHINING_LIMIT,
item.SHINING_SPECIAL : item.SPECIAL_ATTR_COSTUME_SHINING_LIMIT,
},
}
if __CanAttrNewAttr.has_key(item.GetItemType()):
if __CanAttrNewAttr[item.GetItemType()].has_key(item.GetItemSubType()):
needInfo = True
attrLimit = __CanAttrNewAttr[item.GetItemType()][item.GetItemSubType()]
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
value = attrSlot[i][1]
if 0 == value:
if needInfo == True and i <= attrLimit-1:
self.AppendTextLine(localeInfo.NOBONUS, self.NORMAL_COLOR)
if app.ENABLE_LOCK_ATTR:
if type == 0 or 0 == value:
continue
continue
affectString = self.__GetAffectString(type, value)
if app.ENABLE_SASH_SYSTEM:
if item.GetItemType() == item.ITEM_TYPE_COSTUME and item.GetItemSubType() == item.COSTUME_TYPE_SASH and itemAbsChance:
value = self.CalcSashValue(value, itemAbsChance)
affectString = self.__GetAffectString(type, value)
if affectString:
affectColor = self.__GetAttributeColor(i, value)
if app.ENABLE_LOCK_ATTR:
if i in lockIndex:
self.AppendTextLine("<<"+affectString+">>", self.SPECIAL_TITLE_COLOR)
continue
self.AppendTextLine(affectString, affectColor)
else:
def __AppendAttributeInformation(self, attrSlot, itemAbsChance = 0):
if 0 != attrSlot:
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
value = attrSlot[i][1]
if 0 == value:
continue
affectString = self.__GetAffectString(type, value)
if app.ENABLE_SASH_SYSTEM:
if item.GetItemType() == item.ITEM_TYPE_COSTUME and item.GetItemSubType() == item.COSTUME_TYPE_SASH and itemAbsChance:
value = self.CalcSashValue(value, itemAbsChance)
affectString = self.__GetAffectString(type, value)
if affectString:
affectColor = self.__GetAttributeColor(i, value)
self.AppendTextLine(affectString, affectColor)