mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[sql/updates/2008_11_11_01_mangos_db_script_string.sql sql/updates/2008_11_11_02_mangos_scripts.sql] Implement localization support for db script command SCRIPT_COMMAND_TALK.
Now db script command strings stored in `db_script_string (mangos_string like table). Text field `datatext` replace by int field `dataint` that store index in `db_script_string` table. Indexes must be 2000000000+ (for avoid conflicts with mangos_string indexes). Changes required DB support and SCRIPT_COMMAND_TALK will not work with old data until fixing in DB.
This commit is contained in:
parent
b24ace11cf
commit
c9fd3705d7
11 changed files with 184 additions and 28 deletions
|
|
@ -81,7 +81,7 @@ struct ScriptInfo
|
|||
uint32 command;
|
||||
uint32 datalong;
|
||||
uint32 datalong2;
|
||||
std::string datatext;
|
||||
int32 dataint;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
|
@ -125,6 +125,13 @@ typedef UNORDERED_MAP<uint32/*(mapid,spawnMode) pair*/,CellObjectGuidsMap> MapOb
|
|||
|
||||
typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
|
||||
|
||||
|
||||
// mangos string ranges
|
||||
#define MIN_MANGOS_STRING_ID 1
|
||||
#define MAX_MANGOS_STRING_ID 2000000000
|
||||
#define MIN_DB_SCRIPT_STRING_ID MAX_MANGOS_STRING_ID
|
||||
#define MAX_DB_SCRIPT_STRING_ID 2000010000
|
||||
|
||||
struct MangosStringLocale
|
||||
{
|
||||
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
|
||||
|
|
@ -499,7 +506,8 @@ class ObjectMgr
|
|||
void LoadSpellScripts();
|
||||
|
||||
bool LoadMangosStrings(DatabaseType& db, char const* table, int32 min_value, int32 max_value);
|
||||
bool LoadMangosStrings() { return LoadMangosStrings(WorldDatabase,"mangos_string",1,std::numeric_limits<int32>::max()); }
|
||||
bool LoadMangosStrings() { return LoadMangosStrings(WorldDatabase,"mangos_string",MIN_MANGOS_STRING_ID,MAX_MANGOS_STRING_ID); }
|
||||
void LoadDbScriptStrings();
|
||||
void LoadPetCreateSpells();
|
||||
void LoadCreatureLocales();
|
||||
void LoadCreatureTemplates();
|
||||
|
|
@ -824,6 +832,7 @@ class ObjectMgr
|
|||
int DBCLocaleIndex;
|
||||
private:
|
||||
void LoadScripts(ScriptMapMap& scripts, char const* tablename);
|
||||
void CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids);
|
||||
void ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* table, char const* guidEntryStr);
|
||||
void LoadQuestRelationsHelper(QuestRelations& map,char const* table);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue