Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __AppendAttributeInformation(self, attrSlot, itemAbsChance = 0, vnum = 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, type, vnum)
- self.AppendTextLine(affectString, affectColor)
- def __GetAttributeColor(self, index, bonus, value, type = 0):
- if value > 0:
- if index >= 5:
- if self.MAX_5_BONUS(bonus) and value == self.MAX_5_BONUS[bonus]:
- return self.SPECIAL_POSITIVE_COLOR_MAX5
- else:
- return self.SPECIAL_POSITIVE_COLOR2
- else:
- if vnum > 0 and MAX_7_BONUS(bonus) and value == MAX_7_BONUS[bonus]:
- return self.SPECIAL_POSITIVE_COLOR_MAX7
- else:
- return self.SPECIAL_POSITIVE_COLOR
- elif value == 0:
- return self.NORMAL_COLOR
- else:
- return self.NEGATIVE_COLOR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement