Skip to content

Commit 7d435fb

Browse files
committed
Updating class to return mage instead of wizard
1 parent 532d252 commit 7d435fb

File tree

9 files changed

+296
-277
lines changed

9 files changed

+296
-277
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
- Nothing yet :)
99

10+
## 2.0.1 - 2019-11-15
11+
### Changed
12+
- Updating HabiticaUser.class to return "mage" instead of "wizard" for users with a mage class.
13+
1014
## 2.0.0 - 2019-11-2
1115
### Added
1216
- So. Much. Documentation.

dist/HabiticaMagic-v2.0.0.min.js

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ class HabiticaUser {
219219
* @type {string}
220220
*/
221221
get className() {
222+
// the mage class is defined as "wizard" in the API, but referred
223+
// to everywhere else in Habitica as mage, so we're gonna return mage
224+
// here as that's what users on the front end would expect to see
225+
// https://habitica.fandom.com/wiki/Guidance_for_Comrades#Class_Name_.28State_Mage_Instead_of_Wizard.29
226+
if (this.apiData.stats.class == "wizard") {
227+
return "mage";
228+
}
222229
return this.apiData.stats.class;
223230
}
224231
/**

dist/HabiticaMagic-v2.0.1.min.js

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)