Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 00:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Farbige Itembeschreibung - Bitte um schnelle Hilfe

Discussion on Farbige Itembeschreibung - Bitte um schnelle Hilfe within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
»DeneX«'s Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 1,311
Received Thanks: 524
Farbige Itembeschreibung - Bitte um schnelle Hilfe

Moin!

Weiß jemand wo ich das ändern kann wenn in der itemdesc.txt und in der uitooltip nichts ist?
Mir gehen langsam die Ideen aus.

(20% Erfahrung Ab Lv20)

»DeneX« is offline  
Old 12/01/2015, 21:55   #2
 
elite*gold: 0
Join Date: Oct 2015
Posts: 28
Received Thanks: 4
sollte in der uitooltrip sein schau genau nochmal nach oder poste sie mal hier
Andy aka. Raiison is offline  
Old 12/01/2015, 21:58   #3
 
»DeneX«'s Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 1,311
Received Thanks: 524
PHP Code:
import dbg
import player
import item
import grp
import wndMgr
import skill
import shop
import exchange
import grpText
import safebox
import localeInfo
import app
import background
import nonplayer
import chr

import ui
import mouseModule
import constInfo

WARP_SCROLLS 
= [220112200022010]

DESC_DEFAULT_MAX_COLS 26 
DESC_WESTERN_MAX_COLS 
35
DESC_WESTERN_MAX_WIDTH 
220

def chop
(n):
    return 
round(0.51)

def SplitDescription(desclimit):
    
total_tokens desc.split()
    
line_tokens = []
    
line_len 0
    lines 
= []
    for 
token in total_tokens:
        if 
"|" in token:
            
sep_pos token.find("|")
            
line_tokens.append(token[:sep_pos])

            
lines.append(" ".join(line_tokens))
            
line_len len(token) - (sep_pos 1)
            
line_tokens = [token[sep_pos+1:]]
        else:
            
line_len += len(token)
            if 
len(line_tokens) + line_len limit:
                
lines.append(" ".join(line_tokens))
                
line_len len(token)
                
line_tokens = [token]
            else:
                
line_tokens.append(token)
    
    if 
line_tokens:
        
lines.append(" ".join(line_tokens))

    return 
lines

###################################################################################################
## ToolTip
##
##   NOTE : 현재는 Item과 Skill을 상속으로 특화 시켜두었음
##          하지만 그다지 의미가 없어 보임
##
class ToolTip(ui.ThinBoard):

    
TOOL_TIP_WIDTH 190
    TOOL_TIP_HEIGHT 
10

    TEXT_LINE_HEIGHT 
17

    TITLE_COLOR 
grp.GenerateColor(0.94900.90580.75681.0)
    
SPECIAL_TITLE_COLOR grp.GenerateColor(1.00.78430.01.0)
    
NORMAL_COLOR grp.GenerateColor(0.76070.76070.76071.0)
    
FONT_COLOR grp.GenerateColor(0.76070.76070.76071.0)
    
PRICE_COLOR 0xffFFB96D

    HIGH_PRICE_COLOR 
SPECIAL_TITLE_COLOR
    MIDDLE_PRICE_COLOR 
grp.GenerateColor(0.850.850.851.0)
    
LOW_PRICE_COLOR grp.GenerateColor(0.70.70.71.0)

    
ENABLE_COLOR grp.GenerateColor(0.76070.76070.76071.0)
    
DISABLE_COLOR grp.GenerateColor(0.90.47450.46271.0)

    
NEGATIVE_COLOR grp.GenerateColor(0.90.47450.46271.0)
    
POSITIVE_COLOR grp.GenerateColor(0.54110.72540.55681.0)
    
SPECIAL_POSITIVE_COLOR grp.GenerateColor(0.69110.87540.70681.0)
    
SPECIAL_POSITIVE_COLOR2 grp.GenerateColor(0.88240.98040.88241.0)

    
CONDITION_COLOR 0xffBEB47D
    CAN_LEVEL_UP_COLOR 
0xff8EC292
    CANNOT_LEVEL_UP_COLOR 
DISABLE_COLOR
    NEED_SKILL_POINT_COLOR 
0xff9A9CDB

    def __init__
(selfwidth TOOL_TIP_WIDTHisPickable=FALSE):
        
ui.ThinBoard.__init__(self"TOP_MOST")

        if 
isPickable:
            
pass
        
else:
            
self.AddFlag("not_pick")

        
self.AddFlag("float")

        
self.followFlag TRUE
        self
.toolTipWidth width

        self
.xPos = -1
        self
.yPos = -1

        self
.defFontName localeInfo.UI_DEF_FONT
        self
.ClearToolTip()

    
def __del__(self):
        
ui.ThinBoard.__del__(self)

    
def ClearToolTip(self):
        
self.toolTipHeight 12
        self
.childrenList = []

    
def SetFollow(selfflag):
        
self.followFlag flag

    def SetDefaultFontName
(selffontName):
        
self.defFontName fontName

    def AppendSpace
(selfsize):
        
self.toolTipHeight += size
        self
.ResizeToolTip()

    
def AppendHorizontalLine(self):

        for 
i in xrange(2):
            
horizontalLine ui.Line()
            
horizontalLine.SetParent(self)
            
horizontalLine.SetPosition(0self.toolTipHeight i)
            
horizontalLine.SetWindowHorizontalAlignCenter()
            
horizontalLine.SetSize(1500)
            
horizontalLine.Show()

            if 
== i:
                
horizontalLine.SetColor(0xff555555)
            else:
                
horizontalLine.SetColor(0xff000000)

            
self.childrenList.append(horizontalLine)

        
self.toolTipHeight += 11
        self
.ResizeToolTip()

    
def AlignHorizonalCenter(self):
        for 
child in self.childrenList:
            (
xy)=child.GetLocalPosition()
            
child.SetPosition(self.toolTipWidth/2y)

        
self.ResizeToolTip()

    
def AutoAppendTextLine(selftextcolor FONT_COLORcenterAlign TRUE):
        
textLine ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetFontName(self.defFontName)
        
textLine.SetPackedFontColor(color)
        
textLine.SetText(text)
        
textLine.SetOutline()
        
textLine.SetFeather(FALSE)
        
textLine.Show()

        if 
centerAlign:
            
textLine.SetPosition(self.toolTipWidth/2self.toolTipHeight)
            
textLine.SetHorizontalAlignCenter()

        else:
            
textLine.SetPosition(10self.toolTipHeight)

        
self.childrenList.append(textLine)

        (
textWidthtextHeight)=textLine.GetTextSize()

        
textWidth += 40
        textHeight 
+= 5

        
if self.toolTipWidth textWidth:
            
self.toolTipWidth textWidth

        self
.toolTipHeight += textHeight

        
return textLine

    def AppendTextLine
(selftextcolor FONT_COLORcenterAlign TRUE):
        
textLine ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetFontName(self.defFontName)
        
textLine.SetPackedFontColor(color)
        
textLine.SetText(text)
        
textLine.SetOutline()
        
textLine.SetFeather(FALSE)
        
textLine.Show()

        if 
centerAlign:
            
textLine.SetPosition(self.toolTipWidth/2self.toolTipHeight)
            
textLine.SetHorizontalAlignCenter()

        else:
            
textLine.SetPosition(10self.toolTipHeight)

        
self.childrenList.append(textLine)

        
self.toolTipHeight += self.TEXT_LINE_HEIGHT
        self
.ResizeToolTip()

        return 
textLine

    def AppendDescription
(selfdesclimitcolor FONT_COLOR):
        if 
localeInfo.IsEUROPE():
            
self.__AppendDescription_WesternLanguage(desccolor)
        else:
            
self.__AppendDescription_EasternLanguage(desclimitcolor)

    
def __AppendDescription_EasternLanguage(selfdescriptioncharacterLimitationcolor=FONT_COLOR):
        
length len(description)
        if 
== length:
            return

        
lineCount grpText.GetSplitingTextLineCount(descriptioncharacterLimitation)
        for 
i in xrange(lineCount):
            if 
== i:
                
self.AppendSpace(5)
            
self.AppendTextLine(grpText.GetSplitingTextLine(descriptioncharacterLimitationi), color)

    
def __AppendDescription_WesternLanguage(selfdesccolor=FONT_COLOR):
        
lines SplitDescription(descDESC_WESTERN_MAX_COLS)
        if 
not lines:
            return

        
self.AppendSpace(5)
        for 
line in lines:
            
self.AppendTextLine(linecolor)
            

    
def ResizeToolTip(self):
        
self.SetSize(self.toolTipWidthself.TOOL_TIP_HEIGHT self.toolTipHeight)

    
def SetTitle(selfname):
        
self.AppendTextLine(nameself.TITLE_COLOR)

    
def GetLimitTextLineColor(selfcurValuelimitValue):
        if 
curValue limitValue:
            return 
self.DISABLE_COLOR

        
return self.ENABLE_COLOR

    def GetChangeTextLineColor
(selfvalueisSpecial=FALSE):
        if 
value 0:
            if 
isSpecial:
                return 
self.SPECIAL_POSITIVE_COLOR
            
else:
                return 
self.POSITIVE_COLOR

        
if == value:
            return 
self.NORMAL_COLOR

        
return self.NEGATIVE_COLOR

    def SetToolTipPosition
(self= -1= -1):
        
self.xPos x
        self
.yPos y

    def ShowToolTip
(self):
        
self.SetTop()
        
self.Show()

        
self.OnUpdate()

    
def HideToolTip(self):
        
self.Hide()

    
def OnUpdate(self):

        if 
not self.followFlag:
            return

        
0
        y 
0
        width 
self.GetWidth()
        
height self.toolTipHeight

        
if -== self.xPos and -== self.yPos:

            (
mouseXmouseY) = wndMgr.GetMousePosition()

            if 
mouseY wndMgr.GetScreenHeight() - 300:
                
mouseY 40
            
else:
                
mouseY height 30

            x 
mouseX width/2                

        
else:

            
self.xPos width/2
            y 
self.yPos height

        x 
max(x0)
        
max(y0)
        
min(width/2wndMgr.GetScreenWidth() - width/2) - width/2
        y 
min(self.GetHeight(), wndMgr.GetScreenHeight()) - self.GetHeight()

        
parentWindow self.GetParentProxy()
        if 
parentWindow:
            (
gxgy) = parentWindow.GetGlobalPosition()
            
-= gx
            y 
-= gy

        self
.SetPosition(xy)

class 
ItemToolTip(ToolTip):

    
CHARACTER_NAMES = ( 
        
localeInfo.TOOLTIP_WARRIOR,
        
localeInfo.TOOLTIP_ASSASSIN,
        
localeInfo.TOOLTIP_SURA,
        
localeInfo.TOOLTIP_SHAMAN 
    
)        

    
CHARACTER_COUNT len(CHARACTER_NAMES)
    
WEAR_NAMES = ( 
        
localeInfo.TOOLTIP_ARMOR
        
localeInfo.TOOLTIP_HELMET
        
localeInfo.TOOLTIP_SHOES
        
localeInfo.TOOLTIP_WRISTLET
        
localeInfo.TOOLTIP_WEAPON
        
localeInfo.TOOLTIP_NECK,
        
localeInfo.TOOLTIP_EAR,
        
localeInfo.TOOLTIP_UNIQUE,
        
localeInfo.TOOLTIP_SHIELD,
        
localeInfo.TOOLTIP_ARROW,
    )
    
WEAR_COUNT len(WEAR_NAMES)

    
AFFECT_DICT = {
        
item.APPLY_MAX_HP localeInfo.TOOLTIP_MAX_HP,
        
item.APPLY_MAX_SP localeInfo.TOOLTIP_MAX_SP,
        
item.APPLY_CON localeInfo.TOOLTIP_CON,
        
item.APPLY_INT localeInfo.TOOLTIP_INT,
        
item.APPLY_STR localeInfo.TOOLTIP_STR,
        
item.APPLY_DEX localeInfo.TOOLTIP_DEX,
        
item.APPLY_ATT_SPEED localeInfo.TOOLTIP_ATT_SPEED,
        
item.APPLY_MOV_SPEED localeInfo.TOOLTIP_MOV_SPEED,
        
item.APPLY_CAST_SPEED localeInfo.TOOLTIP_CAST_SPEED,
        
item.APPLY_HP_REGEN localeInfo.TOOLTIP_HP_REGEN,
        
item.APPLY_SP_REGEN localeInfo.TOOLTIP_SP_REGEN,
        
item.APPLY_POISON_PCT localeInfo.TOOLTIP_APPLY_POISON_PCT,
        
item.APPLY_STUN_PCT localeInfo.TOOLTIP_APPLY_STUN_PCT,
        
item.APPLY_SLOW_PCT localeInfo.TOOLTIP_APPLY_SLOW_PCT,
        
item.APPLY_CRITICAL_PCT localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,
        
item.APPLY_PENETRATE_PCT localeInfo.TOOLTIP_APPLY_PENETRATE_PCT,

        
item.APPLY_ATTBONUS_WARRIOR localeInfo.TOOLTIP_APPLY_ATTBONUS_WARRIOR,
        
item.APPLY_ATTBONUS_ASSASSIN localeInfo.TOOLTIP_APPLY_ATTBONUS_ASSASSIN,
        
item.APPLY_ATTBONUS_SURA localeInfo.TOOLTIP_APPLY_ATTBONUS_SURA,
        
item.APPLY_ATTBONUS_SHAMAN localeInfo.TOOLTIP_APPLY_ATTBONUS_SHAMAN,
        
item.APPLY_ATTBONUS_MONSTER localeInfo.TOOLTIP_APPLY_ATTBONUS_MONSTER,

        
item.APPLY_ATTBONUS_HUMAN localeInfo.TOOLTIP_APPLY_ATTBONUS_HUMAN,
        
item.APPLY_ATTBONUS_ANIMAL localeInfo.TOOLTIP_APPLY_ATTBONUS_ANIMAL,
        
item.APPLY_ATTBONUS_ORC localeInfo.TOOLTIP_APPLY_ATTBONUS_ORC,
        
item.APPLY_ATTBONUS_MILGYO localeInfo.TOOLTIP_APPLY_ATTBONUS_MILGYO,
        
item.APPLY_ATTBONUS_UNDEAD localeInfo.TOOLTIP_APPLY_ATTBONUS_UNDEAD,
        
item.APPLY_ATTBONUS_DEVIL localeInfo.TOOLTIP_APPLY_ATTBONUS_DEVIL,
        
item.APPLY_STEAL_HP localeInfo.TOOLTIP_APPLY_STEAL_HP,
        
item.APPLY_STEAL_SP localeInfo.TOOLTIP_APPLY_STEAL_SP,
        
item.APPLY_MANA_BURN_PCT localeInfo.TOOLTIP_APPLY_MANA_BURN_PCT,
        
item.APPLY_DAMAGE_SP_RECOVER localeInfo.TOOLTIP_APPLY_DAMAGE_SP_RECOVER,
        
item.APPLY_BLOCK localeInfo.TOOLTIP_APPLY_BLOCK,
        
item.APPLY_DODGE localeInfo.TOOLTIP_APPLY_DODGE,
        
item.APPLY_RESIST_SWORD localeInfo.TOOLTIP_APPLY_RESIST_SWORD,
        
item.APPLY_RESIST_TWOHAND localeInfo.TOOLTIP_APPLY_RESIST_TWOHAND,
        
item.APPLY_RESIST_DAGGER localeInfo.TOOLTIP_APPLY_RESIST_DAGGER,
        
item.APPLY_RESIST_BELL localeInfo.TOOLTIP_APPLY_RESIST_BELL,
        
item.APPLY_RESIST_FAN localeInfo.TOOLTIP_APPLY_RESIST_FAN,
        
item.APPLY_RESIST_BOW localeInfo.TOOLTIP_RESIST_BOW,
        
item.APPLY_RESIST_FIRE localeInfo.TOOLTIP_RESIST_FIRE,
        
item.APPLY_RESIST_ELEC localeInfo.TOOLTIP_RESIST_ELEC,
        
item.APPLY_RESIST_MAGIC localeInfo.TOOLTIP_RESIST_MAGIC,
        
item.APPLY_RESIST_WIND localeInfo.TOOLTIP_APPLY_RESIST_WIND,
        
item.APPLY_REFLECT_MELEE localeInfo.TOOLTIP_APPLY_REFLECT_MELEE,
        
item.APPLY_REFLECT_CURSE localeInfo.TOOLTIP_APPLY_REFLECT_CURSE,
        
item.APPLY_POISON_REDUCE localeInfo.TOOLTIP_APPLY_POISON_REDUCE,
        
item.APPLY_KILL_SP_RECOVER localeInfo.TOOLTIP_APPLY_KILL_SP_RECOVER,
        
item.APPLY_EXP_DOUBLE_BONUS localeInfo.TOOLTIP_APPLY_EXP_DOUBLE_BONUS,
        
item.APPLY_GOLD_DOUBLE_BONUS localeInfo.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS,
        
item.APPLY_ITEM_DROP_BONUS localeInfo.TOOLTIP_APPLY_ITEM_DROP_BONUS,
        
item.APPLY_POTION_BONUS localeInfo.TOOLTIP_APPLY_POTION_BONUS,
        
item.APPLY_KILL_HP_RECOVER localeInfo.TOOLTIP_APPLY_KILL_HP_RECOVER,
        
item.APPLY_IMMUNE_STUN localeInfo.TOOLTIP_APPLY_IMMUNE_STUN,
        
item.APPLY_IMMUNE_SLOW localeInfo.TOOLTIP_APPLY_IMMUNE_SLOW,
        
item.APPLY_IMMUNE_FALL localeInfo.TOOLTIP_APPLY_IMMUNE_FALL,
        
item.APPLY_BOW_DISTANCE localeInfo.TOOLTIP_BOW_DISTANCE,
        
item.APPLY_DEF_GRADE_BONUS localeInfo.TOOLTIP_DEF_GRADE,
        
item.APPLY_ATT_GRADE_BONUS localeInfo.TOOLTIP_ATT_GRADE,
        
item.APPLY_MAGIC_ATT_GRADE localeInfo.TOOLTIP_MAGIC_ATT_GRADE,
        
item.APPLY_MAGIC_DEF_GRADE localeInfo.TOOLTIP_MAGIC_DEF_GRADE,
        
item.APPLY_MAX_STAMINA localeInfo.TOOLTIP_MAX_STAMINA,
        
item.APPLY_MALL_ATTBONUS localeInfo.TOOLTIP_MALL_ATTBONUS,
        
item.APPLY_MALL_DEFBONUS localeInfo.TOOLTIP_MALL_DEFBONUS,
        
item.APPLY_MALL_EXPBONUS localeInfo.TOOLTIP_MALL_EXPBONUS,
        
item.APPLY_MALL_ITEMBONUS localeInfo.TOOLTIP_MALL_ITEMBONUS,
        
item.APPLY_MALL_GOLDBONUS localeInfo.TOOLTIP_MALL_GOLDBONUS,
        
item.APPLY_SKILL_DAMAGE_BONUS localeInfo.TOOLTIP_SKILL_DAMAGE_BONUS,
        
item.APPLY_NORMAL_HIT_DAMAGE_BONUS localeInfo.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS,
        
item.APPLY_SKILL_DEFEND_BONUS localeInfo.TOOLTIP_SKILL_DEFEND_BONUS,
        
item.APPLY_NORMAL_HIT_DEFEND_BONUS localeInfo.TOOLTIP_NORMAL_HIT_DEFEND_BONUS,
        
item.APPLY_PC_BANG_EXP_BONUS localeInfo.TOOLTIP_MALL_EXPBONUS_P_STATIC,
        
item.APPLY_PC_BANG_DROP_BONUS localeInfo.TOOLTIP_MALL_ITEMBONUS_P_STATIC,
        
item.APPLY_RESIST_WARRIOR localeInfo.TOOLTIP_APPLY_RESIST_WARRIOR,
        
item.APPLY_RESIST_ASSASSIN localeInfo.TOOLTIP_APPLY_RESIST_ASSASSIN,
        
item.APPLY_RESIST_SURA localeInfo.TOOLTIP_APPLY_RESIST_SURA,
        
item.APPLY_RESIST_SHAMAN localeInfo.TOOLTIP_APPLY_RESIST_SHAMAN,
        
item.APPLY_MAX_HP_PCT localeInfo.TOOLTIP_APPLY_MAX_HP_PCT,
        
item.APPLY_MAX_SP_PCT localeInfo.TOOLTIP_APPLY_MAX_SP_PCT,
        
item.APPLY_ENERGY localeInfo.TOOLTIP_ENERGY,
        
item.APPLY_COSTUME_ATTR_BONUS localeInfo.TOOLTIP_COSTUME_ATTR_BONUS,
        
        
item.APPLY_MAGIC_ATTBONUS_PER localeInfo.TOOLTIP_MAGIC_ATTBONUS_PER,
        
item.APPLY_MELEE_MAGIC_ATTBONUS_PER localeInfo.TOOLTIP_MELEE_MAGIC_ATTBONUS_PER,
        
item.APPLY_RESIST_ICE localeInfo.TOOLTIP_RESIST_ICE,
        
item.APPLY_RESIST_EARTH localeInfo.TOOLTIP_RESIST_EARTH,
        
item.APPLY_RESIST_DARK localeInfo.TOOLTIP_RESIST_DARK,
        
item.APPLY_ANTI_CRITICAL_PCT localeInfo.TOOLTIP_ANTI_CRITICAL_PCT,
        
item.APPLY_ANTI_PENETRATE_PCT localeInfo.TOOLTIP_ANTI_PENETRATE_PCT,
    }

    
ATTRIBUTE_NEED_WIDTH = {
        
23 230,
        
24 230,
        
25 230,
        
26 220,
        
27 210,

        
35 210,
        
36 210,
        
37 210,
        
38 210,
        
39 210,
        
40 210,
        
41 210,

        
42 220,
        
43 230,
        
45 230,
    }

    
ANTI_FLAG_DICT = {
        
item.ITEM_ANTIFLAG_WARRIOR,
        
item.ITEM_ANTIFLAG_ASSASSIN,
        
item.ITEM_ANTIFLAG_SURA,
        
item.ITEM_ANTIFLAG_SHAMAN,
    }

    
FONT_COLOR grp.GenerateColor(0.76070.76070.76071.0)

    
def __init__(self, *args, **kwargs):
        
ToolTip.__init__(self, *args, **kwargs)
        
self.itemVnum 0
        self
.isShopItem FALSE

        
# 아이템 툴팁을 표시할 때 현재 캐릭터가 착용할 수 없는 아이템이라면 강제로 Disable Color로 설정 (이미 그렇게 작동하고 있으나 꺼야 할 필요가 있어서)
        
self.bCannotUseItemForceSetDisableColor TRUE 

    def __del__
(self):
        
ToolTip.__del__(self)

    
def SetCannotUseItemForceSetDisableColor(selfenable):
        
self.bCannotUseItemForceSetDisableColor enable

    def CanEquip
(self):
        if 
not item.IsEquipmentVID(self.itemVnum):
            return 
TRUE

        race 
player.GetRace()
        
job chr.RaceToJob(race)
        if 
not self.ANTI_FLAG_DICT.has_key(job):
            return 
FALSE

        
if item.IsAntiFlag(self.ANTI_FLAG_DICT[job]):
            return 
FALSE

        sex 
chr.RaceToSex(race)
        
        
MALE 1
        FEMALE 
0

        
if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE:
            return 
FALSE

        
if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE:
            return 
FALSE

        
for i in xrange(item.LIMIT_MAX_NUM):
            (
limitTypelimitValue) = item.GetLimit(i)

            if 
item.LIMIT_LEVEL == limitType:
                if 
player.GetStatus(player.LEVEL) < limitValue:
                    return 
FALSE
            
"""
            elif item.LIMIT_STR == limitType:
                if player.GetStatus(player.ST) < limitValue:
                    return FALSE
            elif item.LIMIT_DEX == limitType:
                if player.GetStatus(player.DX) < limitValue:
                    return FALSE
            elif item.LIMIT_INT == limitType:
                if player.GetStatus(player.IQ) < limitValue:
                    return FALSE
            elif item.LIMIT_CON == limitType:
                if player.GetStatus(player.HT) < limitValue:
                    return FALSE
            """

        
return TRUE

    def AppendTextLine
(selftextcolor FONT_COLORcenterAlign TRUE):
        if 
not self.CanEquip() and self.bCannotUseItemForceSetDisableColor:
            
color self.DISABLE_COLOR

        
return ToolTip.AppendTextLine(selftextcolorcenterAlign)

    
def ClearToolTip(self):
        
self.isShopItem FALSE
        self
.toolTipWidth self.TOOL_TIP_WIDTH
        ToolTip
.ClearToolTip(self)

    
def SetInventoryItem(selfslotIndexwindow_type player.INVENTORY):
        
itemVnum player.GetItemIndex(window_typeslotIndex)
        if 
== itemVnum:
            return

        
self.ClearToolTip()
        if 
shop.IsOpen():
            if 
not shop.IsPrivateShop():
                
item.SelectItem(itemVnum)
                
self.AppendSellingPrice(player.GetISellItemPrice(window_typeslotIndex))

        
metinSlot = [player.GetItemMetinSocket(window_typeslotIndexi) for i in xrange(player.METIN_SOCKET_MAX_NUM)]
        
attrSlot = [player.GetItemAttribute(window_typeslotIndexi) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]

        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def SetShopItem(selfslotIndex):
        
itemVnum shop.GetItemID(slotIndex)
        if 
== itemVnum:
            return

        
price shop.GetItemPrice(slotIndex)
        
self.ClearToolTip()
        
self.isShopItem TRUE

        metinSlot 
= []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(shop.GetItemMetinSocket(slotIndexi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(shop.GetItemAttribute(slotIndexi))

        
self.AddItemData(itemVnummetinSlotattrSlot)
        
self.AppendPrice(price)

    
def SetExchangeOwnerItem(selfslotIndex):
        
itemVnum exchange.GetItemVnumFromSelf(slotIndex)
        if 
== itemVnum:
            return

        
self.ClearToolTip()

        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(exchange.GetItemMetinSocketFromSelf(slotIndexi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(exchange.GetItemAttributeFromSelf(slotIndexi))
        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def SetExchangeTargetItem(selfslotIndex):
        
itemVnum exchange.GetItemVnumFromTarget(slotIndex)
        if 
== itemVnum:
            return

        
self.ClearToolTip()

        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(exchange.GetItemMetinSocketFromTarget(slotIndexi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(exchange.GetItemAttributeFromTarget(slotIndexi))
        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def SetPrivateShopBuilderItem(selfinvenTypeinvenPosprivateShopSlotIndex):
        
itemVnum player.GetItemIndex(invenTypeinvenPos)
        if 
== itemVnum:
            return

        
item.SelectItem(itemVnum)
        
self.ClearToolTip()
        
self.AppendSellingPrice(shop.GetPrivateShopItemPrice(invenTypeinvenPos))

        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(player.GetItemMetinSocket(invenPosi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(player.GetItemAttribute(invenPosi))

        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def SetSafeBoxItem(selfslotIndex):
        
itemVnum safebox.GetItemID(slotIndex)
        if 
== itemVnum:
            return

        
self.ClearToolTip()
        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(safebox.GetItemMetinSocket(slotIndexi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(safebox.GetItemAttribute(slotIndexi))
        
        
self.AddItemData(itemVnummetinSlotattrSlotsafebox.GetItemFlags(slotIndex))

    
def SetMallItem(selfslotIndex):
        
itemVnum safebox.GetMallItemID(slotIndex)
        if 
== itemVnum:
            return

        
self.ClearToolTip()
        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(safebox.GetMallItemMetinSocket(slotIndexi))
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append(safebox.GetMallItemAttribute(slotIndexi))

        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def SetItemToolTip(selfitemVnum):
        
self.ClearToolTip()
        
metinSlot = []
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlot.append(0)
        
attrSlot = []
        for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
attrSlot.append((00))

        
self.AddItemData(itemVnummetinSlotattrSlot)

    
def __AppendAttackSpeedInfo(selfitem):
        
atkSpd item.GetValue(0)

        if 
atkSpd 80:
            
stSpd localeInfo.TOOLTIP_ITEM_VERY_FAST
        elif atkSpd 
<= 95:
            
stSpd localeInfo.TOOLTIP_ITEM_FAST
        elif atkSpd 
<= 105:
            
stSpd localeInfo.TOOLTIP_ITEM_NORMAL
        elif atkSpd 
<= 120:
            
stSpd localeInfo.TOOLTIP_ITEM_SLOW
        
else:
            
stSpd localeInfo.TOOLTIP_ITEM_VERY_SLOW

        self
.AppendTextLine(localeInfo.TOOLTIP_ITEM_ATT_SPEED stSpdself.NORMAL_COLOR)

    
def __AppendAttackGradeInfo(self):
        
atkGrade item.GetValue(1)
        
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_ATT_GRADE atkGradeself.GetChangeTextLineColor(atkGrade))

    
def __AppendAttackPowerInfo(self):
        
minPower item.GetValue(3)
        
maxPower item.GetValue(4)
        
addPower item.GetValue(5)
        if 
maxPower minPower:
            
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_ATT_POWER % (minPower+addPowermaxPower+addPower), self.POSITIVE_COLOR)
        else:
            
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_ATT_POWER_ONE_ARG % (minPower+addPower), self.POSITIVE_COLOR)

    
def __AppendMagicAttackInfo(self):
        
minMagicAttackPower item.GetValue(1)
        
maxMagicAttackPower item.GetValue(2)
        
addPower item.GetValue(5)

        if 
minMagicAttackPower or maxMagicAttackPower 0:
            if 
maxMagicAttackPower minMagicAttackPower:
                
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_MAGIC_ATT_POWER % (minMagicAttackPower+addPowermaxMagicAttackPower+addPower), self.POSITIVE_COLOR)
            else:
                
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_MAGIC_ATT_POWER_ONE_ARG % (minMagicAttackPower+addPower), self.POSITIVE_COLOR)

    
def __AppendMagicDefenceInfo(self):
        
magicDefencePower item.GetValue(0)

        if 
magicDefencePower 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_MAGIC_DEF_POWER magicDefencePowerself.GetChangeTextLineColor(magicDefencePower))

    
def __AppendAttributeInformation(selfattrSlot):
        if 
!= attrSlot:

            for 
i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
                
type attrSlot[i][0]
                
value attrSlot[i][1]

                if 
== value:
                    continue

                
affectString self.__GetAffectString(typevalue)
                if 
affectString:
                    
affectColor self.__GetAttributeColor(ivalue)
                    
self.AppendTextLine(affectStringaffectColor)

    
def __GetAttributeColor(selfindexvalue):
        if 
value 0:
            if 
index >= 5:
                return 
self.SPECIAL_POSITIVE_COLOR2
            
else:
                return 
self.SPECIAL_POSITIVE_COLOR
        elif value 
== 0:
            return 
self.NORMAL_COLOR
        
else:
            return 
self.NEGATIVE_COLOR

    def __IsPolymorphItem
(selfitemVnum):
        if 
itemVnum >= 70103 and itemVnum <= 70106:
            return 
1
        
return 0

    def __SetPolymorphItemTitle
(selfmonsterVnum):
        if 
localeInfo.IsVIETNAM():
            
itemName =item.GetItemName()
            
itemName+=" "
            
itemName+=nonplayer.GetMonsterName(monsterVnum)
        else:
            
itemName =nonplayer.GetMonsterName(monsterVnum)
            
itemName+=" "
            
itemName+=item.GetItemName()
        
self.SetTitle(itemName)

    
def __SetNormalItemTitle(self):
        
self.SetTitle(item.GetItemName())

    
def __SetSpecialItemTitle(self):
        
self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR)

    
def __SetItemTitle(selfitemVnummetinSlotattrSlot):
        if 
localeInfo.IsCANADA():
            if 
72726 == itemVnum or 72730 == itemVnum:
                
self.AppendTextLine(item.GetItemName(), grp.GenerateColor(1.00.78430.01.0))
                return
            
        if 
self.__IsPolymorphItem(itemVnum):
            
self.__SetPolymorphItemTitle(metinSlot[0])
        else:
            if 
self.__IsAttr(attrSlot):
                
self.__SetSpecialItemTitle()
                return

            
self.__SetNormalItemTitle()

    
def __IsAttr(selfattrSlot):
        if 
not attrSlot:
            return 
FALSE

        
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
type attrSlot[i][0]
            if 
!= type:
                return 
TRUE

        
return FALSE
    
    def AddRefineItemData
(selfitemVnummetinSlotattrSlot 0):
        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlotData=metinSlot[i]
            if 
self.GetMetinItemIndex(metinSlotData) == constInfo.ERROR_METIN_STONE:
                
metinSlot[i]=player.METIN_SOCKET_TYPE_SILVER

        self
.AddItemData(itemVnummetinSlotattrSlot)

    
def AddItemData_Offline(selfitemVnumitemDescitemSummarymetinSlotattrSlot):
        
self.__AdjustMaxWidth(attrSlotitemDesc)
        
self.__SetItemTitle(itemVnummetinSlotattrSlot)
        
        if 
self.__IsHair(itemVnum):    
            
self.__AppendHairIcon(itemVnum)

        
### Description ###
        
self.AppendDescription(itemDesc26)
        
self.AppendDescription(itemSummary26self.CONDITION_COLOR)

    
def AddItemData(selfitemVnummetinSlotattrSlot 0flags 0unbindTime 0):
        
self.itemVnum itemVnum
        item
.SelectItem(itemVnum)
        
itemType item.GetItemType()
        
itemSubType item.GetItemSubType()

        if 
50026 == itemVnum:
            if 
!= metinSlot:
                
name item.GetItemName()
                if 
metinSlot[0] > 0:
                    
name += " "
                    
name += localeInfo.NumberToMoneyString(metinSlot[0])
                
self.SetTitle(name)
                
self.ShowToolTip()
            return

        
### Skill Book ###
        
elif 50300 == itemVnum:
            if 
!= metinSlot:
                
self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILLBOOK_NAME1)
                
self.ShowToolTip()
            return 
        
elif 70037 == itemVnum:
            if 
!= metinSlot:
                
self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILL_FORGET_BOOK_NAME0)
                
self.AppendDescription(item.GetItemDescription(), 26)
                
self.AppendDescription(item.GetItemSummary(), 26self.CONDITION_COLOR)
                
self.ShowToolTip()
            return
        
elif 70055 == itemVnum:
            if 
!= metinSlot:
                
self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILL_FORGET_BOOK_NAME0)
                
self.AppendDescription(item.GetItemDescription(), 26)
                
self.AppendDescription(item.GetItemSummary(), 26self.CONDITION_COLOR)
                
self.ShowToolTip()
            return
        
###########################################################################################


        
itemDesc item.GetItemDescription()
        
itemSummary item.GetItemSummary()

        
isCostumeItem 0
        isCostumeHair 
0
        isCostumeBody 
0
            
        
if app.ENABLE_COSTUME_SYSTEM:
            if 
item.ITEM_TYPE_COSTUME == itemType:
                
isCostumeItem 1
                isCostumeHair 
item.COSTUME_TYPE_HAIR == itemSubType
                isCostumeBody 
item.COSTUME_TYPE_BODY == itemSubType
                
                
#dbg.TraceError("IS_COSTUME_ITEM! body(%d) hair(%d)" % (isCostumeBody, isCostumeHair))

        
self.__AdjustMaxWidth(attrSlotitemDesc)
        
self.__SetItemTitle(itemVnummetinSlotattrSlot)
        
        
### Hair Preview Image ###
        
if self.__IsHair(itemVnum):    
            
self.__AppendHairIcon(itemVnum)

        
### Description ###
        
self.AppendDescription(itemDesc26)
        
self.AppendDescription(itemSummary26self.CONDITION_COLOR)

        
### Weapon ###
        
if item.ITEM_TYPE_WEAPON == itemType:

            
self.__AppendLimitInformation()

            
self.AppendSpace(5)

            
## 부채일 경우 마공을 먼저 표시한다.
            
if item.WEAPON_FAN == itemSubType:
                
self.__AppendMagicAttackInfo()
                
self.__AppendAttackPowerInfo()

            else:
                
self.__AppendAttackPowerInfo()
                
self.__AppendMagicAttackInfo()

            
self.__AppendAffectInformation()
            
self.__AppendAttributeInformation(attrSlot)

            
self.AppendWearableInformation()
            
self.__AppendMetinSlotInfo(metinSlot)

        
### Armor ###
        
elif item.ITEM_TYPE_ARMOR == itemType:
            
self.__AppendLimitInformation()

            
## 방어력
            
defGrade item.GetValue(1)
            
defBonus item.GetValue(5)*## 방어력 표시 잘못 되는 문제를 수정
            
if defGrade 0:
                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_DEF_GRADE % (defGrade+defBonus), self.GetChangeTextLineColor(defGrade))

            
self.__AppendMagicDefenceInfo()
            
self.__AppendAffectInformation()
            
self.__AppendAttributeInformation(attrSlot)

            
self.AppendWearableInformation()

            if 
itemSubType in (item.ARMOR_WRISTitem.ARMOR_NECKitem.ARMOR_EAR):                
                
self.__AppendAccessoryMetinSlotInfo(metinSlotconstInfo.GET_ACCESSORY_MATERIAL_VNUM(itemVnumitemSubType))
            else:
                
self.__AppendMetinSlotInfo(metinSlot)

                
### Belt Item ###
        
elif item.ITEM_TYPE_BELT == itemType:
            
self.__AppendLimitInformation()
            
self.__AppendAffectInformation()
            
self.__AppendAttributeInformation(attrSlot)

            
self.__AppendAccessoryMetinSlotInfo(metinSlotconstInfo.GET_BELT_MATERIAL_VNUM(itemVnum))
        
                
        
## 코스츔 아이템 ##
        
elif 0 != isCostumeItem:
            
self.__AppendLimitInformation()
            
self.__AppendAffectInformation()
            
self.__AppendAttributeInformation(attrSlot)

            
self.AppendWearableInformation()
        
            
bHasRealtimeFlag 0
            
            
## 사용가능 시간 제한이 있는지 찾아보고
            
for i in xrange(item.LIMIT_MAX_NUM):
                (
limitTypelimitValue) = item.GetLimit(i)

                if 
item.LIMIT_REAL_TIME == limitType:
                    
bHasRealtimeFlag 1
            
            
## 있다면 관련 정보를 표시함. ex) 남은 시간 : 6일 6시간 58분 
            
if == bHasRealtimeFlag:
                
self.AppendMallItemLastTime(metinSlot[0])
                
#dbg.TraceError("1) REAL_TIME flag On ")
                
        ## Rod ##
        
elif item.ITEM_TYPE_ROD == itemType:

            if 
!= metinSlot:
                
curLevel item.GetValue(0) / 10
                curEXP 
metinSlot[0]
                
maxEXP item.GetValue(2)
                
self.__AppendLimitInformation()
                
self.__AppendRodInformation(curLevelcurEXPmaxEXP)

        
## Pick ##
        
elif item.ITEM_TYPE_PICK == itemType:

            if 
!= metinSlot:
                
curLevel item.GetValue(0) / 10
                curEXP 
metinSlot[0]
                
maxEXP item.GetValue(2)
                
self.__AppendLimitInformation()
                
self.__AppendPickInformation(curLevelcurEXPmaxEXP)

        
## Lottery ##
        
elif item.ITEM_TYPE_LOTTERY == itemType:
            if 
!= metinSlot:

                
ticketNumber int(metinSlot[0])
                
stepNumber int(metinSlot[1])

                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_LOTTERY_STEP_NUMBER % (stepNumber), self.NORMAL_COLOR)
                
self.AppendTextLine(localeInfo.TOOLTIP_LOTTO_NUMBER % (ticketNumber), self.NORMAL_COLOR);

        
### Metin ###
        
elif item.ITEM_TYPE_METIN == itemType:
            
self.AppendMetinInformation()
            
self.AppendMetinWearInformation()

        
### Fish ###
        
elif item.ITEM_TYPE_FISH == itemType:
            if 
!= metinSlot:
                
self.__AppendFishInfo(metinSlot[0])
        
        
## item.ITEM_TYPE_BLEND
        
elif item.ITEM_TYPE_BLEND == itemType:
            
self.__AppendLimitInformation()

            if 
metinSlot:
                
affectType metinSlot[0]
                
affectValue metinSlot[1]
                
time metinSlot[2]
                
self.AppendSpace(5)
                
affectText self.__GetAffectString(affectTypeaffectValue)

                
self.AppendTextLine(affectTextself.NORMAL_COLOR)

                if 
time 0:
                    
minute = (time 60)
                    
second = (time 60)
                    
timeString localeInfo.TOOLTIP_POTION_TIME

                    
if minute 0:
                        
timeString += str(minute) + localeInfo.TOOLTIP_POTION_MIN
                    
if second 0:
                        
timeString += " " str(second) + localeInfo.TOOLTIP_POTION_SEC

                    self
.AppendTextLine(timeString)
                else:
                    
self.AppendTextLine(localeInfo.BLEND_POTION_NO_TIME)
            else:
                
self.AppendTextLine("BLEND_POTION_NO_INFO")

        
elif item.ITEM_TYPE_UNIQUE == itemType:
            if 
!= metinSlot:
                
bHasRealtimeFlag 0
                loop_variable 
0
                
                
for i in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(i)

                    if 
item.LIMIT_REAL_TIME == limitType:
                        
bHasRealtimeFlag 1
                    
if item.LIMIT_REAL_TIME_START_FIRST_USE == limitType:
                        
bHasRealtimeFlag 2
                        loop_variable 
i
                
                
if == bHasRealtimeFlag:
                    
self.AppendMallItemLastTime(metinSlot[0])
                
elif 2 == bHasRealtimeFlag:
                    
self.AppendRealTimeStartFirstUseLastTime(itemmetinSlotloop_variable)
                else:
                    
time metinSlot[player.METIN_SOCKET_MAX_NUM-1]

                    if 
== item.GetValue(2): ## 실시간 이용 Flag / 장착 안해도 준다
                        
self.AppendMallItemLastTime(time)
                    else:
                        
self.AppendUniqueItemLastTime(time)

        
### Use ###
        
elif item.ITEM_TYPE_USE == itemType:
            
self.__AppendLimitInformation()

            if 
item.USE_POTION == itemSubType or item.USE_POTION_NODELAY == itemSubType:
                
self.__AppendPotionInformation()

            
elif item.USE_ABILITY_UP == itemSubType:
                
self.__AppendAbilityPotionInformation()


            
## 영석 감지기
            
if 27989 == itemVnum or 76006 == itemVnum:
                if 
!= metinSlot:
                    
useCount int(metinSlot[0])

                    
self.AppendSpace(5)
                    
self.AppendTextLine(localeInfo.TOOLTIP_REST_USABLE_COUNT % (useCount), self.NORMAL_COLOR)

            
## 이벤트 감지기
            
elif 50004 == itemVnum:
                if 
!= metinSlot:
                    
useCount int(metinSlot[0])

                    
self.AppendSpace(5)
                    
self.AppendTextLine(localeInfo.TOOLTIP_REST_USABLE_COUNT % (10 useCount), self.NORMAL_COLOR)

            
## 자동물약
            
elif constInfo.IS_AUTO_POTION(itemVnum):
                if 
!= metinSlot:
                    
## 0: 활성화, 1: 사용량, 2: 총량
                    
isActivated int(metinSlot[0])
                    
usedAmount float(metinSlot[1])
                    
totalAmount float(metinSlot[2])
                    
                    if 
== totalAmount:
                        
totalAmount 1
                    
                    self
.AppendSpace(5)

                    if 
!= isActivated:
                        
self.AppendTextLine("(%s)" % (localeInfo.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
                        
self.AppendSpace(5)
                        
                    
self.AppendTextLine(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount totalAmount) * 100.0)), self.POSITIVE_COLOR)
                                
            
## 귀환 기억부
            
elif itemVnum in WARP_SCROLLS:
                if 
!= metinSlot:
                    
xPos int(metinSlot[0])
                    
yPos int(metinSlot[1])

                    if 
xPos != and yPos != 0:
                        (
mapNamexBaseyBase) = background.GlobalPositionToMapInfo(xPosyPos)
                        
                        
localeMapName=localeInfo.MINIMAP_ZONE_NAME_DICT.get(mapName"")

                        
self.AppendSpace(5)

                        if 
localeMapName!="":                        
                            
self.AppendTextLine(localeInfo.TOOLTIP_MEMORIZED_POSITION % (localeMapNameint(xPos-xBase)/100int(yPos-yBase)/100), self.NORMAL_COLOR)
                        else:
                            
self.AppendTextLine(localeInfo.TOOLTIP_MEMORIZED_POSITION_ERROR % (int(xPos)/100int(yPos)/100), self.NORMAL_COLOR)
                            
dbg.TraceError("NOT_EXIST_IN_MINIMAP_ZONE_NAME_DICT: %s" mapName)

            
#####
            
if item.USE_SPECIAL == itemSubType:
                
bHasRealtimeFlag 0
                
for i in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(i)

                    if 
item.LIMIT_REAL_TIME == limitType:
                        
bHasRealtimeFlag 1
        
                
## 있다면 관련 정보를 표시함. ex) 남은 시간 : 6일 6시간 58분 
                
if == bHasRealtimeFlag:
                    
self.AppendMallItemLastTime(metinSlot[0])
                else:
                    
# ... 이거... 서버에는 이런 시간 체크 안되어 있는데...
                    # 왜 이런게 있는지 알지는 못하나 그냥 두자...
                    
if != metinSlot:
                        
time metinSlot[player.METIN_SOCKET_MAX_NUM-1]

                        
## 실시간 이용 Flag
                        
if == item.GetValue(2):
                            
self.AppendMallItemLastTime(time)
            
            
elif item.USE_TIME_CHARGE_PER == itemSubType:
                
bHasRealtimeFlag 0
                
for i in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(i)

                    if 
item.LIMIT_REAL_TIME == limitType:
                        
bHasRealtimeFlag 1
                
if metinSlot[2]:
                    
self.AppendTextLine(localeInfo.TOOLTIP_TIME_CHARGER_PER(metinSlot[2]))
                else:
                    
self.AppendTextLine(localeInfo.TOOLTIP_TIME_CHARGER_PER(item.GetValue(0)))
         
                
## 있다면 관련 정보를 표시함. ex) 남은 시간 : 6일 6시간 58분 
                
if == bHasRealtimeFlag:
                    
self.AppendMallItemLastTime(metinSlot[0])

            
elif item.USE_TIME_CHARGE_FIX == itemSubType:
                
bHasRealtimeFlag 0
                
for i in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(i)

                    if 
item.LIMIT_REAL_TIME == limitType:
                        
bHasRealtimeFlag 1
                
if metinSlot[2]:
                    
self.AppendTextLine(localeInfo.TOOLTIP_TIME_CHARGER_FIX(metinSlot[2]))
                else:
                    
self.AppendTextLine(localeInfo.TOOLTIP_TIME_CHARGER_FIX(item.GetValue(0)))
        
                
## 있다면 관련 정보를 표시함. ex) 남은 시간 : 6일 6시간 58분 
                
if == bHasRealtimeFlag:
                    
self.AppendMallItemLastTime(metinSlot[0])

        
elif item.ITEM_TYPE_QUEST == itemType:
            for 
i in xrange(item.LIMIT_MAX_NUM):
                (
limitTypelimitValue) = item.GetLimit(i)

                if 
item.LIMIT_REAL_TIME == limitType:
                    
self.AppendMallItemLastTime(metinSlot[0])
        
elif item.ITEM_TYPE_DS == itemType:
            
self.AppendTextLine(self.__DragonSoulInfoString(itemVnum))
            
self.__AppendAttributeInformation(attrSlot)
        else:
            
self.__AppendLimitInformation()

        for 
i in xrange(item.LIMIT_MAX_NUM):
            (
limitTypelimitValue) = item.GetLimit(i)
            
#dbg.TraceError("LimitType : %d, limitValue : %d" % (limitType, limitValue))
            
            
if item.LIMIT_REAL_TIME_START_FIRST_USE == limitType and item.ITEM_TYPE_UNIQUE != itemType:
                
self.AppendRealTimeStartFirstUseLastTime(itemmetinSloti)
                
#dbg.TraceError("2) REAL_TIME_START_FIRST_USE flag On ")
                
            
elif item.LIMIT_TIMER_BASED_ON_WEAR == limitType:
                
self.AppendTimerBasedOnWearLastTime(metinSlot)
                
#dbg.TraceError("1) REAL_TIME flag On ")
                
        
self.ShowToolTip()

    
def __DragonSoulInfoString (selfdwVnum):
        
step = (dwVnum 100) % 10
        refine 
= (dwVnum 10) % 10
        
if == step:
            return 
localeInfo.DRAGON_SOUL_STEP_LEVEL1 " " localeInfo.DRAGON_SOUL_STRENGTH(refine)
        
elif 1 == step:
            return 
localeInfo.DRAGON_SOUL_STEP_LEVEL2 " " localeInfo.DRAGON_SOUL_STRENGTH(refine)
        
elif 2 == step:
            return 
localeInfo.DRAGON_SOUL_STEP_LEVEL3 " " localeInfo.DRAGON_SOUL_STRENGTH(refine)
        
elif 3 == step:
            return 
localeInfo.DRAGON_SOUL_STEP_LEVEL4 " " localeInfo.DRAGON_SOUL_STRENGTH(refine)
        
elif 4 == step:
            return 
localeInfo.DRAGON_SOUL_STEP_LEVEL5 " " localeInfo.DRAGON_SOUL_STRENGTH(refine)
        else:
            return 
""


    
## 헤어인가?
    
def __IsHair(selfitemVnum):
        return (
self.__IsOldHair(itemVnum) or 
            
self.__IsNewHair(itemVnum) or
            
self.__IsNewHair2(itemVnum) or
            
self.__IsNewHair3(itemVnum) or
            
self.__IsCostumeHair(itemVnum)
            )

    
def __IsOldHair(selfitemVnum):
        return 
itemVnum 73000 and itemVnum 74000    

    def __IsNewHair
(selfitemVnum):
        return 
itemVnum 74000 and itemVnum 75000    

    def __IsNewHair2
(selfitemVnum):
        return 
itemVnum 75000 and itemVnum 76000    

    def __IsNewHair3
(selfitemVnum):
        return ((
74012 itemVnum and itemVnum 74022) or
            (
74262 itemVnum and itemVnum 74272) or
            (
74512 itemVnum and itemVnum 74522) or
            (
74762 itemVnum and itemVnum 74772) or
            (
45000 itemVnum and itemVnum 47000))

    
def __IsCostumeHair(selfitemVnum):
        return 
app.ENABLE_COSTUME_SYSTEM and self.__IsNewHair3(itemVnum 100000)
        
    
def __AppendHairIcon(selfitemVnum):
        
itemImage ui.ImageBox()
        
itemImage.SetParent(self)
        
itemImage.Show()            

        if 
self.__IsOldHair(itemVnum):
            
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum)+".tga")
        
elif self.__IsNewHair3(itemVnum):
            
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
        
elif self.__IsNewHair(itemVnum): # 기존 헤어 번호를 연결시켜서 사용한다. 새로운 아이템은 1000만큼 번호가 늘었다.
            
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum-1000)+".tga")
        
elif self.__IsNewHair2(itemVnum):
            
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
        
elif self.__IsCostumeHair(itemVnum):
            
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum 100000))

        
itemImage.SetPosition(itemImage.GetWidth()/2self.toolTipHeight)
        
self.toolTipHeight += itemImage.GetHeight()
        
#self.toolTipWidth += itemImage.GetWidth()/2
        
self.childrenList.append(itemImage)
        
self.ResizeToolTip()

    
## 사이즈가 큰 Description 일 경우 툴팁 사이즈를 조정한다
    
def __AdjustMaxWidth(selfattrSlotdesc):
        
newToolTipWidth self.toolTipWidth
        newToolTipWidth 
max(self.__AdjustAttrMaxWidth(attrSlot), newToolTipWidth)
        
newToolTipWidth max(self.__AdjustDescMaxWidth(desc), newToolTipWidth)
        if 
newToolTipWidth self.toolTipWidth:
            
self.toolTipWidth newToolTipWidth
            self
.ResizeToolTip()

    
def __AdjustAttrMaxWidth(selfattrSlot):
        if 
== attrSlot:
            return 
self.toolTipWidth

        maxWidth 
self.toolTipWidth
        
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
            
type attrSlot[i][0]
            
value attrSlot[i][1]
            if 
self.ATTRIBUTE_NEED_WIDTH.has_key(type):
                if 
value 0:
                    
maxWidth max(self.ATTRIBUTE_NEED_WIDTH[type], maxWidth)

                    
# ATTR_CHANGE_TOOLTIP_WIDTH
                    #self.toolTipWidth = max(self.ATTRIBUTE_NEED_WIDTH[type], self.toolTipWidth)
                    #self.ResizeToolTip()
                    # END_OF_ATTR_CHANGE_TOOLTIP_WIDTH

        
return maxWidth

    def __AdjustDescMaxWidth
(selfdesc):
        if 
len(desc) < DESC_DEFAULT_MAX_COLS:
            return 
self.toolTipWidth
    
        
return DESC_WESTERN_MAX_WIDTH

    def __SetSkillBookToolTip
(selfskillIndexbookNameskillGrade):
        
skillName skill.GetSkillName(skillIndex)

        if 
not skillName:
            return

        if 
localeInfo.IsVIETNAM():
            
itemName bookName " " skillName
        
else:
            
itemName skillName " " bookName
        self
.SetTitle(itemName)

    
def __AppendPickInformation(selfcurLevelcurEXPmaxEXP):
        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_PICK_LEVEL % (curLevel), self.NORMAL_COLOR)
        
self.AppendTextLine(localeInfo.TOOLTIP_PICK_EXP % (curEXPmaxEXP), self.NORMAL_COLOR)

        if 
curEXP == maxEXP:
            
self.AppendSpace(5)
            
self.AppendTextLine(localeInfo.TOOLTIP_PICK_UPGRADE1self.NORMAL_COLOR)
            
self.AppendTextLine(localeInfo.TOOLTIP_PICK_UPGRADE2self.NORMAL_COLOR)
            
self.AppendTextLine(localeInfo.TOOLTIP_PICK_UPGRADE3self.NORMAL_COLOR)


    
def __AppendRodInformation(selfcurLevelcurEXPmaxEXP):
        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_FISHINGROD_LEVEL % (curLevel), self.NORMAL_COLOR)
        
self.AppendTextLine(localeInfo.TOOLTIP_FISHINGROD_EXP % (curEXPmaxEXP), self.NORMAL_COLOR)

        if 
curEXP == maxEXP:
            
self.AppendSpace(5)
            
self.AppendTextLine(localeInfo.TOOLTIP_FISHINGROD_UPGRADE1self.NORMAL_COLOR)
            
self.AppendTextLine(localeInfo.TOOLTIP_FISHINGROD_UPGRADE2self.NORMAL_COLOR)
            
self.AppendTextLine(localeInfo.TOOLTIP_FISHINGROD_UPGRADE3self.NORMAL_COLOR)

    
def __AppendLimitInformation(self):

        
appendSpace FALSE

        
for i in xrange(item.LIMIT_MAX_NUM):

            (
limitTypelimitValue) = item.GetLimit(i)

            if 
limitValue 0:
                if 
FALSE == appendSpace:
                    
self.AppendSpace(5)
                    
appendSpace TRUE

            
else:
                continue

            if 
item.LIMIT_LEVEL == limitType:
                
color self.GetLimitTextLineColor(player.GetStatus(player.LEVEL), limitValue)
                
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_LEVEL % (limitValue), color)
            
"""
            elif item.LIMIT_STR == limitType:
                color = self.GetLimitTextLineColor(player.GetStatus(player.ST), limitValue)
                self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_STR % (limitValue), color)
            elif item.LIMIT_DEX == limitType:
                color = self.GetLimitTextLineColor(player.GetStatus(player.DX), limitValue)
                self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_DEX % (limitValue), color)
            elif item.LIMIT_INT == limitType:
                color = self.GetLimitTextLineColor(player.GetStatus(player.IQ), limitValue)
                self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_INT % (limitValue), color)
            elif item.LIMIT_CON == limitType:
                color = self.GetLimitTextLineColor(player.GetStatus(player.HT), limitValue)
                self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_CON % (limitValue), color)
            """

    
def __GetAffectString(selfaffectTypeaffectValue):
        if 
== affectType:
            return 
None

        
if == affectValue:
            return 
None

        
try:
            return 
self.AFFECT_DICT[affectType](affectValue)
        
except TypeError:
            return 
"UNKNOWN_VALUE[%s] %s" % (affectTypeaffectValue)
        
except KeyError:
            return 
"UNKNOWN_TYPE[%s] %s" % (affectTypeaffectValue)

    
def __AppendAffectInformation(self):
        for 
i in xrange(item.ITEM_APPLY_MAX_NUM):

            (
affectTypeaffectValue) = item.GetAffect(i)

            
affectString self.__GetAffectString(affectTypeaffectValue)
            if 
affectString:
                
self.AppendTextLine(affectStringself.GetChangeTextLineColor(affectValue))

    
def AppendWearableInformation(self):

        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_WEARABLE_JOBself.NORMAL_COLOR)

        
flagList = (
            
not item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR),
            
not item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN),
            
not item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA),
            
not item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN))

        
characterNames ""
        
for i in xrange(self.CHARACTER_COUNT):

            
name self.CHARACTER_NAMES[i]
            
flag flagList[i]

            if 
flag:
                
characterNames += " "
                
characterNames += name

        textLine 
self.AppendTextLine(characterNamesself.NORMAL_COLORTRUE)
        
textLine.SetFeather()

        if 
item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE):
            
textLine self.AppendTextLine(localeInfo.FOR_FEMALEself.NORMAL_COLORTRUE)
            
textLine.SetFeather()

        if 
item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE):
            
textLine self.AppendTextLine(localeInfo.FOR_MALEself.NORMAL_COLORTRUE)
            
textLine.SetFeather()

    
def __AppendPotionInformation(self):
        
self.AppendSpace(5)

        
healHP item.GetValue(0)
        
healSP item.GetValue(1)
        
healStatus item.GetValue(2)
        
healPercentageHP item.GetValue(3)
        
healPercentageSP item.GetValue(4)

        if 
healHP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_HP_POINT healHPself.GetChangeTextLineColor(healHP))
        if 
healSP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_SP_POINT healSPself.GetChangeTextLineColor(healSP))
        if 
healStatus != 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_CURE)
        if 
healPercentageHP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_HP_PERCENT healPercentageHPself.GetChangeTextLineColor(healPercentageHP))
        if 
healPercentageSP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_SP_PERCENT healPercentageSPself.GetChangeTextLineColor(healPercentageSP))

    
def __AppendAbilityPotionInformation(self):

        
self.AppendSpace(5)

        
abilityType item.GetValue(0)
        
time item.GetValue(1)
        
point item.GetValue(2)

        if 
abilityType == item.APPLY_ATT_SPEED:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_ATTACK_SPEED pointself.GetChangeTextLineColor(point))
        
elif abilityType == item.APPLY_MOV_SPEED:
            
self.AppendTextLine(localeInfo.TOOLTIP_POTION_PLUS_MOVING_SPEED pointself.GetChangeTextLineColor(point))

        if 
time 0:
            
minute = (time 60)
            
second = (time 60)
            
timeString localeInfo.TOOLTIP_POTION_TIME

            
if minute 0:
                
timeString += str(minute) + localeInfo.TOOLTIP_POTION_MIN
            
if second 0:
                
timeString += " " str(second) + localeInfo.TOOLTIP_POTION_SEC

            self
.AppendTextLine(timeString)

    
def GetPriceColor(selfprice):
        if 
price>=constInfo.HIGH_PRICE:
            return 
self.HIGH_PRICE_COLOR
        
if price>=constInfo.MIDDLE_PRICE:
            return 
self.MIDDLE_PRICE_COLOR
        
else:
            return 
self.LOW_PRICE_COLOR
                        
    def AppendPrice
(selfprice):    
        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE  % (localeInfo.NumberToMoneyString(price)), self.GetPriceColor(price))

    
def AppendSellingPrice(selfprice):
        if 
item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL):            
            
self.AppendTextLine(localeInfo.TOOLTIP_ANTI_SELLself.DISABLE_COLOR)
            
self.AppendSpace(5)
        else:
            
self.AppendTextLine(localeInfo.TOOLTIP_SELLPRICE % (localeInfo.NumberToMoneyString(price)), self.GetPriceColor(price))
            
self.AppendSpace(5)

    
def AppendMetinInformation(self):
        
affectTypeaffectValue item.GetAffect(0)
        
#affectType = item.GetValue(0)
        #affectValue = item.GetValue(1)

        
affectString self.__GetAffectString(affectTypeaffectValue)

        if 
affectString:
            
self.AppendSpace(5)
            
self.AppendTextLine(affectStringself.GetChangeTextLineColor(affectValue))

    
def AppendMetinWearInformation(self):

        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_SOCKET_REFINABLE_ITEMself.NORMAL_COLOR)

        
flagList = (item.IsWearableFlag(item.WEARABLE_BODY),
                    
item.IsWearableFlag(item.WEARABLE_HEAD),
                    
item.IsWearableFlag(item.WEARABLE_FOOTS),
                    
item.IsWearableFlag(item.WEARABLE_WRIST),
                    
item.IsWearableFlag(item.WEARABLE_WEAPON),
                    
item.IsWearableFlag(item.WEARABLE_NECK),
                    
item.IsWearableFlag(item.WEARABLE_EAR),
                    
item.IsWearableFlag(item.WEARABLE_UNIQUE),
                    
item.IsWearableFlag(item.WEARABLE_SHIELD),
                    
item.IsWearableFlag(item.WEARABLE_ARROW))

        
wearNames ""
        
for i in xrange(self.WEAR_COUNT):

            
name self.WEAR_NAMES[i]
            
flag flagList[i]

            if 
flag:
                
wearNames += "  "
                
wearNames += name

        textLine 
ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetFontName(self.defFontName)
        
textLine.SetPosition(self.toolTipWidth/2self.toolTipHeight)
        
textLine.SetHorizontalAlignCenter()
        
textLine.SetPackedFontColor(self.NORMAL_COLOR)
        
textLine.SetText(wearNames)
        
textLine.Show()
        
self.childrenList.append(textLine)

        
self.toolTipHeight += self.TEXT_LINE_HEIGHT
        self
.ResizeToolTip()

    
def GetMetinSocketType(selfnumber):
        if 
player.METIN_SOCKET_TYPE_NONE == number:
            return 
player.METIN_SOCKET_TYPE_NONE
        elif player
.METIN_SOCKET_TYPE_SILVER == number:
            return 
player.METIN_SOCKET_TYPE_SILVER
        elif player
.METIN_SOCKET_TYPE_GOLD == number:
            return 
player.METIN_SOCKET_TYPE_GOLD
        
else:
            
item.SelectItem(number)
            if 
item.METIN_NORMAL == item.GetItemSubType():
                return 
player.METIN_SOCKET_TYPE_SILVER
            elif item
.METIN_GOLD == item.GetItemSubType():
                return 
player.METIN_SOCKET_TYPE_GOLD
            elif 
"USE_PUT_INTO_ACCESSORY_SOCKET" == item.GetUseType(number):
                return 
player.METIN_SOCKET_TYPE_SILVER

        
return player.METIN_SOCKET_TYPE_NONE

    def GetMetinItemIndex
(selfnumber):
        if 
player.METIN_SOCKET_TYPE_SILVER == number:
            return 
0
        
if player.METIN_SOCKET_TYPE_GOLD == number:
            return 
0

        
return number

    def __AppendAccessoryMetinSlotInfo
(selfmetinSlotmtrlVnum):        
        
ACCESSORY_SOCKET_MAX_SIZE 3        

        cur
=min(metinSlot[0], ACCESSORY_SOCKET_MAX_SIZE)
        
end=min(metinSlot[1], ACCESSORY_SOCKET_MAX_SIZE)

        
affectType1affectValue1 item.GetAffect(0)
        
affectList1=[0max(1affectValue1*10/100), max(2affectValue1*20/100), max(3affectValue1*40/100)]

        
affectType2affectValue2 item.GetAffect(1)
        
affectList2=[0max(1affectValue2*10/100), max(2affectValue2*20/100), max(3affectValue2*40/100)]

        
mtrlPos=0
        mtrlList
=[mtrlVnum]*cur+[player.METIN_SOCKET_TYPE_SILVER]*(end-cur)
        for 
mtrl in mtrlList:
            
affectString1 self.__GetAffectString(affectType1affectList1[mtrlPos+1]-affectList1[mtrlPos])            
            
affectString2 self.__GetAffectString(affectType2affectList2[mtrlPos+1]-affectList2[mtrlPos])

            
leftTime 0
            
if cur == mtrlPos+1:
                
leftTime=metinSlot[2]

            
self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPosmtrlaffectString1affectString2leftTime)
            
mtrlPos+=1

    def __AppendMetinSlotInfo
(selfmetinSlot):
        if 
self.__AppendMetinSlotInfo_IsEmptySlotList(metinSlot):
            return

        for 
i in xrange(player.METIN_SOCKET_MAX_NUM):
            
self.__AppendMetinSlotInfo_AppendMetinSocketData(imetinSlot[i])

    
def __AppendMetinSlotInfo_IsEmptySlotList(selfmetinSlot):
        if 
== metinSlot:
            return 
1

        
for i in xrange(player.METIN_SOCKET_MAX_NUM):
            
metinSlotData=metinSlot[i]
            if 
!= self.GetMetinSocketType(metinSlotData):
                if 
!= self.GetMetinItemIndex(metinSlotData):
                    return 
0

        
return 1

    def __AppendMetinSlotInfo_AppendMetinSocketData
(selfindexmetinSlotDatacustumAffectString=""custumAffectString2=""leftTime=0):

        
slotType self.GetMetinSocketType(metinSlotData)
        
itemIndex self.GetMetinItemIndex(metinSlotData)

        if 
== slotType:
            return

        
self.AppendSpace(5)

        
slotImage ui.ImageBox()
        
slotImage.SetParent(self)
        
slotImage.Show()

        
## Name
        
nameTextLine ui.TextLine()
        
nameTextLine.SetParent(self)
        
nameTextLine.SetFontName(self.defFontName)
        
nameTextLine.SetPackedFontColor(self.NORMAL_COLOR)
        
nameTextLine.SetOutline()
        
nameTextLine.SetFeather()
        
nameTextLine.Show()            

        
self.childrenList.append(nameTextLine)

        if 
player.METIN_SOCKET_TYPE_SILVER == slotType:
            
slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub")
        
elif player.METIN_SOCKET_TYPE_GOLD == slotType:
            
slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub")

        
self.childrenList.append(slotImage)
        
        if 
localeInfo.IsARABIC():
            
slotImage.SetPosition(self.toolTipWidth slotImage.GetWidth() - 9self.toolTipHeight-1)
            
nameTextLine.SetPosition(self.toolTipWidth 50self.toolTipHeight 2)
        else:
            
slotImage.SetPosition(9self.toolTipHeight-1)
            
nameTextLine.SetPosition(50self.toolTipHeight 2)

        
metinImage ui.ImageBox()
        
metinImage.SetParent(self)
        
metinImage.Show()
        
self.childrenList.append(metinImage)

        if 
itemIndex:

            
item.SelectItem(itemIndex)

            
## Image
            
try:
                
metinImage.LoadImage(item.GetIconImageFileName())
            
except:
                
dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" 
                    (
itemIndexitem.GetIconImageFileName())
                )

            
nameTextLine.SetText(item.GetItemName())
            
            
## Affect        
            
affectTextLine ui.TextLine()
            
affectTextLine.SetParent(self)
            
affectTextLine.SetFontName(self.defFontName)
            
affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
            
affectTextLine.SetOutline()
            
affectTextLine.SetFeather()
            
affectTextLine.Show()            
                
            if 
localeInfo.IsARABIC():
                
metinImage.SetPosition(self.toolTipWidth metinImage.GetWidth() - 10self.toolTipHeight)
                
affectTextLine.SetPosition(self.toolTipWidth 50self.toolTipHeight 16 2)
            else:
                
metinImage.SetPosition(10self.toolTipHeight)
                
affectTextLine.SetPosition(50self.toolTipHeight 16 2)
                            
            if 
custumAffectString:
                
affectTextLine.SetText(custumAffectString)
            
elif itemIndex!=constInfo.ERROR_METIN_STONE:
                
affectTypeaffectValue item.GetAffect(0)
                
affectString self.__GetAffectString(affectTypeaffectValue)
                if 
affectString:
                    
affectTextLine.SetText(affectString)
            else:
                
affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT)
            
            
self.childrenList.append(affectTextLine)            

            if 
custumAffectString2:
                
affectTextLine ui.TextLine()
                
affectTextLine.SetParent(self)
                
affectTextLine.SetFontName(self.defFontName)
                
affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
                
affectTextLine.SetPosition(50self.toolTipHeight 16 16 2)
                
affectTextLine.SetOutline()
                
affectTextLine.SetFeather()
                
affectTextLine.Show()
                
affectTextLine.SetText(custumAffectString2)
                
self.childrenList.append(affectTextLine)
                
self.toolTipHeight += 16 2

            
if != leftTime:
                
timeText = (localeInfo.LEFT_TIME " : " localeInfo.SecondToDHM(leftTime))

                
timeTextLine ui.TextLine()
                
timeTextLine.SetParent(self)
                
timeTextLine.SetFontName(self.defFontName)
                
timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
                
timeTextLine.SetPosition(50self.toolTipHeight 16 16 2)
                
timeTextLine.SetOutline()
                
timeTextLine.SetFeather()
                
timeTextLine.Show()
                
timeTextLine.SetText(timeText)
                
self.childrenList.append(timeTextLine)
                
self.toolTipHeight += 16 2

        
else:
            
nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY)

        
self.toolTipHeight += 35
        self
.ResizeToolTip()

    
def __AppendFishInfo(selfsize):
        if 
size 0:
            
self.AppendSpace(5)
            
self.AppendTextLine(localeInfo.TOOLTIP_FISH_LEN % (float(size) / 100.0), self.NORMAL_COLOR)

    
def AppendUniqueItemLastTime(selfrestMin):
        
restSecond restMin*60
        self
.AppendSpace(5)
        
self.AppendTextLine(localeInfo.LEFT_TIME " : " localeInfo.SecondToDHM(restSecond), self.NORMAL_COLOR)

    
def AppendMallItemLastTime(selfendTime):
        
leftSec max(0endTime app.GetGlobalTimeStamp())
        
self.AppendSpace(5)
        
self.AppendTextLine(localeInfo.LEFT_TIME " : " localeInfo.SecondToDHM(leftSec), self.NORMAL_COLOR)
        
    
def AppendTimerBasedOnWearLastTime(selfmetinSlot):
        if 
== metinSlot[0]:
            
self.AppendSpace(5)
            
self.AppendTextLine(localeInfo.CANNOT_USEself.DISABLE_COLOR)
        else:
            
endTime app.GetGlobalTimeStamp() + metinSlot[0]
            
self.AppendMallItemLastTime(endTime)        
    
    
def AppendRealTimeStartFirstUseLastTime(selfitemmetinSlotlimitIndex):        
        
useCount metinSlot[1]
        
endTime metinSlot[0]
        
        
# 한 번이라도 사용했다면 Socket0에 종료 시간(2012년 3월 1일 13시 01분 같은..) 이 박혀있음.
        # 사용하지 않았다면 Socket0에 이용가능시간(이를테면 600 같은 값. 초단위)이 들어있을 수 있고, 0이라면 Limit Value에 있는 이용가능시간을 사용한다.
        
if == useCount:
            if 
== endTime:
                (
limitTypelimitValue) = item.GetLimit(limitIndex)
                
endTime limitValue
                
            endTime 
+= app.GetGlobalTimeStamp()
    
        
self.AppendMallItemLastTime(endTime)
    
class 
HyperlinkItemToolTip(ItemToolTip):
    
def __init__(self):
        
ItemToolTip.__init__(selfisPickable=TRUE)

    
def SetHyperlinkItem(selftokens):
        
minTokenCount player.METIN_SOCKET_MAX_NUM
        maxTokenCount 
minTokenCount player.ATTRIBUTE_SLOT_MAX_NUM
        
if tokens and len(tokens) >= minTokenCount and len(tokens) <= maxTokenCount:
            
headvnumflag tokens[:3]
            
itemVnum int(vnum16)
            
metinSlot = [int(metin16) for metin in tokens[3:6]]

            
rests tokens[6:]
            if 
rests:
                
attrSlot = []

                
rests.reverse()
                while 
rests:
                    
key int(rests.pop(), 16)
                    if 
rests:
                        
val int(rests.pop())
                        
attrSlot.append((keyval))

                
attrSlot += [(00)] * (player.ATTRIBUTE_SLOT_MAX_NUM len(attrSlot))
            else:
                
attrSlot = [(00)] * player.ATTRIBUTE_SLOT_MAX_NUM

            self
.ClearToolTip()
            
self.AddItemData(itemVnummetinSlotattrSlot)

            
ItemToolTip.OnUpdate(self)

    
def OnUpdate(self):
        
pass

    def OnMouseLeftButtonDown
(self):
        
self.Hide()

class 
SkillToolTip(ToolTip):

    
POINT_NAME_DICT = {
        
player.LEVEL localeInfo.SKILL_TOOLTIP_LEVEL,
        
player.IQ localeInfo.SKILL_TOOLTIP_INT,
    }

    
SKILL_TOOL_TIP_WIDTH 200
    PARTY_SKILL_TOOL_TIP_WIDTH 
340

    PARTY_SKILL_EXPERIENCE_AFFECT_LIST 
= (    ( 22,  10,),
                                            ( 
83,  20,),
                                            (
144,  30,),
                                            (
225,  45,),
                                            (
286,  60,),
                                            (
347,  80,),
                                            (
388100,), )

    
PARTY_SKILL_PLUS_GRADE_AFFECT_LIST = (    ( 4210,),
                                            (
10320,),
                                            (
16421,),
                                            (
24522,), )

    
PARTY_SKILL_ATTACKER_AFFECT_LIST = (    ( 363, ),
                                            ( 
261, ),
                                            ( 
322, ), )

    
SKILL_GRADE_NAME = {    player.SKILL_GRADE_MASTER localeInfo.SKILL_GRADE_NAME_MASTER,
                            
player.SKILL_GRADE_GRAND_MASTER localeInfo.SKILL_GRADE_NAME_GRAND_MASTER,
                            
player.SKILL_GRADE_PERFECT_MASTER localeInfo.SKILL_GRADE_NAME_PERFECT_MASTER, }

    
AFFECT_NAME_DICT =    {
                            
"HP" localeInfo.TOOLTIP_SKILL_AFFECT_ATT_POWER,
                            
"ATT_GRADE" localeInfo.TOOLTIP_SKILL_AFFECT_ATT_GRADE,
                            
"DEF_GRADE" localeInfo.TOOLTIP_SKILL_AFFECT_DEF_GRADE,
                            
"ATT_SPEED" localeInfo.TOOLTIP_SKILL_AFFECT_ATT_SPEED,
                            
"MOV_SPEED" localeInfo.TOOLTIP_SKILL_AFFECT_MOV_SPEED,
                            
"DODGE" localeInfo.TOOLTIP_SKILL_AFFECT_DODGE,
                            
"RESIST_NORMAL" localeInfo.TOOLTIP_SKILL_AFFECT_RESIST_NORMAL,
                            
"REFLECT_MELEE" localeInfo.TOOLTIP_SKILL_AFFECT_REFLECT_MELEE,
                        }
    
AFFECT_APPEND_TEXT_DICT =    {
                                    
"DODGE" "%",
                                    
"RESIST_NORMAL" "%",
                                    
"REFLECT_MELEE" "%",
                                }

    
def __init__(self):
        
ToolTip.__init__(selfself.SKILL_TOOL_TIP_WIDTH)
    
def __del__(self):
        
ToolTip.__del__(self)

    
def SetSkill(selfskillIndexskillLevel = -1):

        if 
== skillIndex:
            return

        if 
skill.SKILL_TYPE_GUILD == skill.GetSkillType(skillIndex):

            if 
self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
                
self.toolTipWidth self.SKILL_TOOL_TIP_WIDTH
                self
.ResizeToolTip()

            
self.AppendDefaultData(skillIndex)
            
self.AppendSkillConditionData(skillIndex)
            
self.AppendGuildSkillData(skillIndexskillLevel)

        else:

            if 
self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
                
self.toolTipWidth self.SKILL_TOOL_TIP_WIDTH
                self
.ResizeToolTip()

            
slotIndex player.GetSkillSlotIndex(skillIndex)
            
skillGrade player.GetSkillGrade(slotIndex)
            
skillLevel player.GetSkillLevel(slotIndex)
            
skillCurrentPercentage player.GetSkillCurrentEfficientPercentage(slotIndex)
            
skillNextPercentage player.GetSkillNextEfficientPercentage(slotIndex)

            
self.AppendDefaultData(skillIndex)
            
self.AppendSkillConditionData(skillIndex)
            
self.AppendSkillDataNew(slotIndexskillIndexskillGradeskillLevelskillCurrentPercentageskillNextPercentage)
            
self.AppendSkillRequirement(skillIndexskillLevel)

        
self.ShowToolTip()

    
def SetSkillNew(selfslotIndexskillIndexskillGradeskillLevel):

        if 
== skillIndex:
            return

        if 
player.SKILL_INDEX_TONGSOL == skillIndex:

            
slotIndex player.GetSkillSlotIndex(skillIndex)
            
skillLevel player.GetSkillLevel(slotIndex)

            
self.AppendDefaultData(skillIndex)
            
self.AppendPartySkillData(skillGradeskillLevel)

        
elif player.SKILL_INDEX_RIDING == skillIndex:

            
slotIndex player.GetSkillSlotIndex(skillIndex)
            
self.AppendSupportSkillDefaultData(skillIndexskillGradeskillLevel30)

        
elif player.SKILL_INDEX_SUMMON == skillIndex:

            
maxLevel 10

            self
.ClearToolTip()
            
self.__SetSkillTitle(skillIndexskillGrade)

            
## Description
            
description skill.GetSkillDescription(skillIndex)
            
self.AppendDescription(description25)

            if 
skillLevel == 10:
                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
                
self.AppendTextLine(localeInfo.SKILL_SUMMON_DESCRIPTION % (skillLevel*10), self.NORMAL_COLOR)

            else:
                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
                
self.__AppendSummonDescription(skillLevelself.NORMAL_COLOR)

                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel+1), self.NEGATIVE_COLOR)
                
self.__AppendSummonDescription(skillLevel+1self.NEGATIVE_COLOR)

        
elif skill.SKILL_TYPE_GUILD == skill.GetSkillType(skillIndex):

            if 
self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
                
self.toolTipWidth self.SKILL_TOOL_TIP_WIDTH
                self
.ResizeToolTip()

            
self.AppendDefaultData(skillIndex)
            
self.AppendSkillConditionData(skillIndex)
            
self.AppendGuildSkillData(skillIndexskillLevel)

        else:

            if 
self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
                
self.toolTipWidth self.SKILL_TOOL_TIP_WIDTH
                self
.ResizeToolTip()

            
slotIndex player.GetSkillSlotIndex(skillIndex)

            
skillCurrentPercentage player.GetSkillCurrentEfficientPercentage(slotIndex)
            
skillNextPercentage player.GetSkillNextEfficientPercentage(slotIndex)

            
self.AppendDefaultData(skillIndexskillGrade)
            
self.AppendSkillConditionData(skillIndex)
            
self.AppendSkillDataNew(slotIndexskillIndexskillGradeskillLevelskillCurrentPercentageskillNextPercentage)
            
self.AppendSkillRequirement(skillIndexskillLevel)

        
self.ShowToolTip()

    
def __SetSkillTitle(selfskillIndexskillGrade):
        
self.SetTitle(skill.GetSkillName(skillIndexskillGrade))
        
self.__AppendSkillGradeName(skillIndexskillGrade)

    
def __AppendSkillGradeName(selfskillIndexskillGrade):        
        if 
self.SKILL_GRADE_NAME.has_key(skillGrade):
            
self.AppendSpace(5)
            
self.AppendTextLine(self.SKILL_GRADE_NAME[skillGrade] % (skill.GetSkillName(skillIndex0)), self.CAN_LEVEL_UP_COLOR)

    
def SetSkillOnlyName(selfslotIndexskillIndexskillGrade):
        if 
== skillIndex:
            return

        
slotIndex player.GetSkillSlotIndex(skillIndex)

        
self.toolTipWidth self.SKILL_TOOL_TIP_WIDTH
        self
.ResizeToolTip()

        
self.ClearToolTip()
        
self.__SetSkillTitle(skillIndexskillGrade)        
        
self.AppendDefaultData(skillIndexskillGrade)
        
self.AppendSkillConditionData(skillIndex)        
        
self.ShowToolTip()

    
def AppendDefaultData(selfskillIndexskillGrade 0):
        
self.ClearToolTip()
        
self.__SetSkillTitle(skillIndexskillGrade)

        
## Level Limit
        
levelLimit skill.GetSkillLevelLimit(skillIndex)
        if 
levelLimit 0:

            
color self.NORMAL_COLOR
            
if player.GetStatus(player.LEVEL) < levelLimit:
                
color self.NEGATIVE_COLOR

            self
.AppendSpace(5)
            
self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_LEVEL % (levelLimit), color)

        
## Description
        
description skill.GetSkillDescription(skillIndex)
        
self.AppendDescription(description25)

    
def AppendSupportSkillDefaultData(selfskillIndexskillGradeskillLevelmaxLevel):
        
self.ClearToolTip()
        
self.__SetSkillTitle(skillIndexskillGrade)

        
## Description
        
description skill.GetSkillDescription(skillIndex)
        
self.AppendDescription(description25)

        if 
== skillGrade:
            
skillLevel += 19
        elif 2 
== skillGrade:
            
skillLevel += 29
        elif 3 
== skillGrade:
            
skillLevel 40

        self
.AppendSpace(5)
        
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_WITH_MAX % (skillLevelmaxLevel), self.NORMAL_COLOR)

    
def AppendSkillConditionData(selfskillIndex):
        
conditionDataCount skill.GetSkillConditionDescriptionCount(skillIndex)
        if 
conditionDataCount 0:
            
self.AppendSpace(5)
            for 
i in xrange(conditionDataCount):
                
self.AppendTextLine(skill.GetSkillConditionDescription(skillIndexi), self.CONDITION_COLOR)

    
def AppendGuildSkillData(selfskillIndexskillLevel):
        
skillMaxLevel 7
        skillCurrentPercentage 
float(skillLevel) / float(skillMaxLevel)
        
skillNextPercentage float(skillLevel+1) / float(skillMaxLevel)
        
## Current Level
        
if skillLevel 0:
            if 
self.HasSkillLevelDescription(skillIndexskillLevel):
                
self.AppendSpace(5)
                if 
skillLevel == skillMaxLevel:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
                else:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)

                
#####

                
for i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
                    
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndexiskillCurrentPercentage), self.ENABLE_COLOR)

                
## Cooltime
                
coolTime skill.GetSkillCoolTime(skillIndexskillCurrentPercentage)
                if 
coolTime 0:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_COOL_TIME str(coolTime), self.ENABLE_COLOR)

                
## SP
                
needGSP skill.GetSkillNeedSP(skillIndexskillCurrentPercentage)
                if 
needGSP 0:
                    
self.AppendTextLine(localeInfo.TOOLTIP_NEED_GSP % (needGSP), self.ENABLE_COLOR)

        
## Next Level
        
if skillLevel skillMaxLevel:
            if 
self.HasSkillLevelDescription(skillIndexskillLevel+1):
                
self.AppendSpace(5)
                
self.AppendTextLine(localeInfo.TOOLTIP_NEXT_SKILL_LEVEL_1 % (skillLevel+1skillMaxLevel), self.DISABLE_COLOR)

                
#####

                
for i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
                    
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndexiskillNextPercentage), self.DISABLE_COLOR)

                
## Cooltime
                
coolTime skill.GetSkillCoolTime(skillIndexskillNextPercentage)
                if 
coolTime 0:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_COOL_TIME str(coolTime), self.DISABLE_COLOR)

                
## SP
                
needGSP skill.GetSkillNeedSP(skillIndexskillNextPercentage)
                if 
needGSP 0:
                    
self.AppendTextLine(localeInfo.TOOLTIP_NEED_GSP % (needGSP), self.DISABLE_COLOR)

    
def AppendSkillDataNew(selfslotIndexskillIndexskillGradeskillLevelskillCurrentPercentageskillNextPercentage):

        
self.skillMaxLevelStartDict = { 17710, }
        
self.skillMaxLevelEndDict = { 201010, }

        
skillLevelUpPoint 1
        realSkillGrade 
player.GetSkillGrade(slotIndex)
        
skillMaxLevelStart self.skillMaxLevelStartDict.get(realSkillGrade15)
        
skillMaxLevelEnd self.skillMaxLevelEndDict.get(realSkillGrade20)

        
## Current Level
        
if skillLevel 0:
            if 
self.HasSkillLevelDescription(skillIndexskillLevel):
                
self.AppendSpace(5)
                if 
skillGrade == skill.SKILL_GRADE_COUNT:
                    
pass
                elif skillLevel 
== skillMaxLevelEnd:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
                else:
                    
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
                
self.AppendSkillLevelDescriptionNew(skillIndexskillCurrentPercentageself.ENABLE_COLOR)

        
## Next Level
        
if skillGrade != skill.SKILL_GRADE_COUNT:
            if 
skillLevel skillMaxLevelEnd:
                if 
self.HasSkillLevelDescription(skillIndexskillLevel+skillLevelUpPoint):
                    
self.AppendSpace(5)
                    
## HP보강, 관통회피 보조스킬의 경우
                    
if skillIndex == 141 or skillIndex == 142:
                        
self.AppendTextLine(localeInfo.TOOLTIP_NEXT_SKILL_LEVEL_3 % (skillLevel+1), self.DISABLE_COLOR)
                    else:
                        
self.AppendTextLine(localeInfo.TOOLTIP_NEXT_SKILL_LEVEL_1 % (skillLevel+1skillMaxLevelEnd), self.DISABLE_COLOR)
                    
self.AppendSkillLevelDescriptionNew(skillIndexskillNextPercentageself.DISABLE_COLOR)

    
def AppendSkillLevelDescriptionNew(selfskillIndexskillPercentagecolor):

        
affectDataCount skill.GetNewAffectDataCount(skillIndex)
        if 
affectDataCount 0:
            for 
i in xrange(affectDataCount):
                
typeminValuemaxValue skill.GetNewAffectData(skillIndexiskillPercentage)

                if 
not self.AFFECT_NAME_DICT.has_key(type):
                    continue

                
minValue int(minValue)
                
maxValue int(maxValue)
                
affectText self.AFFECT_NAME_DICT[type]

                if 
"HP" == type:
                    if 
minValue and maxValue 0:
                        
minValue *= -1
                        maxValue 
*= -1

                    
else:
                        
affectText localeInfo.TOOLTIP_SKILL_AFFECT_HEAL

                affectText 
+= str(minValue)
                if 
minValue != maxValue:
                    
affectText += " - " str(maxValue)
                
affectText += self.AFFECT_APPEND_TEXT_DICT.get(type"")

                
#import debugInfo
                #if debugInfo.IsDebugMode():
                #    affectText = "!!" + affectText

                
self.AppendTextLine(affectTextcolor)
            
        else:
            for 
i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
                
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndexiskillPercentage), color)
        

        
## Duration
        
duration skill.GetDuration(skillIndexskillPercentage)
        if 
duration 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_DURATION % (duration), color)

        
## Cooltime
        
coolTime skill.GetSkillCoolTime(skillIndexskillPercentage)
        if 
coolTime 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_SKILL_COOL_TIME str(coolTime), color)

        
## SP
        
needSP skill.GetSkillNeedSP(skillIndexskillPercentage)
        if 
needSP != 0:
            
continuationSP skill.GetSkillContinuationSP(skillIndexskillPercentage)

            if 
skill.IsUseHPSkill(skillIndex):
                
self.AppendNeedHP(needSPcontinuationSPcolor)
            else:
                
self.AppendNeedSP(needSPcontinuationSPcolor)

    
def AppendSkillRequirement(selfskillIndexskillLevel):

        
skillMaxLevel skill.GetSkillMaxLevel(skillIndex)

        if 
skillLevel >= skillMaxLevel:
            return

        
isAppendHorizontalLine FALSE

        
## Requirement
        
if skill.IsSkillRequirement(skillIndex):

            if 
not isAppendHorizontalLine:
                
isAppendHorizontalLine TRUE
                self
.AppendHorizontalLine()

            
requireSkillNamerequireSkillLevel skill.GetSkillRequirementData(skillIndex)

            
color self.CANNOT_LEVEL_UP_COLOR
            
if skill.CheckRequirementSueccess(skillIndex):
                
color self.CAN_LEVEL_UP_COLOR
            self
.AppendTextLine(localeInfo.TOOLTIP_REQUIREMENT_SKILL_LEVEL % (requireSkillNamerequireSkillLevel), color)

        
## Require Stat
        
requireStatCount skill.GetSkillRequireStatCount(skillIndex)
        if 
requireStatCount 0:

            for 
i in xrange(requireStatCount):
                
typelevel skill.GetSkillRequireStatData(skillIndexi)
                if 
self.POINT_NAME_DICT.has_key(type):

                    if 
not isAppendHorizontalLine:
                        
isAppendHorizontalLine TRUE
                        self
.AppendHorizontalLine()

                    
name self.POINT_NAME_DICT[type]
                    
color self.CANNOT_LEVEL_UP_COLOR
                    
if player.GetStatus(type) >= level:
                        
color self.CAN_LEVEL_UP_COLOR
                    self
.AppendTextLine(localeInfo.TOOLTIP_REQUIREMENT_STAT_LEVEL % (namelevel), color)

    
def HasSkillLevelDescription(selfskillIndexskillLevel):
        if 
skill.GetSkillAffectDescriptionCount(skillIndex) > 0:
            return 
TRUE
        
if skill.GetSkillCoolTime(skillIndexskillLevel) > 0:
            return 
TRUE
        
if skill.GetSkillNeedSP(skillIndexskillLevel) > 0:
            return 
TRUE

        
return FALSE

    def AppendMasterAffectDescription
(selfindexdesccolor):
        
self.AppendTextLine(desccolor)

    
def AppendNextAffectDescription(selfindexdesc):
        
self.AppendTextLine(descself.DISABLE_COLOR)

    
def AppendNeedHP(selfneedSPcontinuationSPcolor):

        
self.AppendTextLine(localeInfo.TOOLTIP_NEED_HP % (needSP), color)

        if 
continuationSP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_NEED_HP_PER_SEC % (continuationSP), color)

    
def AppendNeedSP(selfneedSPcontinuationSPcolor):

        if -
== needSP:
            
self.AppendTextLine(localeInfo.TOOLTIP_NEED_ALL_SPcolor)

        else:
            
self.AppendTextLine(localeInfo.TOOLTIP_NEED_SP % (needSP), color)

        if 
continuationSP 0:
            
self.AppendTextLine(localeInfo.TOOLTIP_NEED_SP_PER_SEC % (continuationSP), color)

    
def AppendPartySkillData(selfskillGradeskillLevel):

        if 
== skillGrade:
            
skillLevel += 19
        elif 2 
== skillGrade:
            
skillLevel += 29
        elif 3 
== skillGrade:
            
skillLevel =  40

        
if skillLevel <= 0:
            return

        
skillIndex player.SKILL_INDEX_TONGSOL
        slotIndex 
player.GetSkillSlotIndex(skillIndex)
        
skillPower player.GetSkillCurrentEfficientPercentage(slotIndex)
        if 
localeInfo.IsBRAZIL():
            
skillPower
        
else:
            
player.GetSkillLevel(skillIndex) / 100.0
        self
.AppendSpace(5)
        
self.AutoAppendTextLine(localeInfo.TOOLTIP_PARTY_SKILL_LEVEL skillLevelself.NORMAL_COLOR)

        if 
skillLevel>=10:
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_ATTACKER chop10 60 ))

        if 
skillLevel>=20:
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_BERSERKER     chop(k))
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_TANKER     chop(50 1450 k))

        if 
skillLevel>=25:
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_BUFFER chop(45 ))

        if 
skillLevel>=35:
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_SKILL_MASTER chop(25 600 ))

        if 
skillLevel>=40:
            
self.AutoAppendTextLine(localeInfo.PARTY_SKILL_DEFENDER chop30 ))

        
self.AlignHorizonalCenter()

    
def __AppendSummonDescription(selfskillLevelcolor):
        if 
skillLevel 1:
            
self.AppendTextLine(localeInfo.SKILL_SUMMON_DESCRIPTION % (skillLevel 10), color)
        
elif 1 == skillLevel:
            
self.AppendTextLine(localeInfo.SKILL_SUMMON_DESCRIPTION % (15), color)
        
elif 0 == skillLevel:
            
self.AppendTextLine(localeInfo.SKILL_SUMMON_DESCRIPTION % (10), color)


if 
__name__ == "__main__":    
    
import app
    import wndMgr
    import systemSetting
    import mouseModule
    import grp
    import ui
    
    
#wndMgr.SetOutlineFlag(TRUE)

    
app.SetMouseHandler(mouseModule.mouseController)
    
app.SetHairColorEnable(TRUE)
    
wndMgr.SetMouseHandler(mouseModule.mouseController)
    
wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
    
app.Create("METIN2 CLOSED BETA"systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
    
mouseModule.mouseController.Create()

    
toolTip ItemToolTip()
    
toolTip.ClearToolTip()
    
#toolTip.AppendTextLine("Test")
    
desc "Item descriptions:|increase of width of display to 35 digits per row AND installation of function that the displayed words are not broken up in two parts, but instead if one word is too long to be displayed in this row, this word will start in the next row."
    
summ ""

    
toolTip.AddItemData_Offline(10descsumm00
    
toolTip.Show()
    
    
app.Loop() 
Da ist nichts, Ich bin doch nicht Blind
»DeneX« is offline  
Old 12/01/2015, 22:19   #4
Trade Restricted
 
elite*gold: 30
Join Date: Nov 2014
Posts: 196
Received Thanks: 136
Hab ihn über Skype geholfen, Frage ist damit geklärt.

mfG.
Sanji
SanjixHD is offline  
Thanks
1 User
Old 12/02/2015, 09:38   #5

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
Itemdesc.txt öffnen -> nach der Itembeschreibung ein TAB setzen und dann die Beschreibung hinzufügen
[-Lee-] is offline  
Reply


Similar Threads Similar Threads
Bitte um schnelle Hilfe!!!!!!!
04/21/2011 - WarRock - 4 Replies
Hallo alle miteinander, Ich habe folgendes Problem: Ich habe gerade einen Account zu meinem Gamersfirst Account hinzugefügt, für Warrock , also Konto (name) add Account. Dann Create a new Account. So neue Gamer ID eingegeben Nickname und Chapter.So wie dadrunter steht mit dem gerade ausgewähltem ID und dem Gamersfirst PW im Spiel anmelden. Das wollte ich auch sogleich tun ! Aber leider wurde mir angezeigt . Was habe ich falsch gemacht ? Was muss ich anders machen? . Ich hoffe ihr könnt mir...
Schnelle Hilfe , bitte.
04/16/2011 - CrossFire - 17 Replies
Hey Leute . Ich habe gestern abend ein Autobann bekommen . Der geht noch 40 stunden , kann ich den irgentwie wegbekommen .zB Support anschreiben oder so ? .. thx
[VB 2008] Eine Frage Hilfe bitte schnelle hilfe
07/03/2010 - .NET Languages - 0 Replies
hi com, also ich möchte ein bot machen und der mauszeiger muss dabei klicken kann mir jemand den code sagen i-wie cursor.clikc oder so ich hab jetzt coursor.positon = new point ( xwert, ywert) und jetzt soll er klicken edit: und möchte noch also die maus beewgt sich auf eine textvbox von einer interbnet seite drückt auf die textbopx und soll dann was eingeben PS: jede hilfreiche antwort = 1thanx



All times are GMT +2. The time now is 00:11.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.