From 51a74c23ef2e960df0adacf6a4056556edaebba8 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 30 Dec 2020 15:47:27 -0500 Subject: [PATCH] quest::getspellname() and quest::getclassname() fixes/additions. (#1158) - Update GetSpellName() to uint16. - Add more classes to GetClassIDName(). --- common/classes.cpp | 14 ++++++++++++++ common/classes.h | 1 + common/spdat.cpp | 2 +- common/spdat.h | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/common/classes.cpp b/common/classes.cpp index 3aaeeded3..b9445443f 100644 --- a/common/classes.cpp +++ b/common/classes.cpp @@ -378,6 +378,8 @@ const char *GetClassIDName(uint8 class_id, uint8 level) return "Berserker Guildmaster"; case MERCHANT: return "Merchant"; + case DISCORD_MERCHANT: + return "Discord Merchant"; case ADVENTURERECRUITER: return "Adventure Recruiter"; case ADVENTUREMERCHANT: @@ -388,6 +390,18 @@ const char *GetClassIDName(uint8 class_id, uint8 level) return "Tribute Master"; case GUILD_TRIBUTE_MASTER: return "Guild Tribute Master"; + case GUILD_BANKER: + return "Guild Banker"; + case NORRATHS_KEEPERS_MERCHANT: + return "Radiant Crystal Merchant"; + case DARK_REIGN_MERCHANT: + return "Ebon Crystal Merchant"; + case FELLOWSHIP_MASTER: + return "Fellowship Master"; + case ALT_CURRENCY_MERCHANT: + return "Alternate Currency Merchant"; + case MERCERNARY_MASTER: + return "Mercenary Liaison"; default: return "Unknown"; } diff --git a/common/classes.h b/common/classes.h index f63758937..a35014d94 100644 --- a/common/classes.h +++ b/common/classes.h @@ -61,6 +61,7 @@ #define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far.. #define TRIBUTE_MASTER 63 #define GUILD_TRIBUTE_MASTER 64 // not sure +#define GUILD_BANKER 66 #define NORRATHS_KEEPERS_MERCHANT 67 #define DARK_REIGN_MERCHANT 68 #define FELLOWSHIP_MASTER 69 diff --git a/common/spdat.cpp b/common/spdat.cpp index 3f0ae6e41..fe6e4db9c 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1271,7 +1271,7 @@ bool IsSpellUsableThisZoneType(uint16 spell_id, uint8 zone_type) return false; } -const char* GetSpellName(int16 spell_id) +const char* GetSpellName(uint16 spell_id) { return spells[spell_id].name; } diff --git a/common/spdat.h b/common/spdat.h index 811825757..d6d6ef144 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -981,6 +981,6 @@ uint32 GetNimbusEffect(uint16 spell_id); int32 GetFuriousBash(uint16 spell_id); bool IsShortDurationBuff(uint16 spell_id); bool IsSpellUsableThisZoneType(uint16 spell_id, uint8 zone_type); -const char *GetSpellName(int16 spell_id); +const char *GetSpellName(uint16 spell_id); #endif