Implement Perl Export Variable settings map (Huge performance boost) (Preliminary)

This commit is contained in:
Akkadius
2015-11-01 15:59:24 -06:00
parent 33917fe2a9
commit 53c8d63981
15 changed files with 126 additions and 15 deletions
+21
View File
@@ -77,6 +77,27 @@ public:
void GetErrors(std::list<std::string> &err);
/*
Internally used memory reference for all Perl Event Export Settings
Some exports are very taxing on CPU given how much an event is called.
These are loaded via DB and have defaults loaded in PerlEventExportSettingsDefaults.
Database loaded via Database::LoadPerlEventExportSettings(log_settings)
*/
struct PerlEventExportSettings {
uint8 qglobals;
uint8 mob;
uint8 zone;
uint8 item;
uint8 event_variables;
};
PerlEventExportSettings perl_event_export_settings[_LargestEventID];
void LoadPerlEventExportSettings(PerlEventExportSettings* perl_event_export_settings);
private:
bool HasQuestSubLocal(uint32 npcid, QuestEventID evt);
bool HasQuestSubGlobal(QuestEventID evt);