lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [Common/] [SkillData/] [SkillData.lua] - Rev 195

Go to most recent revision | Compare with Previous | Blame | View Log

import "Turbine"
import "Turbine.Gameplay"
import "Turbine.UI"
import "Turbine.UI.Lotro"

local importPath = getfenv(1)._.Name:gsub("%.SkillData$", "");
local language = Turbine.Engine.GetLanguage();
local locale;
if (language == Turbine.Language.German) then
    import (importPath .. ".SkillData_de");
    locale = "de";
elseif (language == Turbine.Language.French) then
    import (importPath .. ".SkillData_fr");
    locale = "fr";
else
    import (importPath .. ".SkillData_en");
    locale = "en";
end

-- Special characters that look like non-special ones
local nbsp = "\194\160"; -- non-breaking space, used in many French skill names

-- Skills which can have different names (but the same shortcut) depending on conditions such as stance, etc.
-- This table currently has to be manually maintained (can't be extracted from the client automatically).
local altNames = {};
local AlternateNameData = {

    --Burglar
    [0x7000FB73] = {
        en = { "A Small Snag", "Quite a Snag" },
        de = { "Ein kleiner Schnitt", "Ein ziemlicher Haken"},
        fr = { "Petit accrochage", "Bel accroc"}
    };
    [0x7000FB71] = {
        en = { "Feint Attack", "Improved Feint Attack" },
        de = { "Scheinangriff", "Verbesserter Scheinangriff" },
        fr = { "Attaque feinte", "Attaque feinte amélioré" }
    };
    [0x7000FD86] = {
        en = { "Lucky Strike", "Gambler's Strike" },
        de = { "Glückstreffer", "Treffer des Spielers"},
        fr = { "Coup chanceux", "Coup de poker" }
    };

    --Hunter
    [0x70003F33] = {
        en = { "Barbed Arrow", "Burning Arrow", "Eldarin Arrow" },
        de = { "Stachelpfeil", "Feuerpfeil", "Eldar-Pfeil" },
        fr = { "Flèche barbelée", "Flèche brûlante", "Flèche eldarine" }
    };
    [0x7002984F] = {
        en = { "Improved Penetrating Shot", "Imp. Penetrating Shot: Burn Through", "Imp. Penetrating Shot: Pierce the Darkness" },
        de = { "Verbesserter Durchdringender Schuss", "Verbesserter Durchdringender Schuss \"Verzehrendes Feuer\"", "Verbesserter Durchdringender Schuss: \"Dunkelheit stechen\"" },
        fr = { "Tir pénétrant amélioré", "Tir pénétrant amélioré" .. nbsp .. ": Brûlure", "Tir pénétrant amélioré" .. nbsp .. ": Percée des ténèbres" }
    };
    [0x70029856] = {
        en = { "Improved Quick Shot", "Imp. Quick Shot: Flaming Arrow", "Imp. Quick Shot: Elvish Arrow" },
        de = { "Verbesserter Schneller Schuss", "Verb.: Schneller Schuss: \"Flammenpfeil\"", "Verb.: Schneller Schuss \"Elbenpfeil\"" },
        fr = { "Tir rapide amélioré", "Tir rapide amélioré" .. nbsp .. ": Flèche enflammée", "Tir rapide amélioré" .. nbsp .. ": Flèche elfique" }
    };
    [0x700153E2] = {
        en = { "Improved Swift Bow", "Improved Swift Bow: Ablaze", "Improved Swift Bow: Star-light" },
        de = { "Verbesserter Schneller Bogen", "Verbesserter Schneller Bogen: Flammenmeer", "Verbesserung: Schneller Bogen: Sternenlicht" },
        fr = { "Arc rapide amélioré", "Arc rapide" .. nbsp .. ": flambée amélioré", "Arc rapide" .. nbsp .. ": lumière stellaire amélioré" }
    };
    [0x700292DC] = {
        en = { "Split Shot", "Split Shot: Hail of Fire", "Split Shot: Shafts of Light" },
        de = { "Spaltschuss", "Spaltschuss: Feuerhagel", "Spaltschuss: Lichtstrahlen" },
        fr = { "Tir multiple", "Tir multiple" .. nbsp .. ": Grèle ardente", "Tir multiple" .. nbsp .. ": Tiges de lumière" }
    };

    --Minstrel
    [0x700293C5] = {
        en = { "Coda of Melody", "Coda of Resonance", "Coda of Fury" },
        de = { "Coda der Melodie", "Coda der Resonanz", "Coda der Wut" },
        fr = { "Coda de mélodie", "Coda de résonance", "Coda de fureur" }
    };

    -- Warden
    [0x7001509A] = {
        en = { "Fist and Spear", "Fist and Javelin" },
        de = { "Faust und Speer", "Faust und Wurfspieß" },
        fr = { "Poing et lance", "Poing et javeline" }
    };
    [0x7000E867] = {
        en = { "Quick Thrust", "Prepare Spear", "Quick Toss", "Prepare Javelin" },
        de = { "Schneller Stoß", "Speer vorbereiten", "Schneller Wurf", "Wurfspieß vorbereiten" },
        fr = { "Fente rapide", "Préparer la lance", "Lancer rapide", "Préparer javeline" }
    };
    [0x7001509D] = {
        en = { "Shield and Spear", "Shield and Javelin" },
        de = { "Schild und Speer", "Schild und Wurfspieß" },
        fr = { "Bouclier et lance", "Bouclier et javeline" }
    };
    [0x7000ED0E] = {
        en = { "Shield-bash", "Prepare Shield", "Behind the Shield" },
        de = { "Heftiger Schildschlag", "Schild vorbereiten", "Hinter dem Schild" },
        fr = { "Violent coup de bouclier", "Préparer bouclier", "Derrière le bouclier" }
    };
    [0x70015098] = {
        en = { "Spear and Fist", "Javelin and Fist" },
        de = { "Speer und Faust", "Wurfspieß und Faust" },
        fr = { "Lance et poing", "Javeline et poing" }
    };
    [0x70015099] = {
        en = { "Spear and Shield", "Javelin and Shield" },
        de = { "Speer und Schild", "Wurfspieß und Schild" },
        fr = { "Lance et bouclier", "Javeline et bouclier" }
    };
    [0x7002850A] = {
        en = { "Spear and Spear", "Javelin and Javelin" },
        de = { "Speer und Speer", "Wurfspieß und Wurfspieß" },
        fr = { "Lance et lance", "Javeline et javeline" }
    };
    [0x7000EECF] = {
        en = { "Warden's Taunt", "Prepare Fist", "Warden's Aim" },
        de = { "Hohn des Hüters", "Faust vorbereiten", "Absicht des Hüters" },
        fr = { "Provocation de sentinelle", "Préparer poing", "Visée de la sentinelle" }
    };
    -- To do: When adding an item to this list, make sure to use the main ID and not an alias thereof.
};
for id, data in pairs(AlternateNameData) do
    local name = data[locale];
    SkillData[id].name = name;
    for _, n1 in ipairs(name) do
        altNames[n1] = altNames[n1] or {};
        for _, n2 in ipairs(name) do
            if (n1 ~= n2) then
                table.insert(altNames[n1], n2);
            end
        end
        altNames[n1] = table.concat(altNames[n1], " / ");
    end
end

-- Russian client is not yet supported
if (language == Turbine.Language.Russian) then
    SkillData, altNames = {}, {};
end

-- Handle aliases
for id, data in pairs(SkillData) do
    if (type(data) == "number") then
        SkillData[id] = SkillData[data];
    end
end

-- Get the name of the skill associated with a shortcut
-- (returns a string or a list of strings)
function Turbine.UI.Lotro.Shortcut.GetSkillName(shortcut)
    local id = tonumber(shortcut:GetData() or 0);
    if (SkillData[id]) then
        return SkillData[id].name;
    end
end

-- Get the altername name(s) for a skill (e.g. "Improved", etc.)
function Turbine.Gameplay.Skill.GetAltNames(skillName)
    return altNames[skillName];
end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 07:00 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui