Advertisement
MrKarpiuk

Untitled

Apr 7th, 2021
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.88 KB | None | 0 0
  1.     def __IsOldHair(self, itemVnum):
  2.         return itemVnum > 73000 and itemVnum < 74000   
  3.  
  4.     def __IsNewHair(self, itemVnum):
  5.         return itemVnum > 74000 and itemVnum < 75000
  6.     def __IsNewHair2(self, itemVnum):
  7.         return itemVnum > 75000 and itemVnum < 76000   
  8.  
  9.     def __IsNewHair3(self, itemVnum):
  10.         return ((74012 < itemVnum and itemVnum < 74022) or ##
  11.             (45001 <= itemVnum and itemVnum <= 45026) or ## org GF/YMIR Hair styles
  12.             (45051 <= itemVnum and itemVnum <= 45525) or ## org GF/YMIR New Hair styles add more if slot bee missing
  13.             (74262 < itemVnum and itemVnum < 74272) or
  14.             (74512 < itemVnum and itemVnum < 74522) or
  15.             (74762 < itemVnum and itemVnum < 74772) or
  16.             (1370755 < itemVnum and itemVnum < 1370883) or
  17.             (45051 <= itemVnum and itemVnum <= 75632) or
  18.             (75601 <= itemVnum and itemVnum <= 75632) or ## Only Lican Hair
  19.             (97999 < itemVnum and itemVnum < 98999)) # New Shining Images
  20.  
  21.     def __IsCostumeHair(self, itemVnum):
  22.         return app.ENABLE_COSTUME_SYSTEM and self.__IsNewHair3(itemVnum - 80000)
  23.        
  24.     def __AppendHairIcon(self, itemVnum):
  25.         itemImage = ui.ImageBox()
  26.         itemImage.SetParent(self)
  27.         itemImage.Show()           
  28.  
  29.         if self.__IsOldHair(itemVnum):
  30.             itemImage.LoadImage("d:/ymir work/icon/hair_old/"+str(itemVnum)+".tga")
  31.         elif self._IsNewHair3(itemVnum):
  32.             hair = "d:/ymir work/icon/hair/"+str(itemVnum)
  33.             if os.path.exists(hair+".sub"):
  34.                 itemImage.LoadImage(hair+".sub")
  35.             else:
  36.                 itemImage.LoadImage(hair+".tga")
  37.         elif self.__IsNewHair(itemVnum): # 기존 헤어 번호를 연결시켜서 사용한다. 새로운 아이템은 1000만큼 번호가 늘었다.
  38.             itemImage.LoadImage("d:/ymir work/icon/hair_old/"+str(itemVnum-1000)+".tga")
  39.         elif self.__IsNewHair2(itemVnum):
  40.             itemImage.LoadImage("d:/ymir work/icon/hair/%d.sub" % (itemVnum))
  41.         elif self.__IsCostumeHair(itemVnum):
  42.             itemImage.LoadImage("d:/ymir work/icon/hair/%d.sub" % (itemVnum - 80000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement