[7295] Make more static world data accessable for scripts use.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-02-18 15:36:19 +03:00 committed by VladimirMangos
parent 1fa4ecf482
commit 0be9e35b7b
5 changed files with 22 additions and 4 deletions

View file

@ -7364,3 +7364,13 @@ ObjectMgr::ScriptNameMap & GetScriptNames()
{ {
return objmgr.GetScriptNames(); return objmgr.GetScriptNames();
} }
CreatureInfo const* GetCreatureTemplateStore(uint32 entry)
{
return sCreatureStorage.LookupEntry<CreatureInfo>(entry);
}
Quest const* GetQuestTemplateStore(uint32 entry)
{
return objmgr.GetQuestTemplate(entry);
}

View file

@ -881,5 +881,7 @@ MANGOS_DLL_SPEC bool LoadMangosStrings(DatabaseType& db, char const* table,int32
MANGOS_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 trigger_id); MANGOS_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 trigger_id);
MANGOS_DLL_SPEC uint32 GetScriptId(const char *name); MANGOS_DLL_SPEC uint32 GetScriptId(const char *name);
MANGOS_DLL_SPEC ObjectMgr::ScriptNameMap& GetScriptNames(); MANGOS_DLL_SPEC ObjectMgr::ScriptNameMap& GetScriptNames();
MANGOS_DLL_SPEC CreatureInfo const* GetCreatureTemplateStore(uint32 entry);
MANGOS_DLL_SPEC Quest const* GetQuestTemplateStore(uint32 entry);
#endif #endif

View file

@ -707,3 +707,6 @@ uint32 const* GetTalentTabPages(uint32 cls)
MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; } MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; }
MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore() { return &sSpellStore; } MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore() { return &sSpellStore; }
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; } MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; }
MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore() { return &sFactionStore; }
MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore() { return &sItemStore; }
MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; }

View file

@ -215,7 +215,10 @@ extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
void LoadDBCStores(const std::string& dataPath); void LoadDBCStores(const std::string& dataPath);
// script support functions // script support functions
MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore(); MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore(); MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore(); 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();
#endif #endif

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7294" #define REVISION_NR "7295"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__