commit
ebf57b42a3
6 changed files with 269 additions and 1 deletions
151
data/Skills.csv
Normal file
151
data/Skills.csv
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
ID,CategoryId,SkillCostId,Name,SpellIcon,AltVerb,CanLink
|
||||
6,7,0,Frost,188,,0
|
||||
8,7,0,Fire,183,,0
|
||||
26,7,0,Arms,514,,0
|
||||
38,7,0,Combat,243,,0
|
||||
39,7,0,Subtlety,250,,0
|
||||
43,6,0,Swords,1,,0
|
||||
44,6,0,Axes,1,,0
|
||||
45,6,0,Bows,1,,0
|
||||
46,6,0,Guns,1,,0
|
||||
50,7,0,Beast Mastery,255,,0
|
||||
51,7,0,Survival,257,,0
|
||||
54,6,0,Maces,1,,0
|
||||
55,6,0,Two-Handed Swords,1,,0
|
||||
56,7,0,Holy,70,,0
|
||||
78,7,0,Shadow Magic,234,,0
|
||||
95,6,0,Defense,1,,0
|
||||
98,10,0,Language: Common,1,,0
|
||||
101,9,0,Dwarven Racial,1,,0
|
||||
109,10,0,Language: Orcish,1,,0
|
||||
111,10,0,Language: Dwarven,1,,0
|
||||
113,10,0,Language: Darnassian,1,,0
|
||||
115,10,0,Language: Taurahe,1,,0
|
||||
118,6,0,Dual Wield,1,,0
|
||||
124,9,0,Tauren Racial,1,,0
|
||||
125,9,0,Orc Racial,1,,0
|
||||
126,9,0,Night Elf Racial,1,,0
|
||||
129,9,0,First Aid,504,,1
|
||||
134,7,0,Feral Combat,107,,0
|
||||
136,6,0,Staves,1,,0
|
||||
137,10,0,Language: Thalassian,1,,0
|
||||
138,10,0,Language: Draconic,1,,0
|
||||
139,10,0,Language: Demon Tongue,1,,0
|
||||
140,10,0,Language: Titan,1,,0
|
||||
141,10,0,Language: Old Tongue,1,,0
|
||||
142,9,0,Survival,1,,0
|
||||
148,9,0,Horse Riding,1,,0
|
||||
149,9,0,Wolf Riding,1,,0
|
||||
150,9,0,Tiger Riding,1,,0
|
||||
152,9,0,Ram Riding,1,,0
|
||||
155,9,0,Swimming,1,,0
|
||||
160,6,0,Two-Handed Maces,1,,0
|
||||
162,6,0,Unarmed,1,,0
|
||||
163,7,0,Marksmanship,126,,0
|
||||
164,11,0,Blacksmithing,335,Modify,1
|
||||
165,11,0,Leatherworking,346,Emboss,1
|
||||
171,11,0,Alchemy,339,Refill,1
|
||||
172,6,0,Two-Handed Axes,1,,0
|
||||
173,6,0,Daggers,1,,0
|
||||
176,6,0,Thrown,1,,0
|
||||
182,11,0,Herbalism,345,,0
|
||||
183,12,0,GENERIC (DND),1,,0
|
||||
184,7,0,Retribution,555,,0
|
||||
185,9,0,Cooking,1467,,1
|
||||
186,11,0,Mining,2418,,0
|
||||
188,7,0,Pet - Imp,1,,0
|
||||
189,7,0,Pet - Felhunter,1,,0
|
||||
197,11,0,Tailoring,341,Embroider,1
|
||||
202,11,0,Engineering,333,Tinker,1
|
||||
203,7,0,Pet - Spider,1,,0
|
||||
204,7,0,Pet - Voidwalker,1,,0
|
||||
205,7,0,Pet - Succubus,1,,0
|
||||
206,7,0,Pet - Infernal,1,,0
|
||||
207,7,0,Pet - Doomguard,1,,0
|
||||
208,7,0,Pet - Wolf,1,,0
|
||||
209,7,0,Pet - Cat,1,,0
|
||||
210,7,0,Pet - Bear,1,,0
|
||||
211,7,0,Pet - Boar,1,,0
|
||||
212,7,0,Pet - Crocolisk,1,,0
|
||||
213,7,0,Pet - Carrion Bird,1,,0
|
||||
214,7,0,Pet - Crab,1,,0
|
||||
215,7,0,Pet - Gorilla,1,,0
|
||||
217,7,0,Pet - Raptor,1,,0
|
||||
218,7,0,Pet - Tallstrider,1,,0
|
||||
220,9,0,Racial - Undead,1,,0
|
||||
226,6,0,Crossbows,1,,0
|
||||
228,6,0,Wands,1,,0
|
||||
229,6,0,Polearms,1,,0
|
||||
236,7,0,Pet - Scorpid,1,,0
|
||||
237,7,0,Arcane,125,,0
|
||||
251,7,0,Pet - Turtle,1,,0
|
||||
253,7,0,Assassination,514,,0
|
||||
256,7,0,Fury,561,,0
|
||||
257,7,0,Protection,276,,0
|
||||
267,7,0,Protection,291,,0
|
||||
270,7,0,Pet - Generic Hunter,1,,0
|
||||
293,8,0,Plate Mail,1,,0
|
||||
313,10,0,Language: Gnomish,1,,0
|
||||
315,10,0,Language: Troll,1,,0
|
||||
333,11,0,Enchanting,578,Enchant,1
|
||||
354,7,0,Demonology,90,,0
|
||||
355,7,0,Affliction,88,,0
|
||||
356,9,0,Fishing,580,,0
|
||||
373,7,0,Enhancement,19,,0
|
||||
374,7,0,Restoration,13,,0
|
||||
375,7,0,Elemental Combat,62,,0
|
||||
393,11,0,Skinning,1,,0
|
||||
413,8,0,Mail,1,,0
|
||||
414,8,0,Leather,1,,0
|
||||
415,8,0,Cloth,1,,0
|
||||
433,8,0,Shield,1,,0
|
||||
473,6,0,Fist Weapons,1,,0
|
||||
533,9,0,Raptor Riding,1,,0
|
||||
553,9,0,Mechanostrider Piloting,1,,0
|
||||
554,9,0,Undead Horsemanship,1,,0
|
||||
573,7,0,Restoration,962,,0
|
||||
574,7,0,Balance,225,,0
|
||||
593,7,0,Destruction,547,,0
|
||||
594,7,0,Holy,70,,0
|
||||
613,7,0,Discipline,685,,0
|
||||
633,7,0,Lockpicking,1,,0
|
||||
653,7,0,Pet - Bat,1,,0
|
||||
654,7,0,Pet - Hyena,1,,0
|
||||
655,7,0,Pet - Bird of Prey,1,,0
|
||||
656,7,0,Pet - Wind Serpent,1,,0
|
||||
673,10,0,Language: Gutterspeak,1,,0
|
||||
713,9,0,Kodo Riding,317,,0
|
||||
733,9,0,Racial - Troll,0,,0
|
||||
753,9,0,Racial - Gnome,0,,0
|
||||
754,9,0,Racial - Human,0,,0
|
||||
755,11,0,Jewelcrafting,1768,Modify,1
|
||||
756,9,0,Blood Elf Racial,0,,0
|
||||
758,-1,0,Pet - Event - Remote Control,0,,0
|
||||
759,10,0,Language: Draenei,0,,0
|
||||
760,9,0,Draenei Racial,0,,0
|
||||
761,7,0,Pet - Felguard,0,,0
|
||||
762,9,0,Riding,255,,0
|
||||
763,7,0,Pet - Dragonhawk,1530,,0
|
||||
764,7,0,Pet - Nether Ray,1577,,0
|
||||
765,7,0,Pet - Sporebat,2033,,0
|
||||
766,7,0,Pet - Warp Stalker,1952,,0
|
||||
767,7,0,Pet - Ravager,1585,,0
|
||||
768,7,0,Pet - Serpent,2167,,0
|
||||
769,7,22,Internal,1775,,0
|
||||
770,7,0,Blood,2636,,0
|
||||
771,7,0,Frost,2632,,0
|
||||
772,7,0,Unholy,2633,,0
|
||||
773,11,0,Inscription,3267,Inscribe,1
|
||||
775,7,0,Pet - Moth,0,,0
|
||||
776,7,0,Runeforging,2727,Engrave,0
|
||||
777,7,0,Mounts,2224,,0
|
||||
778,7,0,Companions,0,,0
|
||||
780,7,0,Pet - Exotic Chimaera,0,,0
|
||||
781,7,0,Pet - Exotic Devlisaur,0,,0
|
||||
782,7,0,Pet - Ghoul,221,,0
|
||||
783,7,0,Pet - Exotic Silithid,0,,0
|
||||
784,7,0,Pet - Exotic Worm,0,,0
|
||||
785,7,0,Pet- Wasp,0,,0
|
||||
786,7,0,Pet - Exotic Rhino,0,,0
|
||||
787,7,0,Pet - Exotic Core Hound,0,,0
|
||||
788,5,0,Pet - Exotic Spirit Beast,0,,0
|
||||
|
|
|
@ -150,6 +150,7 @@ export class Armory {
|
|||
await charsController.load();
|
||||
app.get("/character/:realm/:name", this.wrapRoute(charsController.character.bind(charsController)));
|
||||
app.get("/character/:realm/:name/talents", this.wrapRoute(charsController.talents.bind(charsController)));
|
||||
app.get("/character/:realm/:name/skills", this.wrapRoute(charsController.skills.bind(charsController)));
|
||||
app.get("/character/:realm/:name/achievements", this.wrapRoute(charsController.achievements.bind(charsController)));
|
||||
app.get("/character/:realm/:character/achievements/data", this.wrapRoute(charsController.achievementsData.bind(charsController)));
|
||||
app.get("/character/:realm/:name/pvp", this.wrapRoute(charsController.pvp.bind(charsController)));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { RowDataPacket } from "mysql2/promise";
|
|||
import { Armory } from "../Armory";
|
||||
import { IRealmConfig } from "../Config";
|
||||
import { IEmblem, Utils } from "../Utils";
|
||||
import { IAchievement as IAchievementDbc } from "../data/DbcReader";
|
||||
import { IAchievement as IAchievementDbc, ISkillDbc } from "../data/DbcReader";
|
||||
|
||||
interface ICharacterData {
|
||||
guid: number;
|
||||
|
|
@ -72,6 +72,13 @@ interface IArenaTeam {
|
|||
emblem?: IEmblem;
|
||||
}
|
||||
|
||||
interface ISkills {
|
||||
id: number;
|
||||
skill: string;
|
||||
value: number;
|
||||
max: number ;
|
||||
}
|
||||
|
||||
const ItemClassGem = 3;
|
||||
const SpellMechanicMounted = 21;
|
||||
const RaceDisplayName = {
|
||||
|
|
@ -108,6 +115,7 @@ export class CharacterController {
|
|||
private itemSocketBonuses: { [key: number]: number };
|
||||
private mountSpells: number[];
|
||||
private mountBySpellId: { [key: number]: IMount };
|
||||
private skillById: { [key: number]: ISkillDbc };
|
||||
private achievementById: { [key: number]: IAchievementDbc };
|
||||
|
||||
public constructor(armory: Armory) {
|
||||
|
|
@ -180,6 +188,11 @@ export class CharacterController {
|
|||
for await (const achievement of this.armory.dbc.achievement()) {
|
||||
this.achievementById[achievement.id] = achievement;
|
||||
}
|
||||
|
||||
this.skillById = {};
|
||||
for await (const skill of this.armory.dbc.skill()) {
|
||||
this.skillById[skill.id] = skill;
|
||||
}
|
||||
}
|
||||
|
||||
public async character(req: express.Request, res: express.Response, next: express.NextFunction): Promise<void> {
|
||||
|
|
@ -257,6 +270,31 @@ export class CharacterController {
|
|||
});
|
||||
}
|
||||
|
||||
public async skills(req: express.Request, res: express.Response, next: express.NextFunction): Promise<void> {
|
||||
const realmName = req.params.realm;
|
||||
const charName = req.params.name;
|
||||
|
||||
const realm = this.armory.getRealm(realmName);
|
||||
if (realm === undefined) {
|
||||
// Could not find realm
|
||||
return next(404);
|
||||
}
|
||||
|
||||
const charData = await this.getCharacterData(realm, charName);
|
||||
if (charData === null) {
|
||||
// Could not find character
|
||||
return next(404);
|
||||
}
|
||||
|
||||
res.render("character-skills.hbs", {
|
||||
title: `Armory - ${charData.name} - Skills`,
|
||||
...this.makeSharedDataObject(realm, charData),
|
||||
data: {
|
||||
skills: await this.getSkills(realm.name, charData.guid),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public async achievements(req: express.Request, res: express.Response, next: express.NextFunction): Promise<void> {
|
||||
const realmName = req.params.realm;
|
||||
const charName = req.params.name;
|
||||
|
|
@ -968,6 +1006,30 @@ export class CharacterController {
|
|||
return talents;
|
||||
}
|
||||
|
||||
private async getSkills(realm: string, character: number): Promise<ISkills[]> {
|
||||
const [rows] = await this.armory.getCharactersDb(realm).query({
|
||||
sql: `
|
||||
SELECT skill, value, max
|
||||
FROM character_skills
|
||||
WHERE guid = ?
|
||||
`,
|
||||
values: [character],
|
||||
timeout: this.armory.config.dbQueryTimeout,
|
||||
});
|
||||
|
||||
const skills: { id: number, skill: string; value: number; max: number }[] = [];
|
||||
for (const row of rows as RowDataPacket[]) {
|
||||
skills.push({
|
||||
id: row.skill,
|
||||
skill: this.skillById[row.skill].name,
|
||||
value: row.value,
|
||||
max: row.max,
|
||||
});
|
||||
}
|
||||
|
||||
return skills;
|
||||
}
|
||||
|
||||
private async getTalentTrees(classId: number) {
|
||||
const items = await this.armory.dbc
|
||||
.talentTab()
|
||||
|
|
|
|||
|
|
@ -65,6 +65,16 @@ export interface IMountXDisplayDbc {
|
|||
mountId: number;
|
||||
}
|
||||
|
||||
export interface ISkillDbc {
|
||||
id: number;
|
||||
categoryId: number;
|
||||
skillCostId: number;
|
||||
name: string;
|
||||
spellIcon: number;
|
||||
altVerb: string;
|
||||
canLink: number;
|
||||
}
|
||||
|
||||
export interface ISpellDbc {
|
||||
id: number;
|
||||
mechanic: number;
|
||||
|
|
@ -313,6 +323,7 @@ export const DbcFiles = {
|
|||
itemDisplayInfo: path.join(dir, "ItemDisplayInfo_3.3.5_12340.csv"),
|
||||
mount: path.join(dir, "Mount_9.2.0_41462.csv"),
|
||||
mountDisplay: path.join(dir, "MountXDisplay_9.2.0_41462.csv"),
|
||||
skill: path.join(dir, "Skills.csv"),
|
||||
spell: path.join(dir, "Spell_3.3.5_12340.csv"),
|
||||
spellItemEnchantment: path.join(dir, "SpellItemEnchantment_3.3.5_12340.csv"),
|
||||
spellIcon: path.join(dir, "SpellIcon_3.3.5_12340.csv"),
|
||||
|
|
@ -331,6 +342,7 @@ const dbcFields = {
|
|||
itemDisplayInfo: ["id", "inventoryIcon0"],
|
||||
mount: ["id", "sourceSpellId"],
|
||||
mountDisplay: ["id", "creatureDisplayInfoId", "mountId"],
|
||||
skill: ["id", "name"],
|
||||
spell: ["id", "mechanic", "spellIconId"],
|
||||
spellItemEnchantment: ["id", "srcItemId"],
|
||||
spellIcon: ["id", "textureFilename"],
|
||||
|
|
@ -361,6 +373,7 @@ export class DbcManager {
|
|||
private _itemDisplayInfo: IItemDisplayInfoDbc[];
|
||||
private _mount: IMountDbc[];
|
||||
private _mountDisplay: IMountXDisplayDbc[];
|
||||
private _skill: ISkillDbc[];
|
||||
private _spell: ISpellDbc[];
|
||||
private _spellItemEnchantment: ISpellItemEnchantmentDbc[];
|
||||
private _spellIcon: ISpellIcon[];
|
||||
|
|
@ -384,6 +397,7 @@ export class DbcManager {
|
|||
this._itemDisplayInfo = await this.read<IItemDisplayInfoDbc>(DbcFiles.itemDisplayInfo, dbcFields.itemDisplayInfo).toArray();
|
||||
this._mount = await this.read<IMountDbc>(DbcFiles.mount, dbcFields.mount).toArray();
|
||||
this._mountDisplay = await this.read<IMountXDisplayDbc>(DbcFiles.mountDisplay, dbcFields.mountDisplay).toArray();
|
||||
this._skill = await this.read<ISkillDbc>(DbcFiles.skill).toArray();
|
||||
this._spell = await this.read<ISpellDbc>(DbcFiles.spell, dbcFields.spell).toArray();
|
||||
this._spellItemEnchantment = await this.read<ISpellItemEnchantmentDbc>(
|
||||
DbcFiles.spellItemEnchantment,
|
||||
|
|
@ -434,6 +448,10 @@ export class DbcManager {
|
|||
return this.getLoadedDataOrRead(DbcFiles.mountDisplay, this._mountDisplay, dbcFields.mountDisplay);
|
||||
}
|
||||
|
||||
public skill() {
|
||||
return this.getLoadedDataOrRead(DbcFiles.skill, this._skill, dbcFields.skill);
|
||||
}
|
||||
|
||||
public spell() {
|
||||
return this.getLoadedDataOrRead(DbcFiles.spell, this._spell, dbcFields.spell);
|
||||
}
|
||||
|
|
|
|||
35
static/character-skills.hbs
Normal file
35
static/character-skills.hbs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<link rel="stylesheet" type="text/css" href="{{websiteRoot}}/css/character-talents.css">
|
||||
{{> icons }}
|
||||
<script type="application/javascript">
|
||||
const aowow_tooltips = { "renamelinks": true, };
|
||||
</script>
|
||||
|
||||
{{> character-header }}
|
||||
|
||||
<div class="skills-table">
|
||||
<h2 class="is-size-4">Character Skills</h2>
|
||||
<table class="table is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
{{!-- <th>Skill ID</th> --}}
|
||||
<th>Skill Name</th>
|
||||
<th>Skill Value</th>
|
||||
<th>Max Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each data.skills}}
|
||||
<tr>
|
||||
{{!-- <td>{{this.id}}</td> --}}
|
||||
<td>{{this.skill}}</td>
|
||||
<td>{{this.value}}</td>
|
||||
<td>{{this.max}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
// Add any additional JavaScript logic if needed
|
||||
</script>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<a href="{{websiteRoot}}/character/{{realm}}/{{name}}">Character</a> 
|
||||
<a href="{{websiteRoot}}/character/{{realm}}/{{name}}/talents">Talents</a> 
|
||||
<a href="{{websiteRoot}}/character/{{realm}}/{{name}}/skills">Skills</a> 
|
||||
<a href="{{websiteRoot}}/character/{{realm}}/{{name}}/achievements">Achievements</a> 
|
||||
<a href="{{websiteRoot}}/character/{{realm}}/{{name}}/pvp">PvP</a> 
|
||||
<br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue