nameplates: rewrite

This commit is contained in:
shagu
2017-07-02 22:39:06 +02:00
parent e926569509
commit 3b6d4b910f
16 changed files with 910 additions and 322 deletions
+5 -3
View File
@@ -441,6 +441,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("chat", "global", "fadetime", "300")
pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "0")
pfUI:UpdateConfig("nameplates", nil, "overlap", "0")
pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1")
pfUI:UpdateConfig("nameplates", nil, "spellname", "0")
pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "0")
@@ -451,11 +452,12 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "friendclassc", "1")
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
pfUI:UpdateConfig("nameplates", nil, "players", "0")
pfUI:UpdateConfig("nameplates", nil, "critters", "0")
pfUI:UpdateConfig("nameplates", nil, "showhp", "0")
pfUI:UpdateConfig("nameplates", nil, "vpos", "-10")
pfUI:UpdateConfig("nameplates", nil, "width", "100")
pfUI:UpdateConfig("nameplates", nil, "heighthealth", "6")
pfUI:UpdateConfig("nameplates", nil, "heightcast", "6")
pfUI:UpdateConfig("nameplates", nil, "width", "120")
pfUI:UpdateConfig("nameplates", nil, "heighthealth", "8")
pfUI:UpdateConfig("nameplates", nil, "heightcast", "8")
pfUI:UpdateConfig("thirdparty", "dpsmate", "enable", "1")
pfUI:UpdateConfig("thirdparty", "wim", "enable", "1")
pfUI:UpdateConfig("thirdparty", "healcomm", "enable", "1")
+86
View File
@@ -51,6 +51,92 @@ pfUI_locale["deDE"]["customcast"] = {
["MULTISHOT"] = "Mehrfachschuss",
}
pfUI_locale["deDE"]["critters"] = {
'Besudelte Kakerlake',
'Besudelte Ratte',
'Brauner Präriehund',
'Cleo',
'Dschungelkröte',
'Effsee',
'Eichhörnchen',
'Eingesperrte Kröte',
'Eingesperrter Hase',
'Eingesperrtes Eichhörnchen',
'Eingesperrtes Schaf',
'Feuerkäfer',
'Fischschwarm',
'Flauschie',
'Gallkröte',
'Gazelle',
'Geheilte Gazelle',
'Geheiltes Reh',
'Graumähne',
'Hase',
'Huhn',
'Hund',
'Infiziertes Eichhörnchen',
'Infiziertes Reh',
'Irrwisch',
'Irrwisch der Shen\'dralar',
'Käfer',
'Kaninchen',
'Katze',
'Kernratte',
'Kleiner Frosch',
'Krakles Thermometer',
'Kränkliche Gazelle',
'Kränkliches Reh',
'Kröte',
'Kuh',
'Lady',
'Larve',
'Lavakrebs',
'Made',
'Maus',
'Mr. Bigglesworth',
'Natter',
'Nibbles',
'Noarm',
'Otter',
'Papagei',
'Pestlandtermite',
'Pferd',
'Piratenschatz Auslöser Meute',
'Präriehund',
'Ratte',
'Reh',
'Rehkitz',
'Reißzahn',
'Reitwidder',
'Salome',
'Schabe',
'Schaf',
'Schleicherpfote',
'Schwarze Ratte',
'Schwein',
'Skorpid',
'Spike',
'Spinne',
'Stimme von Elune',
'Titanische Kröte',
'Transporterfehlfunktion',
'Turmfledermaus',
'Umzauberte Untergrundratte',
'Untergrundratte',
'Verseuchte Made',
'Verseuchte Ratte',
'Verseuchtes Insekt',
'Verwandelte Kuh',
'Verwandelte Ratte',
'Verwandelte Schildkröte',
'Verwandeltes Huhn',
'Verwandeltes Schaf',
'Verwandeltes Schwein',
'Wasserschlange',
'Waypoint',
'Widder',
}
pfUI_locale["deDE"]["spells"] = {
['Eisenherz nimmt wieder Huhngestalt an'] = {t=1000, icon="Ability_Racial_BearForm" };
['Monstrositätenspucke'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+84
View File
@@ -51,6 +51,90 @@ pfUI_locale["enUS"]["customcast"] = {
["MULTISHOT"] = "Multi-Shot",
}
pfUI_locale["enUS"]["critters"] = {
'Adder',
'Beetle',
'Belfry Bat',
'Biletoad',
'Black Rat',
'Brown Prairie Dog',
'Caged Rabbit',
'Caged Sheep',
'Caged Squirrel',
'Caged Toad',
'Cat',
'Chicken',
'Cleo',
'Core Rat',
'Cow',
'Cured Deer',
'Cured Gazelle',
'Deeprun Rat',
'Deer',
'Dog',
'Effsee',
'Enthralled Deeprun Rat',
'Fang',
'Fawn',
'Fire Beetle',
'Fluffy',
'Frog',
'Gazelle',
'Hare',
'Horse',
'Huge Toad',
'Infected Deer',
'Infected Squirrel',
'Jungle Toad',
'Krakle\'s Thermometer',
'Lady',
'Larva',
'Lava Crab',
'Maggot',
'Moccasin',
'Mouse',
'Mr. Bigglesworth',
'Nibbles',
'Noarm',
'Old Blanchy',
'Parrot',
'Pig',
'Pirate treasure trigger mob',
'Plagued Insect',
'Plagued Maggot',
'Plagued Rat',
'Plagueland Termite',
'Polymorphed Chicken',
'Polymorphed Rat',
'Prairie Dog',
'Rabbit',
'Ram',
'Rat',
'Riding Ram',
'Roach',
'Salome',
'School of Fish',
'Scorpion',
'Sheep',
'Shen\'dralar Wisp',
'Sickly Deer',
'Sickly Gazelle',
'Snake',
'Spider',
'Spike',
'Squirrel',
'Swine',
'Tainted Cockroach',
'Tainted Rat',
'Toad',
'Transporter Malfunction',
'Turtle',
'Underfoot',
'Voice of Elune',
'Waypoint (Only GM can see it)',
'Wisp',
}
pfUI_locale["enUS"]["spells"] = {
['"Plucky" Resumes Chicken Form'] = {t=1000, icon="Ability_Racial_BearForm" };
['Abomination Spit'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+80
View File
@@ -51,6 +51,86 @@ pfUI_locale["frFR"]["customcast"] = {
["MULTISHOT"] = "Flèches multiples",
}
pfUI_locale["frFR"]["critters"] = {
'Araignée',
'Aspic',
'Asticot pestiféré',
'Banc de poisson',
'Bélier',
'Blatte',
'Cafard corrompu',
'Casse-pieds',
'Chat',
'Chauve-souris de clocher',
'Cheval',
'Chien',
'Chien de prairie',
'Chien de prairie brun',
'Cléo',
'Crabe de lave',
'Crapaud',
'Crapaud-bile',
'Crapaud de la jungle',
'Crapaud en cage',
'Crapaud énorme',
'Croc',
'Daim',
'Daim infecté',
'Daim malade',
'Daim soigné',
'Dame',
'Ecureuil',
'Ecureuil en cage',
'Ecureuil infecté',
'Effsee',
'Faon',
'Feu follet',
'Feu follet de Shen\'dralar',
'Gazelle',
'Gazelle malade',
'Gazelle soignée',
'Grenouille',
'Grignote',
'Hanneton',
'Hanneton de feu',
'Insecte pestiféré',
'Lapin',
'Lapin en cage',
'Lièvre',
'M. Bigglesworth',
'Métamorphosé en cochon',
'Métamorphosé en mouton',
'Métamorphosé en tortue',
'Métamorphosé en vache',
'Mocassin d\'eau',
'Monstre déclencheur du trésor des pirates',
'Mouton',
'Mouton en cage',
'Noarm',
'Perroquet',
'Point de SPAWN (Seuls les MJ peuvent le voir)',
'Pointe',
'Poulet',
'Pourceau',
'Rat',
'Rat corrompu',
'Rat des profondeurs',
'Rat des profondeurs ensorcelé',
'Rat du Magma',
'Rat noir',
'Rat pestiféré',
'Salome',
'Scorpion',
'Serpent',
'Souris',
'Termite des Maleterres',
'Thermomètre de Krakle',
'Tout-doux',
'Vache',
'Vieille Blanchette',
'Voix d\'Elune',
}
pfUI_locale["frFR"]["spells"] = {
['Le Brave reprend sa forme de poulet'] = {t=1000, icon="Ability_Racial_BearForm" };
['Crachat d\'abomination'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+85
View File
@@ -51,6 +51,91 @@ pfUI_locale["koKR"]["customcast"] = {
["MULTISHOT"] = "일제 사격",
}
pfUI_locale["koKR"]["critters"] = {
'살무사',
'딱정벌레',
'종탑 박쥐',
'독두꺼비',
'곰쥐',
'갈색 땅다람쥐',
'우리에 갇힌 토끼',
'우리에 갇힌 양',
'우리에 갇힌 다람쥐',
'우리에 갇힌 개구리',
'고양이',
'닭',
'클레오',
'화산쥐',
'소',
'변이된 소',
'회복된 사슴',
'회복된 가젤',
'깊은굴쥐',
'사슴',
'강아지',
'나비',
'피리 소리에 홀린 깊은굴쥐',
'검둥이',
'새끼 사슴',
'불딱정벌레',
'복슬이',
'작은 개구리',
'가젤',
'산토끼',
'말',
'왕두꺼비',
'병든 사슴',
'병든 다람쥐',
'정글 두꺼비',
'크래클의 온도계측장치',
'레이디',
'애벌레',
'용암게',
'구더기',
'물뱀',
'생쥐',
'비글스워스 씨',
'냠냠이',
'노암',
'늙은말 블랑쉬',
'앵무새',
'변이된 돼지',
'해적 보물 트리거',
'역병 걸린 벌레',
'역병 걸린 구더기',
'역병 걸린 쥐',
'역병지대 흰개미',
'변이된 닭',
'변이된 쥐',
'땅다람쥐',
'토끼',
'산양',
'쥐',
'길들인 산양',
'바퀴',
'살로메',
'물고기 떼',
'전갈',
'변이된 양',
'양',
'셴드랄라 위습',
'병든 사슴',
'병든 가젤',
'뱀',
'거미',
'스파이크',
'다람쥐',
'돼지',
'오염된 바퀴벌레',
'오염된 쥐',
'두꺼비',
'순간이동기 기능장애',
'변이된 거북이',
'언더풋',
'엘룬의 음성',
'위습',
}
pfUI_locale["koKR"]["spells"] = {
['"씩씩이" 닭 모습'] = {t=1000, icon="Ability_Racial_BearForm" };
['증오의 독침'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+83
View File
@@ -51,6 +51,89 @@ pfUI_locale["ruRU"]["customcast"] = {
["MULTISHOT"] = "Залп",
}
pfUI_locale["ruRU"]["critters"] = {
'Аспид',
'Баран',
'Белка',
'Белка в клетке',
'Болотная гадюка',
'Больная газель',
'Больной олень',
'Бурая луговая собачка',
'Газель',
'Голос Элуны',
'Грызунчик',
'Ездовой баран',
'Жаба',
'Жаба в клетке',
'Желчная жаба',
'Жук',
'Зараженная белка',
'Зараженный олень',
'Заяц',
'Змея',
'Исцеленная газель',
'Исцеленный олень',
'Клео',
'Клык',
'Корова',
'Косяк рыбы',
'Кошка',
'Кролик',
'Кролик в клетке',
'Крыса',
'Крыса Недр',
'Крыса-полиморф',
'Курица',
'Курица в полиморфе',
'Лавовый краб',
'Леди',
'Личинка',
'Лошадь',
'Луговая собачка',
'Лягушка',
'Мистер Бигглсуорт',
'Мышь',
'Неисправный транспортер',
'Нетронь',
'Нечистая крыса',
'Нечистый таракан',
'Овца',
'Овца в клетке',
'Огненный жук',
'Огонек',
'Огромная жаба',
'Олененок',
'Олень',
'Паук',
'Пиратский клад инициатор – существо',
'Подземная крыса',
'Пойманная подземная крыса',
'Попугай',
'Пушок',
'Салом',
'Свинья',
'Скорпион',
'Собака',
'Старая Савраска',
'Таракан',
'Термит Чумных земель',
'Термометр Кракла',
'Точка маршрута (Только ГМ может увидеть это)',
'Тропическая жаба',
'Хват',
'Червь',
'Чердачный нетопырь',
'Черепаха',
'Черная крыса',
'Чумная блоха',
'Чумная крыса',
'Чумной червь',
'Шендраларский огонек',
'Шмыг',
'Эфси',
}
pfUI_locale["ruRU"]["spells"] = {
['"Отчаянный" снова принимает облик цыпленка"'] = {t=1000, icon="Ability_Racial_BearForm" };
['Плевок мясника'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+79
View File
@@ -51,6 +51,85 @@ pfUI_locale["zhCN"]["customcast"] = {
["MULTISHOT"] = "多重射击",
}
pfUI_locale["zhCN"]["critters"] = {
'丛林蟾蜍',
'乳牛',
'伊露恩之音',
'克拉兰克的温度计',
'克莱奥',
'兔子',
'利牙',
'喵喵',
'噬鱼蛇',
'大蟾蜍',
'奶牛',
'安德弗特',
'小乌龟',
'小猪',
'小精灵',
'小绵羊',
'小鹿',
'尼波斯',
'山羊',
'斯派克',
'松鼠',
'棕色土拨鼠',
'毕勾沃斯先生',
'火甲虫',
'熔岩蟹',
'熔核鼠',
'狗',
'猪',
'猫',
'生病的瞪羚',
'生病的鹿',
'甲壳虫',
'瘟疫白蚁',
'瘟疫虫',
'瘟疫蛆',
'瘟疫鼠',
'瞪羚',
'矿道老鼠',
'笼中的兔子',
'笼中的松鼠',
'笼中的绵羊',
'笼中的蟾蜍',
'绵羊',
'老马布兰契',
'老鼠',
'腐化蟑螂',
'腐化鼠',
'草原土拨鼠',
'萨罗米',
'蛇',
'蜘蛛',
'蝎子',
'蝰蛇',
'蟑螂',
'蟾蜍',
'被感染的松鼠',
'被感染的鹿',
'被控制的矿道老鼠',
'被治愈的瞪羚',
'被治愈的鹿',
'诺拉姆',
'路径点(只有GM可见)',
'辛德拉小精灵',
'野兔',
'钟楼蝙蝠',
'长毛兔',
'雷蒂',
'青蛙',
'马',
'骑乘用山羊',
'鱼群',
'鸡',
'鹦鹉',
'鹿',
'黄蟾蜍',
'黑老鼠',
}
pfUI_locale["zhCN"]["spells"] = {
['"Plucky" Resumes Chicken Form'] = {t=1000, icon="Ability_Racial_BearForm" };
['憎恶喷吐'] = {t=2500, icon="Spell_Nature_CorrosiveBreath" };
+2
View File
@@ -137,6 +137,7 @@ pfUI_translation["deDE"] = {
["Enable Micro Bar"] = nil,
["Enable Mouselook With Right Click"] = nil,
["Enable Offscreen Frame Positions"] = nil,
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = nil,
["Enable Pixel Perfect (Native Resolution)"] = nil,
["Enable Power Color in Text"] = nil,
@@ -176,6 +177,7 @@ pfUI_translation["deDE"] = {
["Health - Missing"] = nil,
["Health - Percentage"] = nil,
["Hide Channel Names"] = nil,
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = nil,
["Hoverbind"] = nil,
["Icon Size"] = nil,
+3 -1
View File
@@ -1,4 +1,4 @@
pfUI_translation["enGB"] = {
pfUI_translation["enUS"] = {
["40y-Range Check Interval"] = nil,
["Abbreviate Numbers (4200 -> 4.2k)"] = nil,
["Action Bar Border Size"] = nil,
@@ -137,6 +137,7 @@ pfUI_translation["enGB"] = {
["Enable Micro Bar"] = nil,
["Enable Mouselook With Right Click"] = nil,
["Enable Offscreen Frame Positions"] = nil,
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = nil,
["Enable Pixel Perfect (Native Resolution)"] = nil,
["Enable Power Color in Text"] = nil,
@@ -176,6 +177,7 @@ pfUI_translation["enGB"] = {
["Health - Missing"] = nil,
["Health - Percentage"] = nil,
["Hide Channel Names"] = nil,
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = nil,
["Hoverbind"] = nil,
["Icon Size"] = nil,
+6 -4
View File
@@ -1,8 +1,8 @@
pfUI_translation["frFR"] = {
["40y-Range Check Interval"] = "Intervalle de vérification de la portée (40m)",
["Abbreviate Numbers (4200 -> 4.2k)"] = "Nombre abrégés (4200 -> 4.2k)",
["Action Bar Border Size"] = "Taille de la bordure de la barre d'action",
["Actionbar"] = "Barre d'action",
["Action Bar Border Size"] = "Taille de la bordure de la barre d'action",
["Aggressive 40y-Range Check (Will break stuff)"] = "Vérification aggressive de la portée (fortement déconseillé)",
["Alt-Click Action"] = "Action de Alt+Clic",
["Always Show Experience And Reputation Bar"] = "Toujours afficher les barres d'expérience et de réputations",
@@ -25,8 +25,8 @@ pfUI_translation["frFR"] = {
["Buff Size"] = "Taille des améliorations",
["Buffs Per Row"] = "Nombre d'améliorations par ligne",
["Cache"] = "Cache",
["Castbar Height"] = "Hauteur de la barre d'incantation",
["Castbar"] = "Barre d'incantation",
["Castbar Height"] = "Hauteur de la barre d'incantation",
["Casting Color"] = "Couleur de l'incantation",
["Center Text"] = "Centrer le texte",
["|cff33ffccBlizzard: \"Interface Options\"|r\n\nDo you want me to setup the recommended blizzard UI settings?\nThis will enable settings that can be found in the Interface section of your client.\nOptions like Buff Durations, Instant Quest Text, Auto Selfcast and others will be set."] = "|cff33ffccBlizzard: \"Options d'Interface\"|r\n\nVoulez-vous que le logiciel vous paramètre les options d'interface recommandées ?\nSi oui, cela va choisir les options d'interface par défaut de votre client.\nLes options comme la durée des améliorations, le texte instantané des quêtes, lancer sur soi par défaut et d'autres vont être activées.",
@@ -75,12 +75,12 @@ pfUI_translation["frFR"] = {
["Disable All UIErrors"] = "Désactiver tout les messages d'erreur liés à l'UI",
["Disable Blizzard Castbar"] = "Désactiver la barre d'incantation d'origine",
["Disabled"] = "Désactivé",
["Disable"] = "Désactiver",
["Disable Item Quality Color For \"Common\" Items"] = "Désactiver la couleur de qualité pour les objets de type\"Commun\"",
["Disable Loot Confirmation Dialog (Without Group)"] = "Désactiver la boîte de dialogue de confirmation du butin (hors groupe)",
["Disable Minimap Buffs"] = "Désactiver les améliorations à côté de la minicarte",
["Disable Minimap Weapon Buffs"] = "Désactiver les améliorations des armes à côté de la carte",
["Disable Module"] = "Désactiver le module",
["Disable"] = "Désactiver",
["Disable pfUI Player Castbar"] = "Désactiver la barre d'incantation pfUI",
["Disable pfUI Target Castbar"] = "Désactiver la barre d'incantation de la cible pfUI",
["Disable pfUI Unit Frames"] = "Désactiver les cadres d'unité pfUI",
@@ -137,6 +137,7 @@ pfUI_translation["frFR"] = {
["Enable Micro Bar"] = "Activer la barre des menus miniature",
["Enable Mouselook With Right Click"] = "Activer le déplacement de la caméra avec le clic droit",
["Enable Offscreen Frame Positions"] = "Activer le positionnement des cadres en dehors de l'écran",
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = "Activer les couleurs pastel",
["Enable Pixel Perfect (Native Resolution)"] = "Activer le Pixel Parfait (en résolutions natives)",
["Enable Power Color in Text"] = "Activer la couleur du mana/rage/énergie sur le texte",
@@ -168,14 +169,15 @@ pfUI_translation["frFR"] = {
["Health - Auto"] = "Points de vie - Automatique",
["Healthbar Animation Speed"] = "Vitesse de l'animation des barres de vie",
["Healthbar Embedded"] = "Barres de vies intégrées",
["Healthbar Height"] = "Hauteur des barres de vies",
["Health Bar Height"] = "Hauteur de la barre de vie",
["Healthbar Height"] = "Hauteur des barres de vies",
["Health Bar Width"] = "Largeur de la barre de vie",
["Health - Current"] = "Points de vie - Actuels",
["Health - Max"] = "Points de vie - Max",
["Health - Missing"] = "Points de vies - Manquants",
["Health - Percentage"] = "Points de vies - Pourcentage",
["Hide Channel Names"] = "Cacher le nom des canaux",
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = "Cacher le cadre de Groupe en raid",
["Hoverbind"] = "Mode Raccourcis",
["Icon Size"] = "Taille des icônes",
+13 -11
View File
@@ -1,8 +1,8 @@
pfUI_translation["koKR"] = {
["40y-Range Check Interval"] = "40야드 거리 검사 간격",
["Abbreviate Numbers (4200 -> 4.2k)"] = "체력수치 약어 (4200 -> 4.2k)",
["Action Bar Border Size"] = "액션바 테두리 크기",
["Actionbar"] = "액션바",
["Action Bar Border Size"] = "액션바 테두리 크기",
["Aggressive 40y-Range Check (Will break stuff)"] = "공격적인 40야드 거리 체크(will break stuff)",
["Alt-Click Action"] = "알트-클릭 액션",
["Always Show Experience And Reputation Bar"] = "항상 경험치바와 평판바 보기",
@@ -25,8 +25,8 @@ pfUI_translation["koKR"] = {
["Buff Size"] = "버프 크기",
["Buffs Per Row"] = "행당 버프 갯수",
["Cache"] = "캐쉬",
["Castbar Height"] = "캐스트바 높이",
["Castbar"] = "캐스트바",
["Castbar Height"] = "캐스트바 높이",
["Casting Color"] = "캐스트바 색상",
["Center Text"] = "가운데 텍스트",
["|cff33ffccBlizzard: \"Interface Options\"|r\n\nDo you want me to setup the recommended blizzard UI settings?\nThis will enable settings that can be found in the Interface section of your client.\nOptions like Buff Durations, Instant Quest Text, Auto Selfcast and others will be set."] = "|cff33ffcc블리자드: \"인터페이스 옵션\"|r\n\n내가 권장하는 블리자드 UI 설정을 설치하길 원하십니까?\n이렇게하면 클라이언트의 인터페이스 섹션에서 찾을 수 있는 설정이 활성화됩니다.\n버프 기간, 인스턴트 퀘스트 텍스트, 자동 셀프 캐스트 및 기타 옵션이 설정됩니다.",
@@ -37,10 +37,10 @@ pfUI_translation["koKR"] = {
["|cff33ffccUnlock Mode|r\nThis mode allows you to move frames by dragging them using the mouse cursor. Frames can be scaled by scrolling up and down.\nTo scale multiple frames at once (eg. raidframes), hold down the shift key while scrolling. Click into an empty space to go back to the pfUI menu."] = "|cff33ffcc잠금 해체 모드|r\n이 모드에서는 마우스 커서를 사용하여 프레임을 드래그하여 이동할 수 있습니다. 프레임은 위아래로 스크롤하여 크기를 조정할 수 있습니다.\n한 번에 여러 프레임을 조정하려면 (예 : 레이드프레임), 스크롤하는 동안 Shift키를 누르고 계십시오. 빈 공간을 클릭하면 pfUI 메뉴로 돌아갑니다.",
["|cffff5555EVERYTHING"] = "|cffff5555모두(전체)",
["Channeling Color"] = "채널링 색상",
["Chat"] = "채팅",
["Chat Background Color"] = "채팅 바탕 색상",
["Chat Border Color"] = "채팅 테두리 색상",
["Chat Border Size"] = "채팅 테두리 크기",
["Chat"] = "채팅",
["Class"] = "클래스(직업)",
["CleanUp"] = "CleanUp(가방&은행 자동정렬)",
["Click Action"] = "클릭 액션",
@@ -51,12 +51,12 @@ pfUI_translation["koKR"] = {
["Combat Timer"] = "전투 타이머",
["Combopoint Size"] = "콤보포인트 크기",
["Configuration"] = "구성",
["Cooldown"] = "쿨다운",
["Cooldown Color (Days)"] = "재사용 대기시간 컬러(일)",
["Cooldown Color (Hours)"] = "재사용 대기시간 컬러(시간)",
["Cooldown Color (Less than 3 Sec)"] = "재사용 대기시간 컬러(3초전)",
["Cooldown Color (Minutes)"] = "재사용 대기시간 컬러(분)",
["Cooldown Color (Seconds)"] = "재사용 대기시간 컬러(초)",
["Cooldown"] = "쿨다운",
["Cooldown Text Font Size"] = "재사용 대기시간 텍스트 폰트 크기",
["Cooldown Text Threshold"] = "재사용 대기시간 텍스트 임계 값",
["Create Profile"] = "프로파일 생성",
@@ -72,6 +72,7 @@ pfUI_translation["koKR"] = {
["Default"] = "기본",
["Delete profile"] = "프로파일 삭제",
["Delete / Reset"] = "지우기/초기화",
["Disable"] = "가리기",
["Disable All UIErrors"] = "모든 UI오류 비활성화",
["Disable Blizzard Castbar"] = "블리자드 캐스트바 사용 중지",
["Disabled"] = "가리기",
@@ -80,7 +81,6 @@ pfUI_translation["koKR"] = {
["Disable Minimap Buffs"] = "미니맵 옆 버프 비활성화",
["Disable Minimap Weapon Buffs"] = "미니맵 옆 무기버프 비활성화",
["Disable Module"] = "모듈 비활성화",
["Disable"] = "가리기",
["Disable pfUI Player Castbar"] = "pfUI 플레이어 캐스트바 비활성화",
["Disable pfUI Target Castbar"] = "pfUI 대상 캐스트바 비활성화",
["Disable pfUI Unit Frames"] = "pfUI 유닛프레임 비활성화",
@@ -137,6 +137,7 @@ pfUI_translation["koKR"] = {
["Enable Micro Bar"] = "미니바 보기(블리자드 마이크로바)",
["Enable Mouselook With Right Click"] = "오른쪽 클릭 Mouselook 사용",
["Enable Offscreen Frame Positions"] = "오프스크린 프레임 위치 활성화",
["Enable Overlap"] = "겹쳐서 표시",
["Enable Pastel Colors"] = "파스텔 색상 사용",
["Enable Pixel Perfect (Native Resolution)"] = "픽셀에 맞춰 이동 사용(기본 해상도) 활성화",
["Enable Power Color in Text"] = "텍스트에 기력(마나)색상 사용",
@@ -159,8 +160,8 @@ pfUI_translation["koKR"] = {
["General"] = "일반 설정",
["Global Border Size"] = "글로벌 테두리 크기",
["Gold"] = "골드",
["Group Frames"] = "파티 프레임",
["Group"] = "파티",
["Group Frames"] = "파티 프레임",
["Group-Pet"] = "파티-팻",
["Group-Target"] = "파티-타켓",
["Guild Online"] = "접속중인 길드원",
@@ -176,6 +177,7 @@ pfUI_translation["koKR"] = {
["Health - Missing"] = "체력-손실",
["Health - Percentage"] = "체력-퍼센트",
["Hide Channel Names"] = "채널 이름 숨기기",
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = "레이드 전환시 파티프레임 숨기기",
["Hoverbind"] = "단축키 설정",
["Icon Size"] = "아이콘 크기",
@@ -187,10 +189,10 @@ pfUI_translation["koKR"] = {
["Item Durability"] = "아이템 내구도",
["KLH Threat Meter"] = "KLH Threat Meter(어그로 미터기)",
["Layout"] = "레이아웃",
["Left"] = "왼쪽",
["Left Actionbar (BottomRight)"] = "왼쪽 액션바(오른쪽 하단)",
["Left Chat Height"] = "왼쪽 채팅창 높이",
["Left Chat Width"] = "왼쪽 채팅창 넓이",
["Left"] = "왼쪽",
["Left Panel: Center"] = "왼쪽 패널: 가운데",
["Left Panel: Left"] = "왼쪽 패널: 좌측",
["Left Panel: Right"] = "왼쪽 패널: 우측",
@@ -211,10 +213,10 @@ pfUI_translation["koKR"] = {
["Nameplate Width"] = "상바 넓이",
["Only Show Indicators for Dispellable Debuffs"] = "해체 가능한 디버프에 대한 표시만 보기",
["Other Panel: Minimap"] = "나머지 패널:미니맵",
["Panel Border Size"] = "패널 테두리 크기",
["Panel"] = "패널",
["Pet Bar (BarPet)"] = "팻바(BarPet)",
["Panel Border Size"] = "패널 테두리 크기",
["Pet"] = "팻",
["Pet Bar (BarPet)"] = "팻바(BarPet)",
["pfUI Settings"] = "pfUI 설정",
["Player"] = "플레이어",
["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "새 프로필의 이름을 입력하십시오.\n동일한 이름을 작성하면 기존 프로파일을 덮어 씁니다.",
@@ -222,14 +224,14 @@ pfUI_translation["koKR"] = {
["Portrait Position"] = "초상화 위치",
["Power Bar Height"] = "마나(기력)바 높이",
["Profile"] = "프로파일",
["Raid Icon Size"] = "레이드 아이콘 크기",
["Raid"] = "레이드",
["Raid Icon Size"] = "레이드 아이콘 크기",
["Range Display Color"] = "스킬 거리 색상 표시",
["Right"] = "오른쪽",
["Right Actionbar (Right)"] = "오른쪽 액션바(오른쪽)",
["Right Chat Height"] = "오른쪽 채팅창 높이",
["Right Chat Width"] = "오른쪽 채팅창 넓이",
["Right Click Auto Attack Threshold"] = "자동공격 임계 값을 마우스 오른쪽버튼 클릭",
["Right"] = "오른쪽",
["Right Panel: Center"] = "오른쪽 패널:가운데",
["Right Panel: Left"] = "오른쪽 패널:좌측",
["Right Panel: Right"] = "오른쪽 패널:우측",
+2
View File
@@ -137,6 +137,7 @@ pfUI_translation["ruRU"] = {
["Enable Micro Bar"] = nil,
["Enable Mouselook With Right Click"] = nil,
["Enable Offscreen Frame Positions"] = nil,
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = nil,
["Enable Pixel Perfect (Native Resolution)"] = nil,
["Enable Power Color in Text"] = nil,
@@ -176,6 +177,7 @@ pfUI_translation["ruRU"] = {
["Health - Missing"] = nil,
["Health - Percentage"] = nil,
["Hide Channel Names"] = nil,
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = nil,
["Hoverbind"] = nil,
["Icon Size"] = nil,
+13 -11
View File
@@ -47,8 +47,8 @@ pfUI_translation["zhCN"] = {
["Clickcast Spells"] = "点击施法",
["Clock"] = "时间",
["Close"] = "关闭",
["Combat"] = "战斗报警",
["Combat Timer"] = "战斗计时器",
["Combat"] = "战斗报警",
["Combopoint Size"] = "连击点大小",
["Configuration"] = "配置",
["Cooldown Color (Days)"] = "技能冷却时间颜色[天]",
@@ -56,9 +56,9 @@ pfUI_translation["zhCN"] = {
["Cooldown Color (Less than 3 Sec)"] = "技能冷却时间颜色[少于3秒]",
["Cooldown Color (Minutes)"] = "技能冷却时间颜色[分]",
["Cooldown Color (Seconds)"] = "技能冷却时间颜色[秒]",
["Cooldown"] = "冷却时间",
["Cooldown Text Font Size"] = "技能冷却时间文字大小",
["Cooldown Text Threshold"] = "技能冷却时间文字临界值",
["Cooldown"] = "冷却时间",
["Create Profile"] = "新建配置",
["Ctrl-Click Action"] = "CTRL点击操作",
["Cursor"] = "鼠标跟随",
@@ -80,10 +80,10 @@ pfUI_translation["zhCN"] = {
["Disable Minimap Buffs"] = "隐藏系统BUFF图标",
["Disable Minimap Weapon Buffs"] = "隐藏系统武器Buff图标",
["Disable Module"] = "禁用 ",
["Disable"] = "禁用",
["Disable pfUI Player Castbar"] = "隐藏玩家施法条",
["Disable pfUI Target Castbar"] = "隐藏目标施法条",
["Disable pfUI Unit Frames"] = "禁用头像框架",
["Disable"] = "禁用",
["Display Focus Frame"] = "启用焦点目标模块",
["Display Group Frames"] = "启用小队模块",
["Display Group Pet Frames"] = "启用小队宠物模块",
@@ -114,9 +114,9 @@ pfUI_translation["zhCN"] = {
["Enable Chat Dock"] = "显示聊天窗口停靠栏",
["Enable Chat Fade"] = "聊天记录淡出",
["Enable Class Color in Text"] = "启用职业文字颜色样式",
["Enable Class Colors"] = "使用职业颜色",
["Enable Class Colors On Enemies"] = "显示敌军职业颜色",
["Enable Class Colors On Friends"] = "显示友军职业颜色",
["Enable Class Colors"] = "使用职业颜色",
["Enable Clickcast"] = "启用点击施法",
["Enable Clickthrough"] = "启用点击",
["Enable Combat Glow Effects On Group Frames"] = "在小队显示战斗报警",
@@ -137,6 +137,7 @@ pfUI_translation["zhCN"] = {
["Enable Micro Bar"] = "显示菜单栏",
["Enable Mouselook With Right Click"] = "启动右键移动镜头",
["Enable Offscreen Frame Positions"] = "启用屏幕框架固定",
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = "使用轻淡柔和的色彩头像",
["Enable Pixel Perfect (Native Resolution)"] = "启用UI缩放",
["Enable Power Color in Text"] = "启用能量值文字颜色样式",
@@ -160,9 +161,9 @@ pfUI_translation["zhCN"] = {
["Global Border Size"] = "全局边框大小",
["Gold"] = "金钱",
["Group Frames"] = "队伍框架",
["Group"] = "小队",
["Group-Pet"] = "小队宠物",
["Group-Target"] = "小队目标",
["Group"] = "小队",
["Guild Online"] = "公会在线",
["HealComm"] = "HealComm",
["Health - Auto"] = "动态生命值和百分比",
@@ -176,6 +177,7 @@ pfUI_translation["zhCN"] = {
["Health - Missing"] = "失去的生命值",
["Health - Percentage"] = "生命值百分比",
["Hide Channel Names"] = "隐藏频道名称",
["Hide Critters"] = nil,
["Hide Group Frames When In A Raid"] = "在团队框架下隐藏小队框架",
["Hoverbind"] = "悬停设置",
["Icon Size"] = "图标大小",
@@ -190,11 +192,11 @@ pfUI_translation["zhCN"] = {
["Left Actionbar (BottomRight)"] = "右下方动作条",
["Left Chat Height"] = "左侧聊天窗口高度",
["Left Chat Width"] = "左侧聊天窗口宽度",
["Left"] = "左边",
["Left Panel: Center"] = "左侧面板:中部",
["Left Panel: Left"] = "左侧面板:左侧",
["Left Panel: Right"] = "左侧面板:右侧",
["Left Text"] = "左侧文字",
["Left"] = "左边",
["Level"] = "等级",
["Load profile"] = "加载配置",
["Loot"] = "拾取",
@@ -206,9 +208,9 @@ pfUI_translation["zhCN"] = {
["Mana - Percentage"] = "法力值百分比",
["Minimap"] = "小地图",
["Modules"] = "高级选项",
["Name"] = "名字",
["Nameplates"] = "姓名板",
["Nameplate Width"] = "姓名板高度",
["Name"] = "名字",
["Only Show Indicators for Dispellable Debuffs"] = "只显示可驱散的Debuff",
["Other Panel: Minimap"] = "小地图面板",
["Panel Border Size"] = "面板边框大小",
@@ -229,11 +231,11 @@ pfUI_translation["zhCN"] = {
["Right Chat Height"] = "右侧聊天窗口高度",
["Right Chat Width"] = "右侧聊天窗口宽度",
["Right Click Auto Attack Threshold"] = "镜头移动速度",
["Right"] = "右边",
["Right Panel: Center"] = "右侧面板:中部",
["Right Panel: Left"] = "右侧面板:左侧",
["Right Panel: Right"] = "右侧面板:右侧",
["Right Text"] = "右侧文字",
["Right"] = "右边",
["Save current settings to profile"] = "将当前设置保存到配置文件",
["Save profile"] = "保存配置",
["Scrolling Combat Text Font"] = "战斗信息字体",
@@ -256,16 +258,16 @@ pfUI_translation["zhCN"] = {
["Some settings need to reload the UI to take effect.\nDo you want to reloadUI now?"] = "有些设置需要重新加载UI生效。\n您要重新载入UI吗?",
["Soulshard Counter"] = "灵魂碎片",
["Spacing"] = "血条能量条间隔",
["Standard Text Font"] = "标准字体",
["Standard Text Font Size"] = "标准字体字号",
["Target"] = "目标",
["Standard Text Font"] = "标准字体",
["Target-Target"] = "目标的目标",
["Target"] = "目标",
["Thirdparty"] = "第三方插件接口",
["Timestamp Brackets"] = "时间戳括弧",
["Timestamp Color"] = "时间戳颜色",
["Timestamp Format"] = "时间戳格式",
["Tooltip"] = "鼠标提示框",
["Tooltip Position"] = "鼠标提示框位置",
["Tooltip"] = "鼠标提示框",
["Top"] = "顶部",
["Unit Frame Border Size"] = "头像边框大小",
["Unit Frame Layout"] = "头像框架样式",
+1
View File
@@ -137,6 +137,7 @@ pfUI_translation["zhTW"] = {
["Enable Micro Bar"] = "顯示功能表列",
["Enable Mouselook With Right Click"] = "啟動右鍵移動鏡頭",
["Enable Offscreen Frame Positions"] = "啟用螢幕框架固定",
["Enable Overlap"] = nil,
["Enable Pastel Colors"] = "使用輕淡柔和的色彩頭像",
["Enable Pixel Perfect (Native Resolution)"] = "啟用UI縮放",
["Enable Power Color in Text"] = "啟用能量值文字顏色樣式",
+2
View File
@@ -1428,12 +1428,14 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(this, T["Enable Spellname"], C.nameplates, "spellname", "checkbox")
CreateConfig(this, T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox")
CreateConfig(this, T["Enable Clickthrough"], C.nameplates, "clickthrough", "checkbox")
CreateConfig(this, T["Enable Overlap"], C.nameplates, "overlap", "checkbox")
CreateConfig(this, T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox")
CreateConfig(this, T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold")
CreateConfig(this, T["Enable Class Colors On Enemies"], C.nameplates, "enemyclassc", "checkbox")
CreateConfig(this, T["Enable Class Colors On Friends"], C.nameplates, "friendclassc", "checkbox")
CreateConfig(this, T["Raid Icon Size"], C.nameplates, "raidiconsize")
CreateConfig(this, T["Show Players Only"], C.nameplates, "players", "checkbox")
CreateConfig(this, T["Hide Critters"], C.nameplates, "critters", "checkbox")
CreateConfig(this, T["Show Health Points"], C.nameplates, "showhp", "checkbox")
CreateConfig(this, T["Vertical Position"], C.nameplates, "vpos")
CreateConfig(this, T["Nameplate Width"], C.nameplates, "width")
+366 -292
View File
@@ -3,8 +3,10 @@ pfUI:RegisterModule("nameplates", function ()
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
pfUI.nameplates = CreateFrame("Frame", nil, UIParent)
pfUI.nameplates.players = pfUI_playerDB
pfUI.nameplates.mobs = {}
pfUI.nameplates.targets = {}
pfUI.nameplates.scanqueue = {}
-- catch all nameplates
pfUI.nameplates.scanner = CreateFrame("Frame", "pfNameplateScanner", UIParent)
@@ -12,6 +14,7 @@ pfUI:RegisterModule("nameplates", function ()
pfUI.nameplates.scanner:SetScript("OnUpdate", function()
local parentCount = WorldFrame:GetNumChildren()
-- [[ scan nameplate frames ]]
if pfUI.nameplates.scanner.parentCount < parentCount then
pfUI.nameplates.scanner.parentCount = parentCount
@@ -19,240 +22,390 @@ pfUI:RegisterModule("nameplates", function ()
if not nameplate.done and nameplate:GetObjectType() == "Button" then
local regions = nameplate:GetRegions()
if regions and regions:GetObjectType() == "Texture" and regions:GetTexture() == "Interface\\Tooltips\\Nameplate-Border" then
local visible = nameplate:IsVisible()
nameplate:Hide()
nameplate:SetScript("OnShow", pfUI.nameplates.CreateNameplate)
nameplate:SetScript("OnUpdate", pfUI.nameplates.UpdateNameplate)
nameplate:SetScript("OnShow", pfUI.nameplates.OnShow)
nameplate:SetScript("OnUpdate", pfUI.nameplates.OnUpdate)
nameplate:SetAlpha(1)
if visible then nameplate:Show() end
nameplate.done = true
end
end
end
end
-- [[ scan missing names ]]
for index, name in pairs(pfUI.nameplates.scanqueue) do
-- remove entry if already scanned
if pfUI.nameplates.targets[name] == "OK" then
table.remove(pfUI.nameplates.scanqueue, index)
else
if UnitName("mouseover") == name then
if UnitIsPlayer("mouseover") then
local _, class = UnitClass("mouseover")
pfUI.nameplates.players[name] = {}
pfUI.nameplates.players[name]["mouseover"] = class
elseif UnitClassification("mouseover") then
local elite = UnitClassification("mouseover")
pfUI.nameplates.mobs[name] = elite
end
pfUI.nameplates.targets[name] = "OK"
elseif not UnitName("target") then
TargetByName(name, true)
if UnitIsPlayer("target") then
local _, class = UnitClass("target")
pfUI.nameplates.players[name] = {}
pfUI.nameplates.players[name]["class"] = class
elseif UnitClassification("target") then
local elite = UnitClassification("target")
pfUI.nameplates.mobs[name] = elite
end
pfUI.nameplates.targets[name] = "OK"
ClearTarget()
end
end
end
end)
local plate_width = C.nameplates.width + 50
local plate_height = C.nameplates.heighthealth + font_size + 5
local plate_height_cast = C.nameplates.heighthealth + font_size + 5 + C.nameplates.heightcast + 5
-- Create Nameplate
function pfUI.nameplates:CreateNameplate()
local healthbar = this:GetChildren()
local border, glow, name, level, levelicon , raidicon = this:GetRegions()
function pfUI.nameplates:OnShow()
-- initialize nameplate frames
if not this.nameplate then
this.nameplate = CreateFrame("Button", nil, this)
this.nameplate.parent = this
this.healthbar = this:GetChildren()
this.border, this.glow, this.name, this.level, this.levelicon , this.raidicon = this:GetRegions()
this.healthbar:SetParent(this.nameplate)
this.border:SetParent(this.nameplate)
this.glow:SetParent(this.nameplate)
this.name:SetParent(this.nameplate)
this.level:SetParent(this.nameplate)
this.levelicon:SetParent(this.nameplate)
this.raidicon:SetParent(this.nameplate)
end
-- init
this:SetFrameLevel(0)
this:EnableMouse(false)
-- enable plate overlap
if C.nameplates.overlap == "1" then
this:SetWidth(1)
this:SetHeight(1)
else
this:SetWidth(plate_width * UIParent:GetScale())
this:SetHeight(plate_height * UIParent:GetScale())
end
-- set dimensions
this.nameplate:SetScale(UIParent:GetScale())
this.nameplate:SetWidth(plate_width)
this.nameplate:SetHeight(plate_height)
this.nameplate:SetPoint("TOP", this, "TOP", 0, -tonumber(C.nameplates.vpos))
-- add click handlers
if C.nameplates["clickthrough"] == "0" then
this.nameplate:SetScript("OnClick", function() this.parent:Click() end)
if C.nameplates["rightclick"] == "1" then
this.nameplate:SetScript("OnMouseDown", function()
if arg1 and arg1 == "RightButton" then
MouselookStart()
-- start detection of the rightclick emulation
pfUI.nameplates.emulateRightClick.time = GetTime()
pfUI.nameplates.emulateRightClick.frame = this
pfUI.nameplates.emulateRightClick:Show()
end
end)
end
else
this.nameplate:EnableMouse(false)
end
-- hide default plates
border:Hide()
this.border:Hide()
-- remove glowing
glow:Hide()
glow:SetAlpha(0)
glow.Show = function() return end
this.glow:Hide()
this.glow:SetAlpha(0)
this.glow.Show = function() return end
if C.nameplates.players == "1" then
if not pfUI_playerDB[name:GetText()] or not pfUI_playerDB[name:GetText()]["class"] then
this:Hide()
-- name
this.name:SetFont(font, font_size, "OUTLINE")
this.name:ClearAllPoints()
this.name:SetPoint("TOP", this.nameplate, "TOP", 0, 0)
-- healthbar
this.healthbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
this.healthbar:ClearAllPoints()
this.healthbar:SetPoint("TOP", this.name, "BOTTOM", 0, -3)
this.healthbar:SetWidth(C.nameplates.width)
this.healthbar:SetHeight(C.nameplates.heighthealth)
if not this.healthbar.bg then
this.healthbar.bg = this.healthbar:CreateTexture(nil, "BORDER")
this.healthbar.bg:SetTexture(0,0,0,0.90)
this.healthbar.bg:ClearAllPoints()
this.healthbar.bg:SetPoint("CENTER", this.healthbar, "CENTER", 0, 0)
this.healthbar.bg:SetWidth(this.healthbar:GetWidth() + 3)
this.healthbar.bg:SetHeight(this.healthbar:GetHeight() + 3)
end
this.healthbar.reaction = nil
-- level
this.level:SetFont(font, font_size, "OUTLINE")
this.level:ClearAllPoints()
this.level:SetPoint("RIGHT", this.healthbar, "LEFT", 0, 0)
this.level.needUpdate = true
this.healthbar.needReactionUpdate = true
-- adjust font
this.levelicon:ClearAllPoints()
this.levelicon:SetPoint("RIGHT", this.healthbar, "LEFT", -1, 0)
-- raidtarget
this.raidicon:ClearAllPoints()
this.raidicon:SetWidth(C.nameplates.raidiconsize)
this.raidicon:SetHeight(C.nameplates.raidiconsize)
this.raidicon:SetPoint("CENTER", this.healthbar, "CENTER", 0, -5)
-- add debuff frames
if C.nameplates["showdebuffs"] == "1" then
if this.debuffs == nil then this.debuffs = {} end
for j=1, 16, 1 do
if this.debuffs[j] == nil then
this.debuffs[j] = this:CreateTexture(nil, "BORDER")
this.debuffs[j]:SetTexture(0,0,0,0)
this.debuffs[j]:ClearAllPoints()
this.debuffs[j]:SetWidth(12)
this.debuffs[j]:SetHeight(12)
if j == 1 then
this.debuffs[j]:SetPoint("TOPLEFT", this.healthbar, "BOTTOMLEFT", 0, -3)
elseif j <= 8 then
this.debuffs[j]:SetPoint("LEFT", this.debuffs[j-1], "RIGHT", 1, 0)
elseif j > 8 then
this.debuffs[j]:SetPoint("TOPLEFT", this.debuffs[1], "BOTTOMLEFT", (j-9) * 13, -1)
end
end
end
end
-- set width
this:SetWidth(C.nameplates.width)
-- add castbar
if pfUI.castbar and C.nameplates["showcastbar"] == "1" then
local plate = this
-- healthbar
healthbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
healthbar:ClearAllPoints()
healthbar:SetPoint("TOP", this, "TOP", 0, tonumber(C.nameplates.vpos))
healthbar:SetWidth(this:GetWidth())
healthbar:SetHeight(C.nameplates.heighthealth)
if not this.healthbar.castbar then
this.healthbar.castbar = CreateFrame("StatusBar", nil, this.healthbar)
this.healthbar.castbar:Hide()
this.healthbar.castbar:SetWidth(this.healthbar:GetWidth())
this.healthbar.castbar:SetHeight(C.nameplates.heightcast)
this.healthbar.castbar:SetPoint("TOPLEFT", this.healthbar, "BOTTOMLEFT", 0, -5)
this.healthbar.castbar:SetBackdrop({ bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
insets = {left = -1, right = -1, top = -1, bottom = -1} })
this.healthbar.castbar:SetBackdropColor(0,0,0,1)
this.healthbar.castbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
this.healthbar.castbar:SetStatusBarColor(.9,.8,0,1)
if healthbar.bg == nil then
healthbar.bg = healthbar:CreateTexture(nil, "BORDER")
healthbar.bg:SetTexture(0,0,0,0.90)
healthbar.bg:ClearAllPoints()
healthbar.bg:SetPoint("CENTER", healthbar, "CENTER", 0, 0)
healthbar.bg:SetWidth(healthbar:GetWidth() + 3)
healthbar.bg:SetHeight(healthbar:GetHeight() + 3)
plate.healthbar.castbar:SetScript("OnShow", function()
plate:SetHeight(plate_height_cast * UIParent:GetScale())
plate.nameplate:SetHeight(plate_height_cast)
if plate.debuffs then
plate.debuffs[1]:SetPoint("TOPLEFT", plate.healthbar.castbar, "BOTTOMLEFT", 0, -3)
end
end)
this.healthbar.castbar:SetScript("OnHide", function()
plate:SetHeight(plate_height * UIParent:GetScale())
plate.nameplate:SetHeight(plate_height)
if plate.debuffs then
plate.debuffs[1]:SetPoint("TOPLEFT", plate.healthbar, "BOTTOMLEFT", 0, -3)
end
end)
this.healthbar.castbar.bg = this.healthbar.castbar:CreateTexture(nil, "BACKGROUND")
this.healthbar.castbar.bg:SetTexture(0,0,0,0.90)
this.healthbar.castbar.bg:ClearAllPoints()
this.healthbar.castbar.bg:SetPoint("CENTER", this.healthbar.castbar, "CENTER", 0, 0)
this.healthbar.castbar.bg:SetWidth(this.healthbar.castbar:GetWidth() + 3)
this.healthbar.castbar.bg:SetHeight(this.healthbar.castbar:GetHeight() + 3)
this.healthbar.castbar.text = this.healthbar.castbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
this.healthbar.castbar.text:SetPoint("RIGHT", this.healthbar.castbar, "LEFT")
this.healthbar.castbar.text:SetNonSpaceWrap(false)
this.healthbar.castbar.text:SetFontObject(GameFontWhite)
this.healthbar.castbar.text:SetTextColor(1,1,1,.5)
this.healthbar.castbar.text:SetFont(font, font_size, "OUTLINE")
this.healthbar.castbar.spell = this.healthbar.castbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
this.healthbar.castbar.spell:SetPoint("CENTER", this.healthbar.castbar, "CENTER")
this.healthbar.castbar.spell:SetNonSpaceWrap(false)
this.healthbar.castbar.spell:SetFontObject(GameFontWhite)
this.healthbar.castbar.spell:SetTextColor(1,1,1,1)
this.healthbar.castbar.spell:SetFont(font, font_size, "OUTLINE")
this.healthbar.castbar.icon = this.healthbar.castbar:CreateTexture(nil, "BORDER")
this.healthbar.castbar.icon:ClearAllPoints()
this.healthbar.castbar.icon:SetPoint("BOTTOMLEFT", this.healthbar.castbar, "BOTTOMRIGHT", 5, 0)
this.healthbar.castbar.icon:SetWidth(C.nameplates.heightcast + 5 + C.nameplates.heighthealth)
this.healthbar.castbar.icon:SetHeight(C.nameplates.heightcast + 5 + C.nameplates.heighthealth)
this.healthbar.castbar.icon.bg = this.healthbar.castbar:CreateTexture(nil, "BACKGROUND")
this.healthbar.castbar.icon.bg:SetTexture(0,0,0,0.90)
this.healthbar.castbar.icon.bg:ClearAllPoints()
this.healthbar.castbar.icon.bg:SetPoint("CENTER", this.healthbar.castbar.icon, "CENTER", 0, 0)
this.healthbar.castbar.icon.bg:SetWidth(this.healthbar.castbar.icon:GetWidth() + 3)
this.healthbar.castbar.icon.bg:SetHeight(this.healthbar.castbar.icon:GetHeight() + 3)
end
end
healthbar.reaction = nil
if C.nameplates.showhp == "1" and not this.healthbar.hptext then
this.healthbar.hptext = this.healthbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
this.healthbar.hptext:SetPoint("RIGHT", this.healthbar, "RIGHT")
this.healthbar.hptext:SetNonSpaceWrap(false)
this.healthbar.hptext:SetFontObject(GameFontWhite)
this.healthbar.hptext:SetTextColor(1,1,1,1)
this.healthbar.hptext:SetFont(font, font_size)
end
-- raidtarget
raidicon:ClearAllPoints()
raidicon:SetWidth(C.nameplates.raidiconsize)
raidicon:SetHeight(C.nameplates.raidiconsize)
raidicon:SetPoint("CENTER", healthbar, "CENTER", 0, -5)
if C.nameplates.players == "1" then
if pfUI.nameplates.targets[this.name:GetText()] == "OK" then
if not pfUI.nameplates.players[this.name:GetText()] then this:Hide() end
end
end
-- adjust font
name:SetFont(font, font_size, "OUTLINE")
name:SetPoint("BOTTOM", healthbar, "CENTER", 0, 7)
level:SetFont(font, font_size, "OUTLINE")
level:ClearAllPoints()
level:SetPoint("RIGHT", healthbar, "LEFT", -1, 0)
levelicon:ClearAllPoints()
levelicon:SetPoint("RIGHT", healthbar, "LEFT", -1, 0)
pfUI.nameplates:CreateDebuffs(this)
pfUI.nameplates:CreateCastbar(healthbar)
pfUI.nameplates:CreateHP(healthbar)
this.needNameUpdate = true
this.needClassColorUpdate = true
this.needLevelColorUpdate = true
this.needEliteUpdate = true
this.setup = true
end
function pfUI.nameplates:CreateDebuffs(frame)
if C.nameplates["showdebuffs"] ~= "1" then return end
-- Nameplate OnUpdate
function pfUI.nameplates:OnUpdate()
if not this.setup then pfUI.nameplates:OnShow() return end
if frame.debuffs == nil then frame.debuffs = {} end
for j=1, 16, 1 do
if frame.debuffs[j] == nil then
frame.debuffs[j] = this:CreateTexture(nil, "BORDER")
frame.debuffs[j]:SetTexture(0,0,0,0)
frame.debuffs[j]:ClearAllPoints()
frame.debuffs[j]:SetWidth(12)
frame.debuffs[j]:SetHeight(12)
if j == 1 then
frame.debuffs[j]:SetPoint("TOPLEFT", healthbar, "BOTTOMLEFT", 0, -3)
elseif j <= 8 then
frame.debuffs[j]:SetPoint("LEFT", frame.debuffs[j-1], "RIGHT", 1, 0)
elseif j > 8 then
frame.debuffs[j]:SetPoint("TOPLEFT", frame.debuffs[1], "BOTTOMLEFT", (j-9) * 13, -1)
local healthbar = this.healthbar
local border, glow, name, level, levelicon , raidicon = this.border, this.glow, this.name, this.level, this.levelicon , this.raidicon
-- add scan entry if not existing
if this.needNameUpdate and name:GetText() ~= UNKNOWN then
if not pfUI.nameplates.targets[this.name:GetText()] then
table.insert(pfUI.nameplates.scanqueue, this.name:GetText())
end
this.needNameUpdate = nil
end
-- hide non-player frames
if C.nameplates.players == "1" and not this.needNameUpdate then
if pfUI.nameplates.targets[name:GetText()] == "OK" then
if not pfUI.nameplates.players[name:GetText()] then this:Hide() end
end
end
-- hide critters
if C.nameplates.critters == "1" and not this.needNameUpdate then
local red, green, blue, _ = healthbar:GetStatusBarColor()
local name_val = name:GetText()
for i, critter_val in pairs(L["critters"]) do
if red > 0.9 and green > 0.9 and blue < 0.2 and name_val == critter_val then
this:Hide()
end
end
end
end
function pfUI.nameplates:CreateCastbar(healthbar)
if not pfUI.castbar or not C.nameplates["showcastbar"] == "1" then return end
-- create frames
if healthbar.castbar == nil then
healthbar.castbar = CreateFrame("StatusBar", nil, healthbar)
healthbar.castbar:Hide()
healthbar.castbar:SetWidth(healthbar:GetWidth())
healthbar.castbar:SetHeight(C.nameplates.heightcast)
healthbar.castbar:SetPoint("TOPLEFT", healthbar, "BOTTOMLEFT", 0, -5)
healthbar.castbar:SetBackdrop({ bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
insets = {left = -1, right = -1, top = -1, bottom = -1} })
healthbar.castbar:SetBackdropColor(0,0,0,1)
healthbar.castbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
healthbar.castbar:SetStatusBarColor(.9,.8,0,1)
if healthbar.castbar.bg == nil then
healthbar.castbar.bg = healthbar.castbar:CreateTexture(nil, "BACKGROUND")
healthbar.castbar.bg:SetTexture(0,0,0,0.90)
healthbar.castbar.bg:ClearAllPoints()
healthbar.castbar.bg:SetPoint("CENTER", healthbar.castbar, "CENTER", 0, 0)
healthbar.castbar.bg:SetWidth(healthbar.castbar:GetWidth() + 3)
healthbar.castbar.bg:SetHeight(healthbar.castbar:GetHeight() + 3)
end
if healthbar.castbar.text == nil then
healthbar.castbar.text = healthbar.castbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
healthbar.castbar.text:SetPoint("RIGHT", healthbar.castbar, "LEFT")
healthbar.castbar.text:SetNonSpaceWrap(false)
healthbar.castbar.text:SetFontObject(GameFontWhite)
healthbar.castbar.text:SetTextColor(1,1,1,.5)
healthbar.castbar.text:SetFont(font, font_size - 2, "OUTLINE")
end
if healthbar.castbar.spell == nil then
healthbar.castbar.spell = healthbar.castbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
healthbar.castbar.spell:SetPoint("CENTER", healthbar.castbar, "CENTER")
healthbar.castbar.spell:SetNonSpaceWrap(false)
healthbar.castbar.spell:SetFontObject(GameFontWhite)
healthbar.castbar.spell:SetTextColor(1,1,1,1)
healthbar.castbar.spell:SetFont(font, font_size - 2, "OUTLINE")
end
if healthbar.castbar.icon == nil then
healthbar.castbar.icon = healthbar.castbar:CreateTexture(nil, "BORDER")
healthbar.castbar.icon:ClearAllPoints()
healthbar.castbar.icon:SetPoint("BOTTOMLEFT", healthbar.castbar, "BOTTOMRIGHT", 5, 0)
healthbar.castbar.icon:SetWidth(C.nameplates.heightcast + 5 + C.nameplates.heighthealth)
healthbar.castbar.icon:SetHeight(C.nameplates.heightcast + 5 + C.nameplates.heighthealth)
end
if healthbar.castbar.icon.bg == nil then
healthbar.castbar.icon.bg = healthbar.castbar:CreateTexture(nil, "BACKGROUND")
healthbar.castbar.icon.bg:SetTexture(0,0,0,0.90)
healthbar.castbar.icon.bg:ClearAllPoints()
healthbar.castbar.icon.bg:SetPoint("CENTER", healthbar.castbar.icon, "CENTER", 0, 0)
healthbar.castbar.icon.bg:SetWidth(healthbar.castbar.icon:GetWidth() + 3)
healthbar.castbar.icon.bg:SetHeight(healthbar.castbar.icon:GetHeight() + 3)
end
end
end
function pfUI.nameplates:CreateHP(healthbar)
if C.nameplates.showhp == "1" and not healthbar.hptext then
healthbar.hptext = healthbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
healthbar.hptext:SetPoint("RIGHT", healthbar, "RIGHT")
healthbar.hptext:SetNonSpaceWrap(false)
healthbar.hptext:SetFontObject(GameFontWhite)
healthbar.hptext:SetTextColor(1,1,1,1)
healthbar.hptext:SetFont(font, font_size - 2)
end
end
-- Update Nameplate
function pfUI.nameplates:UpdateNameplate()
if not this.setup then pfUI.nameplates:CreateNameplate() return end
local healthbar = this:GetChildren()
local border, glow, name, level, levelicon , raidicon = this:GetRegions()
-- show indicator for elite/rare mobs
if level:GetText() ~= nil then
if pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "elite" and not string.find(level:GetText(), "+", 1) then
level:SetText(level:GetText() .. "+")
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rareelite" and not string.find(level:GetText(), "R+", 1) then
level:SetText(level:GetText() .. "R+")
elseif pfUI.nameplates.mobs[name:GetText()] and pfUI.nameplates.mobs[name:GetText()] == "rare" and not string.find(level:GetText(), "R", 1) then
level:SetText(level:GetText() .. "R")
-- level elite indicator
if this.needEliteUpdate and pfUI.nameplates.mobs[name:GetText()] then
if level:GetText() ~= nil then
if pfUI.nameplates.mobs[name:GetText()] == "elite" then
level:SetText(level:GetText() .. "+")
elseif pfUI.nameplates.mobs[name:GetText()] == "rareelite" then
level:SetText(level:GetText() .. "R+")
elseif pfUI.nameplates.mobs[name:GetText()] == "rare" then
level:SetText(level:GetText() .. "R")
end
end
this.needEliteUpdate = nil
end
if C.nameplates.players == "1" then
if not pfUI_playerDB[name:GetText()] or not pfUI_playerDB[name:GetText()]["class"] then
this:Hide()
-- level colors
if this.needLevelColorUpdate then
local red, green, blue, _ = level:GetTextColor()
if red > 0.99 and green == 0 and blue == 0 then
level:SetTextColor(1,0.4,0.2,0.85)
elseif red > 0.99 and green > 0.81 and green < 0.82 and blue == 0 then
level:SetTextColor(1,1,1,0.85)
end
this.needLevelColorUpdate = nil
end
pfUI.nameplates:UpdatePlayer(name)
pfUI.nameplates:UpdateColors(name, level, healthbar)
pfUI.nameplates:UpdateCastbar(this, name, healthbar)
pfUI.nameplates:UpdateDebuffs(this, healthbar)
pfUI.nameplates:UpdateHP(healthbar)
pfUI.nameplates:UpdateClickHandler(this)
end
function pfUI.nameplates:UpdatePlayer(name)
local name = name:GetText()
-- target
if not pfUI_playerDB[name] and pfUI.nameplates.targets[name] == nil and UnitName("target") == nil then
TargetByName(name, true)
if UnitIsPlayer("target") then
local _, class = UnitClass("target")
pfUI_playerDB[name] = {}
pfUI_playerDB[name]["class"] = class
elseif UnitClassification("target") ~= "normal" then
local elite = UnitClassification("target")
pfUI.nameplates.mobs[name] = elite
-- healtbar: update colors
local red, green, blue, _ = healthbar:GetStatusBarColor()
if red ~= healthbar.wantR or green ~= healthbar.wantG or blue ~= healthbar.wantB then
-- set reaction color
-- reaction: 0 enemy ; 1 neutral ; 2 player ; 3 npc
if red > 0.9 and green < 0.2 and blue < 0.2 then
healthbar.reaction = 0
healthbar:SetStatusBarColor(.9,.2,.3,0.8)
elseif red > 0.9 and green > 0.9 and blue < 0.2 then
healthbar.reaction = 1
healthbar:SetStatusBarColor(1,1,.3,0.8)
elseif ( blue > 0.9 and red == 0 and green == 0 ) then
healthbar.reaction = 2
healthbar:SetStatusBarColor(0.2,0.6,1,0.8)
elseif red == 0 and green > 0.99 and blue == 0 then
healthbar.reaction = 3
healthbar:SetStatusBarColor(0.6,1,0,0.8)
end
pfUI.nameplates.targets[name] = "OK"
ClearTarget()
healthbar.wantR, healthbar.wantG, healthbar.wantB = healthbar:GetStatusBarColor()
end
-- mouseover
if not pfUI_playerDB[name] and pfUI.nameplates.targets[name] == nil and UnitName("mouseover") == name then
if UnitIsPlayer("mouseover") then
local _, class = UnitClass("mouseover")
pfUI_playerDB[name] = {}
pfUI_playerDB[name]["class"] = class
elseif UnitClassification("mouseover") ~= "normal" then
local elite = UnitClassification("mouseover")
pfUI.nameplates.mobs[name] = elite
-- add class colors
if this.needClassColorUpdate and pfUI.nameplates.targets[name:GetText()] == "OK" then
-- show class names?
if healthbar.reaction == 0 then
if C.nameplates["enemyclassc"] == "1"
and pfUI_playerDB[name:GetText()]
and pfUI_playerDB[name:GetText()]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]]
then
healthbar:SetStatusBarColor(
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].b,
0.9)
end
elseif healthbar.reaction == 2 then
if C.nameplates["friendclassc"] == "1"
and pfUI_playerDB[name:GetText()]
and pfUI_playerDB[name:GetText()]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]]
then
healthbar:SetStatusBarColor(
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].r,
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].g,
RAID_CLASS_COLORS[pfUI_playerDB[name:GetText()]["class"]].b,
0.9)
end
end
pfUI.nameplates.targets[name] = "OK"
end
end
function pfUI.nameplates:UpdateColors(name, level, healthbar)
healthbar.wantR, healthbar.wantG, healthbar.wantB = healthbar:GetStatusBarColor()
this.needClassColorUpdate = nil
end
-- name color
local red, green, blue, _ = name:GetTextColor()
if red > 0.99 and green == 0 and blue == 0 then
@@ -261,64 +414,8 @@ pfUI:RegisterModule("nameplates", function ()
name:SetTextColor(1,1,1,0.85)
end
-- level colors
local red, green, blue, _ = level:GetTextColor()
if red > 0.99 and green == 0 and blue == 0 then
level:SetTextColor(1,0.4,0.2,0.85)
elseif red > 0.99 and green > 0.81 and green < 0.82 and blue == 0 then
level:SetTextColor(1,1,1,0.85)
end
-- healthbar color
-- reaction: 0 enemy ; 1 neutral ; 2 player ; 3 npc
local red, green, blue, _ = healthbar:GetStatusBarColor()
if red > 0.9 and green < 0.2 and blue < 0.2 then
healthbar.reaction = 0
healthbar:SetStatusBarColor(.9,.2,.3,0.8)
elseif red > 0.9 and green > 0.9 and blue < 0.2 then
healthbar.reaction = 1
healthbar:SetStatusBarColor(1,1,.3,0.8)
elseif ( blue > 0.9 and red == 0 and green == 0 ) then
healthbar.reaction = 2
healthbar:SetStatusBarColor(0.2,0.6,1,0.8)
elseif red == 0 and green > 0.99 and blue == 0 then
healthbar.reaction = 3
healthbar:SetStatusBarColor(0.6,1,0,0.8)
end
local name = name:GetText()
if healthbar.reaction == 0 then
if C.nameplates["enemyclassc"] == "1"
and pfUI_playerDB[name]
and pfUI_playerDB[name]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]]
then
healthbar:SetStatusBarColor(
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].r,
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].g,
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].b,
0.9)
end
elseif healthbar.reaction == 2 then
if C.nameplates["friendclassc"] == "1"
and pfUI_playerDB[name]
and pfUI_playerDB[name]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]]
then
healthbar:SetStatusBarColor(
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].r,
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].g,
RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]].b,
0.9)
end
end
end
function pfUI.nameplates:UpdateCastbar(frame, name, healthbar)
if not healthbar.castbar then return end
-- show castbar
if pfUI.castbar and C.nameplates["showcastbar"] == "1" and pfUI.castbar.target.casterDB[name:GetText()] ~= nil and pfUI.castbar.target.casterDB[name:GetText()]["cast"] ~= nil then
if healthbar.castbar and pfUI.castbar and C.nameplates["showcastbar"] == "1" and pfUI.castbar.target.casterDB[name:GetText()] ~= nil and pfUI.castbar.target.casterDB[name:GetText()]["cast"] ~= nil then
if pfUI.castbar.target.casterDB[name:GetText()]["starttime"] + pfUI.castbar.target.casterDB[name:GetText()]["casttime"] <= GetTime() then
pfUI.castbar.target.casterDB[name:GetText()] = nil
healthbar.castbar:Hide()
@@ -332,8 +429,8 @@ pfUI:RegisterModule("nameplates", function ()
healthbar.castbar.spell:SetText("")
end
healthbar.castbar:Show()
if frame.debuffs then
frame.debuffs[1]:SetPoint("TOPLEFT", healthbar.castbar, "BOTTOMLEFT", 0, -3)
if this.debuffs then
this.debuffs[1]:SetPoint("TOPLEFT", healthbar.castbar, "BOTTOMLEFT", 0, -3)
end
if pfUI.castbar.target.casterDB[name:GetText()]["icon"] then
@@ -343,35 +440,33 @@ pfUI:RegisterModule("nameplates", function ()
end
else
healthbar.castbar:Hide()
if frame.debuffs then
frame.debuffs[1]:SetPoint("TOPLEFT", healthbar, "BOTTOMLEFT", 0, -3)
if this.debuffs then
this.debuffs[1]:SetPoint("TOPLEFT", healthbar, "BOTTOMLEFT", 0, -3)
end
end
end
function pfUI.nameplates:UpdateDebuffs(frame, healthbar)
if not frame.debuffs or C.nameplates["showdebuffs"] ~= "1" then return end
if UnitExists("target") and healthbar:GetAlpha() == 1 then
local j = 1
local k = 1
for j, e in ipairs(pfUI.nameplates.debuffs) do
frame.debuffs[j]:SetTexture(pfUI.nameplates.debuffs[j])
frame.debuffs[j]:SetTexCoord(.078, .92, .079, .937)
frame.debuffs[j]:SetAlpha(0.9)
k = k + 1
end
for j = k, 16, 1 do
frame.debuffs[j]:SetTexture(nil)
end
elseif frame.debuffs then
for j = 1, 16, 1 do
frame.debuffs[j]:SetTexture(nil)
-- update debuffs
if this.debuffs and C.nameplates["showdebuffs"] ~= "1" then
if UnitExists("target") and healthbar:GetAlpha() == 1 then
local j = 1
local k = 1
for j, e in ipairs(pfUI.nameplates.debuffs) do
this.debuffs[j]:SetTexture(pfUI.nameplates.debuffs[j])
this.debuffs[j]:SetTexCoord(.078, .92, .079, .937)
this.debuffs[j]:SetAlpha(0.9)
k = k + 1
end
for j = k, 16, 1 do
this.debuffs[j]:SetTexture(nil)
end
elseif this.debuffs then
for j = 1, 16, 1 do
this.debuffs[j]:SetTexture(nil)
end
end
end
end
function pfUI.nameplates:UpdateHP(healthbar)
-- show hp text
if C.nameplates.showhp == "1" and healthbar.hptext then
local min, max = healthbar:GetMinMaxValues()
local cur = healthbar:GetValue()
@@ -379,27 +474,6 @@ pfUI:RegisterModule("nameplates", function ()
end
end
function pfUI.nameplates:UpdateClickHandler(frame)
-- enable clickthrough
if C.nameplates["clickthrough"] == "0" then
frame:EnableMouse(true)
if C.nameplates["rightclick"] == "1" then
frame:SetScript("OnMouseDown", function()
if arg1 and arg1 == "RightButton" then
MouselookStart()
-- start detection of the rightclick emulation
pfUI.nameplates.emulateRightClick.time = GetTime()
pfUI.nameplates.emulateRightClick.frame = this
pfUI.nameplates.emulateRightClick:Show()
end
end)
end
else
frame:EnableMouse(false)
end
end
-- debuff detection
pfUI.nameplates:RegisterEvent("PLAYER_TARGET_CHANGED")
pfUI.nameplates:RegisterEvent("UNIT_AURA")