eri000n

Untitled

Apr 10th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. def __AppendAffectInformation(self):
  2. for i in xrange(item.ITEM_APPLY_MAX_NUM):
  3.  
  4. (affectType, affectValue) = item.GetAffect(i)
  5.  
  6. affectString = self.__GetAffectString(affectType, affectValue)
  7. if affectString:
  8. self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))
  9.  
  10. def AppendAntiflagInformation(self):
  11. antiFlagDict = {
  12. localeInfo.TOOLTIP_ANTIFLAG_DROP: item.IsAntiFlag(item.ITEM_ANTIFLAG_DROP),
  13. localeInfo.TOOLTIP_ANTIFLAG_SELL: item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL),
  14. localeInfo.TOOLTIP_ANTIFLAG_GIVE: item.IsAntiFlag(item.ITEM_ANTIFLAG_GIVE),
  15. localeInfo.TOOLTIP_ANTIFLAG_PKDROP: item.IsAntiFlag(item.ITEM_ANTIFLAG_PKDROP),
  16. localeInfo.TOOLTIP_ANTIFLAG_STACK: item.IsAntiFlag(item.ITEM_ANTIFLAG_STACK),
  17. localeInfo.TOOLTIP_ANTIFLAG_MYSHOP: item.IsAntiFlag(item.ITEM_ANTIFLAG_MYSHOP),
  18. localeInfo.TOOLTIP_ANTIFLAG_SAFEBOX: item.IsAntiFlag(item.ITEM_ANTIFLAG_SAFEBOX),
  19. }
  20.  
  21. antiFlagNames = [name for name, flag in antiFlagDict.iteritems() if flag]
  22. if antiFlagNames:
  23. self.AppendSpace(5)
  24.  
  25. textLine = self.AppendTextLine('{} {}'.format(', '.join(antiFlagNames), localeInfo.NOT_POSSIBLE), self.CONDITION_COLOR)
  26. textLine.SetFeather()
Advertisement
Add Comment
Please, Sign In to add comment