From 21e713d8b166e5999e1863bb887ee72993ff6ea3 Mon Sep 17 00:00:00 2001 From: wduda Date: Fri, 27 Oct 2023 22:52:46 +0200 Subject: [PATCH] v1.0.28alpha (#129) * Added Mariner Skills and River Hobbit racial (#128) * fixing comment bug * 1.0.27 metadata * u36 metadata * Added Mariner Skills and River Hobbit racial * Add missing descriptions * Add River Hobbit Key * Fix map window indexes * Add translations --------- Co-authored-by: wduda * Add U38 metadata to TravelWindowII.plugincompendium * Added U38 metadata to TravelWindowII.plugin * Update CHANGELOG.md * Update credits.md * fixed bug that would have happened if hunter skills get removed from the game * sorted indexdictionaryEN toi my liking * created release notes * fixed some whitespace * added mariner skills to dictionaries in cleaned up fashion --------- Co-authored-by: Michael DuBose --- CHANGELOG.md | 6 ++++- TravelWindowII.plugin | 4 ++-- TravelWindowII.plugincompendium | 2 +- doc/credits.md | 3 ++- doc/lotroforums.md | 6 +++-- doc/lotrointerface.md | 6 +++-- src/EriadorMapWindow.lua | 39 ++++++++++++++++++++++++++++++ src/GondorMapWindow.lua | 41 ++++++++++++++++++++++++++++++-- src/IndexedDictionaryDe.lua | 39 +++++++++++++++++++++++++++--- src/IndexedDictionaryEn.lua | 42 +++++++++++++++++++++++++++------ src/IndexedDictionaryFr.lua | 24 ++++++++++++++++--- src/OptionsPanel.lua | 7 ++++++ src/RhovanionMapWindow.lua | 40 ++++++++++++++++++++++++++++++- src/TravelWindow.lua | 33 ++++++++++++++++++++++++-- 14 files changed, 265 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ad3d5..e975fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.0.28 +- added support for Mariner Sail skills in EN/DE/FR +- added support for River Hobbits racial travel +- fixed rare bug in hunter skills sorting ## v1.0.27 - fixed typo in init.lua causing crash on load ## v1.0.26 @@ -129,4 +133,4 @@ - fixed Eriador/Rhovannion/Eriador maps with overlays - fixed High Elf racial travel skill that was broken since U28.2 - cleaned up a few English and German translations -- started reorganizing code \ No newline at end of file +- started reorganizing code diff --git a/TravelWindowII.plugin b/TravelWindowII.plugin index c838ed3..f7c817a 100644 --- a/TravelWindowII.plugin +++ b/TravelWindowII.plugin @@ -3,7 +3,7 @@ Travel Window II Hyoss - v1.0.27 + v1.0.28alpha This plugin creates a single window that contains all the available travel skills, including the race, class and reputation skills. It is a further development of Travel Window, that has been worked on by multiple authors before. @@ -14,4 +14,4 @@ Please report bugs and feature requests at Lotrointeface or GitHub. TravelWindowII.src.Main - \ No newline at end of file + diff --git a/TravelWindowII.plugincompendium b/TravelWindowII.plugincompendium index 90440e1..32f63bd 100644 --- a/TravelWindowII.plugincompendium +++ b/TravelWindowII.plugincompendium @@ -2,7 +2,7 @@ 1113 Travel Window II - v1.0.27 + v1.0.28alpha Hyoss http://www.lotrointerface.com/downloads/info1113 http://www.lotrointerface.com/downloads/download1113 diff --git a/doc/credits.md b/doc/credits.md index 572ea01..68004e1 100644 --- a/doc/credits.md +++ b/doc/credits.md @@ -19,4 +19,5 @@ Hyoss Thaliruth Drogo Adra -Lossensinome \ No newline at end of file +Lossensinome +mhdubose diff --git a/doc/lotroforums.md b/doc/lotroforums.md index c7a8bac..e0118e0 100644 --- a/doc/lotroforums.md +++ b/doc/lotroforums.md @@ -1,6 +1,8 @@ A new version is available! -v1.0.27 -- fixed typo in init.lua causing crash on load +v1.0.28alpha +- added support for Mariner Sail skills in EN/DE/FR +- added support for River Hobbits racial travel +- fixed rare bug in hunter skills sorting Download it at [url=https://www.lotrointerface.com/downloads/fileinfo.php?id=1113]Lotrointerface[/url], [url=https://github.com/wduda/TravelWindowII/releases]GitHub[/url], via [url=https://github.com/JeremyStepp/OneLauncher]OneLauncher[/url] or via [url=https://www.lotrointerface.com/downloads/info663-LOTROPluginCompendium.html]Plugin Compendium[/url]. \ No newline at end of file diff --git a/doc/lotrointerface.md b/doc/lotrointerface.md index bbfcc1f..0677eb1 100644 --- a/doc/lotrointerface.md +++ b/doc/lotrointerface.md @@ -37,7 +37,9 @@ Use the mousewheel while hovering over the travel skill icon to change the selec [/LIST] Version history: -v1.0.27 -- fixed typo in init.lua causing crash on load +v1.0.28alpha +- added support for Mariner Sail skills in EN/DE/FR +- added support for River Hobbits racial travel +- fixed rare bug in hunter skills sorting Rest of changelog found [URL="https://github.com/wduda/TravelWindowII/blob/master/CHANGELOG.md"]here[/URL]. \ No newline at end of file diff --git a/src/EriadorMapWindow.lua b/src/EriadorMapWindow.lua index adb9bf7..5ca3481 100644 --- a/src/EriadorMapWindow.lua +++ b/src/EriadorMapWindow.lua @@ -97,6 +97,9 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir -- Warden skills {725, 400}, -- Ost Guruth @@ -144,6 +147,25 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir + + -- Mariner skills + {-1, -1}, -- Celondim + {-1, -1}, -- Brown Lands + {-1, -1}, -- Trader's Wharf + {-1, -1}, -- after-battle Osgiliath + {-1, -1}, -- Lake-town + {-1, -1}, -- Mirk-eaves + {-1, -1}, -- Tinnundir + {-1, -1}, -- Dol Amroth + {-1, -1}, -- Buckland + {-1, -1}, -- Pelegir + {-1, -1}, -- Sûri-kylä + {-1, -1}, -- Lothlórien + {-1, -1}, -- Tharbad + {-1, -1}, -- Snowbourn -- Reputation skills {305, 330}, -- Thorin's Hall @@ -196,6 +218,10 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan {-1, -1}, -- Tracery Archive + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Glân Vraig + {-1, -1}, -- Pelargir -- Racial skills {620, 400}, -- Bree @@ -205,6 +231,7 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Grimbeorn's House {-1, -1}, -- Caras Galadhon {330, 330}, -- Thorin's Gate + {-1, -1}, -- Lyndelby -- Moors Map {815, 300} -- Ettenmoors }; @@ -253,6 +280,18 @@ function EriadorMapWindow:AddShortcuts() counter = counter + 1; end + -- mariner locations + for i = 1, travelCount[7], 1 do + + -- add mariner locations if they should be on this map + if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Corsair and + self:IsShortcutEnabled(marinerLocations:IdAtIndex(i)) == 1) then + self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, marinerLocations:IdAtIndex(i))); + end + + counter = counter + 1; + end + -- reputation locations for i = 1, travelCount[4], 1 do diff --git a/src/GondorMapWindow.lua b/src/GondorMapWindow.lua index 11676f6..7645cbb 100644 --- a/src/GondorMapWindow.lua +++ b/src/GondorMapWindow.lua @@ -97,6 +97,9 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir -- Muster skills {-1, -1}, -- Ost Guruth @@ -144,6 +147,25 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir + + -- Mariner skills + {-1, -1}, -- Celondim + {-1, -1}, -- Brown Lands + {-1, -1}, -- Trader's Wharf + {-1, -1}, -- after-battle Osgiliath + {-1, -1}, -- Lake-town + {-1, -1}, -- Mirk-eaves + {-1, -1}, -- Tinnundir + {-1, -1}, -- Dol Amroth + {-1, -1}, -- Buckland + {-1, -1}, -- Pelegir + {-1, -1}, -- Sûri-kylä + {-1, -1}, -- Lothlórien + {-1, -1}, -- Tharbad + {-1, -1}, -- Snowbourn -- Reputation skills {-1, -1}, -- Thorin's Hall @@ -196,6 +218,10 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan {-1, -1}, -- Tracery Archive + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Glân Vraig + {-1, -1}, -- Pelargir -- Racial skills {-1, -1}, -- Bree @@ -204,8 +230,8 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Rivendell {-1, -1}, -- Grimbeorn's House {-1, -1}, -- Caras Galadhon - {-1, -1} -- Thorin's Hall - + {-1, -1}, -- Thorin's Hall + {-1, -1} -- Lyndelby }; self:AddShortcuts(); @@ -250,6 +276,17 @@ function GondorMapWindow:AddShortcuts() counter = counter + 1; end + -- mariner locations + for i = 1, travelCount[7], 1 do + + -- add mariner locations if they should be on this map + if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Corsair and + self:IsShortcutEnabled(marinerLocations:IdAtIndex(i)) == 1) then + self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, marinerLocations:IdAtIndex(i))); + end + counter = counter + 1; + end + -- reputation locations for i = 1, travelCount[4], 1 do diff --git a/src/IndexedDictionaryDe.lua b/src/IndexedDictionaryDe.lua index 2fd43f1..027017d 100644 --- a/src/IndexedDictionaryDe.lua +++ b/src/IndexedDictionaryDe.lua @@ -74,9 +74,10 @@ function TravelDictionaries:Constructor() racialLocations = IndexedDictionary(); repLocations = IndexedDictionary(); creepLocations = IndexedDictionary(); + marinerLocations = IndexedDictionary(); -- a table to store the number of each type of travel skill - travelCount = { 0, 0, 0, 0, 0, 0 }; + travelCount = { 0, 0, 0, 0, 0, 0, 0 }; LocationsTotal = 0; self:CreateDictionaries(); @@ -91,8 +92,9 @@ function TravelDictionaries:GetCounts() travelCount[4] = repLocations:GetCount(); travelCount[5] = racialLocations:GetCount(); travelCount[6] = creepLocations:GetCount(); + travelCount[7] = marinerLocations:GetCount(); - LocationsTotal = travelCount[1] + travelCount[2] + travelCount[3] + travelCount[4] + travelCount[5]; + LocationsTotal = travelCount[1] + travelCount[2] + travelCount[3] + travelCount[4] + travelCount[5] + travelCount[6] + travelCount[7]; end -- function to return the count of a specific type of travel @@ -107,7 +109,7 @@ end -- function to return the 5 tables containing the travel skills function TravelDictionaries:GetLocations() - return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations; + return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations, creepLocations, marinerLocations; end -- add the data to custom dictionaries to maintain the order @@ -217,6 +219,21 @@ function TravelDictionaries:CreateDictionaries() wardenLocations:AddSkill("Appell in Clegur", "0x70064F4D", "Clegur (Appell)"); wardenLocations:AddSkill("Heerschau in Pelargir", "0x700658E8", "Pelargir (Appell)"); + marinerLocations:AddSkill("Segelt nach Celondim", "0x70066100", "Celondim (Segeln)") + marinerLocations:AddSkill("Segelt in die Braunen Lande", "0x70066101", "die Braunen Lande (Segeln)") + marinerLocations:AddSkill("Segelt zum Händlerkai", "0x70066105", "Händlerkai (Segel)") + marinerLocations:AddSkill("Segelt ins schlachtgezeichnete Osgiliath", "0x70066109", "schlachtgezeichnete Osgiliath (Segeln)") + marinerLocations:AddSkill("Segelt nach Seestadt", "0x7006610C", "Seestadt (Segeln)") + marinerLocations:AddSkill("Segelt zur Dunkelsenke", "0x7006610E", "Dunkelsenke (Segeln)") + marinerLocations:AddSkill("Segelt nach Tinnudir", "0x7006610F", "Tinnundir (Segeln)") + marinerLocations:AddSkill("Segelt nach Dol Amroth", "0x70066117", "Dol Amroth (Segeln)") + marinerLocations:AddSkill("Segelt nach Bockland", "0x7006611A", "Bockland (Segeln)") + marinerLocations:AddSkill("Segelt nach Pelargir", "0x7006611B", "Pelargir (Segeln)") + marinerLocations:AddSkill("Segelt nach Sûri-kylä", "0x7006611C", "Sûri-kylä (Segeln)") + marinerLocations:AddSkill("Segelt nach Lothlórien", "0x7006611E", "Lothlórien (Segeln)") + marinerLocations:AddSkill("Segelt zur Sarnfurt", "0x70066120", "Sarnfurt (Segeln)") + marinerLocations:AddSkill("Segelt nach Schneegrenze", "0x70066121", "Schneegrenze (Segeln)") + racialLocations:AddSkill("Rückkehr nach Bree", "0x700062F6", "Bree (Rasse)"); racialLocations:AddSkill("Rückkehr ins Auenland", "0x700062C8", "Michelbinge (Rasse)"); racialLocations:AddSkill("Rückkehr zu Thorins Tor", "0x70006346", "Thorins Tor (Rasse Zwerg)"); @@ -224,6 +241,7 @@ function TravelDictionaries:CreateDictionaries() racialLocations:AddSkill("Zum 1. Heim zurückkehren", "0x70041A22", "Grimbeorns Hütte (Rasse)"); racialLocations:AddSkill("Reise nach Caras Galadhon in Lothlórien", "0x70048C8C", "Caras Galadhon (Rasse)"); racialLocations:AddSkill("Reise zu Thorins Halle", "0x70053C0F", "Thorins Halle (Rasse Starkaxt)"); + racialLocations:AddSkill("Kehrt zu Lyndelby zurück", "0x70066D31", "Lyndelby (Rasse)") genLocations:AddSkill("Zum 1. Heim zurückkehren", "0x700256BA", "1. Markstein"); genLocations:AddSkill("Zum 2. Heim zurückkehren", "0x70025792", "2. Markstein"); @@ -317,4 +335,19 @@ function TravelDictionaries:CreateDictionaries() creepLocations:AddSkill("Gute Karte zur Feste Lugazag", "0x70028BB5"); creepLocations:AddSkill("Gute Karte zur Feste Tirith Rhaw", "0x70028BB0"); creepLocations:AddSkill("Gute Karte zum Grimmwald", "0x70028BBD"); + + marinerLocations:AddSkill("Segelt nach Celondim", "0x70066100", "Celondim (Segenl)") + marinerLocations:AddSkill("Segelt in die Braunen Lande", "0x70066101", "die Braunen Lande (Segeln)") + marinerLocations:AddSkill("Segelt zum Händlerkai", "0x70066105", "Händlerkai (Segel)") + marinerLocations:AddSkill("Segelt ins schlachtgezeichnete Osgiliath", "0x70066109", "schlachtgezeichnete Osgiliath (Segeln)") + marinerLocations:AddSkill("Segelt nach Seestadt", "0x7006610c", "Seestadt (Segeln)") + marinerLocations:AddSkill("Segelt zur Dunkelsenke", "0x7006610e", "Dunkelsenke (Segeln)") + marinerLocations:AddSkill("Segelt nach Tinnudir", "0x7006610f", "Tinnundir (Segeln)") + marinerLocations:AddSkill("Segelt nach Dol Amroth", "0x70066117", "Dol Amroth (Segeln)") + marinerLocations:AddSkill("Segelt nach Bockland", "0x7006611a", "Bockland (Segeln)") + marinerLocations:AddSkill("Segelt nach Pelargir", "0x7006611b", "Pelargir (Segeln)") + marinerLocations:AddSkill("Segelt nach Sûri-kylä", "0x7006611c", "Sûri-kylä (Segeln)") + marinerLocations:AddSkill("Segelt nach Lothlórien", "0x7006611e", "Lothlórien (Segeln)") + marinerLocations:AddSkill("Segelt zur Sarnfurt", "0x70066120", "Sarnfurt (Segeln)") + marinerLocations:AddSkill("Segelt nach Schneegrenze", "0x70066121", "Schneegrenze (Segeln)") end diff --git a/src/IndexedDictionaryEn.lua b/src/IndexedDictionaryEn.lua index 6b97465..4bd5dad 100644 --- a/src/IndexedDictionaryEn.lua +++ b/src/IndexedDictionaryEn.lua @@ -74,9 +74,10 @@ function TravelDictionaries:Constructor() racialLocations = IndexedDictionary(); repLocations = IndexedDictionary(); creepLocations = IndexedDictionary(); + marinerLocations = IndexedDictionary(); -- a table to store the number of each type of travel skill - travelCount = { 0, 0, 0, 0, 0, 0 }; + travelCount = { 0, 0, 0, 0, 0, 0, 0 }; LocationsTotal = 0; self:CreateDictionaries(); @@ -91,6 +92,9 @@ function TravelDictionaries:GetCounts() travelCount[4] = repLocations:GetCount(); travelCount[5] = racialLocations:GetCount(); travelCount[6] = creepLocations:GetCount(); + travelCount[7] = marinerLocations:GetCount(); + + LocationsTotal = travelCount[1] + travelCount[2] + travelCount[3] + travelCount[4] + travelCount[5] + travelCount[6] + travelCount[7]; end -- function to return the count of a specific type of travel @@ -98,13 +102,19 @@ function TravelDictionaries:GetCount(index) return travelCount[index]; end +-- function to get the total number of travel skills +function TravelDictionaries:GetTotalCount() + return LocationsTotal; +end + -- function to return the 5 tables containing the travel skills function TravelDictionaries:GetLocations() - return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations; + return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations, creepLocations, marinerLocations; end -- add the data to custom dictionaries to maintain the order function TravelDictionaries:CreateDictionaries() + -- add the hunter locations hunterLocations:AddSkill("Return to Camp", "0x7000A2C1", "Return to Camp"); hunterLocations:AddSkill("Guide to Bree", "0x70003F42", "Bree (Guide)"); hunterLocations:AddSkill("Guide to Thorin's Hall", "0x70003F41", "Thorin's Hall (Guide)"); @@ -161,6 +171,7 @@ function TravelDictionaries:CreateDictionaries() hunterLocations:AddSkill("Guide to Clegur", "0x70064F4C", "Clegur (Guide)"); hunterLocations:AddSkill("Guide to Pelargir", "0x700658EA", "Pelargir (Guide)"); + -- add the Warden locations wardenLocations:AddSkill("Muster in Ost Guruth", "0x70014786", "Ost Guruth (Muster)"); wardenLocations:AddSkill("Muster in Esteldín", "0x70014798", "Esteldín (Muster)"); wardenLocations:AddSkill("Muster in Evendim", "0x7001478E", "Evendim (Muster)"); @@ -210,14 +221,31 @@ function TravelDictionaries:CreateDictionaries() wardenLocations:AddSkill("Muster at Clegur", "0x70064F4D", "Clegur (Muster)"); wardenLocations:AddSkill("Muster at Pelargir", "0x700658E8", "Pelargir (Muster)"); + -- add the Mariner locations + marinerLocations:AddSkill("Sail to Celondim", "0x70066100", "Celondim (Sail)") + marinerLocations:AddSkill("Sail to the Brown Lands", "0x70066101", "Brown Lands (Sail)") + marinerLocations:AddSkill("Sail to Trader's Wharf", "0x70066105", "Trader's Wharf (Sail)") + marinerLocations:AddSkill("Sail to after-battle Osgiliath", "0x70066109", "After-battle Osgiliath (Sail)") + marinerLocations:AddSkill("Sail to Lake-town", "0x7006610C", "Lake-town (Sail)") + marinerLocations:AddSkill("Sail to the Mirk-eaves", "0x7006610E", "Mirk-eaves (Sail)") + marinerLocations:AddSkill("Sail to Tinnudir", "0x7006610F", "Tinnudir (Sail)") + marinerLocations:AddSkill("Sail to Dol Amroth", "0x70066117", "Dol Amroth (Sail)") + marinerLocations:AddSkill("Sail to Buckland", "0x7006611A", "Buckland (Sail)") + marinerLocations:AddSkill("Sail to Pelargir", "0x7006611B", "Pelargir (Sail)") + marinerLocations:AddSkill("Sail to Sûri-kylä", "0x7006611C", "Sûri-kylä (Sail)") + marinerLocations:AddSkill("Sail to Lothlórien", "0x7006611E", "Lothlórien (Sail)") + marinerLocations:AddSkill("Sail to Tharbad", "0x70066120", "Tharbad (Sail)") + marinerLocations:AddSkill("Sail to Snowbourn", "0x70066121", "Snowbourn (Sail)") + -- add the racial travel skills - racialLocations:AddSkill("Return to Bree", "0x700062F6", "Bree (Racial)"); - racialLocations:AddSkill("Return to the Shire", "0x700062C8", "Shire (Racial)"); + racialLocations:AddSkill("Return to Bree", "0x700062F6", "Bree (Racial)"); -- human + racialLocations:AddSkill("Return to the Shire", "0x700062C8", "Shire (Racial)"); -- hobbit racialLocations:AddSkill("Return to Thorin's Gate", "0x70006346", "Thorin's Gate (Racial)"); -- dwarf - racialLocations:AddSkill("Return to Rivendell", "0x7000631F", "Rivendell (Racial)"); - racialLocations:AddSkill("Return Home", "0x70041A22", "Beorning Home (Racial)"); - racialLocations:AddSkill("Travel to Caras Galadhon in Lothlórien", "0x70048C8C", "Caras Galadhon (Racial)"); + racialLocations:AddSkill("Return to Rivendell", "0x7000631F", "Rivendell (Racial)"); --elf + racialLocations:AddSkill("Return Home", "0x70041A22", "Beorning Home (Racial)"); -- beorning + racialLocations:AddSkill("Travel to Caras Galadhon in Lothlórien", "0x70048C8C", "Caras Galadhon (Racial)"); -- high-elf racialLocations:AddSkill("Travel to Thorin's Hall", "0x70053C0F", "Thorin's Hall (Racial)"); -- stoutaxe + racialLocations:AddSkill("Return to Lyndelby", "0x70066D31", "Lyndelby (Racial)") -- river hobbit -- add the Return Home and housing skills genLocations:AddSkill("Return Home", "0x700256BA", "Return Home"); diff --git a/src/IndexedDictionaryFr.lua b/src/IndexedDictionaryFr.lua index 2cee9cc..e1c881c 100644 --- a/src/IndexedDictionaryFr.lua +++ b/src/IndexedDictionaryFr.lua @@ -74,9 +74,10 @@ function TravelDictionaries:Constructor() racialLocations = IndexedDictionary(); repLocations = IndexedDictionary(); creepLocations = IndexedDictionary(); + marinerLocations = IndexedDictionary(); -- a table to store the number of each type of travel skill - travelCount = { 0, 0, 0, 0, 0, 0 }; + travelCount = { 0, 0, 0, 0, 0, 0, 0 }; LocationsTotal = 0; self:CreateDictionaries(); @@ -91,8 +92,9 @@ function TravelDictionaries:GetCounts() travelCount[4] = repLocations:GetCount(); travelCount[5] = racialLocations:GetCount(); travelCount[6] = creepLocations:GetCount(); + travelCount[7] = marinerLocations:GetCount(); - LocationsTotal = travelCount[1] + travelCount[2] + travelCount[3] + travelCount[4] + travelCount[5]; + LocationsTotal = travelCount[1] + travelCount[2] + travelCount[3] + travelCount[4] + travelCount[5] + travelCount[6] + travelCount[7]; end -- function to return the count of a specific type of travel @@ -107,7 +109,7 @@ end -- function to return the 5 tables containing the travel skills function TravelDictionaries:GetLocations() - return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations; + return genLocations, hunterLocations, wardenLocations, racialLocations, repLocations, creepLocations, marinerLocations; end -- add the data to custom dictionaries to maintain the order @@ -217,6 +219,21 @@ function TravelDictionaries:CreateDictionaries() wardenLocations:AddSkill("Rassemblement à Clegur", "0x70064F4D", "Clegur (Rassemblement)"); wardenLocations:AddSkill("Rassemblement à Pelargir", "0x700658E8", "Pelargir (Rassemblement)"); + marinerLocations:AddSkill("Naviguer vers Celondim", "0x70066100", "Celondim (Naviguer)") + marinerLocations:AddSkill("Naviguer vers les Terres brunes", "0x70066101", "Terres brunes (Naviguer)") + marinerLocations:AddSkill("Naviguer vers le Quai des marchands", "0x70066105", "Quai des marchands (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Osgiliath après la bataille", "0x70066109", "Osgiliath après la bataille (Naviguer)") + marinerLocations:AddSkill("Cap sur la Ville du Lac", "0x7006610C", "Ville du Lac (Naviguer)") + marinerLocations:AddSkill("Naviguer vers l'Orée Noire", "0x7006610E", "Orée Noire (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Tinnudir", "0x7006610F", "Tinnudir (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Dol Amroth", "0x70066117", "Dol Amroth (Naviguer)") + marinerLocations:AddSkill("Naviguer vers le Pays de Bouc", "0x7006611A", "Pays de Bouc (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Pelargir", "0x7006611B", "Pelargir (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Sûri-kylä", "0x7006611C", "Sûri-kylä (Naviguer)") + marinerLocations:AddSkill("Naviguer vers la Lothlorien", "0x7006611E", "Lothlorien (Naviguer)") + marinerLocations:AddSkill("Naviguer vers le Gué de Sarn", "0x70066120", "le Gué de Sarn (Naviguer)") + marinerLocations:AddSkill("Naviguer vers Neigebronne", "0x70066121", "Neigebronne (Naviguer)") + racialLocations:AddSkill("Retour à Bree", "0x700062F6", "Bree (Race)"); racialLocations:AddSkill("Retournez dans la Comté", "0x700062C8", "Comté (Race)"); racialLocations:AddSkill("Retour : Porte de Thorin", "0x70006346", "Porte de Thorin (Race)"); @@ -224,6 +241,7 @@ function TravelDictionaries:CreateDictionaries() racialLocations:AddSkill("Retour à la maison", "0x70041A22", "Maison Beorning (Race)"); racialLocations:AddSkill("Voyage vers Caras Galadhon, en Lothlórien", "0x70048C8C", "Caras Galadhon (Race)"); racialLocations:AddSkill("Aller au Palais de Thorin", "0x70053C0F", "Palais de Thorin (Race)"); + racialLocations:AddSkill("Retour à Lyndelby", "0x70066d31", "Lyndelby (Race)") -- river hobbit genLocations:AddSkill("Retour à la maison", "0x700256BA", "Point de repère 1"); genLocations:AddSkill("Retour à la maison 2", "0x70025792", "Point de repère 2"); diff --git a/src/OptionsPanel.lua b/src/OptionsPanel.lua index b6ca0b5..d3a34ac 100644 --- a/src/OptionsPanel.lua +++ b/src/OptionsPanel.lua @@ -436,6 +436,13 @@ function OptionsPanel:AddItems() counter = counter + 1; end end + -- add the mariner sailing skills if the character is a mariner + if (PlayerClass == Turbine.Gameplay.Class.Corsair) then + for i = 1, travelCount[7], 1 do + self:AddSkillItemForEnabling(counter, marinerLocations:IdAtIndex(i), marinerLocations:LabelAtIndex(i)); + counter = counter + 1; + end + end -- add the reputation travel skills if (PlayerAlignment == Turbine.Gameplay.Alignment.FreePeople) then diff --git a/src/RhovanionMapWindow.lua b/src/RhovanionMapWindow.lua index 1072949..b0d7316 100644 --- a/src/RhovanionMapWindow.lua +++ b/src/RhovanionMapWindow.lua @@ -97,6 +97,9 @@ function RhovanionMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir -- Muster skills {-1, -1}, -- Ost Guruth @@ -144,6 +147,25 @@ function RhovanionMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Andrath {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Pelargir + + -- Mariner skills + {-1, -1}, -- Celondim + {-1, -1}, -- Brown Lands + {-1, -1}, -- Trader's Wharf + {-1, -1}, -- after-battle Osgiliath + {-1, -1}, -- Lake-town + {-1, -1}, -- Mirk-eaves + {-1, -1}, -- Tinnundir + {-1, -1}, -- Dol Amroth + {-1, -1}, -- Buckland + {-1, -1}, -- Pelegir + {-1, -1}, -- Sûri-kylä + {-1, -1}, -- Lothlórien + {-1, -1}, -- Tharbad + {-1, -1}, -- Snowbourn -- Reputation skills {-1, -1}, -- Thorin's Hall @@ -196,6 +218,10 @@ function RhovanionMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Swanfleet {-1, -1}, -- Cardolan {-1, -1}, -- Tracery Archive + {-1, -1}, -- Carn Dûm + {-1, -1}, -- Clegur + {-1, -1}, -- Glân Vraig + {-1, -1}, -- Pelargir -- Racial skills {-1, -1}, -- Bree @@ -204,7 +230,8 @@ function RhovanionMapWindow:Constructor(parent, class, race, shortcuts) {-1, -1}, -- Rivendell {405, 180}, -- Grimbeorn's House {-1, -1}, -- Caras Galadhon - {-1, -1} -- Thorin's Hall + {-1, -1}, -- Thorin's Hall + {-1, -1} -- Lyndelby }; self:AddShortcuts(); @@ -249,6 +276,17 @@ function RhovanionMapWindow:AddShortcuts() counter = counter + 1; end + -- mariner locations + for i = 1, travelCount[7], 1 do + + -- add mariner locations if they should be on this map + if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Corsair and + self:IsShortcutEnabled(marinerLocations:IdAtIndex(i)) == 1) then + self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, marinerLocations:IdAtIndex(i))); + end + counter = counter + 1; + end + -- reputation locations for i = 1, travelCount[4], 1 do diff --git a/src/TravelWindow.lua b/src/TravelWindow.lua index e6131e8..74a0d04 100644 --- a/src/TravelWindow.lua +++ b/src/TravelWindow.lua @@ -329,6 +329,8 @@ function TravelWindow:SetPlayerRaceKey() PlayerRaceKey = 6; elseif (PlayerRace == Turbine.Gameplay.Race.StoutAxe) then PlayerRaceKey = 7; + elseif (PlayerRace == Turbine.Gameplay.Race.RiverHobbit) then + PlayerRaceKey = 8; else PlayerRaceKey = 1; -- default to man race to prevent errors end @@ -521,6 +523,17 @@ function TravelWindow:SetShortcuts() end end + -- set the mariner travel items + if (PlayerClass == Turbine.Gameplay.Class.Corsair) then + for i = 1, travelCount[7], 1 do + shortcutIndex = self:TableIndex(Settings.order, marinerLocations:IdAtIndex(i)); + table.insert(TravelShortcuts, + TravelShortcut(6.0, marinerLocations:IdAtIndex(i), marinerLocations:NameAtIndex(i), 4, + shortcutIndex, Settings.enabled[marinerLocations:IdAtIndex(i)], + marinerLocations:LabelAtIndex(i))); + end + end + -- sort the shortcuts self:SortShortcuts() end @@ -537,6 +550,9 @@ function TravelWindow:CheckEnabledSettings() elseif (PlayerClass == Turbine.Gameplay.Class.Warden) then -- wardens have warden skills ItemCount = ItemCount + travelCount[2] + elseif (PlayerClass == Turbine.Gameplay.Class.Corsair) then + -- mariners have mariner skills + ItemCount = ItemCount + travelCount[7] end else -- monster player skills @@ -547,7 +563,7 @@ function TravelWindow:CheckEnabledSettings() if (#Settings.order > ItemCount) then for id, order in pairs(Settings.order) do if (not genLocations:VerifyId(id) and not wardenLocations:VerifyId(id) and not repLocations:VerifyId(id) and - not genLocations:VerifyId(id)) then + not hunterLocations:VerifyId(id) and not marinerLocations:VerifyId(id)) then Settings.order[id] = nil; end end @@ -557,7 +573,7 @@ function TravelWindow:CheckEnabledSettings() if (#Settings.enabled > ItemCount) then for id, status in pairs(Settings.enabled) do if (not genLocations:VerifyId(id) and not wardenLocations:VerifyId(id) and not repLocations:VerifyId(id) and - not genLocations:VerifyId(id)) then + not hunterLocations:VerifyId(id) and not marinerLocations:VerifyId(id)) then Settings.enabled[id] = nil; end end @@ -626,6 +642,19 @@ function TravelWindow:CheckEnabledSettings() end end end + + -- update mariner travel settings + if (PlayerClass == Turbine.Gameplay.Class.Corsair) then + for i = 1, travelCount[7], 1 do + if (Settings.enabled[marinerLocations:IdAtIndex(i)] == nil) then + Settings.enabled[marinerLocations:IdAtIndex(i)] = true; + end + if (self:TableContains(Settings.order, marinerLocations:IdAtIndex(i)) == false) then + table.insert(Settings.order, counter, marinerLocations:IdAtIndex(i)); + counter = counter + 1; + end + end + end else -- update creep travel settings for i = 1, travelCount[6], 1 do