From 2d672fd5ed1636e7a00d1c8a0abe309e2999ba9c Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Sun, 20 Mar 2022 20:28:38 +0100
Subject: [PATCH 01/52] docs(README): fix issue links
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 4d0f92c..22b8f20 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,11 @@
A website to view your AzerothCore server's characters
- Report a Bug
+ Report a Bug
·
- Request a Feature
+ Suggest a Feature
·
- Ask a Question
+ Ask a Question
@@ -324,4 +324,4 @@ Distributed under the MIT License. See the [`LICENSE`][license-url] file for mor
[issues-url]: https://github.com/r-o-b-o-t-o/azerothcore-armory/issues
[license-shield]: https://img.shields.io/github/license/r-o-b-o-t-o/azerothcore-armory.svg?style=flat
[license-url]: https://github.com/r-o-b-o-t-o/azerothcore-armory/blob/master/LICENSE
-[feature-request]: https://github.com/r-o-b-o-t-o/azerothcore-armory/issues/new?template=feature_request.yml
+[feature-request]: https://github.com/r-o-b-o-t-o/azerothcore-armory/issues/new?assignees=&labels=enhancement&template=feature_request.yml
From af497b7ea670ed841ad24147a70fcb25123d9b7e Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Sun, 20 Mar 2022 21:02:17 +0100
Subject: [PATCH 02/52] fix(character): fix equipment slot icons size on mobile
(#4)
---
static/css/icons.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/static/css/icons.css b/static/css/icons.css
index 6eb341e..b7b4e8b 100644
--- a/static/css/icons.css
+++ b/static/css/icons.css
@@ -45,6 +45,7 @@
position: absolute;
background-repeat: no-repeat;
z-index: 1;
+ background-size: 36px;
}
.iconlarge {
From 91f3ec424a783229e302daae5189e5871fbe5f4c Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Mon, 21 Mar 2022 00:28:13 +0100
Subject: [PATCH 03/52] fix(character): fix sheath type when mounted (#5)
---
src/armory/controllers/CharacterController.ts | 13 +++-
src/armory/data/DbcReader.ts | 3 +-
static/character.hbs | 67 +++++++++++++++++--
3 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/src/armory/controllers/CharacterController.ts b/src/armory/controllers/CharacterController.ts
index bc56c90..fcdbf19 100644
--- a/src/armory/controllers/CharacterController.ts
+++ b/src/armory/controllers/CharacterController.ts
@@ -29,6 +29,8 @@ interface IEquipmentData {
flags: number;
enchantments: string;
randomPropertyId: number;
+ classId: number;
+ subclassId: number;
}
interface ICustomizationOption {
@@ -338,7 +340,16 @@ export class CharacterController {
values: [charGuid],
timeout: this.armory.config.dbQueryTimeout,
});
- return rows as RowDataPacket[] as IEquipmentData[];
+
+ const data = rows as RowDataPacket[] as IEquipmentData[];
+
+ for (const row of data) {
+ const item = await this.armory.dbc.item().find(item => item.id === row.itemEntry);
+ row.classId = item.classId;
+ row.subclassId = item.subclassId;
+ }
+
+ return data;
}
private async getMounts(realm: string, charGuid: number): Promise {
diff --git a/src/armory/data/DbcReader.ts b/src/armory/data/DbcReader.ts
index 2fa6582..212e502 100644
--- a/src/armory/data/DbcReader.ts
+++ b/src/armory/data/DbcReader.ts
@@ -28,6 +28,7 @@ export interface IAchievementCategory {
export interface IItemDbc {
id: number;
classId: number;
+ subclassId: number;
displayInfoId: number;
inventoryType: number;
}
@@ -316,7 +317,7 @@ const dbcFields = {
achievement: ["id", "faction", "titleLang0", "descriptionLang0", "category", "points", "flags", "iconId"],
achievementCategory: ["id", "parent", "nameLang0"],
glyphProperties: ["id", "spellId"],
- item: ["id", "classId", "displayInfoId", "inventoryType"],
+ item: ["id", "classId", "subclassId", "displayInfoId", "inventoryType"],
itemRetail: ["id", "inventoryType"],
itemAppearance: ["id", "itemDisplayInfoId"],
itemModifiedAppearance: ["id", "itemId", "itemAppearanceId"],
diff --git a/static/character.hbs b/static/character.hbs
index 0a93c09..7b82c02 100644
--- a/static/character.hbs
+++ b/static/character.hbs
@@ -66,7 +66,7 @@
debug: () => { },
};
- const charData = {{{JSONstringify data}}};
+ const charData = {{{ JSONstringify data }}};
const races = {
1: "human",
2: "orc",
@@ -199,10 +199,37 @@
onResize(true);
function setMount(mountId) {
- if (characterModel.mount.id !== mountId) {
- characterModel.mount.id = mountId;
- createViewer();
+ if (characterModel.mount.id === mountId) {
+ return;
}
+
+ if (mountId !== 0) {
+ const mainHand = charData.equipment.find(e => e.slot === 15);
+ const offHand = charData.equipment.find(e => e.slot === 16);
+ const ranged = charData.equipment.find(e => e.slot === 17);
+
+ characterModel.charCustomization.sheathMain = sheathTypes[mainHand.classId][mainHand.subclassId];
+ if (offHand !== undefined) {
+ characterModel.charCustomization.sheathOff = sheathTypes[offHand.classId][offHand.subclassId];
+ } else if (ranged !== undefined) {
+ characterModel.charCustomization.sheathOff = sheathTypes[ranged.classId][ranged.subclassId];
+ } else {
+ characterModel.charCustomization.sheathOff = -1;
+ }
+
+ if (characterModel.charCustomization.sheathMain === undefined) {
+ characterModel.charCustomization.sheathMain = 0;
+ }
+ if (characterModel.charCustomization.sheathOff === undefined) {
+ characterModel.charCustomization.sheathOff = 0;
+ }
+ } else {
+ characterModel.charCustomization.sheathMain = -1;
+ characterModel.charCustomization.sheathOff = -1;
+ }
+
+ characterModel.mount.id = mountId;
+ createViewer();
}
if (charData.mounts.length === 0) {
@@ -233,6 +260,38 @@
$("#mounts").slideToggle("fast");
});
+ const sheathTypes = {
+ 2: {
+ // One handed weapons
+ 0: 3,
+ 4: 3,
+ 7: 3,
+ 14: 3,
+ 15: 3,
+ 17: 3,
+ 20: 3,
+
+ // Two handed weapons
+ 1: 1,
+ 5: 1,
+ 8: 1,
+
+ // Others
+ 10: 2, // Staff
+ 6: 1, // Polearm
+ 2: 4, // Bow
+ 3: 4, // Gun
+ 18: 4, // Crossbow
+ 13: 0, // Fist weapons
+ 19: 3, // Wand
+ 20: 1, // Fishing pole
+ },
+ 4: {
+ 0: 3, // Held in off-hand
+ 6: 9, // Shield
+ },
+ };
+
const characterModel = {
type: ZamModelViewer.WOW,
contentPath: "{{websiteRoot}}/data/",
From 05f5cabf5c92128700bea79ee38476c77d12c8a6 Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Mon, 21 Mar 2022 00:29:12 +0100
Subject: [PATCH 04/52] docs(README): add demo link to top
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 22b8f20..fb292ca 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,8 @@
Suggest a Feature
·
Ask a Question
+ ·
+ Demo
From 5b0ab5b11834afa6410993a31059d0c916d14d35 Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Mon, 21 Mar 2022 00:30:53 +0100
Subject: [PATCH 05/52] v1.0.1
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8500b72..510b931 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "azerothcore-armory",
- "version": "1.0.0",
+ "version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "azerothcore-armory",
- "version": "1.0.0",
+ "version": "1.0.1",
"license": "MIT",
"dependencies": {
"@supercharge/promise-pool": "^2.1.0",
diff --git a/package.json b/package.json
index 7fb7492..25e6073 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "azerothcore-armory",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "",
"scripts": {
"build": "tsc -p tsconfig.json",
From 6933e8ee86cf1ec65a370f579b0a6716c7718a1b Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Mon, 21 Mar 2022 00:33:27 +0100
Subject: [PATCH 06/52] feat: add FUNDING.yml
---
.github/FUNDING.yml | 1 +
1 file changed, 1 insertion(+)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..1eb62d1
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+ko_fi: roboto
From 4062263e8df40845f0a19c2116f9a75aa49668fe Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 2 Apr 2022 21:22:01 +0200
Subject: [PATCH 07/52] build(deps): bump minimist from 1.2.5 to 1.2.6 (#14)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)
---
updated-dependencies:
- dependency-name: minimist
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package-lock.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 510b931..9cdc5bf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3091,9 +3091,9 @@
}
},
"node_modules/minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/mixin-deep": {
"version": "1.3.2",
@@ -7563,9 +7563,9 @@
}
},
"minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"mixin-deep": {
"version": "1.3.2",
From 43ccb613418d85c4047d65b9df05f2486b977239 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 10 Apr 2022 18:47:41 +0200
Subject: [PATCH 08/52] build(deps): bump moment from 2.29.1 to 2.29.2 (#15)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)
---
updated-dependencies:
- dependency-name: moment
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package-lock.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 9cdc5bf..e1df4cc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3130,9 +3130,9 @@
}
},
"node_modules/moment": {
- "version": "2.29.1",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
- "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
+ "version": "2.29.2",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
+ "integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==",
"engines": {
"node": "*"
}
@@ -7592,9 +7592,9 @@
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
},
"moment": {
- "version": "2.29.1",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
- "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
+ "version": "2.29.2",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
+ "integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg=="
},
"morgan": {
"version": "1.10.0",
From 8906047a060b610bad599aebff2c9a52fd3a9f72 Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Thu, 14 Apr 2022 11:44:47 +0200
Subject: [PATCH 09/52] docs(README): fix typo
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index fb292ca..574df96 100644
--- a/README.md
+++ b/README.md
@@ -110,14 +110,14 @@ I also noticed that such a tool was frequently requested in the AzerothCore Disc
```sh
git clone git@github.com:r-o-b-o-t-o/azerothcore-armory.git
```
-3. Install the dependencies:
+2. Install the dependencies:
```sh
cd azerothcore-armory/
npm install
```
-4. Configure the application: copy `config.default.json` to `config.json` or `.env.example` to `.env` and edit the resulting file.
+3. Configure the application: copy `config.default.json` to `config.json` or `.env.example` to `.env` and edit the resulting file.
See the [Configuration Reference](#configuration-reference) below for a description of all values.
-5. Download the model viewer's data:
+4. Download the model viewer's data:
* Download from script:
```sh
npm run build
From fe21209817c6d4f227059af1213070ee0379f025 Mon Sep 17 00:00:00 2001
From: Axel Cocat
Date: Fri, 6 May 2022 14:25:51 +0200
Subject: [PATCH 10/52] fix(layout): add missing closing html tag
---
static/layout.hbs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/static/layout.hbs b/static/layout.hbs
index b46cc1a..90c822f 100644
--- a/static/layout.hbs
+++ b/static/layout.hbs
@@ -36,3 +36,5 @@
{{{ body }}}