diff --git a/src/backend/Components/Item/ItemManager.ts b/src/backend/Components/Item/ItemManager.ts index e0b35a1..dbdb473 100644 --- a/src/backend/Components/Item/ItemManager.ts +++ b/src/backend/Components/Item/ItemManager.ts @@ -1,4 +1,4 @@ -import { T1 } from "../../Types/Items"; +import { T1, T2 } from "../../Types/Items"; import { Inject, Injectable } from "../../Injector/ServiceDecorator"; import { ItemManagerFeatureIfc, ItemManagerIfc } from "./RPCInterface"; import { FrontworkComponent } from "../../Types/FrontworkComponent"; @@ -9,7 +9,6 @@ import { IItemManager } from "./Interface"; import { getLogger } from "log4js"; import { IUserManager } from "../User/Interface"; import { ICharacterManager } from "../Character/Interface"; -import { join } from "path"; const fetch = require('node-fetch') const xml2js = require('xml2js'); @@ -250,10 +249,11 @@ implements FrontworkComponent, TableDefin if(this.initialized) return this.initialized = true - const allItems = [...T1] - getLogger('ItemManager').debug('Checking items') + const allItems = [...T1, ...T2] const countCache = await this.countItems() + getLogger('ItemManager').debug('Checking items, got: ',countCache, 'expected: ', allItems.length) + if(countCache != allItems.length){ const items:Item[] = await Promise.all(allItems.map((i) => this.fetchItem(i))) try{ diff --git a/src/backend/Types/Items.ts b/src/backend/Types/Items.ts index b67b29d..49c5d25 100644 --- a/src/backend/Types/Items.ts +++ b/src/backend/Types/Items.ts @@ -61,4 +61,75 @@ export const T1 = [ "Ring of Binding", "Shard of the Scale", "Head of Onyxia", -"Bindings of the Windseeker"] \ No newline at end of file +"Bindings of the Windseeker"] + +export const T2:string[] = [ +"Gloves of Rapid Evolution", +"Mantle of the Blackwing Cabal", +"Spineshatter", +"The Untamed Blade", +"Pendant of the Fallen Dragon", +"Helm of Endless Rage", +"Dragonfang Blade", +"Red Dragonscale Protector", +"Black Brood Pauldrons", +"Bracers of Arcane Accuracy", +"Heartstriker", +"Maladath, Runed Blade of the Black Flight", +"Black Ash Robe", +"Firemaw's Clutch", +"Claw of the Black Drake", +"Cloak of Firemaw", +"Legguards of the Fallen Crusader", +"Taut Dragonhide Belt", +"Drake Talon Pauldrons", +"Rejuvenating Gem", +"Drake Talon Cleaver", +"Band of Forced Concentration", +"Drake Fang Talisman", +"Ebony Flame Gloves", +"Malfurion's Blessed Bulwark", +"Dragonbreath Hand Cannon", +"Shadow Wing Focus Staff", +"Shroud of Pure Thought", +"Circle of Applied Force", +"Emberweave Leggings", +"Styleen's Impeding Scarab", +"Dragon's Touch", +"Herald of Woe", +"Taut Dragonhide Shoulderpads", +"Chromatic Boots", +"Taut Dragonhide Gloves", +"Shimmering Geta", +"Elementium Threaded Cloak", +"Angelista's Grasp", +"Girdle of the Fallen Crusader", +"Empowered Leggings", +"Chromatically Tempered Sword", +"Claw of Chromaggus", +"Primalist's Linked Waistguard", +"Ashjre'thul, Crossbow of Smiting", +"Elementium Reinforced Bulwark", +"Head of Nefarian", +"Cloak of the Brood Lord", +"Boots of the Shadow Flame", +"Therazane's Link", +"Archimtiros' Ring of Reckoning", +"Neltharion's Tear", +"Pure Elementium Band", +"Mish'undare, Circlet of the Mind Flayer", +"Prestor's Talisman of Connivery", +"Staff of the Shadow Flame", +"Ashkandi, Greatsword of the Brotherhood", +"Crul'shorukh, Edge of Chaos", +"Lok'amir il Romathis", +"Boots of Pure Thought", +"Cloak of Draconic Might", +"Draconic Maul", +"Doom's Edge", +"Essence Gatherer", +"Band of Dark Dominion", +"Draconic Avenger", +"Interlaced Shadow Jerkin", +"Ringo's Blizzard Boots" +] \ No newline at end of file diff --git a/src/backend/Types/PlayerSpecs.ts b/src/backend/Types/PlayerSpecs.ts index e097217..1259464 100644 --- a/src/backend/Types/PlayerSpecs.ts +++ b/src/backend/Types/PlayerSpecs.ts @@ -2,7 +2,7 @@ import { Spec, _Class, Class } from "./Types" export type SpecT = { Warrior : 'Arms' | 'Fury' | 'Protection' - Rogue: 'Subetly' | 'Combat' | 'Assassination' + Rogue: 'Subtlety' | 'Combat' | 'Assassination' Hunter: 'Beast Mastery' | 'Marksmanship' | 'Survival' Paladin: 'Holy' | 'Protection' | 'Retribution' Priest: 'Discipline' | 'Holy' | 'Shadow' @@ -20,7 +20,7 @@ export const specs : { [classname in keyof SpecT] : SpecT[classname][] } = { ], Rogue: [ - 'Subetly', + 'Subtlety', 'Combat', 'Assassination' ], diff --git a/src/frontend/src/app/@theme/components/header/header.component.ts b/src/frontend/src/app/@theme/components/header/header.component.ts index 4d32835..e43cae9 100644 --- a/src/frontend/src/app/@theme/components/header/header.component.ts +++ b/src/frontend/src/app/@theme/components/header/header.component.ts @@ -40,7 +40,7 @@ export class HeaderComponent implements OnInit, OnDestroy { }, ]; - currentTheme = 'dark'; + currentTheme = 'default'; userMenu : NbMenuItem[] = [ { title: 'Log out', link: '/auth/logout' } ]; sendMessage: any = console.log @@ -59,6 +59,8 @@ export class HeaderComponent implements OnInit, OnDestroy { ) {} ngOnInit() { + this.themeService.changeTheme("dark"); + this.currentTheme = this.themeService.currentTheme; this.user = this.api.getCurrentUser() diff --git a/src/frontend/src/app/frontcraft/pages/raid/characterpicker.component.html b/src/frontend/src/app/frontcraft/pages/raid/characterpicker.component.html index a7dbfbc..f590630 100644 --- a/src/frontend/src/app/frontcraft/pages/raid/characterpicker.component.html +++ b/src/frontend/src/app/frontcraft/pages/raid/characterpicker.component.html @@ -1,30 +1,36 @@ - + Pick Character
+ + + {{character.charactername}} + +
+
+
+ - +   +   +   - - {{character.charactername}} - -
\ No newline at end of file diff --git a/src/frontend/src/app/frontcraft/pages/raids/createraid.component.html b/src/frontend/src/app/frontcraft/pages/raids/createraid.component.html index 0a161f0..16da56c 100644 --- a/src/frontend/src/app/frontcraft/pages/raids/createraid.component.html +++ b/src/frontend/src/app/frontcraft/pages/raids/createraid.component.html @@ -1,6 +1,6 @@ - + Create Raid diff --git a/src/frontend/src/app/frontcraft/pages/raids/raids.component.html b/src/frontend/src/app/frontcraft/pages/raids/raids.component.html index bea8bd5..48828b2 100644 --- a/src/frontend/src/app/frontcraft/pages/raids/raids.component.html +++ b/src/frontend/src/app/frontcraft/pages/raids/raids.component.html @@ -11,11 +11,31 @@ nbInfiniteList listenWindowScroll [threshold]="500"> - - {{raid.title}}
- {{raid.signupcount}} / {{raid.size}}
- {{raid.start | date : 'EEEE d MMMM @ HH:mm'}}
- {{raid.description}}
+ +
+
+ +
+ +
+ {{raid.title}} +
+ +
+ {{raid.signupcount}} / {{raid.size}}
+
+ +
+ {{raid.start | date : 'HH:mm'}} +
+ +
+ {{raid.start | date : 'EEEE MMMM d'}} +
+
diff --git a/src/frontend/src/app/frontcraft/pages/raids/raids.component.scss b/src/frontend/src/app/frontcraft/pages/raids/raids.component.scss index 0e5b7ee..a71122f 100644 --- a/src/frontend/src/app/frontcraft/pages/raids/raids.component.scss +++ b/src/frontend/src/app/frontcraft/pages/raids/raids.component.scss @@ -5,3 +5,12 @@ } } } + +.raidlist:hover { + background-color: #293259; +} + +.vcenter { + height: 75px; + padding-top: 30px; +} \ No newline at end of file diff --git a/src/frontend/src/assets/images/alan.png b/src/frontend/src/assets/images/alan.png deleted file mode 100644 index 9b107ce..0000000 Binary files a/src/frontend/src/assets/images/alan.png and /dev/null differ diff --git a/src/frontend/src/assets/images/camera1.jpg b/src/frontend/src/assets/images/camera1.jpg deleted file mode 100644 index 8115dbb..0000000 Binary files a/src/frontend/src/assets/images/camera1.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/camera2.jpg b/src/frontend/src/assets/images/camera2.jpg deleted file mode 100644 index 73fdfcc..0000000 Binary files a/src/frontend/src/assets/images/camera2.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/camera3.jpg b/src/frontend/src/assets/images/camera3.jpg deleted file mode 100644 index 5cdce5b..0000000 Binary files a/src/frontend/src/assets/images/camera3.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/camera4.jpg b/src/frontend/src/assets/images/camera4.jpg deleted file mode 100644 index 98aeeb1..0000000 Binary files a/src/frontend/src/assets/images/camera4.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/cover1.jpg b/src/frontend/src/assets/images/cover1.jpg deleted file mode 100644 index 38c00ca..0000000 Binary files a/src/frontend/src/assets/images/cover1.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/cover2.jpg b/src/frontend/src/assets/images/cover2.jpg deleted file mode 100644 index 92615f2..0000000 Binary files a/src/frontend/src/assets/images/cover2.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/cover3.jpg b/src/frontend/src/assets/images/cover3.jpg deleted file mode 100644 index fadf382..0000000 Binary files a/src/frontend/src/assets/images/cover3.jpg and /dev/null differ diff --git a/src/frontend/src/assets/images/druid.png b/src/frontend/src/assets/images/druid.png new file mode 100755 index 0000000..9c54242 Binary files /dev/null and b/src/frontend/src/assets/images/druid.png differ diff --git a/src/frontend/src/assets/images/eva.png b/src/frontend/src/assets/images/eva.png deleted file mode 100644 index 04baf87..0000000 Binary files a/src/frontend/src/assets/images/eva.png and /dev/null differ diff --git a/src/frontend/src/assets/images/hunter.png b/src/frontend/src/assets/images/hunter.png new file mode 100755 index 0000000..c243431 Binary files /dev/null and b/src/frontend/src/assets/images/hunter.png differ diff --git a/src/frontend/src/assets/images/jack.png b/src/frontend/src/assets/images/jack.png deleted file mode 100644 index bd9d68c..0000000 Binary files a/src/frontend/src/assets/images/jack.png and /dev/null differ diff --git a/src/frontend/src/assets/images/kate.png b/src/frontend/src/assets/images/kate.png deleted file mode 100644 index 0ec8a19..0000000 Binary files a/src/frontend/src/assets/images/kate.png and /dev/null differ diff --git a/src/frontend/src/assets/images/kitten-corporate.png b/src/frontend/src/assets/images/kitten-corporate.png deleted file mode 100644 index 15e03eb..0000000 Binary files a/src/frontend/src/assets/images/kitten-corporate.png and /dev/null differ diff --git a/src/frontend/src/assets/images/kitten-cosmic.png b/src/frontend/src/assets/images/kitten-cosmic.png deleted file mode 100644 index 3966612..0000000 Binary files a/src/frontend/src/assets/images/kitten-cosmic.png and /dev/null differ diff --git a/src/frontend/src/assets/images/kitten-dark.png b/src/frontend/src/assets/images/kitten-dark.png deleted file mode 100644 index 3966612..0000000 Binary files a/src/frontend/src/assets/images/kitten-dark.png and /dev/null differ diff --git a/src/frontend/src/assets/images/kitten-default.png b/src/frontend/src/assets/images/kitten-default.png deleted file mode 100644 index 9ef74ff..0000000 Binary files a/src/frontend/src/assets/images/kitten-default.png and /dev/null differ diff --git a/src/frontend/src/assets/images/lee.png b/src/frontend/src/assets/images/lee.png deleted file mode 100644 index 95c1ef7..0000000 Binary files a/src/frontend/src/assets/images/lee.png and /dev/null differ diff --git a/src/frontend/src/assets/images/mage.png b/src/frontend/src/assets/images/mage.png new file mode 100755 index 0000000..3db1ae8 Binary files /dev/null and b/src/frontend/src/assets/images/mage.png differ diff --git a/src/frontend/src/assets/images/nick.png b/src/frontend/src/assets/images/nick.png deleted file mode 100644 index 0045d24..0000000 Binary files a/src/frontend/src/assets/images/nick.png and /dev/null differ diff --git a/src/frontend/src/assets/images/paladin.png b/src/frontend/src/assets/images/paladin.png new file mode 100755 index 0000000..58fd2ad Binary files /dev/null and b/src/frontend/src/assets/images/paladin.png differ diff --git a/src/frontend/src/assets/images/priest.png b/src/frontend/src/assets/images/priest.png new file mode 100755 index 0000000..8a982d3 Binary files /dev/null and b/src/frontend/src/assets/images/priest.png differ diff --git a/src/frontend/src/assets/images/rogue.png b/src/frontend/src/assets/images/rogue.png new file mode 100755 index 0000000..16a6594 Binary files /dev/null and b/src/frontend/src/assets/images/rogue.png differ diff --git a/src/frontend/src/assets/images/shaman.png b/src/frontend/src/assets/images/shaman.png new file mode 100755 index 0000000..494d9a1 Binary files /dev/null and b/src/frontend/src/assets/images/shaman.png differ diff --git a/src/frontend/src/assets/images/warrior.png b/src/frontend/src/assets/images/warrior.png new file mode 100755 index 0000000..cd4493c Binary files /dev/null and b/src/frontend/src/assets/images/warrior.png differ diff --git a/test/backendTest.ts b/test/backendTest.ts index 58cd67e..592b9c0 100644 --- a/test/backendTest.ts +++ b/test/backendTest.ts @@ -3,7 +3,7 @@ import { FrontworkAdmin } from "../src/backend/Admin/Admin"; import { T1 } from "../src/backend/Types/Items"; import { RPCSocket } from "rpclibrary"; -import { FrontcraftIfc, Auth, User, FrontcraftFeatureIfc, Raid, Character, Rank, Class, Race } from "../src/backend/Types/Types"; +import { FrontcraftIfc, Auth, User, FrontcraftFeatureIfc, Raid, Character, Rank, Class, Race, SRPriority, Spec } from "../src/backend/Types/Types"; import { SpecT } from "../src/backend/Types/PlayerSpecs"; @@ -227,9 +227,214 @@ describe('Frontcraft', () => { }) it('calculate priorities', (done)=>{ + const makePrio = async (itemname:string, spec?: Spec, race?:Race, mod:number = 0, description:string = "") => { + let specid + if(spec) + specid = await client.CharacterManager.getSpecId(spec.class, spec.specname) + + await adminClient.managePriorities.setPriority(itemname, { + specid: specid, + race: race, + modifier: mod, + description: description + }) + } + + + Promise.all([ + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Warlock', specname:'Demonology'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Warlock', specname:'Affliction'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Warlock', specname:'Destruction'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Mage', specname:'Arcane'}, + undefined, 1, "hit bias" + ), + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Mage', specname:'Frost'}, + undefined, 1, "hit bias" + ), + makePrio( + 'Bracers of Arcane Accuracy', + {class:'Mage', specname:'Fire'}, + undefined, 1, "hit bias" + ), + + makePrio( + 'Maladath, Runed Blade of the Black Flight', + {class:'Warrior', specname:'Fury'}, + 'Human', 2, "weapon skill bias" + ), + + makePrio( + 'Cloak of Firemaw', + {class:'Rogue', specname:'Assassination'}, + undefined, 2, "agi-to-ap bias" + ), + makePrio( + 'Cloak of Firemaw', + {class:'Rogue', specname:'Combat'}, + undefined, 2, "agi-to-ap bias" + ), + makePrio( + 'Cloak of Firemaw', + {class:'Rogue', specname:'Subtlety'}, + undefined, 2, "agi-to-ap bias" + ), + + makePrio( + 'Band of Forced Concentration', + {class:'Warlock', specname:'Demonology'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Band of Forced Concentration', + {class:'Warlock', specname:'Affliction'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Band of Forced Concentration', + {class:'Warlock', specname:'Destruction'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Band of Forced Concentration', + {class:'Mage', specname:'Arcane'}, + undefined, 1, "hit bias" + ), + makePrio( + 'Band of Forced Concentration', + {class:'Mage', specname:'Frost'}, + undefined, 1, "hit bias" + ), + makePrio( + 'Band of Forced Concentration', + {class:'Mage', specname:'Fire'}, + undefined, 1, "hit bias" + ), + + makePrio( + 'Drake Fang Talisman', + {class:'Rogue', specname:'Assassination'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Drake Fang Talisman', + {class:'Rogue', specname:'Combat'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Drake Fang Talisman', + {class:'Rogue', specname:'Subtlety'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Drake Fang Talisman', + {class:'Warrior', specname:'Fury'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Drake Fang Talisman', + {class:'Druid', specname:'Feral (DPS)'}, + undefined, 2, "hit bias" + ), + + makePrio( + 'Circle of Applied Force', + {class:'Warrior', specname:'Fury'}, + undefined, 2, "str-to-ap bias" + ), + makePrio( + 'Circle of Applied Force', + {class:'Druid', specname:'Feral (DPS)'}, + undefined, 2, "str-to-ap bias" + ), + + makePrio( + 'Empowered Leggings', + {class:'Paladin', specname:'Holy'}, + undefined, 2, "crit bias" + ), + + makePrio( + 'Boots of the Shadow Flame', + {class:'Rogue', specname:'Assassination'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Boots of the Shadow Flame', + {class:'Rogue', specname:'Combat'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Boots of the Shadow Flame', + {class:'Rogue', specname:'Subtlety'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Boots of the Shadow Flame', + {class:'Druid', specname:'Feral (DPS)'}, + undefined, 2, "hit bias" + ), + + makePrio( + 'Neltharion\'s Tear', + {class:'Warlock', specname:'Demonology'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Neltharion\'s Tear', + {class:'Warlock', specname:'Affliction'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Neltharion\'s Tear', + {class:'Warlock', specname:'Destruction'}, + undefined, 4, "hit bias" + ), + makePrio( + 'Neltharion\'s Tear', + {class:'Mage', specname:'Arcane'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Neltharion\'s Tear', + {class:'Mage', specname:'Frost'}, + undefined, 2, "hit bias" + ), + makePrio( + 'Neltharion\'s Tear', + {class:'Mage', specname:'Fire'}, + undefined, 2, "hit bias" + ), + + makePrio( + 'Cloak of Draconic Might', + {class:'Warrior', specname:'Fury'}, + undefined, 2, "str-to-ap bias" + ), + makePrio( + 'Cloak of Draconic Might', + {class:'Druid', specname:'Feral (DPS)'}, + undefined, 2, "str-to-ap bias" + ), + ]) + const user = Object.values(users)[0] - adminClient.managePriorities.setPriority(T1[0], { race: user.character.race, specid: user.character.specid,