#3
def __LoadInformation(self, race):
self.yPos = 7
self.children = []
self.race = race
self.stoneImg = None
self.stoneVnum = None
self.nextStoneIconChange = 0
self.__LoadInformation_Default(race)
self.__LoadInformation_Race(race)
self.__LoadInformation_Resists(race)
self.__LoadInformation_Drops(race)
#4
def __LoadInformation_Drops(self, race):
self.AppendSeperator()
if race in MONSTER_INFO_DATA:
if len(MONSTER_INFO_DATA[race]["items"]) == 0:
if self.itemScrollBar.IsShow():
self.AppendTextLine(localeInfo.TARGET_INFO_NO_DEBUG)
else:
self.AppendTextLine(localeInfo.TARGET_INFO_NO_ITEM_TEXT)
else:
itemListBox = ui.ListBoxExNew(32 + 5, self.MAX_ITEM_COUNT)
itemListBox.SetSize(self.GetWidth() - 15 * 2 - ui.ScrollBar.SCROLLBAR_WIDTH, (32 + 5) * self.MAX_ITEM_COUNT)
height = 0
for curItem in MONSTER_INFO_DATA[race]["items"]:
if curItem.has_key("vnum_list"):
height += self.AppendItem(itemListBox, curItem["vnum_list"], curItem["count"], curItem["rarity"])
else:
height += self.AppendItem(itemListBox, curItem["vnum"], curItem["count"], curItem["rarity"])
if height < itemListBox.GetHeight():
itemListBox.SetSize(itemListBox.GetWidth(), height)
self.AppendWindow(itemListBox, 15)
itemListBox.SetBasePos(0)
if len(MONSTER_INFO_DATA[race]["items"]) > itemListBox.GetViewItemCount():
itemScrollBar = ui.ScrollBar()
itemScrollBar.SetParent(self)
itemScrollBar.SetPosition(itemListBox.GetRight(), itemListBox.GetTop())
itemScrollBar.SetScrollBarSize(32 * self.MAX_ITEM_COUNT + 5 * (self.MAX_ITEM_COUNT - 1))
itemScrollBar.SetMiddleBarSize(float(self.MAX_ITEM_COUNT) / float(height / (32 + 5)))
itemScrollBar.Show()
itemListBox.SetScrollBar(itemScrollBar)
self.itemScrollBar = itemScrollBar
else:
self.AppendTextLine(localeInfo.TARGET_INFO_NO_ITEM_TEXT)