From a96147ae92f3448932ff486486c7936da88e9c88 Mon Sep 17 00:00:00 2001 From: Michael Virnstein Date: Wed, 6 Oct 2021 00:56:46 +0200 Subject: [PATCH] =?UTF-8?q?**Update**=20-=20GvG=20=20=20=20=20-=20Visualis?= =?UTF-8?q?ierung=20der=20Angriffskn=C3=B6pfe=20(BA=20+=20Bezahlund=20und?= =?UTF-8?q?=20Platzieren)=20=20=20=20=20-=20Bei=20aktiven=20Angriffskn?= =?UTF-8?q?=C3=B6pfen=20wird=20der=20Klick=20auf=20"Angreifen"=20verhinder?= =?UTF-8?q?t=20=20=20=20=20-=20Tastaturk=C3=BCrzel=20Strg+Alt+A=20um=20die?= =?UTF-8?q?=20Angriffskn=C3=B6pfe=20an=20und=20abzuschalten=20-=20PvP=20An?= =?UTF-8?q?griffe=20=20=20=20=20-=20Summe=20der=20erhaltenen=20Doppelbonus?= =?UTF-8?q?=20bei=20Pl=C3=BCnderungen=20hinzugef=C3=BCgt=20=20=20=20=20-?= =?UTF-8?q?=20Angriffe=20werden=20jetzt=20erst=20nach=201=20Jahr=20aus=20d?= =?UTF-8?q?er=20DB=20entfernt=20(Experimentell,=20da=20Performance=20noch?= =?UTF-8?q?=20unklar)=20-=20Einstellungen=20=20=20=20=20-=20GvG=20Angriffs?= =?UTF-8?q?kn=C3=B6pfe=20k=C3=B6nnen=20per=20Einstellung=20deaktiviert=20w?= =?UTF-8?q?erden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Bugfix** - Plünderhilfe - Konnte geöffnet werden, auch wenn noch kein anderer Spieler besucht wurde --- changelog.md | 16 ++++ js/web/_i18n/de.json | 7 +- js/web/_menu/js/_menu.js | 4 +- js/web/gvg/css/gvg.css | 129 +++++++++++++++++++++++++---- js/web/gvg/js/gvg.js | 35 ++++++-- js/web/indexdb/js/indexdb.js | 2 +- js/web/looting/css/looting.css | 50 ++++++++++- js/web/looting/js/looting.js | 97 +++++++++++++++------- js/web/part-calc/js/part-calc.js | 2 +- js/web/sabotage/css/sabotage.css | 29 ------- js/web/settings/config/config.json | 6 ++ js/web/x_img/doubleloot.png | Bin 0 -> 8397 bytes manifest.json | 4 +- 13 files changed, 291 insertions(+), 90 deletions(-) create mode 100644 js/web/x_img/doubleloot.png diff --git a/changelog.md b/changelog.md index 90a4f4d..232b065 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,21 @@ ## Changelog - Extension +##### 1.12.3.0 +**Update** +- GvG + - Visualisierung der Angriffsknöpfe (BA + Bezahlund und Platzieren) + - Bei aktiven Angriffsknöpfen wird der Klick auf "Angreifen" verhindert + - Tastaturkürzel Strg+Alt+A um die Angriffsknöpfe an und abzuschalten +- PvP Angriffe + - Summe der erhaltenen Doppelbonus bei Plünderungen hinzugefügt + - Angriffe werden jetzt erst nach 1 Jahr aus der DB entfernt (Experimentell, da Performance noch unklar) +- Einstellungen + - GvG Angriffsknöpfe können per Einstellung deaktiviert werden + +**Bugfix** +- Plünderhilfe + - Konnte geöffnet werden, auch wenn noch kein anderer Spieler besucht wurde + ##### 1.12.2.0 **Update** - GvG diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 143523a..7b30497 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -479,10 +479,11 @@ "Boxes.Looting.AllPlayers": "Alle Spieler", "Boxes.Looting.Attack": "Angriff", "Boxes.Looting.autoBattle": "Autokampf", - "Boxes.Looting.collectedToday": "Heute gesammelt", + "Boxes.Looting.collectedToday": "Heute", "Boxes.Looting.CurrentPvPArenaOpponents": "Aktuelle PvP-Arena Gegner", "Boxes.Looting.Defense": "Verteidigung", "Boxes.Looting.doubleLoot": "Plünderung verdoppelt", + "Boxes.Looting.DoubleLootPartFP": "Doppelbonus", "Boxes.Looting.filteredByUser": "Filter nach Spieler", "Boxes.Looting.FP": "FP", "Boxes.Looting.goto1stPage": "erste Seite", @@ -500,6 +501,7 @@ "Boxes.Looting.showPvPArenaOpponents": "PvP-Arena Gegner", "Boxes.Looting.thisWeek": "Diese Woche", "Boxes.Looting.Title": "PvP Angriffe", + "Boxes.Looting.TotalFP": "Gesamt FP", "Boxes.Looting.total": "Gesamt", "Boxes.Looting.Unknown": "Unbekannt", "Boxes.Looting.visited": "Besucht", @@ -1052,6 +1054,7 @@ "Settings.Entry.ShowBlueGalaxyHelper": "Blaue Galaxie", "Settings.Entry.ShowEventChest": "Eventpreis-Rechner", "Settings.Entry.ShowGuildTreasuryLogExport": "Gilden Kassen Export", + "Settings.Entry.ShowGvGFightHud": "GvG Angriffshilfe", "Settings.Entry.ShowInvestments": "FP Investitionen", "Settings.Entry.ShowMapTradeWarning": "Handelsblocker", "Settings.Entry.ShowMarketFilter": "Marktplatz Filter", @@ -1104,6 +1107,8 @@ "Settings.ShowEventChest.Title": "Zeige Eventrechner Box", "Settings.ShowGuildTreasuryLogExport.Desc": "Zeigt ein Tool zum Exportieren von Gildenkassen-Protokollen in eine .csv-Datei, wenn das Gildenkassen-Protokollfenster geöffnet wird", "Settings.ShowGuildTreasuryLogExport.Title": "Exportwerkzeug für Gildenkassenprotokolle anzeigen", + "Settings.ShowGvGFightHud.Desc": "Visualisiert die Knöpfe (Auto-Kampf, OK, BA)", + "Settings.ShowGvGFightHud.Title": "GvG Angriffshilfe", "Settings.ShowInvestments.Desc": "Beim Betreten des 'Rathauses' > 'Neuigkeiten' > 'Legendäre Bauwerke' wird eine Übersicht der FP Investitionen angezeigt", "Settings.ShowInvestments.Title": "LG Investitionen Übersicht anzeigen", "Settings.ShowMapTradeWarning.Desc": "Zeigt eine Box über dem 'Verhandeln' Button in Provinzen an, die ein versehentliches Verhandeln vermeiden soll ", diff --git a/js/web/_menu/js/_menu.js b/js/web/_menu/js/_menu.js index 47535eb..3d4ac0d 100644 --- a/js/web/_menu/js/_menu.js +++ b/js/web/_menu/js/_menu.js @@ -596,7 +596,9 @@ let _menu = { let btn_Sabotage = $(''); btn_Sabotage.on('click', function () { - Sabotage.showResult(); + if (Sabotage.OtherPlayer !== undefined) { + Sabotage.showResult(); + } }); btn_SabotageBG.append(btn_Sabotage); diff --git a/js/web/gvg/css/gvg.css b/js/web/gvg/css/gvg.css index 5ca3582..9e6e0d6 100644 --- a/js/web/gvg/css/gvg.css +++ b/js/web/gvg/css/gvg.css @@ -84,10 +84,10 @@ #gvgfight-hud { pointer-events: none; - cursor: none; - position: absolute; + user-select: none; + position: absolute; z-index: 100; - top: calc(50vh + 253px); + top: calc(50vh - 120px); left: max(calc(50vw - 154px), 321px); height: 1000px; width: 1000px; @@ -97,20 +97,46 @@ #gvgfight-hud .gvgfight-hud-auto { pointer-events: none; - cursor: none; - background-color: var(--black-50); + user-select: none; + background-color: var(--black-50); border: 1px solid #754e26; border-radius: 4px; - height: 22px; + height: 23px; box-sizing: border-box; float: left; z-index: 101; + position: absolute; + top: 372px; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; - font-size: 0.75rem; - font-weight: 400; + font-size: 0.88rem; + font-weight: 420; color: #f7dba4; text-align: center; - padding: 3px 3px 3px 3px; + padding: 0px 1px 0px 0px; + background: var(--black-50); + width: 171px; + margin: 0 0 2px 2px; +} + +#gvgfight-hud .gvgfight-hud-manual { + pointer-events: auto; + user-select: none; + background-color: var(--black-50); + border: 1px solid #754e26; + border-radius: 4px; + height: 23px; + box-sizing: border-box; + float: left; + z-index: 101; + position: absolute; + top: 372px; + left: 175px; + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + font-size: 0.88rem; + font-weight: 420; + color: var(--text-muted); + text-align: center; + padding: 0px 1px 0px 0px; background: var(--black-50); width: 171px; margin: 0 0 2px 2px; @@ -118,23 +144,94 @@ #gvgfight-hud .gvgfight-hud-ok { pointer-events: none; - cursor: none; - position:absolute; - top: 24px; + user-select: none; + position:absolute; + top: 395px; left:67px; background-color: var(--black-50); border: 1px solid #754e26; border-radius: 4px; - height: 22px; + height: 23px; box-sizing: border-box; float: left; z-index: 102; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; - font-size: 0.75rem; - font-weight: 400; + font-size: 0.88rem; + font-weight: 420; + color: #f7dba4; + text-align: center; + padding: 0px 1px 0px 0px; + background: var(--black-50); + width: 171px; + margin: 0 0 2px 2px; +} + +#gvgfight-hud .gvgfight-hud-siegearmy { + pointer-events: none; + user-select: none; + position:absolute; + left:269px; + background-color: var(--black-50); + border: 1px solid #754e26; + border-radius: 4px; + height: 41px; + box-sizing: border-box; + float: left; + z-index: 102; + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + font-size: 0.88rem; + font-weight: 420; + color: #f7dba4; + text-align: center; + padding: 11px 3px 3px 3px; + background: var(--black-50); + width: 41px; + margin: 0 0 2px 2px; +} + +#gvgfight-hud .gvgfight-hud-placesiegearmy { + pointer-events: none; + user-select: none; + position:absolute; + top: 320px; + left:166px; + background-color: var(--black-50); + border: 1px solid #754e26; + border-radius: 4px; + height: 23px; + box-sizing: border-box; + float: left; + z-index: 102; + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + font-size: 0.88rem; + font-weight: 475; + color: #f7dba4; + text-align: center; + padding: 0px 0px 0px 0px; + background: var(--black-50); + width: 171px; + margin: 0 0 2px 2px; +} + +#gvgfight-hud .gvgfight-hud-placesiegearmy-allage { + pointer-events: none; + user-select: none; + position:absolute; + top: 236px; + left:166px; + background-color: var(--black-50); + border: 1px solid #754e26; + border-radius: 4px; + height: 23px; + box-sizing: border-box; + float: left; + z-index: 102; + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + font-size: 0.88rem; + font-weight: 475; color: #f7dba4; text-align: center; - padding: 3px 3px 3px 3px; + padding: 0px 0px 0px 0px; background: var(--black-50); width: 171px; margin: 0 0 2px 2px; diff --git a/js/web/gvg/js/gvg.js b/js/web/gvg/js/gvg.js index eaeeaf9..a91eed0 100644 --- a/js/web/gvg/js/gvg.js +++ b/js/web/gvg/js/gvg.js @@ -11,6 +11,12 @@ * ************************************************************************************** */ +$(document).keydown(function(event){ + if( event.which === 65 && event.ctrlKey && event.altKey ){ + GvG.FlipFightOverlay(); + } +}); + FoEproxy.addHandler('ClanBattleService', 'grantIndependence', (data, postData) => { GvG.AddCount(data.responseData.__class__, postData[0]['requestMethod']); }); @@ -35,6 +41,7 @@ FoEproxy.addHandler('ClanBattleService', 'getContinent', (data, postData) => { FoEproxy.addHandler('ClanBattleService', 'getProvinceDetailed', (data, postData) => { GvGMap.initData(data['responseData']); GvG.IsContinent = false; + GvG.ReloadFightOverlay(); if ($('#GvGMapWrap').length > 0) { GvGMap.show(); } @@ -102,9 +109,13 @@ let GvG = { $('body').append(div).promise().done(function() { div.append('
'+GvG.Actions.Independences+'/4
') - .append('') - .append('') - .attr('title', i18n('GvG.Independences.Tooltip') + '
' + i18n('GvG.Independences.Tooltip.Warning') + '') + .append(''); + + if (Settings.GetSetting('ShowGvGFightHud')) { + div.append('') + } + + div.attr('title', i18n('GvG.Independences.Tooltip') + '
' + i18n('GvG.Independences.Tooltip.Warning') + '') .tooltip( { useFoEHelperSkin: true, @@ -134,7 +145,7 @@ let GvG = { /** * Build HUD */ - FlipFightOverlay: () => { + FlipFightOverlay: () => { if ($('#gvgfight-hud').length === 0) { GvG.ShowFightOverlay(); } else { @@ -142,6 +153,16 @@ let GvG = { } }, + /** + * Build HUD + */ + ReloadFightOverlay: () => { + if ($('#gvgfight-hud').length !== 0) { + GvG.HideFightOverlay(); + GvG.ShowFightOverlay(); + } + }, + /** * Build HUD */ @@ -156,8 +177,12 @@ let GvG = { }); $('body').append(div).promise().done(function() { - div.append('
Auto
'); + + div.append('
Auto-Kampf
'); + div.append('
Angreifen
'); div.append('
OK
'); + div.append('
BA
'); + div.append(`
Bezahlen und Platzieren
`); }); } }, diff --git a/js/web/indexdb/js/indexdb.js b/js/web/indexdb/js/indexdb.js index f6a3ce2..d64a17b 100644 --- a/js/web/indexdb/js/indexdb.js +++ b/js/web/indexdb/js/indexdb.js @@ -400,7 +400,7 @@ let IndexDB = { * @returns {Promise} */ GarbageCollector: async () => { - const neighborhoodAttackExpiryTime = moment().subtract(6, 'weeks').toDate(); + const neighborhoodAttackExpiryTime = moment().subtract(1, 'years').toDate(); // Expiry time for db with 1 record per day const daylyExpiryTime = moment().subtract(1, 'years').toDate(); // Expiry time for db with 1 record per hour diff --git a/js/web/looting/css/looting.css b/js/web/looting/css/looting.css index a820205..ad8d646 100644 --- a/js/web/looting/css/looting.css +++ b/js/web/looting/css/looting.css @@ -1,12 +1,47 @@ #lootingBody { max-height: 600px; width: 590px; - padding: 8px 0; - overflow: scroll; + margin-top: 2px; + overflow: auto; } #looting .header { - padding: 0 0 10px 10px; + padding: 0 0 2px 2px; +} + +#lootingBody .strategy-points { + margin-bottom: 10px; + justify-content: center; + display: flex; +} + +#lootingBody .strategy-points table { + align-self: center; +} + +#lootingBody .strategy-points tr th span { + display: inline-block; + width: 25px; + height: 25px; + vertical-align: bottom; +} + +#lootingBody .strategy-points tr th { + color: var(--text-bright); +} + +#lootingBody .strategy-points tr td { + color: var(--text-bright); +} + +#lootingBody .strategy-points tr th span.forgepoints { + background: url(../../x_img/forgepoints.png) center no-repeat; + background-size: contain; +} + +#lootingBody .strategy-points tr th span.doubleloot { + background: url(../../x_img/doubleloot.png) center no-repeat; + background-size: contain; } @@ -57,13 +92,22 @@ #looting div.filter { padding-right: 4px; + display: flow-root } +#looting div.filterd-by { + float: left; + height: 40px; +} + #looting div.filter-buttons { + float: right; display: flex; justify-content: flex-end; + align-items: flex-end; flex-direction: row; padding-right: 4px; + height: 40px; } #looting .action-row-type-1, #looting .action-row-type-2 { diff --git a/js/web/looting/js/looting.js b/js/web/looting/js/looting.js index c97014f..3a6ce86 100644 --- a/js/web/looting/js/looting.js +++ b/js/web/looting/js/looting.js @@ -525,31 +525,30 @@ let Looting = { } $('#lootingBody').html(` -
-
- Calculating strategy points... -
-
-
${i18n('Boxes.Looting.filteredByUser')}: - - ${filterByPlayerId ? - `${MainParser.GetPlayerLink(filterByPlayerId, playerName)} ${clanName ? `
[${clanName}]` : ''}` : - filterByPvPArena ? - `${i18n('Boxes.Looting.CurrentPvPArenaOpponents')}` : - `${i18n('Boxes.Looting.AllPlayers')}` - } -
+
+
+
+ Calculating strategy points...
-
-
${i18n('Boxes.Looting.showPvPArenaOpponents')}
-
- +
+
${i18n('Boxes.Looting.filteredByUser')}:
+ + ${filterByPlayerId ? + `${MainParser.GetPlayerLink(filterByPlayerId, playerName)} ${clanName ? ` [${clanName}]` : ''}` : + filterByPvPArena ? + `${i18n('Boxes.Looting.CurrentPvPArenaOpponents')}` : + `${i18n('Boxes.Looting.AllPlayers')}` + } + +
+
+
${i18n('Boxes.Looting.showPvPArenaOpponents')}
+
+
- ${actions.length === 0 ? `
- ${i18n('Boxes.Looting.noData')} -
` : ''} - ${Looting.RenderActions(actions) - } + ${Looting.RenderActions(actions)}