Jump to content

[HELP] Adding titles with a NPC


Recommended Posts

Posted

I'm scripting a NPC that hands out titles, but when I try to look up the entry of a title with

const CharTitlesEntry* titleInfo = sCharTitlesStore.LookUpEntry(id);

I get Unresolved External Symbol errors. CharTitleStore apparently isn't supported by CreatureAI scripts. Now I'm trying to figure out how to make it supported, but the only thing I can come up with is adding a line at DBCStores.h -- however, I do not know what to put here.

I'm talking about this part of DBCStores.h

// script support functions
MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry>          const* GetSoundEntriesStore();
MANGOS_DLL_SPEC DBCStorage <SpellEntry>                 const* GetSpellStore();
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry>            const* GetSpellRangeStore();
MANGOS_DLL_SPEC DBCStorage <FactionEntry>               const* GetFactionStore();
MANGOS_DLL_SPEC DBCStorage <ItemEntry>                  const* GetItemDisplayStore();
MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry>   const* GetCreatureDisplayStore();
MANGOS_DLL_SPEC DBCStorage <EmotesEntry>                const* GetEmotesStore();
MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry>            const* GetEmotesTextStore();
#endif

Now there is a line above, stating

extern DBCStorage <CharTitlesEntry>              sCharTitlesStore;

And that is what I tried to access with my script.

The only function I found, for titles, is GetTitleId() and it's not what I need, or I am using it wrong.

So, what's a solution to this problem? How can I add the CharTitleStore to CreatureAI?

Thanks in advance.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use