From 5c2c9a684f1458da0cea1f3536622add77ef1324 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 24 Jan 2016 15:56:10 +0100 Subject: Core/DataStores: Updated dbc/db2 to 7.0.1.20810 --- src/server/scripts/Commands/cs_debug.cpp | 2 +- src/server/scripts/Commands/cs_learn.cpp | 37 +++-- src/server/scripts/Commands/cs_list.cpp | 2 +- src/server/scripts/Commands/cs_lookup.cpp | 242 +++++++++++++++++------------- src/server/scripts/Commands/cs_misc.cpp | 18 +-- src/server/scripts/Spells/spell_druid.cpp | 14 +- src/server/scripts/Spells/spell_item.cpp | 2 +- 7 files changed, 186 insertions(+), 131 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index b2094df08ef..59eb97d1476 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -171,7 +171,7 @@ public: uint32 soundId = atoi((char*)args); - if (!sSoundEntriesStore.LookupEntry(soundId)) + if (!sSoundKitStore.LookupEntry(soundId)) { handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId); handler->SetSentErrorMessage(true); diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 16e94242021..5f31d7f806f 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -325,7 +325,7 @@ public: if ((skillInfo->CategoryID == SKILL_CATEGORY_PROFESSION || skillInfo->CategoryID == SKILL_CATEGORY_SECONDARY) && skillInfo->CanLink) // only prof. with recipes have { - HandleLearnSkillRecipesHelper(target, skillInfo->ID); + HandleLearnSkillRecipesHelper(target, i); } } @@ -358,7 +358,7 @@ public: std::string name; - SkillLineEntry const* targetSkillInfo = NULL; + uint32 skillId = 0; for (uint32 i = 1; i < sSkillLineStore.GetNumRows(); ++i) { SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(i); @@ -370,23 +370,42 @@ public: !skillInfo->CanLink) // only prof with recipes have set continue; - name = skillInfo->DisplayName_lang; + int locale = handler->GetSessionDbcLocale(); + name = skillInfo->DisplayName->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, namePart)) - continue; + { + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; - targetSkillInfo = skillInfo; + name = skillInfo->DisplayName->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, namePart)) + break; + } + } + + if (locale < TOTAL_LOCALES) + { + skillId = i; + break; + } } - if (!targetSkillInfo) + if (!skillId) return false; - HandleLearnSkillRecipesHelper(target, targetSkillInfo->ID); + HandleLearnSkillRecipesHelper(target, skillId); - uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->ID); - target->SetSkill(targetSkillInfo->ID, target->GetSkillStep(targetSkillInfo->ID), maxLevel, maxLevel); + uint16 maxLevel = target->GetPureMaxSkillValue(skillId); + target->SetSkill(skillId, target->GetSkillStep(skillId), maxLevel, maxLevel); handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str()); return true; } diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 67c89a2f10c..b66fc95c407 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -436,7 +436,7 @@ public: AuraApplication const* aurApp = itr->second; Aura const* aura = aurApp->GetBase(); - char const* name = aura->GetSpellInfo()->SpellName; + char const* name = aura->GetSpellInfo()->SpellName->Str[handler->GetSessionDbcLocale()]; bool talent = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR0_CU_IS_TALENT); std::ostringstream ss_name; diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 57bf557771b..b032aa8ef2e 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -688,41 +688,59 @@ public: SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id); if (skillInfo) { - std::string name = skillInfo->DisplayName_lang; + int locale = handler->GetSessionDbcLocale(); + std::string name = skillInfo->DisplayName->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && count++ == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = skillInfo->DisplayName->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } } - char valStr[50] = ""; - char const* knownStr = ""; - if (target && target->HasSkill(id)) + if (locale < TOTAL_LOCALES) { - knownStr = handler->GetTrinityString(LANG_KNOWN); - uint32 curValue = target->GetPureSkillValue(id); - uint32 maxValue = target->GetPureMaxSkillValue(id); - uint32 permValue = target->GetSkillPermBonusValue(id); - uint32 tempValue = target->GetSkillTempBonusValue(id); - - char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES); - snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue); - } + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - // send skill in "id - [namedlink locale]" format - if (handler->GetSession()) - handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), "", knownStr, valStr); - else - handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), "", knownStr, valStr); + char valStr[50] = ""; + char const* knownStr = ""; + if (target && target->HasSkill(id)) + { + knownStr = handler->GetTrinityString(LANG_KNOWN); + uint32 curValue = target->GetPureSkillValue(id); + uint32 maxValue = target->GetPureMaxSkillValue(id); + uint32 permValue = target->GetSkillPermBonusValue(id); + uint32 tempValue = target->GetSkillTempBonusValue(id); + + char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES); + snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue); + } - if (!found) - found = true; + // send skill in "id - [namedlink locale]" format + if (handler->GetSession()) + handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), "", knownStr, valStr); + else + handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), "", knownStr, valStr); + + if (!found) + found = true; + } } } if (!found) @@ -758,63 +776,81 @@ public: SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); if (spellInfo) { - std::string name = spellInfo->SpellName; + int locale = handler->GetSessionDbcLocale(); + std::string name = spellInfo->SpellName->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && count++ == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = spellInfo->SpellName->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } } - bool known = target && target->HasSpell(id); + if (locale < TOTAL_LOCALES) + { + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0); - bool learn = effect ? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false; + bool known = target && target->HasSpell(id); - SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL; + SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0); + bool learn = effect ? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false; - bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT); - bool passive = spellInfo->IsPassive(); - bool active = target && target->HasAura(id); + SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL; - // unit32 used to prevent interpreting uint8 as char at output - // find rank of learned spell for learning spell, or talent rank - uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank(); + bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT); + bool passive = spellInfo->IsPassive(); + bool active = target && target->HasAura(id); - // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format - std::ostringstream ss; - if (handler->GetSession()) - ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name; - else - ss << id << " - " << name; + // unit32 used to prevent interpreting uint8 as char at output + // find rank of learned spell for learning spell, or talent rank + uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank(); - // include rank in link name - if (rank) - ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank; + // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format + std::ostringstream ss; + if (handler->GetSession()) + ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name; + else + ss << id << " - " << name; - if (handler->GetSession()) - ss << "]|h|r"; - - if (talent) - ss << handler->GetTrinityString(LANG_TALENT); - if (passive) - ss << handler->GetTrinityString(LANG_PASSIVE); - if (learn) - ss << handler->GetTrinityString(LANG_LEARN); - if (known) - ss << handler->GetTrinityString(LANG_KNOWN); - if (active) - ss << handler->GetTrinityString(LANG_ACTIVE); + // include rank in link name + if (rank) + ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank; - handler->SendSysMessage(ss.str().c_str()); + if (handler->GetSession()) + ss << "]|h|r"; + + if (talent) + ss << handler->GetTrinityString(LANG_TALENT); + if (passive) + ss << handler->GetTrinityString(LANG_PASSIVE); + if (learn) + ss << handler->GetTrinityString(LANG_LEARN); + if (known) + ss << handler->GetTrinityString(LANG_KNOWN); + if (active) + ss << handler->GetTrinityString(LANG_ACTIVE); - if (!found) - found = true; + handler->SendSysMessage(ss.str().c_str()); + + if (!found) + found = true; + } } } if (!found) @@ -836,56 +872,56 @@ public: if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id)) { int locale = handler->GetSessionDbcLocale(); - std::string name = spellInfo->SpellName; + std::string name = spellInfo->SpellName->Str[locale]; if (name.empty()) { handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND); return true; } - bool known = target && target->HasSpell(id); + bool known = target && target->HasSpell(id); - SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0); - bool learn = effect? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false; + SpellEffectInfo const* effect = spellInfo->GetEffect(EFFECT_0); + bool learn = effect? (effect->Effect == SPELL_EFFECT_LEARN_SPELL) : false; - SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL; + SpellInfo const* learnSpellInfo = effect ? sSpellMgr->GetSpellInfo(effect->TriggerSpell) : NULL; - bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT); - bool passive = spellInfo->IsPassive(); - bool active = target && target->HasAura(id); + bool talent = spellInfo->HasAttribute(SPELL_ATTR0_CU_IS_TALENT); + bool passive = spellInfo->IsPassive(); + bool active = target && target->HasAura(id); - // unit32 used to prevent interpreting uint8 as char at output - // find rank of learned spell for learning spell, or talent rank - uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank(); + // unit32 used to prevent interpreting uint8 as char at output + // find rank of learned spell for learning spell, or talent rank + uint32 rank = learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank(); - // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format - std::ostringstream ss; - if (handler->GetSession()) - ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name; - else - ss << id << " - " << name; - - // include rank in link name - if (rank) - ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank; + // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format + std::ostringstream ss; + if (handler->GetSession()) + ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name; + else + ss << id << " - " << name; - if (handler->GetSession()) - ss << ' ' << localeNames[locale] << "]|h|r"; - else - ss << ' ' << localeNames[locale]; - - if (talent) - ss << handler->GetTrinityString(LANG_TALENT); - if (passive) - ss << handler->GetTrinityString(LANG_PASSIVE); - if (learn) - ss << handler->GetTrinityString(LANG_LEARN); - if (known) - ss << handler->GetTrinityString(LANG_KNOWN); - if (active) - ss << handler->GetTrinityString(LANG_ACTIVE); + // include rank in link name + if (rank) + ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank; - handler->SendSysMessage(ss.str().c_str()); + if (handler->GetSession()) + ss << ' ' << localeNames[locale] << "]|h|r"; + else + ss << ' ' << localeNames[locale]; + + if (talent) + ss << handler->GetTrinityString(LANG_TALENT); + if (passive) + ss << handler->GetTrinityString(LANG_PASSIVE); + if (learn) + ss << handler->GetTrinityString(LANG_LEARN); + if (known) + ss << handler->GetTrinityString(LANG_KNOWN); + if (active) + ss << handler->GetTrinityString(LANG_ACTIVE); + + handler->SendSysMessage(ss.str().c_str()); } else handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 7ad80352995..e6fb42853e3 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -755,7 +755,7 @@ public: } target->GetSpellHistory()->ResetCooldown(spellIid, true); - target->GetSpellHistory()->ResetCharges(spellInfo->ChargeCategoryEntry); + target->GetSpellHistory()->ResetCharges(spellInfo->ChargeCategoryId); handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); } return true; @@ -1168,10 +1168,10 @@ public: if (itemNameStr && itemNameStr[0]) { std::string itemName = itemNameStr+1; - auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* itemSparse) + auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](std::pair kv) { for (uint32 i = 0; i < MAX_LOCALES; ++i) - if (itemName == itemSparse->Name->Str[i]) + if (itemName == kv.second->Name->Str[i]) return true; return false; }); @@ -1183,7 +1183,7 @@ public: return false; } - itemId = itr->ID; + itemId = itr->first; } else return false; @@ -1469,7 +1469,7 @@ public: // add the skill to the player's book with step 1 (which is the first rank, in most cases something // like 'Apprentice '. target->SetSkill(skill, targetHasSkill ? target->GetSkillStep(skill) : 1, level, max); - handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName_lang, handler->GetNameLink(target).c_str(), level, max); + handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName->Str[handler->GetSessionDbcLocale()], handler->GetNameLink(target).c_str(), level, max); return true; } @@ -1573,7 +1573,7 @@ public: uint8 raceid, classid = 0; //RACE_NONE, CLASS_NONE std::string raceStr, classStr = handler->GetTrinityString(LANG_UNKNOWN); uint8 gender = 0; - int8 locale = handler->GetSessionDbcLocale(); + LocaleConstant locale = handler->GetSessionDbcLocale(); uint32 totalPlayerTime = 0; uint8 level = 0; std::string alive = handler->GetTrinityString(LANG_ERROR); @@ -1794,7 +1794,7 @@ public: handler->PSendSysMessage(LANG_PINFO_CHR_LEVEL_HIGH, level); // Output XI. LANG_PINFO_CHR_RACE - raceStr = GetRaceName(raceid, locale); + raceStr = DB2Manager::GetChrRaceName(raceid, locale); classStr = GetClassName(classid, locale); handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetTrinityString(LANG_CHARACTER_GENDER_MALE) : handler->GetTrinityString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str()); @@ -2608,7 +2608,7 @@ public: uint32 soundId = atoi((char*)args); - if (!sSoundEntriesStore.LookupEntry(soundId)) + if (!sSoundKitStore.LookupEntry(soundId)) { handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId); handler->SetSentErrorMessage(true); @@ -2688,7 +2688,7 @@ public: { AuraApplication const* aurApp = itr->second; Aura const* aura = aurApp->GetBase(); - char const* name = aura->GetSpellInfo()->SpellName; + char const* name = aura->GetSpellInfo()->SpellName->Str[handler->GetSessionDbcLocale()]; bool self = target->GetGUID() == aura->GetCasterGUID(); if (self) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 4488561589f..a4665973009 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -172,7 +172,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader int32 energizeAmount = -GetEffectValue(); // -13 // If we are set to fill the lunar side or we've just logged in with 0 power.. if ((!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER)) - || caster->GetPower(POWER_ECLIPSE) == 0) + || caster->GetPower(POWER_LUNAR_POWER) == 0) { caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true); // If the energize was due to 0 power, cast the eclipse marker aura @@ -180,7 +180,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader caster->CastSpell(caster, SPELL_DRUID_LUNAR_ECLIPSE_MARKER, true); } // The energizing effect brought us out of the solar eclipse, remove the aura - if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0) + if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) <= 0) caster->RemoveAurasDueToSpell(SPELL_DRUID_SOLAR_ECLIPSE); break; } @@ -189,7 +189,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader int32 energizeAmount = GetEffectValue(); // 20 // If we are set to fill the solar side or we've just logged in with 0 power.. if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER)) - || caster->GetPower(POWER_ECLIPSE) == 0) + || caster->GetPower(POWER_LUNAR_POWER) == 0) { caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true); // If the energize was due to 0 power, cast the eclipse marker aura @@ -197,7 +197,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true); } // The energizing effect brought us out of the lunar eclipse, remove the aura - if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0) + if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) >= 0) caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE); break; } @@ -205,7 +205,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader { // If we are set to fill the solar side or we've just logged in with 0 power (confirmed with sniffs) if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER)) - || caster->GetPower(POWER_ECLIPSE) == 0) + || caster->GetPower(POWER_LUNAR_POWER) == 0) { int32 energizeAmount = GetEffectValue(); // 15 caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true); @@ -220,10 +220,10 @@ class spell_dru_eclipse_energize : public SpellScriptLoader caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true); } // The energizing effect brought us out of the lunar eclipse, remove the aura - if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0) + if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) >= 0) caster->RemoveAura(SPELL_DRUID_LUNAR_ECLIPSE); // The energizing effect brought us out of the solar eclipse, remove the aura - else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0) + else if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_LUNAR_POWER) <= 0) caster->RemoveAura(SPELL_DRUID_SOLAR_ECLIPSE); break; } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index b0853c71b2c..7dcd3a4fbb9 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -2706,7 +2706,7 @@ public: if (Player* target = GetHitUnit()->ToPlayer()) { target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN); - if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender())) + if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender(), target->getClass())) target->PlayDistanceSound(soundEntry->SoundId); } } -- cgit v1.2.3 From 41ae38d94d627f1945dc1aed46837068b83ed654 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 31 Jan 2016 19:25:51 +0100 Subject: Core/DataStores: Updated dbc/db2 to 7.0.1.20914 --- .../hotfixes/2016_xx_xx_xx_hotfixes_legion_02.sql | 341 +++++++++++++++++++++ .../Database/Implementation/HotfixDatabase.cpp | 66 +++- .../Database/Implementation/HotfixDatabase.h | 23 ++ .../game/Battlegrounds/BattlegroundQueue.cpp | 2 +- src/server/game/DataStores/DB2Stores.cpp | 114 +++++-- src/server/game/DataStores/DB2Stores.h | 14 + src/server/game/DataStores/DB2Structure.h | 178 ++++++++++- src/server/game/DataStores/DB2fmt.h | 18 +- src/server/game/DataStores/DBCStores.cpp | 72 +---- src/server/game/DataStores/DBCStores.h | 18 -- src/server/game/DataStores/DBCStructure.h | 182 ----------- src/server/game/DataStores/DBCfmt.h | 10 - src/server/game/Entities/Player/Player.cpp | 20 +- src/server/game/Entities/Totem/Totem.cpp | 12 +- src/server/game/Entities/Totem/Totem.h | 7 - src/server/game/Entities/Unit/StatSystem.cpp | 22 +- src/server/game/Entities/Vehicle/Vehicle.cpp | 10 +- src/server/game/Entities/Vehicle/Vehicle.h | 2 +- src/server/game/Groups/Group.cpp | 4 +- src/server/game/Handlers/BattleGroundHandler.cpp | 8 +- src/server/game/Handlers/CombatHandler.cpp | 2 +- src/server/game/Handlers/MovementHandler.cpp | 2 +- src/server/game/Handlers/SkillHandler.cpp | 3 +- src/server/game/Handlers/VehicleHandler.cpp | 15 +- src/server/game/Maps/Map.h | 1 + src/server/game/Spells/Spell.cpp | 4 +- src/server/game/Spells/SpellEffects.cpp | 8 +- src/server/game/Spells/SpellInfo.cpp | 4 +- src/server/scripts/Commands/cs_lookup.cpp | 44 ++- .../shared/DataStores/DB2SparseStorageLoader.cpp | 11 +- 30 files changed, 824 insertions(+), 393 deletions(-) create mode 100644 sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_02.sql (limited to 'src/server/scripts') diff --git a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_02.sql b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_02.sql new file mode 100644 index 00000000000..3f94f33dc1e --- /dev/null +++ b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_02.sql @@ -0,0 +1,341 @@ +-- +-- Table structure for table `chat_channels` +-- +DROP TABLE IF EXISTS `chat_channels`; +CREATE TABLE `chat_channels` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Shortcut` text, + `FactionGroup` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chat_channels_locale` +-- +DROP TABLE IF EXISTS `chat_channels_locale`; +CREATE TABLE `chat_channels_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Shortcut_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_specialization` +-- +DROP TABLE IF EXISTS `chr_specialization`; +CREATE TABLE `chr_specialization` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MasterySpellID1` int(10) unsigned NOT NULL DEFAULT '0', + `MasterySpellID2` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `AnimReplacementSetID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Name2` text, + `Description` text, + `BackgroundFile` text, + `SpellIconID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ClassID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PetTalentType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Role` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PrimaryStatOrder` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_specialization_locale` +-- + +DROP TABLE IF EXISTS `chr_specialization_locale`; +CREATE TABLE `chr_specialization_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Name2_lang` text, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_display_info_extra` +-- +ALTER TABLE `creature_display_info_extra` + DROP `NPCItemDisplay1`, + DROP `NPCItemDisplay2`, + DROP `NPCItemDisplay3`, + DROP `NPCItemDisplay4`, + DROP `NPCItemDisplay5`, + DROP `NPCItemDisplay6`, + DROP `NPCItemDisplay7`, + DROP `NPCItemDisplay8`, + DROP `NPCItemDisplay9`, + DROP `NPCItemDisplay10`; + +-- +-- Table structure for table `emotes` +-- +DROP TABLE IF EXISTS `emotes`; +CREATE TABLE `emotes` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `EmoteSlashCommand` text, + `SpellVisualKitID` int(10) unsigned NOT NULL DEFAULT '0', + `EmoteFlags` int(10) unsigned NOT NULL DEFAULT '0', + `AnimID` smallint(5) unsigned NOT NULL DEFAULT '0', + `EmoteSoundID` smallint(5) unsigned NOT NULL DEFAULT '0', + `EmoteSpecProc` tinyint(3) unsigned NOT NULL DEFAULT '0', + `EmoteSpecProcParam` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `gameobject_display_info` +-- +ALTER TABLE `gameobject_display_info` + DROP `Sound1`, + DROP `Sound2`, + DROP `Sound3`, + DROP `Sound4`, + DROP `Sound5`, + DROP `Sound6`, + DROP `Sound7`, + DROP `Sound8`, + DROP `Sound9`, + DROP `Sound10`; + +-- +-- Table structure for table `garr_class_spec` +-- +ALTER TABLE `garr_class_spec` ADD COLUMN `Unknown700` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrFollItemSetID`; + +-- +-- Table structure for table `gem_properties` +-- +DROP TABLE IF EXISTS `gem_properties`; +CREATE TABLE `gem_properties` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Type` int(10) unsigned NOT NULL DEFAULT '0', + `EnchantID` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxCountInv` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxCountItem` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `glyph_properties` +-- +DROP TABLE IF EXISTS `glyph_properties`; +CREATE TABLE `glyph_properties` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `SpellIconID` smallint(5) unsigned NOT NULL DEFAULT '0', + `Type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GlyphExclusiveCategoryID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_set` +-- +DROP TABLE IF EXISTS `item_set`; +CREATE TABLE `item_set` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `ItemID1` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID2` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID3` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID4` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID5` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID6` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID7` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID8` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID9` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID10` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID11` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID12` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID13` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID14` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID15` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID16` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID17` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkill` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_set_locale` +-- +DROP TABLE IF EXISTS `item_set_locale`; +CREATE TABLE `item_set_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `lock` +-- +DROP TABLE IF EXISTS `lock`; +CREATE TABLE `lock` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Index1` int(10) unsigned NOT NULL DEFAULT '0', + `Index2` int(10) unsigned NOT NULL DEFAULT '0', + `Index3` int(10) unsigned NOT NULL DEFAULT '0', + `Index4` int(10) unsigned NOT NULL DEFAULT '0', + `Index5` int(10) unsigned NOT NULL DEFAULT '0', + `Index6` int(10) unsigned NOT NULL DEFAULT '0', + `Index7` int(10) unsigned NOT NULL DEFAULT '0', + `Index8` int(10) unsigned NOT NULL DEFAULT '0', + `Skill1` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill2` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill3` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill4` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill5` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill6` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill7` smallint(5) unsigned NOT NULL DEFAULT '0', + `Skill8` smallint(5) unsigned NOT NULL DEFAULT '0', + `Type1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type6` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type7` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type8` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action6` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action7` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Action8` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `pvp_difficulty` +-- + +DROP TABLE IF EXISTS `pvp_difficulty`; +CREATE TABLE `pvp_difficulty` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `BracketID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_levels` +-- +ALTER TABLE `spell_levels` ADD COLUMN `MaxUsableLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`; + +-- +-- Table structure for table `summon_properties` +-- +DROP TABLE IF EXISTS `summon_properties`; +CREATE TABLE `summon_properties` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Category` int(10) unsigned NOT NULL DEFAULT '0', + `Faction` int(10) unsigned NOT NULL DEFAULT '0', + `Type` int(10) unsigned NOT NULL DEFAULT '0', + `Slot` int(11) NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `vehicle_seat` +-- +DROP TABLE IF EXISTS `vehicle_seat`; +CREATE TABLE `vehicle_seat` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags1` int(10) unsigned NOT NULL DEFAULT '0', + `Flags2` int(10) unsigned NOT NULL DEFAULT '0', + `Flags3` int(10) unsigned NOT NULL DEFAULT '0', + `AttachmentOffsetX` float NOT NULL DEFAULT '0', + `AttachmentOffsetY` float NOT NULL DEFAULT '0', + `AttachmentOffsetZ` float NOT NULL DEFAULT '0', + `EnterPreDelay` float NOT NULL DEFAULT '0', + `EnterSpeed` float NOT NULL DEFAULT '0', + `EnterGravity` float NOT NULL DEFAULT '0', + `EnterMinDuration` float NOT NULL DEFAULT '0', + `EnterMaxDuration` float NOT NULL DEFAULT '0', + `EnterMinArcHeight` float NOT NULL DEFAULT '0', + `EnterMaxArcHeight` float NOT NULL DEFAULT '0', + `ExitPreDelay` float NOT NULL DEFAULT '0', + `ExitSpeed` float NOT NULL DEFAULT '0', + `ExitGravity` float NOT NULL DEFAULT '0', + `ExitMinDuration` float NOT NULL DEFAULT '0', + `ExitMaxDuration` float NOT NULL DEFAULT '0', + `ExitMinArcHeight` float NOT NULL DEFAULT '0', + `ExitMaxArcHeight` float NOT NULL DEFAULT '0', + `PassengerYaw` float NOT NULL DEFAULT '0', + `PassengerPitch` float NOT NULL DEFAULT '0', + `PassengerRoll` float NOT NULL DEFAULT '0', + `VehicleEnterAnimDelay` float NOT NULL DEFAULT '0', + `VehicleExitAnimDelay` float NOT NULL DEFAULT '0', + `CameraEnteringDelay` float NOT NULL DEFAULT '0', + `CameraEnteringDuration` float NOT NULL DEFAULT '0', + `CameraExitingDelay` float NOT NULL DEFAULT '0', + `CameraExitingDuration` float NOT NULL DEFAULT '0', + `CameraOffsetX` float NOT NULL DEFAULT '0', + `CameraOffsetY` float NOT NULL DEFAULT '0', + `CameraOffsetZ` float NOT NULL DEFAULT '0', + `CameraPosChaseRate` float NOT NULL DEFAULT '0', + `CameraFacingChaseRate` float NOT NULL DEFAULT '0', + `CameraEnteringZoom` float NOT NULL DEFAULT '0', + `CameraSeatZoomMin` float NOT NULL DEFAULT '0', + `CameraSeatZoomMax` float NOT NULL DEFAULT '0', + `UISkinFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `EnterAnimStart` smallint(6) NOT NULL DEFAULT '0', + `EnterAnimLoop` smallint(6) NOT NULL DEFAULT '0', + `RideAnimStart` smallint(6) NOT NULL DEFAULT '0', + `RideAnimLoop` smallint(6) NOT NULL DEFAULT '0', + `RideUpperAnimStart` smallint(6) NOT NULL DEFAULT '0', + `RideUpperAnimLoop` smallint(6) NOT NULL DEFAULT '0', + `ExitAnimStart` smallint(6) NOT NULL DEFAULT '0', + `ExitAnimLoop` smallint(6) NOT NULL DEFAULT '0', + `ExitAnimEnd` smallint(6) NOT NULL DEFAULT '0', + `VehicleEnterAnim` smallint(6) NOT NULL DEFAULT '0', + `VehicleExitAnim` smallint(6) NOT NULL DEFAULT '0', + `VehicleRideAnimLoop` smallint(6) NOT NULL DEFAULT '0', + `EnterUISoundID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ExitUISoundID` smallint(5) unsigned NOT NULL DEFAULT '0', + `EnterAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RideAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ExitAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `VehicleEnterAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `VehicleRideAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `VehicleExitAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0', + `CameraModeID` smallint(5) unsigned NOT NULL DEFAULT '0', + `AttachmentID` tinyint(4) NOT NULL DEFAULT '0', + `PassengerAttachmentID` tinyint(4) NOT NULL DEFAULT '0', + `VehicleEnterAnimBone` tinyint(4) NOT NULL DEFAULT '0', + `VehicleExitAnimBone` tinyint(4) NOT NULL DEFAULT '0', + `VehicleRideAnimLoopBone` tinyint(4) NOT NULL DEFAULT '0', + `VehicleAbilityDisplay` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 666b697a4c3..d2a62e1f9ce 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -80,6 +80,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, ItemID18, ItemID19, ItemID20, ItemID21, ItemID22, ItemID23, " "ItemID24, PetDisplayID, RaceID, ClassID, GenderID, OutfitID, PetFamilyID FROM char_start_outfit ORDER BY ID DESC", CONNECTION_SYNCH); + // ChatChannels.db2 + PrepareStatement(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Flags, Name, Shortcut, FactionGroup FROM chat_channels ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Name_lang, Shortcut_lang FROM chat_channels_locale WHERE locale = ?", CONNECTION_SYNCH); + // ChrClassesXPowerTypes.db2 PrepareStatement(HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT ID, ClassID, PowerType FROM chr_classes_x_power_types ORDER BY ID DESC", CONNECTION_SYNCH); @@ -93,6 +97,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_RACES, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_races_locale WHERE locale = ?", CONNECTION_SYNCH); + // ChrSpecialization.db2 + PrepareStatement(HOTFIX_SEL_CHR_SPECIALIZATION, "SELECT ID, MasterySpellID1, MasterySpellID2, Flags, AnimReplacementSetID, Name, Name2, " + "Description, BackgroundFile, SpellIconID, ClassID, OrderIndex, PetTalentType, Role, PrimaryStatOrder FROM chr_specialization ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_SPECIALIZATION, "SELECT ID, Name_lang, Name2_lang, Description_lang FROM chr_specialization_locale" + " WHERE locale = ?", CONNECTION_SYNCH); + // CinematicSequences.db2 PrepareStatement(HOTFIX_SEL_CINEMATIC_SEQUENCES, "SELECT ID, SoundID, Camera1, Camera2, Camera3, Camera4, Camera5, Camera6, Camera7, Camera8" " FROM cinematic_sequences ORDER BY ID DESC", CONNECTION_SYNCH); @@ -104,10 +114,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Gender, Unk700 FROM creature_display_info ORDER BY ID DESC", CONNECTION_SYNCH); // CreatureDisplayInfoExtra.db2 - PrepareStatement(HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA, "SELECT ID, NPCItemDisplay1, NPCItemDisplay2, NPCItemDisplay3, NPCItemDisplay4, " - "NPCItemDisplay5, NPCItemDisplay6, NPCItemDisplay7, NPCItemDisplay8, NPCItemDisplay9, NPCItemDisplay10, FileDataID, HDFileDataID, " - "DisplayRaceID, DisplaySexID, DisplayClassID, SkinID, FaceID, HairStyleID, HairColorID, FacialHairID, CustomDisplayOption1, " - "CustomDisplayOption2, CustomDisplayOption3, Flags FROM creature_display_info_extra ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA, "SELECT ID, FileDataID, HDFileDataID, DisplayRaceID, DisplaySexID, DisplayClassID, " + "SkinID, FaceID, HairStyleID, HairColorID, FacialHairID, CustomDisplayOption1, CustomDisplayOption2, CustomDisplayOption3, Flags" + " FROM creature_display_info_extra ORDER BY ID DESC", CONNECTION_SYNCH); // CreatureType.db2 PrepareStatement(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type ORDER BY ID DESC", CONNECTION_SYNCH); @@ -149,6 +158,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() // DurabilityQuality.db2 PrepareStatement(HOTFIX_SEL_DURABILITY_QUALITY, "SELECT ID, QualityMod FROM durability_quality ORDER BY ID DESC", CONNECTION_SYNCH); + // Emotes.db2 + PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, AnimID, EmoteSoundID, EmoteSpecProc, " + "EmoteSpecProcParam FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); + // EmotesTextSound.db2 PrepareStatement(HOTFIX_SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, SoundId, RaceId, SexId, ClassId FROM emotes_text_sound ORDER BY ID DESC", CONNECTION_SYNCH); @@ -160,8 +173,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() // GameobjectDisplayInfo.db2 PrepareStatement(HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO, "SELECT ID, FileDataID, GeoBoxMinX, GeoBoxMinY, GeoBoxMinZ, GeoBoxMaxX, GeoBoxMaxY, " - "GeoBoxMaxZ, OverrideLootEffectScale, OverrideNameScale, Sound1, Sound2, Sound3, Sound4, Sound5, Sound6, Sound7, Sound8, Sound9, Sound10, " - "ObjectEffectPackageID FROM gameobject_display_info ORDER BY ID DESC", CONNECTION_SYNCH); + "GeoBoxMaxZ, OverrideLootEffectScale, OverrideNameScale, ObjectEffectPackageID FROM gameobject_display_info ORDER BY ID DESC", CONNECTION_SYNCH); // GameTables.db2 PrepareStatement(HOTFIX_SEL_GAME_TABLES, "SELECT ID, Name, NumRows, NumColumns FROM game_tables ORDER BY ID DESC", CONNECTION_SYNCH); @@ -185,7 +197,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() "GarrSiteLevelPlotInstID, GarrBuildingID FROM garr_building_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); // GarrClassSpec.db2 - PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID" + PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, Unknown700" " FROM garr_class_spec ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -222,6 +234,14 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST, "SELECT ID, LandmarkX, LandmarkY, GarrSiteLevelID, GarrPlotInstanceID, Unknown" " FROM garr_site_level_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); + // GemProperties.db2 + PrepareStatement(HOTFIX_SEL_GEM_PROPERTIES, "SELECT ID, Type, EnchantID, MinItemLevel, MaxCountInv, MaxCountItem FROM gem_properties" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // GlyphProperties.db2 + PrepareStatement(HOTFIX_SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, SpellIconID, Type, GlyphExclusiveCategoryID FROM glyph_properties" + " ORDER BY ID DESC", CONNECTION_SYNCH); + // GlyphSlot.db2 PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Type, Tooltip FROM glyph_slot ORDER BY ID DESC", CONNECTION_SYNCH); @@ -354,6 +374,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Enchantment5, AllocationPct1, AllocationPct2, AllocationPct3, AllocationPct4, AllocationPct5 FROM item_random_suffix ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name_lang, InternalName_lang FROM item_random_suffix_locale WHERE locale = ?", CONNECTION_SYNCH); + // ItemSet.db2 + PrepareStatement(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " + "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, RequiredSkillRank, RequiredSkill FROM item_set" + " ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name_lang FROM item_set_locale WHERE locale = ?", CONNECTION_SYNCH); + // ItemSetSpell.db2 PrepareStatement(HOTFIX_SEL_ITEM_SET_SPELL, "SELECT ID, SpellID, ItemSetID, ChrSpecID, Threshold FROM item_set_spell ORDER BY ID DESC", CONNECTION_SYNCH); @@ -392,6 +418,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Key15, Key16, Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM key_chain" " ORDER BY ID DESC", CONNECTION_SYNCH); + // Lock.db2 + PrepareStatement(HOTFIX_SEL_LOCK, "SELECT ID, Index1, Index2, Index3, Index4, Index5, Index6, Index7, Index8, Skill1, Skill2, Skill3, Skill4, " + "Skill5, Skill6, Skill7, Skill8, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Action1, Action2, Action3, Action4, Action5, " + "Action6, Action7, Action8 FROM `lock` ORDER BY ID DESC", CONNECTION_SYNCH); + // MailTemplate.db2 PrepareStatement(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body FROM mail_template ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -457,6 +488,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() // PowerDisplay.db2 PrepareStatement(HOTFIX_SEL_POWER_DISPLAY, "SELECT ID, GlobalStringBaseTag, PowerType, Red, Green, Blue FROM power_display ORDER BY ID DESC", CONNECTION_SYNCH); + // PvpDifficulty.db2 + PrepareStatement(HOTFIX_SEL_PVP_DIFFICULTY, "SELECT ID, MapID, BracketID, MinLevel, MaxLevel FROM pvp_difficulty ORDER BY ID DESC", CONNECTION_SYNCH); + // QuestFactionReward.db2 PrepareStatement(HOTFIX_SEL_QUEST_FACTION_REWARD, "SELECT ID, QuestRewFactionValue1, QuestRewFactionValue2, QuestRewFactionValue3, " "QuestRewFactionValue4, QuestRewFactionValue5, QuestRewFactionValue6, QuestRewFactionValue7, QuestRewFactionValue8, QuestRewFactionValue9, " @@ -590,7 +624,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_SPELL_LEARN_SPELL, "SELECT ID, LearnSpellID, SpellID, OverridesSpellID FROM spell_learn_spell ORDER BY ID DESC", CONNECTION_SYNCH); // SpellLevels.db2 - PrepareStatement(HOTFIX_SEL_SPELL_LEVELS, "SELECT ID, SpellID, BaseLevel, MaxLevel, SpellLevel, DifficultyID FROM spell_levels ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_LEVELS, "SELECT ID, SpellID, BaseLevel, MaxLevel, SpellLevel, DifficultyID, MaxUsableLevel FROM spell_levels" + " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellMisc.db2 PrepareStatement(HOTFIX_SEL_SPELL_MISC, "SELECT ID, Attributes, AttributesEx, AttributesExB, AttributesExC, AttributesExD, AttributesExE, " @@ -653,6 +688,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT ID, SpellID, Unk620, SpellVisualID1, SpellVisualID2, PlayerConditionID, DifficultyID, " "Flags FROM spell_x_spell_visual ORDER BY ID DESC", CONNECTION_SYNCH); + // SummonProperties.db2 + PrepareStatement(HOTFIX_SEL_SUMMON_PROPERTIES, "SELECT ID, Category, Faction, Type, Slot, Flags FROM summon_properties ORDER BY ID DESC", CONNECTION_SYNCH); + // TaxiNodes.db2 PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, MapID, " "ConditionID, LearnableIndex, Flags FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH); @@ -687,6 +725,18 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" " WHERE locale = ?", CONNECTION_SYNCH); + // VehicleSeat.db2 + PrepareStatement(HOTFIX_SEL_VEHICLE_SEAT, "SELECT ID, Flags1, Flags2, Flags3, AttachmentOffsetX, AttachmentOffsetY, AttachmentOffsetZ, " + "EnterPreDelay, EnterSpeed, EnterGravity, EnterMinDuration, EnterMaxDuration, EnterMinArcHeight, EnterMaxArcHeight, ExitPreDelay, ExitSpeed, " + "ExitGravity, ExitMinDuration, ExitMaxDuration, ExitMinArcHeight, ExitMaxArcHeight, PassengerYaw, PassengerPitch, PassengerRoll, " + "VehicleEnterAnimDelay, VehicleExitAnimDelay, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, CameraExitingDuration, " + "CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, CameraSeatZoomMin, " + "CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, RideUpperAnimLoop, " + "ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterUISoundID, ExitUISoundID, " + "EnterAnimKitID, RideAnimKitID, ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, " + "PassengerAttachmentID, VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay FROM vehicle_seat" + " ORDER BY ID DESC", CONNECTION_SYNCH); + // WorldMapOverlay.db2 PrepareStatement(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName, MapAreaID, AreaID1, AreaID2, AreaID3, AreaID4, TextureWidth, " "TextureHeight, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID FROM world_map_overlay" diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 322df76d74d..cedaccf6168 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -63,11 +63,17 @@ enum HotfixDatabaseStatements HOTFIX_SEL_CHAR_START_OUTFIT, + HOTFIX_SEL_CHAT_CHANNELS, + HOTFIX_SEL_CHAT_CHANNELS_LOCALE, + HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, HOTFIX_SEL_CHR_RACES, HOTFIX_SEL_CHR_RACES_LOCALE, + HOTFIX_SEL_CHR_SPECIALIZATION, + HOTFIX_SEL_CHR_SPECIALIZATION_LOCALE, + HOTFIX_SEL_CINEMATIC_SEQUENCES, HOTFIX_SEL_CREATURE_DISPLAY_INFO, @@ -93,6 +99,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_DURABILITY_QUALITY, + HOTFIX_SEL_EMOTES, + HOTFIX_SEL_EMOTES_TEXT_SOUND, HOTFIX_SEL_GAMEOBJECTS, @@ -131,6 +139,10 @@ enum HotfixDatabaseStatements HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST, + HOTFIX_SEL_GEM_PROPERTIES, + + HOTFIX_SEL_GLYPH_PROPERTIES, + HOTFIX_SEL_GLYPH_SLOT, HOTFIX_SEL_GUILD_COLOR_BACKGROUND, @@ -205,6 +217,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_ITEM_RANDOM_SUFFIX, HOTFIX_SEL_ITEM_RANDOM_SUFFIX_LOCALE, + HOTFIX_SEL_ITEM_SET, + HOTFIX_SEL_ITEM_SET_LOCALE, + HOTFIX_SEL_ITEM_SET_SPELL, HOTFIX_SEL_ITEM_SPARSE, @@ -220,6 +235,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_KEY_CHAIN, + HOTFIX_SEL_LOCK, + HOTFIX_SEL_MAIL_TEMPLATE, HOTFIX_SEL_MAIL_TEMPLATE_LOCALE, @@ -252,6 +269,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_POWER_DISPLAY, + HOTFIX_SEL_PVP_DIFFICULTY, + HOTFIX_SEL_QUEST_FACTION_REWARD, HOTFIX_SEL_QUEST_MONEY_REWARD, @@ -351,6 +370,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_SPELL_X_SPELL_VISUAL, + HOTFIX_SEL_SUMMON_PROPERTIES, + HOTFIX_SEL_TAXI_NODES, HOTFIX_SEL_TAXI_NODES_LOCALE, @@ -371,6 +392,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_UNIT_POWER_BAR, HOTFIX_SEL_UNIT_POWER_BAR_LOCALE, + HOTFIX_SEL_VEHICLE_SEAT, + HOTFIX_SEL_WORLD_MAP_OVERLAY, HOTFIX_SEL_WORLD_MAP_TRANSFORMS, diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 6b6c7558f3e..bb4aea1a22c 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -814,7 +814,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp return; } - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id); if (!bracketEntry) { TC_LOG_ERROR("bg.battleground", "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id); diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index ae01936ff0e..1778a0b97aa 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -36,9 +36,11 @@ DB2Storage sBattlePetBreedStateStore("Battl DB2Storage sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesFormat, HOTFIX_SEL_BATTLE_PET_SPECIES); DB2Storage sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateFormat, HOTFIX_SEL_BATTLE_PET_SPECIES_STATE); DB2Storage sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); +DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsFormat, HOTFIX_SEL_CHAT_CHANNELS); DB2Storage sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT); DB2Storage sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); DB2Storage sChrRacesStore("ChrRaces.db2", ChrRacesFormat, HOTFIX_SEL_CHR_RACES); +DB2Storage sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationFormat, HOTFIX_SEL_CHR_SPECIALIZATION); DB2Storage sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES); DB2Storage sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO); DB2Storage sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA); @@ -50,6 +52,7 @@ DB2Storage sCurvePointStore("CurvePoint.db2 DB2Storage sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA); DB2Storage sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsFormat, HOTFIX_SEL_DURABILITY_COSTS); DB2Storage sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY); +DB2Storage sEmotesStore("Emotes.db2", EmotesFormat, HOTFIX_SEL_EMOTES); DB2Storage sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundFormat, HOTFIX_SEL_EMOTES_TEXT_SOUND); DB2Storage sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); DB2Storage sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoFormat, HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO); @@ -65,6 +68,8 @@ DB2Storage sGarrPlotStore("GarrPlot.db2", G DB2Storage sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE); DB2Storage sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL); DB2Storage sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST); +DB2Storage sGemPropertiesStore("GemProperties.db2", GemPropertiesFormat, HOTFIX_SEL_GEM_PROPERTIES); +DB2Storage sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesFormat, HOTFIX_SEL_GLYPH_PROPERTIES); DB2Storage sGlyphSlotStore("GlyphSlot.db2", GlyphSlotFormat, HOTFIX_SEL_GLYPH_SLOT); DB2Storage sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundFormat, HOTFIX_SEL_GUILD_COLOR_BACKGROUND); DB2Storage sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderFormat, HOTFIX_SEL_GUILD_COLOR_BORDER); @@ -99,6 +104,7 @@ DB2Storage sItemModifiedAppearanceStore("It DB2Storage sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseFormat, HOTFIX_SEL_ITEM_PRICE_BASE); DB2Storage sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES); DB2Storage sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX); +DB2Storage sItemSetStore("ItemSet.db2", ItemSetFormat, HOTFIX_SEL_ITEM_SET); DB2Storage sItemSetSpellStore("ItemSetSpell.db2", ItemSetSpellFormat, HOTFIX_SEL_ITEM_SET_SPELL); DB2SparseStorage sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE); DB2Storage sItemSpecStore("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC); @@ -106,6 +112,7 @@ DB2Storage sItemSpecOverrideStore("ItemSpec DB2Storage sItemToBattlePetSpeciesStore("ItemToBattlePetSpecies.db2", ItemToBattlePetSpeciesFormat, HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES); DB2Storage sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE); DB2Storage sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); +DB2Storage sLockStore("Lock.db2", LockFormat, HOTFIX_SEL_LOCK); DB2Storage sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE); DB2Storage sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE); DB2Storage sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY); @@ -120,6 +127,7 @@ DB2Storage sOverrideSpellDataStore("Overrid DB2Storage sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP); DB2Storage sPlayerConditionStore("PlayerCondition.db2", PlayerConditionFormat, HOTFIX_SEL_PLAYER_CONDITION); DB2Storage sPowerDisplayStore("PowerDisplay.db2", PowerDisplayFormat, HOTFIX_SEL_POWER_DISPLAY); +DB2Storage sPvpDifficultyStore("PvpDifficulty.db2", PvpDifficultyFormat, HOTFIX_SEL_PVP_DIFFICULTY); DB2Storage sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardFormat, HOTFIX_SEL_QUEST_FACTION_REWARD); DB2Storage sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardFormat, HOTFIX_SEL_QUEST_MONEY_REWARD); DB2Storage sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemFormat, HOTFIX_SEL_QUEST_PACKAGE_ITEM); @@ -165,6 +173,7 @@ DB2Storage sSpellShapeshiftFormStore("Spell DB2Storage sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsFormat, HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS); DB2Storage sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS); DB2Storage sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL); +DB2Storage sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesFormat, HOTFIX_SEL_SUMMON_PROPERTIES); DB2Storage sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES); DB2Storage sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH); DB2Storage sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE); @@ -173,6 +182,7 @@ DB2Storage sToyStore("Toy.db2", ToyFormat, DB2Storage sTransportAnimationStore("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION); DB2Storage sTransportRotationStore("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION); DB2Storage sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR); +DB2Storage sVehicleSeatStore("VehicleSeat.db2", VehicleSeatFormat, HOTFIX_SEL_VEHICLE_SEAT); DB2Storage sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY); DB2Storage sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsFormat, HOTFIX_SEL_WORLD_MAP_TRANSFORMS); @@ -262,8 +272,10 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sBattlePetSpeciesStateStore); LOAD_DB2(sBroadcastTextStore); LOAD_DB2(sCharStartOutfitStore); + LOAD_DB2(sChatChannelsStore); LOAD_DB2(sChrClassesXPowerTypesStore); LOAD_DB2(sChrRacesStore); + LOAD_DB2(sChrSpecializationStore); LOAD_DB2(sCinematicSequencesStore); LOAD_DB2(sCreatureDisplayInfoStore); LOAD_DB2(sCreatureDisplayInfoExtraStore); @@ -275,6 +287,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sDestructibleModelDataStore); LOAD_DB2(sDurabilityCostsStore); LOAD_DB2(sDurabilityQualityStore); + LOAD_DB2(sEmotesStore); LOAD_DB2(sEmotesTextSoundStore); LOAD_DB2(sGameObjectsStore); LOAD_DB2(sGameObjectDisplayInfoStore); @@ -290,6 +303,8 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sGarrPlotStore); LOAD_DB2(sGarrSiteLevelPlotInstStore); LOAD_DB2(sGarrSiteLevelStore); + LOAD_DB2(sGemPropertiesStore); + LOAD_DB2(sGlyphPropertiesStore); LOAD_DB2(sGlyphSlotStore); LOAD_DB2(sGuildColorBackgroundStore); LOAD_DB2(sGuildColorBorderStore); @@ -323,6 +338,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sItemPriceBaseStore); LOAD_DB2(sItemRandomPropertiesStore); LOAD_DB2(sItemRandomSuffixStore); + LOAD_DB2(sItemSetStore); LOAD_DB2(sItemSetSpellStore); LOAD_DB2(sItemSparseStore); LOAD_DB2(sItemSpecOverrideStore); @@ -331,6 +347,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sItemToBattlePetSpeciesStore); LOAD_DB2(sItemXBonusTreeStore); LOAD_DB2(sKeyChainStore); + LOAD_DB2(sLockStore); LOAD_DB2(sMailTemplateStore); LOAD_DB2(sModifierTreeStore); LOAD_DB2(sMountCapabilityStore); @@ -345,6 +362,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sPhaseXPhaseGroupStore); LOAD_DB2(sPlayerConditionStore); LOAD_DB2(sPowerDisplayStore); + LOAD_DB2(sPvpDifficultyStore); LOAD_DB2(sQuestFactionRewardStore); LOAD_DB2(sQuestMoneyRewardStore); LOAD_DB2(sQuestPackageItemStore); @@ -389,6 +407,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sSpellTargetRestrictionsStore); LOAD_DB2(sSpellTotemsStore); LOAD_DB2(sSpellXSpellVisualStore); + LOAD_DB2(sSummonPropertiesStore); LOAD_DB2(sTaxiNodesStore); LOAD_DB2(sTaxiPathNodeStore); LOAD_DB2(sTaxiPathStore); @@ -397,6 +416,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sTransportAnimationStore); LOAD_DB2(sTransportRotationStore); LOAD_DB2(sUnitPowerBarStore); + LOAD_DB2(sVehicleSeatStore); LOAD_DB2(sWorldMapOverlayStore); LOAD_DB2(sWorldMapTransformsStore); @@ -408,23 +428,36 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (CharStartOutfitEntry const* outfit : sCharStartOutfitStore) _charStartOutfits[outfit->RaceID | (outfit->ClassID << 8) | (outfit->GenderID << 16)] = outfit; - std::set powers; - for (ChrClassesXPowerTypesEntry const* power : sChrClassesXPowerTypesStore) - powers.insert(power); + { + std::set powers; + for (ChrClassesXPowerTypesEntry const* power : sChrClassesXPowerTypesStore) + powers.insert(power); - for (uint32 i = 0; i < MAX_CLASSES; ++i) - for (uint32 j = 0; j < MAX_POWERS; ++j) - _powersByClass[i][j] = MAX_POWERS; + for (uint32 i = 0; i < MAX_CLASSES; ++i) + for (uint32 j = 0; j < MAX_POWERS; ++j) + _powersByClass[i][j] = MAX_POWERS; - for (ChrClassesXPowerTypesEntry const* power : powers) - { - uint32 index = 0; - for (uint32 j = 0; j < MAX_POWERS; ++j) - if (_powersByClass[power->ClassID][j] != MAX_POWERS) - ++index; + for (ChrClassesXPowerTypesEntry const* power : powers) + { + uint32 index = 0; + for (uint32 j = 0; j < MAX_POWERS; ++j) + if (_powersByClass[power->ClassID][j] != MAX_POWERS) + ++index; + + ASSERT(power->PowerType < MAX_POWERS); + _powersByClass[power->ClassID][power->PowerType] = index; + } + } - ASSERT(power->PowerType < MAX_POWERS); - _powersByClass[power->ClassID][power->PowerType] = index; + memset(_chrSpecializationsByIndex, 0, sizeof(_chrSpecializationsByIndex)); + for (uint32 i = 0; i < sChrSpecializationStore.GetNumRows(); ++i) + { + if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(i)) + { + ASSERT(chrSpec->ClassID < MAX_CLASSES); + ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS); + _chrSpecializationsByIndex[chrSpec->ClassID][chrSpec->OrderIndex] = chrSpec; + } } for (EmotesTextSoundEntry const* emoteTextSound : sEmotesTextSoundStore) @@ -444,6 +477,9 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) if (glyphSlot->Type == GLYPH_SLOT_MAJOR || glyphSlot->Type == GLYPH_SLOT_MINOR) _glyphSlots.insert(glyphSlot); + for (HeirloomEntry const* heirloom : sHeirloomStore) + _heirlooms[heirloom->ItemID] = heirloom; + for (ItemBonusEntry const* bonus : sItemBonusStore) _itemBonusLists[bonus->BonusListID].push_back(bonus); @@ -529,6 +565,11 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) _phasesByGroup[group->PhaseGroupID].insert(phase->ID); + for (PvPDifficultyEntry const* entry : sPvpDifficultyStore) + { + ASSERT(entry->BracketID < MAX_BATTLEGROUND_BRACKETS, "PvpDifficulty bracket (%d) exceeded max allowed value (%d)", entry->BracketID, MAX_BATTLEGROUND_BRACKETS); + } + for (QuestPackageItemEntry const* questPackageItem : sQuestPackageItemStore) _questPackages[questPackageItem->QuestPackageID].push_back(questPackageItem); @@ -628,9 +669,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (ToyEntry const* toy : sToyStore) _toys.insert(toy->ItemID); - for (HeirloomEntry const* heirloom : sHeirloomStore) - _heirlooms[heirloom->ItemID] = heirloom; - // error checks if (bad_db2_files.size() >= DB2FilesCount) { @@ -648,7 +686,8 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) } // Check loaded DB2 files proper version - if (!sItemStore.LookupEntry(136350) || // last item added in 7.0.1 (20810) + if (!sGemPropertiesStore.LookupEntry(2960) || // last gem property added in 7.0.1 (20914) + !sItemStore.LookupEntry(136350) || // last item added in 7.0.1 (20810) !sItemExtendedCostStore.LookupEntry(5951) || // last item extended cost added in 7.0.1 (20810) !sSpellStore.LookupEntry(207511)) // last spell added in 7.0.1 (20810) { @@ -752,6 +791,11 @@ CharStartOutfitEntry const* DB2Manager::GetCharStartOutfitEntry(uint8 race, uint return itr->second; } +ChrSpecializationEntry const* DB2Manager::GetChrSpecializationByIndex(uint32 class_, uint32 index) const +{ + return _chrSpecializationsByIndex[class_][index]; +} + uint32 DB2Manager::GetPowerIndexByClass(uint32 powerType, uint32 classId) const { return _powersByClass[classId][powerType]; @@ -929,6 +973,40 @@ ResponseCodes DB2Manager::ValidateName(std::string const& name, LocaleConstant l return CHAR_NAME_SUCCESS; } +PvPDifficultyEntry const* DB2Manager::GetBattlegroundBracketByLevel(uint32 mapid, uint32 level) +{ + PvPDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case + for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i) + { + if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i)) + { + // skip unrelated and too-high brackets + if (entry->MapID != mapid || entry->MinLevel > level) + continue; + + // exactly fit + if (entry->MaxLevel >= level) + return entry; + + // remember for possible out-of-range case (search higher from existed) + if (!maxEntry || maxEntry->MaxLevel < entry->MaxLevel) + maxEntry = entry; + } + } + + return maxEntry; +} + +PvPDifficultyEntry const* DB2Manager::GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id) +{ + for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i) + if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i)) + if (entry->MapID == mapid && entry->GetBracketId() == id) + return entry; + + return nullptr; +} + std::vector const* DB2Manager::GetQuestPackageItems(uint32 questPackageID) const { auto itr = _questPackages.find(questPackageID); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 4e3f7bdd70b..ded2bf01b4f 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -36,7 +36,9 @@ TC_GAME_API extern DB2Storage sBattlePetSp TC_GAME_API extern DB2Storage sBattlePetSpeciesStateStore; TC_GAME_API extern DB2Storage sBroadcastTextStore; TC_GAME_API extern DB2Storage sCharStartOutfitStore; +TC_GAME_API extern DB2Storage sChatChannelsStore; TC_GAME_API extern DB2Storage sChrRacesStore; +TC_GAME_API extern DB2Storage sChrSpecializationStore; TC_GAME_API extern DB2Storage sCinematicSequencesStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoExtraStore; @@ -47,6 +49,7 @@ TC_GAME_API extern DB2Storage sCurrencyTyp TC_GAME_API extern DB2Storage sDestructibleModelDataStore; TC_GAME_API extern DB2Storage sDurabilityCostsStore; TC_GAME_API extern DB2Storage sDurabilityQualityStore; +TC_GAME_API extern DB2Storage sEmotesStore; TC_GAME_API extern DB2Storage sGameObjectsStore; TC_GAME_API extern DB2Storage sGameObjectDisplayInfoStore; TC_GAME_API extern DB2Storage sGameTablesStore; @@ -61,6 +64,8 @@ TC_GAME_API extern DB2Storage sGarrPlotSto TC_GAME_API extern DB2Storage sGarrPlotInstanceStore; TC_GAME_API extern DB2Storage sGarrSiteLevelStore; TC_GAME_API extern DB2Storage sGarrSiteLevelPlotInstStore; +TC_GAME_API extern DB2Storage sGemPropertiesStore; +TC_GAME_API extern DB2Storage sGlyphPropertiesStore; TC_GAME_API extern DB2Storage sGlyphSlotStore; TC_GAME_API extern DB2Storage sGuildColorBackgroundStore; TC_GAME_API extern DB2Storage sGuildColorBorderStore; @@ -89,11 +94,13 @@ TC_GAME_API extern DB2Storage sItemLimitCa TC_GAME_API extern DB2Storage sItemPriceBaseStore; TC_GAME_API extern DB2Storage sItemRandomPropertiesStore; TC_GAME_API extern DB2Storage sItemRandomSuffixStore; +TC_GAME_API extern DB2Storage sItemSetStore; TC_GAME_API extern DB2Storage sItemSetSpellStore; TC_GAME_API extern DB2SparseStorage sItemSparseStore; TC_GAME_API extern DB2Storage sItemSpecStore; TC_GAME_API extern DB2Storage sItemSpecOverrideStore; TC_GAME_API extern DB2Storage sItemToBattlePetSpeciesStore; +TC_GAME_API extern DB2Storage sLockStore; TC_GAME_API extern DB2Storage sMailTemplateStore; TC_GAME_API extern DB2Storage sModifierTreeStore; TC_GAME_API extern DB2Storage sMountCapabilityStore; @@ -141,9 +148,11 @@ TC_GAME_API extern DB2Storage sSpellShapes TC_GAME_API extern DB2Storage sSpellTargetRestrictionsStore; TC_GAME_API extern DB2Storage sSpellTotemsStore; TC_GAME_API extern DB2Storage sSpellXSpellVisualStore; +TC_GAME_API extern DB2Storage sSummonPropertiesStore; TC_GAME_API extern DB2Storage sTaxiNodesStore; TC_GAME_API extern DB2Storage sTaxiPathStore; TC_GAME_API extern DB2Storage sUnitPowerBarStore; +TC_GAME_API extern DB2Storage sVehicleSeatStore; TC_GAME_API extern DB2Storage sWorldMapOverlayStore; TC_GAME_API extern TaxiMask sTaxiNodesMask; @@ -179,6 +188,7 @@ public: typedef std::map StorageMap; typedef std::unordered_map> AreaGroupMemberContainer; typedef std::unordered_map CharStartOutfitContainer; + typedef ChrSpecializationEntry const* ChrSpecializationByIndexContainer[MAX_CLASSES][MAX_SPECIALIZATIONS]; typedef std::map, EmotesTextSoundEntry const*> EmotesTextSoundContainer; typedef std::set GlyphSlotContainer; typedef std::map>> HeirloomCurvesContainer; @@ -216,6 +226,7 @@ public: std::vector GetAreasForGroup(uint32 areaGroupId) const; static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false); CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) const; + ChrSpecializationEntry const* GetChrSpecializationByIndex(uint32 class_, uint32 index) const; uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId) const; static char const* GetChrRaceName(uint8 race, LocaleConstant locale = DEFAULT_LOCALE); EmotesTextSoundEntry const* GetTextSoundEmoteFor(uint32 emote, uint8 race, uint8 gender, uint8 class_) const; @@ -236,6 +247,8 @@ public: std::vector const* GetQuestPackageItems(uint32 questPackageID) const; uint32 GetQuestUniqueBitFlag(uint32 questId); std::set GetPhasesForGroup(uint32 group) const; + static PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); + static PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); std::vector const* GetSpecializationSpells(uint32 specId) const; std::vector GetSpellPowers(uint32 spellId, Difficulty difficulty = DIFFICULTY_NONE, bool* hasDifficultyPowers = nullptr) const; @@ -251,6 +264,7 @@ private: AreaGroupMemberContainer _areaGroupMembers; CharStartOutfitContainer _charStartOutfits; uint32 _powersByClass[MAX_CLASSES][MAX_POWERS]; + ChrSpecializationByIndexContainer _chrSpecializationsByIndex; EmotesTextSoundContainer _emoteTextSounds; GlyphSlotContainer _glyphSlots; HeirloomItemsContainer _heirlooms; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index ff3b9efc9c1..171d4324a62 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -148,6 +148,14 @@ struct CharStartOutfitEntry uint8 PetFamilyID; // Pet Family Entry for starting pet }; +struct ChatChannelsEntry +{ + uint32 Flags; + LocalizedString* Name; + LocalizedString* Shortcut; + uint8 FactionGroup; +}; + struct ChrClassesXPowerTypesEntry { uint8 ClassID; @@ -193,6 +201,26 @@ struct ChrRacesEntry uint8 CharComponentTexLayoutHiResID; }; +#define MAX_MASTERY_SPELLS 2 + +struct ChrSpecializationEntry +{ + uint32 ID; + uint32 MasterySpellID[MAX_MASTERY_SPELLS]; + uint32 Flags; + uint32 AnimReplacementSetID; + LocalizedString* Name; + LocalizedString* Name2; + LocalizedString* Description; + char* BackgroundFile; + uint16 SpellIconID; + uint8 ClassID; + uint8 OrderIndex; + uint8 PetTalentType; + uint8 Role; + uint8 PrimaryStatOrder; +}; + struct CinematicSequencesEntry { uint16 SoundID; @@ -226,7 +254,6 @@ struct CreatureDisplayInfoEntry struct CreatureDisplayInfoExtraEntry { - uint32 NPCItemDisplay[10]; uint32 FileDataID; uint32 HDFileDataID; uint8 DisplayRaceID; @@ -451,6 +478,17 @@ struct DurabilityQualityEntry float QualityMod; }; +struct EmotesEntry +{ + char const* EmoteSlashCommand; + uint32 SpellVisualKitID; + uint32 EmoteFlags; + uint16 AnimID; + uint16 EmoteSoundID; + uint8 EmoteSpecProc; + uint8 EmoteSpecProcParam; +}; + struct EmotesTextSoundEntry { uint16 EmotesTextId; @@ -486,7 +524,6 @@ struct GameObjectDisplayInfoEntry DBCPosition3D GeoBoxMax; float OverrideLootEffectScale; float OverrideNameScale; - uint16 Sound[10]; uint16 ObjectEffectPackageID; }; @@ -554,6 +591,7 @@ struct GarrClassSpecEntry LocalizedString* NameGenderless; uint16 ClassAtlasID; // UiTextureAtlasMember.db2 ref uint8 GarrFollItemSetID; + uint8 Unknown700; }; struct GarrFollowerEntry @@ -636,6 +674,23 @@ struct GarrSiteLevelPlotInstEntry uint8 Unknown; }; +struct GemPropertiesEntry +{ + uint32 Type; + uint16 EnchantID; + uint16 MinItemLevel; + uint8 MaxCountInv; + uint8 MaxCountItem; +}; + +struct GlyphPropertiesEntry +{ + uint32 SpellID; + uint16 SpellIconID; + uint8 Type; + uint8 GlyphExclusiveCategoryID; +}; + struct GlyphSlotEntry { uint8 Type; @@ -905,6 +960,16 @@ struct ItemRandomSuffixEntry uint16 AllocationPct[MAX_ITEM_RANDOM_PROPERTIES]; }; +#define MAX_ITEM_SET_ITEMS 17 + +struct ItemSetEntry +{ + LocalizedString* Name; + uint32 ItemID[MAX_ITEM_SET_ITEMS]; + uint16 RequiredSkillRank; + uint8 RequiredSkill; +}; + struct ItemSetSpellEntry { uint32 SpellID; @@ -1017,6 +1082,16 @@ struct KeyChainEntry uint8 Key[KEYCHAIN_SIZE]; }; +#define MAX_LOCK_CASE 8 + +struct LockEntry +{ + uint32 Index[MAX_LOCK_CASE]; + uint16 Skill[MAX_LOCK_CASE]; + uint8 Type[MAX_LOCK_CASE]; + uint8 Action[MAX_LOCK_CASE]; +}; + struct MailTemplateEntry { LocalizedString* Body; @@ -1205,6 +1280,17 @@ struct PowerDisplayEntry uint8 Blue; }; +struct PvPDifficultyEntry +{ + uint16 MapID; + uint8 BracketID; + uint8 MinLevel; + uint8 MaxLevel; + + // helpers + BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(BracketID); } +}; + struct QuestFactionRewardEntry { int16 QuestRewFactionValue[10]; @@ -1511,6 +1597,7 @@ struct SpellLevelsEntry uint16 MaxLevel; uint16 SpellLevel; uint8 DifficultyID; + uint8 MaxUsableLevel; }; struct SpellMiscEntry @@ -1673,6 +1760,15 @@ struct SpellXSpellVisualEntry uint8 Flags; }; +struct SummonPropertiesEntry +{ + uint32 Category; + uint32 Faction; + uint32 Type; + int32 Slot; + uint32 Flags; +}; + struct TaxiNodesEntry { uint32 ID; @@ -1761,6 +1857,84 @@ struct UnitPowerBarEntry uint8 BarType; }; +struct VehicleSeatEntry +{ + uint32 Flags[3]; + DBCPosition3D AttachmentOffset; + float EnterPreDelay; + float EnterSpeed; + float EnterGravity; + float EnterMinDuration; + float EnterMaxDuration; + float EnterMinArcHeight; + float EnterMaxArcHeight; + float ExitPreDelay; + float ExitSpeed; + float ExitGravity; + float ExitMinDuration; + float ExitMaxDuration; + float ExitMinArcHeight; + float ExitMaxArcHeight; + float PassengerYaw; + float PassengerPitch; + float PassengerRoll; + float VehicleEnterAnimDelay; + float VehicleExitAnimDelay; + float CameraEnteringDelay; + float CameraEnteringDuration; + float CameraExitingDelay; + float CameraExitingDuration; + DBCPosition3D CameraOffset; + float CameraPosChaseRate; + float CameraFacingChaseRate; + float CameraEnteringZoom; + float CameraSeatZoomMin; + float CameraSeatZoomMax; + uint32 UISkinFileDataID; + int16 EnterAnimStart; + int16 EnterAnimLoop; + int16 RideAnimStart; + int16 RideAnimLoop; + int16 RideUpperAnimStart; + int16 RideUpperAnimLoop; + int16 ExitAnimStart; + int16 ExitAnimLoop; + int16 ExitAnimEnd; + int16 VehicleEnterAnim; + int16 VehicleExitAnim; + int16 VehicleRideAnimLoop; + uint16 EnterUISoundID; + uint16 ExitUISoundID; + uint16 EnterAnimKitID; + uint16 RideAnimKitID; + uint16 ExitAnimKitID; + uint16 VehicleEnterAnimKitID; + uint16 VehicleRideAnimKitID; + uint16 VehicleExitAnimKitID; + uint16 CameraModeID; + int8 AttachmentID; + int8 PassengerAttachmentID; + int8 VehicleEnterAnimBone; + int8 VehicleExitAnimBone; + int8 VehicleRideAnimLoopBone; + uint8 VehicleAbilityDisplay; + + bool CanEnterOrExit() const + { + return ((Flags[0] & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0 || + //If it has anmation for enter/ride, means it can be entered/exited by logic + (Flags[0] & (VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER | VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE)) != 0); + } + bool CanSwitchFromSeat() const { return (Flags[0] & VEHICLE_SEAT_FLAG_CAN_SWITCH) != 0; } + bool IsUsableByOverride() const + { + return (Flags[0] & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18) + || (Flags[1] & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 | + VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4))); + } + bool IsEjectable() const { return (Flags[1] & VEHICLE_SEAT_FLAG_B_EJECTABLE) != 0; } +}; + #define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4 struct WorldMapOverlayEntry diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h index 1e8c3be57ea..596a67bd35d 100644 --- a/src/server/game/DataStores/DB2fmt.h +++ b/src/server/game/DataStores/DB2fmt.h @@ -31,11 +31,13 @@ char const BattlePetSpeciesFormat[] = "niiisshbb"; char const BattlePetSpeciesStateFormat[] = "nihb"; char const BroadcastTextFormat[] = "dsshhhhhhhhbb"; char const CharStartOutfitFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiibbbbb"; +char const ChatChannelsFormat[] = "dissb"; char const ChrClassesXPowerTypesFormat[] = "dbb"; char const ChrRacesFormat[] = "niSSsssSSSiiffffffihhhhhhhhhhhhbbbbbbbbb"; +char const ChrSpecializationFormat[] = "niiiisssShbbbbb"; char const CinematicSequencesFormat[] = "dhhhhhhhhh"; char const CreatureDisplayInfoFormat[] = "niffiiiSiiihhhhhhbbbbbb"; -char const CreatureDisplayInfoExtraFormat[] = "diiiiiiiiiiiibbbbbbbbbbbb"; +char const CreatureDisplayInfoExtraFormat[] = "diibbbbbbbbbbbb"; char const CreatureTypeFormat[] = "dsb"; char const CriteriaFormat[] = "diiihhhbbbbb"; char const CriteriaTreeFormat[] = "dishhhhb"; @@ -44,14 +46,15 @@ char const CurvePointFormat[] = "dffhb"; char const DestructibleModelDataFormat[] = "dhhhhhbbbbbbbbbbbbbbbbb"; char const DurabilityCostsFormat[] = "dhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"; char const DurabilityQualityFormat[] = "df"; +char const EmotesFormat[] = "dSiihhbb"; char const EmotesTextSoundFormat[] = "dhhbbb"; char const GameObjectsFormat[] = "nffffffffiiiiiiiishhhhbb"; -char const GameObjectDisplayInfoFormat[] = "diffffffffhhhhhhhhhhh"; +char const GameObjectDisplayInfoFormat[] = "diffffffffh"; char const GameTablesFormat[] = "dshb"; char const GarrAbilityFormat[] = "nssihbbb"; char const GarrBuildingFormat[] = "diissssihhhhhhbbbbbbbbbbb"; char const GarrBuildingPlotInstFormat[] = "nffhhb"; -char const GarrClassSpecFormat[] = "nssshb"; +char const GarrClassSpecFormat[] = "nssshbb"; char const GarrFollowerFormat[] = "diissiihhbbbbbbbbbbbbbbbb"; char const GarrFollowerXAbilityFormat[] = "dhhb"; char const GarrPlotFormat[] = "dsiibbbbb"; @@ -59,6 +62,8 @@ char const GarrPlotBuildingFormat[] = "dbb"; char const GarrPlotInstanceFormat[] = "dsb"; char const GarrSiteLevelFormat[] = "dffhhhbbbbb"; char const GarrSiteLevelPlotInstFormat[] = "dffhbb"; +char const GemPropertiesFormat[] = "dihhbb"; +char const GlyphPropertiesFormat[] = "dihbb"; char const GlyphSlotFormat[] = "dbb"; char const GuildColorBackgroundFormat[] = "dbbb"; char const GuildColorBorderFormat[] = "dbbb"; @@ -93,6 +98,7 @@ char const ItemModifiedAppearanceFormat[] = "nihbb"; char const ItemPriceBaseFormat[] = "dffh"; char const ItemRandomPropertiesFormat[] = "dshhhhh"; char const ItemRandomSuffixFormat[] = "dsshhhhhhhhhh"; +char const ItemSetFormat[] = "dsiiiiiiiiiiiiiiiiihb"; char const ItemSetSpellFormat[] = "dihhb"; char const ItemSparseFormat[] = "iiiffiiiiiiiiiiiiiiiiifffffffffffsssssififhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const ItemSpecFormat[] = "dhbbbbb"; @@ -100,6 +106,7 @@ char const ItemSpecOverrideFormat[] = "dih"; char const ItemToBattlePetSpeciesFormat[] = "dh"; char const ItemXBonusTreeFormat[] = "dih"; char const KeyChainFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; +char const LockFormat[] = "diiiiiiiihhhhhhhhbbbbbbbbbbbbbbbb"; char const MailTemplateFormat[] = "ds"; char const ModifierTreeFormat[] = "diihbbbb"; char const MountFormat[] = "niissshhhb"; @@ -114,6 +121,7 @@ char const OverrideSpellDataFormat[] = "diiiiiiiiiiib"; char const PhaseXPhaseGroupFormat[] = "dhh"; char const PlayerConditionFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const PowerDisplayFormat[] = "dSbbbb"; +char const PvpDifficultyFormat[] = "dhbbb"; char const QuestFactionRewardFormat[] = "dhhhhhhhhhh"; char const QuestMoneyRewardFormat[] = "diiiiiiiiii"; char const QuestPackageItemFormat[] = "dihbb"; @@ -144,7 +152,7 @@ char const SpellFocusObjectFormat[] = "ds"; char const SpellInterruptsFormat[] = "diiiiihb"; char const SpellItemEnchantmentConditionFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const SpellLearnSpellFormat[] = "diii"; -char const SpellLevelsFormat[] = "dihhhb"; +char const SpellLevelsFormat[] = "dihhhbb"; char const SpellMiscFormat[] = "diiiiiiiiiiiiiiffhhhhhb"; char const SpellPowerFormat[] = "niiffifhhhhbbb"; char const SpellPowerDifficultyFormat[] = "nbb"; @@ -157,6 +165,7 @@ char const SpellShapeshiftFormFormat[] = "dsfihhhhhhhhhhhhhhbbb"; char const SpellTargetRestrictionsFormat[] = "diffihhbb"; char const SpellTotemsFormat[] = "diiibb"; char const SpellXSpellVisualFormat[] = "nifhhhbb"; +char const SummonPropertiesFormat[] = "diiiii"; char const TaxiNodesFormat[] = "nfffsiiffhhhb"; char const TaxiPathFormat[] = "nhhh"; char const TaxiPathNodeFormat[] = "nfffihhhhbb"; @@ -165,6 +174,7 @@ char const ToyFormat[] = "nisbb"; char const TransportAnimationFormat[] = "diifffb"; char const TransportRotationFormat[] = "diiffff"; char const UnitPowerBarFormat[] = "diffiiiiiiiiiiiissssffhhbbb"; +char const VehicleSeatFormat[] = "diiiffffffffffffffffffffffffffffffffffihhhhhhhhhhhhhhhhhhhhhbbbbbb"; char const WorldMapOverlayFormat[] = "dShhhhhhhhhhhhhh"; char const WorldMapTransformsFormat[] = "dfffffffffhhhhb"; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 0e0375826ce..04313191799 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -55,47 +55,35 @@ DBCStorage sBattlemasterListStore(BattlemasterL DBCStorage sCharSectionsStore(CharSectionsfmt); CharSectionsMap sCharSectionMap; DBCStorage sCharTitlesStore(CharTitlesfmt); -DBCStorage sChatChannelsStore(ChatChannelsfmt); DBCStorage sChrClassesStore(ChrClassesfmt); -DBCStorage sChrSpecializationStore(ChrSpecializationfmt); -ChrSpecializationByIndexArray sChrSpecializationByIndexStore; DBCStorage sCreatureFamilyStore(CreatureFamilyfmt); DBCStorage sCreatureModelDataStore(CreatureModelDatafmt); DBCStorage sDifficultyStore(DifficultyFmt); DBCStorage sDungeonEncounterStore(DungeonEncounterfmt); -DBCStorage sEmotesStore(Emotesfmt); DBCStorage sEmotesTextStore(EmotesTextfmt); DBCStorage sFactionStore(Factionfmt); static FactionTeamMap sFactionTeamMap; DBCStorage sFactionTemplateStore(FactionTemplatefmt); -DBCStorage sGemPropertiesStore(GemPropertiesfmt); -DBCStorage sGlyphPropertiesStore(GlyphPropertiesfmt); -DBCStorage sItemSetStore(ItemSetfmt); - DBCStorage sLFGDungeonStore(LFGDungeonfmt); DBCStorage sLightStore(Lightfmt); DBCStorage sLiquidTypeStore(LiquidTypefmt); -DBCStorage sLockStore(Lockfmt); DBCStorage sMapStore(Mapfmt); DBCStorage sMapDifficultyStore(MapDifficultyfmt); // only for loading MapDifficultyMap sMapDifficultyMap; DBCStorage sPhaseStore(Phasefmt); -DBCStorage sPvpDifficultyStore(PvpDifficultyfmt); DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); -DBCStorage sSummonPropertiesStore(SummonPropertiesfmt); DBCStorage sTalentStore(Talentfmt); TalentsByPosition sTalentByPos; DBCStorage sVehicleStore(Vehiclefmt); -DBCStorage sVehicleSeatStore(VehicleSeatfmt); DBCStorage sWMOAreaTableStore(WMOAreaTablefmt); static WMOAreaInfoByTripple sWMOAreaInfoByTripple; @@ -242,36 +230,26 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20810 LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20810 LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20810 - LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//20810 LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20810 - LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc");//20810 LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20810 LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20810 LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20810 LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20810 - LOAD_DBC(sEmotesStore, "Emotes.dbc");//20810 LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20810 LOAD_DBC(sFactionStore, "Faction.dbc");//20810 LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20810 - LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//20810 - LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//20810 - LOAD_DBC(sItemSetStore, "ItemSet.dbc");//20810 LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20810 LOAD_DBC(sLightStore, "Light.dbc"); //20810 LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20810 - LOAD_DBC(sLockStore, "Lock.dbc");//20810 LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20810 LOAD_DBC(sMapStore, "Map.dbc");//20810 LOAD_DBC(sPhaseStore, "Phase.dbc");//20810 - LOAD_DBC(sPvpDifficultyStore, "PvpDifficulty.dbc");//20810 LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20810 - LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//20810 LOAD_DBC(sTalentStore, "Talent.dbc");//20810 - LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//20810 LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20810 LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20810 - LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20444 - LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20444 + LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20810 + LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20810 #undef LOAD_DBC @@ -280,12 +258,6 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); - memset(sChrSpecializationByIndexStore, 0, sizeof(sChrSpecializationByIndexStore)); - for (ChrSpecializationEntry const* chrSpec : sChrSpecializationStore) - { - ASSERT(chrSpec->ClassID < MAX_CLASSES); - ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS); - uint32 storageIndex = chrSpec->ClassID; if (chrSpec->Flags & CHR_SPECIALIZATION_FLAG_PET_OVERRIDE_SPEC) { @@ -316,11 +288,6 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) sMapDifficultyMap[entry->MapID][entry->DifficultyID] = entry; sMapDifficultyMap[0][0] = sMapDifficultyMap[1][0]; //map 0 is missing from MapDifficulty.dbc use this till its ported to sql - for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i) - if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i)) - if (entry->BracketID > MAX_BATTLEGROUND_BRACKETS) - ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data"); - for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { if (TalentEntry const* talentInfo = sTalentStore.LookupEntry(i)) @@ -356,7 +323,6 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) // Check loaded DBC files proper version if (!sAreaTableStore.LookupEntry(6719) || // last area (areaflag) added in 7.0.1 (20810) !sCharTitlesStore.LookupEntry(469) || // last char title added in 7.0.1 (20810) - !sGemPropertiesStore.LookupEntry(2952) || // last gem property added in 7.0.1 (20810) !sMapStore.LookupEntry(1602) ) // last map added in 7.0.1 (20810) { TC_LOG_ERROR("misc", "You have _outdated_ DBC files. Please extract correct versions from current using client."); @@ -606,40 +572,6 @@ MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficult return mapDiff; } -PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level) -{ - PvPDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case - for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i) - { - if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i)) - { - // skip unrelated and too-high brackets - if (entry->MapID != mapid || entry->MinLevel > level) - continue; - - // exactly fit - if (entry->MaxLevel >= level) - return entry; - - // remember for possible out-of-range case (search higher from existed) - if (!maxEntry || maxEntry->MaxLevel < entry->MaxLevel) - maxEntry = entry; - } - } - - return maxEntry; -} - -PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id) -{ - for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i) - if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i)) - if (entry->MapID == mapid && entry->GetBracketId() == id) - return entry; - - return NULL; -} - uint32 GetLiquidFlags(uint32 liquidType) { if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType)) diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index a1986effa48..b55c9573421 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -30,10 +30,6 @@ TC_GAME_API CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSection // ChrClasses TC_GAME_API char const* GetClassName(uint8 class_, uint8 locale); -// ChrSpecialization -#define PET_SPEC_OVERRIDE_CLASS_INDEX MAX_CLASSES -typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES + 1][MAX_SPECIALIZATIONS]; - // CreatureFamilty TC_GAME_API char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); @@ -55,10 +51,6 @@ TC_GAME_API MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Diff TC_GAME_API MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty); TC_GAME_API MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty); -// PvpDifficulty -TC_GAME_API PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); -TC_GAME_API PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); - // Talent typedef std::vector TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]; @@ -107,33 +99,23 @@ TC_GAME_API extern DBCStorage sBannedAddOnsSto TC_GAME_API extern DBCStorage sBattlemasterListStore; TC_GAME_API extern DBCStorage sCharSectionsStore; TC_GAME_API extern DBCStorage sCharTitlesStore; -TC_GAME_API extern DBCStorage sChatChannelsStore; TC_GAME_API extern DBCStorage sChrClassesStore; -TC_GAME_API extern DBCStorage sChrSpecializationStore; -TC_GAME_API extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore; TC_GAME_API extern DBCStorage sCreatureFamilyStore; TC_GAME_API extern DBCStorage sCreatureModelDataStore; TC_GAME_API extern DBCStorage sDifficultyStore; TC_GAME_API extern DBCStorage sDungeonEncounterStore; -TC_GAME_API extern DBCStorage sEmotesStore; TC_GAME_API extern DBCStorage sEmotesTextStore; TC_GAME_API extern DBCStorage sFactionStore; TC_GAME_API extern DBCStorage sFactionTemplateStore; -TC_GAME_API extern DBCStorage sGemPropertiesStore; -TC_GAME_API extern DBCStorage sGlyphPropertiesStore; -TC_GAME_API extern DBCStorage sItemSetStore; TC_GAME_API extern DBCStorage sLFGDungeonStore; TC_GAME_API extern DBCStorage sLiquidTypeStore; -TC_GAME_API extern DBCStorage sLockStore; TC_GAME_API extern DBCStorage sMapStore; TC_GAME_API extern MapDifficultyMap sMapDifficultyMap; TC_GAME_API extern DBCStorage sPhaseStore; TC_GAME_API extern DBCStorage sSpellItemEnchantmentStore; -TC_GAME_API extern DBCStorage sSummonPropertiesStore; TC_GAME_API extern DBCStorage sTalentStore; TC_GAME_API extern TalentsByPosition sTalentByPos; TC_GAME_API extern DBCStorage sVehicleStore; -TC_GAME_API extern DBCStorage sVehicleSeatStore; TC_GAME_API extern DBCStorage sWMOAreaTableStore; TC_GAME_API extern DBCStorage sWorldSafeLocsStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 30704aaadad..8dcb1a687a4 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -151,15 +151,6 @@ struct CharTitlesEntry //uint32 Flags; // 5 }; -struct ChatChannelsEntry -{ - uint32 ID; // 0 - uint32 Flags; // 1 - //uint32 FactionGroup // 2 - char* Name_lang; // 3 - //char* Shortcut_lang; // 4 -}; - struct ChrClassesEntry { uint32 ID; // 0 @@ -183,25 +174,6 @@ struct ChrClassesEntry //uint32 Unk1; // 18 }; -struct ChrSpecializationEntry -{ - uint32 ID; // 0 Specialization ID - //char* BackgroundFile; // 1 - uint32 ClassID; // 2 - uint32 MasterySpellID; // 3 - uint32 OrderIndex; // 4 - uint32 PetTalentType; // 5 - uint32 Role; // 6 (0 - Tank, 1 - Healer, 2 - DPS) - uint32 SpellIconID; // 7 - uint32 RaidBuffs; // 8 - uint32 Flags; // 9 - //char* Name_lang; // 10 - //char* Name2_lang; // 11 Same as name_lang? - //char* Description_lang; // 12 - //uint32 PrimaryStatOrder; // 13 - //uint32 AnimReplacementSetID; // 14 -}; - struct CreatureFamilyEntry { uint32 ID; // 0 @@ -294,18 +266,6 @@ struct DungeonEncounterEntry //uint32 Unk; // 8 Flags2? }; -struct EmotesEntry -{ - uint32 ID; // 0 - //char* EmoteSlashCommand; // 1 - //uint32 AnimID; // 2 ref to animationData - uint32 EmoteFlags; // 3 bitmask, may be unit_flags - uint32 EmoteSpecProc; // 4 Can be 0, 1 or 2 (determine how emote are shown) - uint32 EmoteSpecProcParam; // 5 uncomfirmed, may be enum UnitStandStateType - //uint32 EmoteSoundID; // 6 ref to soundEntries - //uint32 SpellVisualKitID // 7 -}; - struct EmotesTextEntry { uint32 ID; // 0 @@ -396,25 +356,6 @@ struct FactionTemplateEntry bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } }; -struct GemPropertiesEntry -{ - uint32 ID; // 0 - uint32 EnchantID; // 1 - //uint32 MaxCountInv; // 2 - //uint32 MaxCountItem; // 3 - uint32 Type; // 4 - uint32 MinItemLevel; // 5 -}; - -struct GlyphPropertiesEntry -{ - uint32 ID; // 0 - uint32 SpellID; // 1 - uint32 Type; // 2 - uint32 SpellIconID; // 3 GlyphIconId (SpellIcon.dbc) - //uint32 GlyphExclusiveCategoryID; // 4 -}; - struct GtArmorMitigationByLvlEntry { //uint32 level; @@ -534,18 +475,6 @@ struct ItemDisplayInfoEntry //uint32 ParticleColorID; // 22 }; -#define MAX_ITEM_SET_ITEMS 17 -#define MAX_ITEM_SET_SPELLS 8 - -struct ItemSetEntry -{ - uint32 ID; // 0 - char* Name_lang; // 1 - uint32 ItemID[MAX_ITEM_SET_ITEMS]; // 2-18 - uint32 RequiredSkill; // 19 - uint32 RequiredSkillRank; // 20 -}; - struct LFGDungeonEntry { uint32 ID; // 0 @@ -617,17 +546,6 @@ struct LiquidTypeEntry //uint32 Int[4]; // 47-50 }; -#define MAX_LOCK_CASE 8 - -struct LockEntry -{ - uint32 ID; // 0 - uint32 Type[MAX_LOCK_CASE]; // 1-8 - uint32 Index[MAX_LOCK_CASE]; // 9-16 - uint32 Skill[MAX_LOCK_CASE]; // 17-24 - //uint32 Action[MAX_LOCK_CASE]; // 25-32 -}; - struct PhaseEntry { uint32 ID; // 0 @@ -711,18 +629,6 @@ struct MinorTalentEntry uint32 OrderIndex; // 3 }; -struct PvPDifficultyEntry -{ - //uint32 ID; // 0 - uint32 MapID; // 1 - uint32 BracketID; // 2 m_rangeIndex - uint32 MinLevel; // 3 - uint32 MaxLevel; // 4 - - // helpers - BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(BracketID); } -}; - #define MAX_ITEM_ENCHANTMENT_EFFECTS 3 struct SpellItemEnchantmentEntry @@ -755,16 +661,6 @@ struct StableSlotPricesEntry uint32 Price; }; -struct SummonPropertiesEntry -{ - uint32 ID; // 0 - uint32 Category; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount? - uint32 Faction; // 2, 14 rows > 0 - uint32 Type; // 3, see enum - int32 Slot; // 4, 0-6 - uint32 Flags; // 5 -}; - #define MAX_TALENT_TIERS 7 #define MAX_TALENT_COLUMNS 3 @@ -818,84 +714,6 @@ struct VehicleEntry uint32 PowerDisplayID[3]; // 38-40 }; -struct VehicleSeatEntry -{ - uint32 ID; // 0 - uint32 Flags; // 1 - int32 AttachmentID; // 2 - DBCPosition3D AttachmentOffset; // 3-5 - float EnterPreDelay; // 6 - float EnterSpeed; // 7 - float EnterGravity; // 8 - float EnterMinDuration; // 9 - float EnterMaxDuration; // 10 - float EnterMinArcHeight; // 11 - float EnterMaxArcHeight; // 12 - int32 EnterAnimStart; // 13 - int32 EnterAnimLoop; // 14 - int32 RideAnimStart; // 15 - int32 RideAnimLoop; // 16 - int32 RideUpperAnimStart; // 17 - int32 RideUpperAnimLoop; // 18 - float ExitPreDelay; // 19 - float ExitSpeed; // 20 - float ExitGravity; // 21 - float ExitMinDuration; // 22 - float ExitMaxDuration; // 23 - float ExitMinArcHeight; // 24 - float ExitMaxArcHeight; // 25 - int32 ExitAnimStart; // 26 - int32 ExitAnimLoop; // 27 - int32 ExitAnimEnd; // 28 - float PassengerYaw; // 29 - float PassengerPitch; // 30 - float PassengerRoll; // 31 - int32 PassengerAttachmentID; // 32 - int32 VehicleEnterAnim; // 33 - int32 VehicleExitAnim; // 34 - int32 VehicleRideAnimLoop; // 35 - int32 VehicleEnterAnimBone; // 36 - int32 VehicleExitAnimBone; // 37 - int32 VehicleRideAnimLoopBone; // 38 - float VehicleEnterAnimDelay; // 39 - float VehicleExitAnimDelay; // 40 - uint32 VehicleAbilityDisplay; // 41 - uint32 EnterUISoundID; // 42 - uint32 ExitUISoundID; // 43 - uint32 FlagsB; // 44 - float CameraEnteringDelay; // 45 - float CameraEnteringDuration; // 46 - float CameraExitingDelay; // 47 - float CameraExitingDuration; // 48 - DBCPosition3D CameraOffset; // 49-51 - float CameraPosChaseRate; // 52 - float CameraFacingChaseRate; // 53 - float CameraEnteringZoom; // 54 - float CameraSeatZoomMin; // 55 - float CameraSeatZoomMax; // 56 - uint32 EnterAnimKitID; // 57 - uint32 RideAnimKitID; // 58 - uint32 ExitAnimKitID; // 59 - uint32 VehicleEnterAnimKitID; // 60 - uint32 VehicleRideAnimKitID; // 61 - uint32 VehicleExitAnimKitID; // 62 - uint32 CameraModeID; // 63 - uint32 FlagsC; // 64 - uint32 UISkinFileDataID; // 65 - - bool CanEnterOrExit() const - { - return ((Flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT) != 0 || - //If it has anmation for enter/ride, means it can be entered/exited by logic - (Flags & (VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER | VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE)) != 0); - } - bool CanSwitchFromSeat() const { return (Flags & VEHICLE_SEAT_FLAG_CAN_SWITCH) != 0; } - bool IsUsableByOverride() const { return (Flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18) - || (FlagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 | - VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4))); } - bool IsEjectable() const { return (FlagsB & VEHICLE_SEAT_FLAG_B_EJECTABLE) != 0; } -}; - struct WMOAreaTableEntry { uint32 ID; // 0 index diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index b85710acae6..b20b55d709f 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -28,35 +28,25 @@ char const BannedAddOnsfmt[] = "nxxxxxxxxxx"; char const BattlemasterListfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx"; char const CharSectionsfmt[] = "diiixxxiii"; char const CharTitlesfmt[] = "nxssix"; -char const ChatChannelsfmt[] = "nixsx"; char const ChrClassesfmt[] = "nixsxxxixiiiiixxxxx"; -char const ChrSpecializationfmt[] = "nxiiiiiiiixxxxx"; char const CreatureFamilyfmt[] = "nfifiiiiixsx"; char const CreatureModelDatafmt[] = "niixxxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx"; char const DifficultyFmt[] = "niiiixiixxxxix"; char const DungeonEncounterfmt[] = "niiixsxxx"; -char const Emotesfmt[] = "nxxiiixx"; char const EmotesTextfmt[] = "nxixxxxxxxxxxxxxxxx"; char const EmotesTextSoundEntryfmt[] = "niiii"; char const Factionfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx"; char const FactionTemplatefmt[] = "niiiiiiiiiiiii"; -char const GemPropertiesfmt[] = "nixxii"; -char const GlyphPropertiesfmt[] = "niiix"; -char const ItemSetfmt[] = "nsiiiiiiiiiiiiiiiiiii"; char const LFGDungeonfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx"; char const Lightfmt[] = "nifffxxxxxxxxxx"; char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const Lockfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; char const Mapfmt[] = "nxiixxsixxixiffxiiiiix"; char const MapDifficultyfmt[] = "diisiiii"; char const MinorTalentfmt[] = "niii"; char const Phasefmt[] = "ni"; -char const PvpDifficultyfmt[] = "diiii"; char const SpellItemEnchantmentfmt[] = "niiiiiiiiiixiiiiiiiiiifffxxx"; -char const SummonPropertiesfmt[] = "niiiii"; char const Talentfmt[] = "niiiiiiiiix"; char const Vehiclefmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii"; -char const VehicleSeatfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiffffffffffffiiiiiiiii"; char const WMOAreaTablefmt[] = "niiixxxxxiixxxx"; char const WorldMapAreafmt[] = "xinxffffixxxxx"; char const WorldSafeLocsfmt[] = "niffffx"; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 38a47d999a9..04d7c07aa3d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3231,7 +3231,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const bool Player::IsCurrentSpecMasterySpell(SpellInfo const* spellInfo) const { if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) - return spellInfo->Id == chrSpec->MasterySpellID; + return spellInfo->Id == chrSpec->MasterySpellID[0] || spellInfo->Id == chrSpec->MasterySpellID[1]; return false; } @@ -4729,9 +4729,9 @@ void Player::UpdateLocalChannels(uint32 newZone) else currentNameExt = current_zone->AreaName_lang; - snprintf(new_channel_name_buf, 100, channel->Name_lang, currentNameExt); + snprintf(new_channel_name_buf, 100, channel->Name->Str[m_session->GetSessionDbcLocale()], currentNameExt); - joinChannel = cMgr->GetJoinChannel(new_channel_name_buf, channel->ID); + joinChannel = cMgr->GetJoinChannel(new_channel_name_buf, i); if (usedChannel) { if (joinChannel != usedChannel) @@ -4744,7 +4744,7 @@ void Player::UpdateLocalChannels(uint32 newZone) } } else - joinChannel = cMgr->GetJoinChannel(channel->Name_lang, channel->ID); + joinChannel = cMgr->GetJoinChannel(channel->Name->Str[m_session->GetSessionDbcLocale()], i); } else removeChannel = usedChannel; @@ -25235,8 +25235,9 @@ void Player::ActivateTalentGroup(uint8 spec) if (CanUseMastery()) if (ChrSpecializationEntry const* specialization = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) - if (uint32 mastery = specialization->MasterySpellID) - LearnSpell(mastery, false); + for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) + if (uint32 mastery = specialization->MasterySpellID[i]) + LearnSpell(mastery, false); // set glyphs for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot) @@ -26146,7 +26147,7 @@ void Player::RemoveSpecializationSpells() { for (uint32 i = 0; i < MAX_SPECIALIZATIONS; ++i) { - if (ChrSpecializationEntry const* specialization = sChrSpecializationByIndexStore[getClass()][i]) + if (ChrSpecializationEntry const* specialization = sDB2Manager.GetChrSpecializationByIndex(getClass(), i)) { if (std::vector const* specSpells = sDB2Manager.GetSpecializationSpells(specialization->ID)) { @@ -26159,8 +26160,9 @@ void Player::RemoveSpecializationSpells() } } - if (uint32 mastery = specialization->MasterySpellID) - RemoveAurasDueToSpell(mastery); + for (uint32 j = 0; j < MAX_MASTERY_SPELLS; ++j) + if (uint32 mastery = specialization->MasterySpellID[j]) + RemoveAurasDueToSpell(mastery); } } } diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index e3a5f9065e0..878475cd386 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -67,7 +67,17 @@ void Totem::InitStats(uint32 duration) } // set display id depending on caster's race - SetDisplayId(owner->GetModelForTotem(PlayerTotemType(m_Properties->ID))); + if (SpellInfo const* createdBySpell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) + { + SpellEffectInfoVector effects = createdBySpell->GetEffectsForDifficulty(DIFFICULTY_NONE); + auto summonEffect = std::find_if(effects.begin(), effects.end(), [](SpellEffectInfo const* effect) + { + return effect && effect->IsEffect(SPELL_EFFECT_SUMMON); + }); + + if (summonEffect != effects.end()) + SetDisplayId(owner->GetModelForTotem(PlayerTotemType((*summonEffect)->MiscValueB))); + } } Minion::InitStats(duration); diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index 14bb60f916f..d2b91bb8684 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -27,13 +27,6 @@ enum TotemType TOTEM_ACTIVE = 1, TOTEM_STATUE = 2 // copied straight from MaNGOS, may need more implementation to work }; -// Some Totems cast spells that are not in creature DB -enum TotemSpells -{ - // Totemic Wrath - SPELL_TOTEMIC_WRATH_TALENT = 77746, - SPELL_TOTEMIC_WRATH = 77747 -}; class TC_GAME_API Totem : public Minion { diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index f9ba83c19ca..da04c39c289 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -539,21 +539,21 @@ void Player::UpdateMastery() if (!chrSpec) return; - if (!chrSpec->MasterySpellID) - return; - - if (Aura* aura = GetAura(chrSpec->MasterySpellID)) + for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) { - for (SpellEffectInfo const* effect : aura->GetSpellEffectInfos()) + if (Aura* aura = GetAura(chrSpec->MasterySpellID[i])) { - if (!effect) - continue; + for (SpellEffectInfo const* effect : aura->GetSpellEffectInfos()) + { + if (!effect) + continue; - float mult = effect->BonusCoefficient; - if (G3D::fuzzyEq(mult, 0.0f)) - continue; + float mult = effect->BonusCoefficient; + if (G3D::fuzzyEq(mult, 0.0f)) + continue; - aura->GetEffect(effect->EffectIndex)->ChangeAmount(int32(value * effect->BonusCoefficient)); + aura->GetEffect(effect->EffectIndex)->ChangeAmount(int32(value * effect->BonusCoefficient)); + } } } } diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index cd7e038508c..a1523db5d62 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -478,12 +478,12 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit) _me->SetFlag64(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK)); // Remove UNIT_FLAG_NOT_SELECTABLE if passenger did not have it before entering vehicle - if (seat->second.SeatInfo->Flags & VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE && !seat->second.Passenger.IsUnselectable) + if (seat->second.SeatInfo->Flags[0] & VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE && !seat->second.Passenger.IsUnselectable) unit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); seat->second.Passenger.Reset(); - if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->second.SeatInfo->Flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) + if (_me->GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && seat->second.SeatInfo->Flags[0] & VEHICLE_SEAT_FLAG_CAN_CONTROL) _me->RemoveCharmedBy(unit); if (_me->IsInWorld()) @@ -785,11 +785,11 @@ bool VehicleJoinEvent::Execute(uint64, uint32) player->StopCastingCharm(); player->StopCastingBindSight(); player->SendOnCancelExpectedVehicleRideAura(); - if (!(veSeat->FlagsB & VEHICLE_SEAT_FLAG_B_KEEP_PET)) + if (!(veSeat->Flags[1] & VEHICLE_SEAT_FLAG_B_KEEP_PET)) player->UnsummonPetTemporaryIfAny(); } - if (Seat->second.SeatInfo->Flags & VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE) + if (Seat->second.SeatInfo->Flags[0] & VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE) Passenger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Passenger->m_movementInfo.transport.pos.Relocate(veSeat->AttachmentOffset.X, veSeat->AttachmentOffset.Y, veSeat->AttachmentOffset.Z); @@ -799,7 +799,7 @@ bool VehicleJoinEvent::Execute(uint64, uint32) Passenger->m_movementInfo.transport.vehicleId = Target->GetVehicleInfo()->ID; if (Target->GetBase()->GetTypeId() == TYPEID_UNIT && Passenger->GetTypeId() == TYPEID_PLAYER && - Seat->second.SeatInfo->Flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) + Seat->second.SeatInfo->Flags[0] & VEHICLE_SEAT_FLAG_CAN_CONTROL) ASSERT(Target->GetBase()->SetCharmedBy(Passenger, CHARM_TYPE_VEHICLE)); // SMSG_CLIENT_CONTROL Passenger->SendClearTarget(); // SMSG_BREAK_TARGET diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index dbaaa3b7b9f..6433004c744 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -65,6 +65,7 @@ class TC_GAME_API Vehicle : public TransportBase void SetLastShootPos(Position const& pos) { _lastShootPos.Relocate(pos); } Position const& GetLastShootPos() const { return _lastShootPos; } + SeatMap::iterator GetSeatIteratorForPassenger(Unit* passenger); SeatMap Seats; ///< The collection of all seats on the vehicle. Including vacant ones. VehicleSeatEntry const* GetSeatForPassenger(Unit const* passenger) const; @@ -83,7 +84,6 @@ class TC_GAME_API Vehicle : public TransportBase STATUS_UNINSTALLING, }; - SeatMap::iterator GetSeatIteratorForPassenger(Unit* passenger); void InitMovementInfoForBase(); /// This method transforms supplied transport offsets into global coordinates diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 43763631b0b..93e301bf548 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1935,7 +1935,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* if (!reference) return ERR_BATTLEGROUND_JOIN_FAILED; - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgOrTemplate->GetMapId(), reference->getLevel()); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bgOrTemplate->GetMapId(), reference->getLevel()); if (!bracketEntry) return ERR_BATTLEGROUND_JOIN_FAILED; @@ -1959,7 +1959,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* return ERR_BATTLEGROUND_JOIN_TIMED_OUT; } // not in the same battleground level braket, don't let join - PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel()); + PvPDifficultyEntry const* memberBracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel()); if (memberBracketEntry != bracketEntry) return ERR_BATTLEGROUND_JOIN_RANGE_INDEX; // don't let join rated matches if the arena team id doesn't match diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index e8fdb384d89..84a6c77bbe2 100644 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -95,7 +95,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt return; // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); if (!bracketEntry) return; @@ -314,7 +314,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl bgTypeId = bg->GetTypeID(); // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); if (!bracketEntry) return; @@ -475,7 +475,7 @@ void WorldSession::HandleRequestBattlefieldStatusOpcode(WorldPackets::Battlegrou continue; // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); if (!bracketEntry) continue; @@ -511,7 +511,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPackets::Battleground::Battl BattlegroundTypeId bgTypeId = bg->GetTypeID(); BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, arenatype); - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); if (!bracketEntry) return; diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index 4796ddf92fe..e067e4433d8 100644 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -51,7 +51,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPackets::Combat::AttackSwing& pa { VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(_player); ASSERT(seat); - if (!(seat->Flags & VEHICLE_SEAT_FLAG_CAN_ATTACK)) + if (!(seat->Flags[0] & VEHICLE_SEAT_FLAG_CAN_ATTACK)) { SendAttackStop(enemy); return; diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index cace773b65e..ae0dcc586ef 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -362,7 +362,7 @@ void WorldSession::HandleMovementOpcodes(WorldPackets::Movement::ClientPlayerMov { if (VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(mover)) { - if (seat->Flags & VEHICLE_SEAT_FLAG_ALLOW_TURNING) + if (seat->Flags[0] & VEHICLE_SEAT_FLAG_ALLOW_TURNING) { if (movementInfo.pos.GetOrientation() != mover->GetOrientation()) { diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index d6e1b35de6e..3596eee68f6 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -88,8 +88,7 @@ void WorldSession::HandleSetSpecializationOpcode(WorldPackets::Talent::SetSpecia return; } - ChrSpecializationEntry const* chrSpec = sChrSpecializationByIndexStore[player->getClass()][packet.SpecGroupIndex]; - + ChrSpecializationEntry const* chrSpec = sDB2Manager.GetChrSpecializationByIndex(player->getClass(), packet.SpecGroupIndex); if (!chrSpec) { TC_LOG_DEBUG("network", "WORLD: HandleSetSpecializationOpcode - specialization index %u not found", packet.SpecGroupIndex); diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp index 57e941d1338..0ebc2957383 100644 --- a/src/server/game/Handlers/VehicleHandler.cpp +++ b/src/server/game/Handlers/VehicleHandler.cpp @@ -45,7 +45,7 @@ void WorldSession::HandleRequestVehiclePrevSeat(WorldPackets::Vehicle::RequestVe if (!seat->CanSwitchFromSeat()) { TC_LOG_ERROR("network", "HandleRequestVehiclePrevSeat: %s tried to switch seats but current seatflags %u don't permit that.", - GetPlayer()->GetGUID().ToString().c_str(), seat->Flags); + GetPlayer()->GetGUID().ToString().c_str(), seat->Flags[0]); return; } @@ -62,7 +62,7 @@ void WorldSession::HandleRequestVehicleNextSeat(WorldPackets::Vehicle::RequestVe if (!seat->CanSwitchFromSeat()) { TC_LOG_ERROR("network", "HandleRequestVehicleNextSeat: %s tried to switch seats but current seatflags %u don't permit that.", - GetPlayer()->GetGUID().ToString().c_str(), seat->Flags); + GetPlayer()->GetGUID().ToString().c_str(), seat->Flags[0]); return; } @@ -79,7 +79,7 @@ void WorldSession::HandleMoveChangeVehicleSeats(WorldPackets::Vehicle::MoveChang if (!seat->CanSwitchFromSeat()) { TC_LOG_ERROR("network", "HandleMoveChangeVehicleSeats: %s tried to switch seats but current seatflags %u don't permit that.", - GetPlayer()->GetGUID().ToString().c_str(), seat->Flags); + GetPlayer()->GetGUID().ToString().c_str(), seat->Flags[0]); return; } @@ -108,7 +108,7 @@ void WorldSession::HandleRequestVehicleSwitchSeat(WorldPackets::Vehicle::Request if (!seat->CanSwitchFromSeat()) { TC_LOG_ERROR("network", "HandleRequestVehicleSwitchSeat: %s tried to switch seats but current seatflags %u don't permit that.", - GetPlayer()->GetGUID().ToString().c_str(), seat->Flags); + GetPlayer()->GetGUID().ToString().c_str(), seat->Flags[0]); return; } @@ -174,13 +174,14 @@ void WorldSession::HandleRequestVehicleExit(WorldPackets::Vehicle::RequestVehicl { if (Vehicle* vehicle = GetPlayer()->GetVehicle()) { - if (VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(GetPlayer())) + auto itr = vehicle->GetSeatIteratorForPassenger(GetPlayer()); + if (itr != vehicle->Seats.end()) { - if (seat->CanEnterOrExit()) + if (itr->second.SeatInfo->CanEnterOrExit()) GetPlayer()->ExitVehicle(); else TC_LOG_ERROR("network", "%s tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.", - GetPlayer()->GetGUID().ToString().c_str(), seat->ID, seat->Flags); + GetPlayer()->GetGUID().ToString().c_str(), vehicle->GetVehicleInfo()->SeatID[itr->first], itr->second.SeatInfo->Flags[0]); } } } diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 6a87a1e3246..7d73d9b6625 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -22,6 +22,7 @@ #include "Define.h" #include "DBCStructure.h" +#include "DB2Structure.h" #include "GridDefines.h" #include "Cell.h" #include "Timer.h" diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index cf35e643a02..a6734f6c205 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4556,7 +4556,7 @@ SpellCastResult Spell::CheckRuneCost() return SPELL_CAST_OK; int32 readyRunes = 0; - for (uint32 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i) + for (int32 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i) if (player->GetRuneCooldown(i) == 0) ++readyRunes; @@ -4579,7 +4579,7 @@ void Spell::TakeRunePower(bool didHit) return cost.Power == POWER_RUNES; })->Amount; - for (uint32 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i) + for (int32 i = 0; i < player->GetMaxPower(POWER_RUNES); ++i) { if (!player->GetRuneCooldown(i) && runeCost > 0) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index b174454225d..31e0b126be6 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2034,7 +2034,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) // however so far noone found a generic check to find all of those (there's no related data in summonproperties.dbc // and in spell attributes, possibly we need to add a table for those) // so here's a list of MiscValueB values, which is currently most generic check - switch (properties->ID) + switch (effectInfo->MiscValueB) { case 64: case 61: @@ -5175,7 +5175,7 @@ void Spell::EffectQuestStart(SpellEffIndex /*effIndex*/) } } -void Spell::EffectActivateRune(SpellEffIndex effIndex) +void Spell::EffectActivateRune(SpellEffIndex /*effIndex*/) { if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH) return; @@ -5196,7 +5196,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) count = 1; // first restore fully depleted runes - for (uint32 j = 0; j < player->GetMaxPower(POWER_RUNES) && count > 0; ++j) + for (int32 j = 0; j < player->GetMaxPower(POWER_RUNES) && count > 0; ++j) { if (player->GetRuneCooldown(j) == player->GetRuneBaseCooldown()) { @@ -5206,7 +5206,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) } // then the rest if we still got something left - for (uint32 j = 0; j < player->GetMaxPower(POWER_RUNES) && count > 0; ++j) + for (int32 j = 0; j < player->GetMaxPower(POWER_RUNES) && count > 0; ++j) { player->SetRuneCooldown(j, 0); --count; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 5b820f02c02..031ab5bdbdf 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2079,11 +2079,11 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const VehicleSeatEntry const* vehicleSeat = vehicle->GetSeatForPassenger(caster); if (!(AttributesEx6 & SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE) && !(Attributes & SPELL_ATTR0_CASTABLE_WHILE_MOUNTED) - && (vehicleSeat->Flags & checkMask) != checkMask) + && (vehicleSeat->Flags[0] & checkMask) != checkMask) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; // Can only summon uncontrolled minions/guardians when on controlled vehicle - if (vehicleSeat->Flags & (VEHICLE_SEAT_FLAG_CAN_CONTROL | VEHICLE_SEAT_FLAG_UNK2)) + if (vehicleSeat->Flags[0] & (VEHICLE_SEAT_FLAG_CAN_CONTROL | VEHICLE_SEAT_FLAG_UNK2)) { for (SpellEffectInfo const* effect : GetEffectsForDifficulty(caster->GetMap()->GetDifficultyID())) { diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index b032aa8ef2e..4ff0d1a70a9 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -425,27 +425,45 @@ public: ItemSetEntry const* set = sItemSetStore.LookupEntry(id); if (set) { - std::string name = set->Name_lang; + int32 locale = handler->GetSessionDbcLocale(); + std::string name = set->Name->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && count++ == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = set->Name->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } } - // send item set in "id - [namedlink locale]" format - if (handler->GetSession()) - handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), ""); - else - handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), ""); + if (locale < TOTAL_LOCALES) + { + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - if (!found) - found = true; + // send item set in "id - [namedlink locale]" format + if (handler->GetSession()) + handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), ""); + else + handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), ""); + + if (!found) + found = true; + } } } if (!found) diff --git a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp index 2e7e974cb5d..42914b4da17 100644 --- a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp +++ b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp @@ -390,7 +390,7 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl ++records; uint32 recordsize = GetFormatRecordSize(format); - std::size_t stringFields = GetFormatStringFieldCount(format); + std::size_t stringFields = GetFormatLocalizedStringFieldCount(format); char* stringTable = new char[offsetsPos - dataStart - records * (recordsize - stringFields * sizeof(char*))]; memset(stringTable, 0, offsetsPos - dataStart - records * (recordsize - stringFields * sizeof(char*))); char* stringPtr = stringTable; @@ -402,7 +402,7 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl if (!offsets[y].FileOffset || !offsets[y].RecordSize) continue; - uint32 fieldOffset; + uint32 fieldOffset = 0; for (uint32 x = 0; x < fieldCount; x++) { switch (format[x]) @@ -427,7 +427,6 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl break; case FT_STRING: { - // fill only not filled entries LocalizedString* db2str = *(LocalizedString**)(&dataTable[offset]); db2str->Str[locale] = stringPtr; strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); @@ -438,11 +437,7 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl } case FT_STRING_NOT_LOCALIZED: { - char** db2str = (char**)(&dataTable[offset]); - *db2str = stringPtr; - strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); - fieldOffset += strlen(stringPtr) + 1; - stringPtr += strlen(stringPtr) + 1; + fieldOffset += strlen((char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]) + 1; offset += sizeof(char*); break; } -- cgit v1.2.3 From 885d9b53c38662e00e3b4977b82e9cf36d197f94 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 6 Feb 2016 17:53:37 +0100 Subject: Core/DataStores: Updated dbc/db2 to 7.0.1.20994 --- .../hotfixes/2016_xx_xx_xx_hotfixes_legion_03.sql | 280 +++++++++++++++++++++ .../Database/Implementation/HotfixDatabase.cpp | 44 ++++ .../Database/Implementation/HotfixDatabase.h | 25 ++ src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 3 +- src/server/game/Chat/Chat.cpp | 5 +- src/server/game/DataStores/DB2Stores.cpp | 51 +++- src/server/game/DataStores/DB2Stores.h | 10 + src/server/game/DataStores/DB2Structure.h | 174 +++++++++++++ src/server/game/DataStores/DB2fmt.h | 9 + src/server/game/DataStores/DBCEnums.h | 46 ++-- src/server/game/DataStores/DBCStores.cpp | 62 +---- src/server/game/DataStores/DBCStores.h | 12 - src/server/game/DataStores/DBCStructure.h | 188 -------------- src/server/game/DataStores/DBCfmt.h | 10 - src/server/game/Entities/Creature/Creature.h | 4 +- src/server/game/Entities/Pet/Pet.cpp | 6 +- src/server/game/Entities/Player/Player.cpp | 12 +- src/server/game/Garrison/Garrison.cpp | 4 +- src/server/game/Garrison/GarrisonMgr.cpp | 4 +- src/server/game/Globals/ObjectMgr.cpp | 40 +-- src/server/game/Handlers/MiscHandler.cpp | 2 +- src/server/game/Instances/InstanceScript.cpp | 5 +- src/server/game/Loot/LootMgr.cpp | 7 +- src/server/game/Maps/Map.cpp | 12 +- src/server/game/Maps/MapManager.cpp | 2 +- src/server/game/Spells/SpellMgr.cpp | 2 +- src/server/scripts/Commands/cs_character.cpp | 2 +- src/server/scripts/Commands/cs_go.cpp | 4 +- src/server/scripts/Commands/cs_group.cpp | 2 +- src/server/scripts/Commands/cs_lookup.cpp | 125 ++++++--- src/server/scripts/Commands/cs_misc.cpp | 12 +- src/server/scripts/Commands/cs_titles.cpp | 12 +- .../shared/DataStores/DB2SparseStorageLoader.h | 1 + src/server/shared/DataStores/DB2StorageLoader.h | 1 + src/server/shared/DataStores/DB2Store.h | 23 +- src/server/shared/DataStores/DBCFileLoader.cpp | 9 +- src/server/shared/DataStores/DBStorageIterator.h | 4 +- 37 files changed, 804 insertions(+), 410 deletions(-) create mode 100644 sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_03.sql (limited to 'src/server/scripts') diff --git a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_03.sql b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_03.sql new file mode 100644 index 00000000000..959b3275e9d --- /dev/null +++ b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_03.sql @@ -0,0 +1,280 @@ +-- +-- Table structure for table `area_table` +-- +DROP TABLE IF EXISTS `area_table`; +CREATE TABLE `area_table` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags1` int(10) unsigned NOT NULL DEFAULT '0', + `Flags2` int(10) unsigned NOT NULL DEFAULT '0', + `ZoneName` text, + `AmbientMultiplier` float NOT NULL DEFAULT '0', + `AreaName` text, + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ParentAreaID` smallint(5) unsigned NOT NULL DEFAULT '0', + `AreaBit` smallint(6) NOT NULL DEFAULT '0', + `AmbienceID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ZoneMusic` smallint(5) unsigned NOT NULL DEFAULT '0', + `IntroSound` smallint(5) unsigned NOT NULL DEFAULT '0', + `LiquidTypeID1` smallint(5) unsigned NOT NULL DEFAULT '0', + `LiquidTypeID2` smallint(5) unsigned NOT NULL DEFAULT '0', + `LiquidTypeID3` smallint(5) unsigned NOT NULL DEFAULT '0', + `LiquidTypeID4` smallint(5) unsigned NOT NULL DEFAULT '0', + `UWZoneMusic` smallint(5) unsigned NOT NULL DEFAULT '0', + `UWAmbience` smallint(5) unsigned NOT NULL DEFAULT '0', + `PvPCombastWorldStateID` smallint(5) unsigned NOT NULL DEFAULT '0', + `SoundProviderPref` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SoundProviderPrefUnderwater` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ExplorationLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FactionGroupMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MountFlags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `UWIntroMusic` tinyint(3) unsigned NOT NULL DEFAULT '0', + `WildBattlePetLevelMin` tinyint(3) unsigned NOT NULL DEFAULT '0', + `WildBattlePetLevelMax` tinyint(3) unsigned NOT NULL DEFAULT '0', + `WindSettingsID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `area_table_locale` +-- +DROP TABLE IF EXISTS `area_table_locale`; +CREATE TABLE `area_table_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `AreaName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `area_trigger` +-- +DROP TABLE IF EXISTS `area_trigger`; +CREATE TABLE `area_trigger` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `PosX` float NOT NULL DEFAULT '0', + `PosY` float NOT NULL DEFAULT '0', + `PosZ` float NOT NULL DEFAULT '0', + `Radius` float NOT NULL DEFAULT '0', + `BoxLength` float NOT NULL DEFAULT '0', + `BoxWidth` float NOT NULL DEFAULT '0', + `BoxHeight` float NOT NULL DEFAULT '0', + `BoxYaw` float NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `PhaseID` smallint(5) unsigned NOT NULL DEFAULT '0', + `PhaseGroupID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ShapeID` smallint(5) unsigned NOT NULL DEFAULT '0', + `AreaTriggerActionSetID` smallint(5) unsigned NOT NULL DEFAULT '0', + `PhaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ShapeType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flag` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `char_titles` +-- +DROP TABLE IF EXISTS `char_titles`; +CREATE TABLE `char_titles` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `NameMale` text, + `NameFemale` text, + `ConditionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaskID` smallint(5) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `char_titles_locale` +-- +DROP TABLE IF EXISTS `char_titles_locale`; +CREATE TABLE `char_titles_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `NameMale_lang` text, + `NameFemale_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_family` +-- +DROP TABLE IF EXISTS `creature_family`; +CREATE TABLE `creature_family` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinScale` float NOT NULL DEFAULT '0', + `MaxScale` float NOT NULL DEFAULT '0', + `Name` text, + `IconFile` text, + `SkillLine1` smallint(5) unsigned NOT NULL DEFAULT '0', + `SkillLine2` smallint(5) unsigned NOT NULL DEFAULT '0', + `PetFoodMask` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinScaleLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxScaleLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PetTalentType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CategoryEnumID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_family_locale` +-- +DROP TABLE IF EXISTS `creature_family_locale`; +CREATE TABLE `creature_family_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `difficulty` +-- +DROP TABLE IF EXISTS `difficulty`; +CREATE TABLE `difficulty` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `FallbackDifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `InstanceType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `OldEnumValue` tinyint(4) NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ToggleDifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GroupSizeHealthCurveID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GroupSizeDmgCurveID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GroupSizeSpellPointsCurveID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ItemBonusTreeModID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `difficulty_locale` +-- +DROP TABLE IF EXISTS `difficulty_locale`; +CREATE TABLE `difficulty_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `dungeon_encounter` +-- +DROP TABLE IF EXISTS `dungeon_encounter`; +CREATE TABLE `dungeon_encounter` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `CreatureDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `OrderIndex` smallint(5) unsigned NOT NULL DEFAULT '0', + `SpellIconID` smallint(5) unsigned NOT NULL DEFAULT '0', + `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Bit` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `dungeon_encounter_locale` +-- +DROP TABLE IF EXISTS `dungeon_encounter_locale`; +CREATE TABLE `dungeon_encounter_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `emotes_text` +-- +DROP TABLE IF EXISTS `emotes_text`; +CREATE TABLE `emotes_text` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `EmoteID` smallint(5) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `emotes_text_locale` +-- +DROP TABLE IF EXISTS `emotes_text_locale`; +CREATE TABLE `emotes_text_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `map` +-- +DROP TABLE IF EXISTS `map`; +CREATE TABLE `map` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Directory` text, + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `MapType` int(10) unsigned NOT NULL DEFAULT '0', + `MinimapIconScale` float NOT NULL DEFAULT '0', + `CorpsePosX` float NOT NULL DEFAULT '0', + `CorpsePosY` float NOT NULL DEFAULT '0', + `RaidOffset` int(10) unsigned NOT NULL DEFAULT '0', + `MapName` text, + `MapDescription0` text, + `MapDescription1` text, + `AreaTableID` smallint(5) unsigned NOT NULL DEFAULT '0', + `LoadingScreenID` smallint(5) unsigned NOT NULL DEFAULT '0', + `CorpseMapID` smallint(6) NOT NULL DEFAULT '0', + `TimeOfDayOverride` smallint(5) unsigned NOT NULL DEFAULT '0', + `ParentMapID` smallint(6) NOT NULL DEFAULT '0', + `CosmeticParentMapID` smallint(6) NOT NULL DEFAULT '0', + `InstanceType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `unk5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ExpansionID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `TimeOffset` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `map_locale` +-- +DROP TABLE IF EXISTS `map_locale`; +CREATE TABLE `map_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `MapName_lang` text, + `MapDescription0_lang` text, + `MapDescription1_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `phase` +-- +DROP TABLE IF EXISTS `phase`; +CREATE TABLE `phase` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index d2a62e1f9ce..9b9363f6724 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -41,6 +41,17 @@ void HotfixDatabaseConnection::DoPrepareStatements() // AreaGroupMember.db2 PrepareStatement(HOTFIX_SEL_AREA_GROUP_MEMBER, "SELECT ID, AreaGroupID, AreaID FROM area_group_member ORDER BY ID DESC", CONNECTION_SYNCH); + // AreaTable.db2 + PrepareStatement(HOTFIX_SEL_AREA_TABLE, "SELECT ID, Flags1, Flags2, ZoneName, AmbientMultiplier, AreaName, MapID, ParentAreaID, AreaBit, " + "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWZoneMusic, UWAmbience, " + "PvPCombastWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, UWIntroMusic, " + "WildBattlePetLevelMin, WildBattlePetLevelMax, WindSettingsID FROM area_table ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_AREA_TABLE, "SELECT ID, AreaName_lang FROM area_table_locale WHERE locale = ?", CONNECTION_SYNCH); + + // AreaTrigger.db2 + PrepareStatement(HOTFIX_SEL_AREA_TRIGGER, "SELECT ID, PosX, PosY, PosZ, Radius, BoxLength, BoxWidth, BoxHeight, BoxYaw, MapID, PhaseID, " + "PhaseGroupID, ShapeID, AreaTriggerActionSetID, PhaseUseFlags, ShapeType, Flag FROM area_trigger ORDER BY ID DESC", CONNECTION_SYNCH); + // ArmorLocation.db2 PrepareStatement(HOTFIX_SEL_ARMOR_LOCATION, "SELECT ID, Modifier1, Modifier2, Modifier3, Modifier4, Modifier5 FROM armor_location ORDER BY ID DESC", CONNECTION_SYNCH); @@ -80,6 +91,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, ItemID18, ItemID19, ItemID20, ItemID21, ItemID22, ItemID23, " "ItemID24, PetDisplayID, RaceID, ClassID, GenderID, OutfitID, PetFamilyID FROM char_start_outfit ORDER BY ID DESC", CONNECTION_SYNCH); + // CharTitles.db2 + PrepareStatement(HOTFIX_SEL_CHAR_TITLES, "SELECT ID, NameMale, NameFemale, ConditionID, MaskID, Flags FROM char_titles ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CHAR_TITLES, "SELECT ID, NameMale_lang, NameFemale_lang FROM char_titles_locale WHERE locale = ?", CONNECTION_SYNCH); + // ChatChannels.db2 PrepareStatement(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Flags, Name, Shortcut, FactionGroup FROM chat_channels ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Name_lang, Shortcut_lang FROM chat_channels_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -118,6 +133,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() "SkinID, FaceID, HairStyleID, HairColorID, FacialHairID, CustomDisplayOption1, CustomDisplayOption2, CustomDisplayOption3, Flags" " FROM creature_display_info_extra ORDER BY ID DESC", CONNECTION_SYNCH); + // CreatureFamily.db2 + PrepareStatement(HOTFIX_SEL_CREATURE_FAMILY, "SELECT ID, MinScale, MaxScale, Name, IconFile, SkillLine1, SkillLine2, PetFoodMask, MinScaleLevel, " + "MaxScaleLevel, PetTalentType, CategoryEnumID FROM creature_family ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_FAMILY, "SELECT ID, Name_lang FROM creature_family_locale WHERE locale = ?", CONNECTION_SYNCH); + // CreatureType.db2 PrepareStatement(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -147,6 +167,17 @@ void HotfixDatabaseConnection::DoPrepareStatements() "StateSmokeInitDoodadSet, StateSmokeAmbientDoodadSet, StateSmokeNameSet, EjectDirection, DoNotHighlight, HealEffect" " FROM destructible_model_data ORDER BY ID DESC", CONNECTION_SYNCH); + // Difficulty.db2 + PrepareStatement(HOTFIX_SEL_DIFFICULTY, "SELECT ID, Name, FallbackDifficultyID, InstanceType, MinPlayers, MaxPlayers, OldEnumValue, Flags, " + "ToggleDifficultyID, GroupSizeHealthCurveID, GroupSizeDmgCurveID, GroupSizeSpellPointsCurveID, ItemBonusTreeModID, OrderIndex FROM difficulty" + " ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_DIFFICULTY, "SELECT ID, Name_lang FROM difficulty_locale WHERE locale = ?", CONNECTION_SYNCH); + + // DungeonEncounter.db2 + PrepareStatement(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name, CreatureDisplayID, MapID, OrderIndex, SpellIconID, DifficultyID, Bit, Flags" + " FROM dungeon_encounter ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name_lang FROM dungeon_encounter_locale WHERE locale = ?", CONNECTION_SYNCH); + // DurabilityCosts.db2 PrepareStatement(HOTFIX_SEL_DURABILITY_COSTS, "SELECT ID, WeaponSubClassCost1, WeaponSubClassCost2, WeaponSubClassCost3, WeaponSubClassCost4, " "WeaponSubClassCost5, WeaponSubClassCost6, WeaponSubClassCost7, WeaponSubClassCost8, WeaponSubClassCost9, WeaponSubClassCost10, " @@ -162,6 +193,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, AnimID, EmoteSoundID, EmoteSpecProc, " "EmoteSpecProcParam FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); + // EmotesText.db2 + PrepareStatement(HOTFIX_SEL_EMOTES_TEXT, "SELECT ID, Name, EmoteID FROM emotes_text ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_EMOTES_TEXT, "SELECT ID, Name_lang FROM emotes_text_locale WHERE locale = ?", CONNECTION_SYNCH); + // EmotesTextSound.db2 PrepareStatement(HOTFIX_SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, SoundId, RaceId, SexId, ClassId FROM emotes_text_sound ORDER BY ID DESC", CONNECTION_SYNCH); @@ -427,6 +462,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body FROM mail_template ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?", CONNECTION_SYNCH); + // Map.db2 + PrepareStatement(HOTFIX_SEL_MAP, "SELECT ID, Directory, Flags, MapType, MinimapIconScale, CorpsePosX, CorpsePosY, RaidOffset, MapName, " + "MapDescription0, MapDescription1, AreaTableID, LoadingScreenID, CorpseMapID, TimeOfDayOverride, ParentMapID, CosmeticParentMapID, " + "InstanceType, unk5, ExpansionID, MaxPlayers, TimeOffset FROM map ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang FROM map_locale WHERE locale = ?", CONNECTION_SYNCH); + // ModifierTree.db2 PrepareStatement(HOTFIX_SEL_MODIFIER_TREE, "SELECT ID, Asset1, Asset2, Parent, Type, Unk700, Operator, Amount FROM modifier_tree ORDER BY ID DESC", CONNECTION_SYNCH); @@ -463,6 +504,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_OVERRIDE_SPELL_DATA, "SELECT ID, SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, SpellID6, SpellID7, SpellID8, " "SpellID9, SpellID10, PlayerActionbarFileDataID, Flags FROM override_spell_data ORDER BY ID DESC", CONNECTION_SYNCH); + // Phase.db2 + PrepareStatement(HOTFIX_SEL_PHASE, "SELECT ID, Flags FROM phase ORDER BY ID DESC", CONNECTION_SYNCH); + // PhaseXPhaseGroup.db2 PrepareStatement(HOTFIX_SEL_PHASE_X_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_x_phase_group ORDER BY ID DESC", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index cedaccf6168..0c915c06b92 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -39,6 +39,11 @@ enum HotfixDatabaseStatements HOTFIX_SEL_AREA_GROUP_MEMBER, + HOTFIX_SEL_AREA_TABLE, + HOTFIX_SEL_AREA_TABLE_LOCALE, + + HOTFIX_SEL_AREA_TRIGGER, + HOTFIX_SEL_ARMOR_LOCATION, HOTFIX_SEL_AUCTION_HOUSE, @@ -63,6 +68,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_CHAR_START_OUTFIT, + HOTFIX_SEL_CHAR_TITLES, + HOTFIX_SEL_CHAR_TITLES_LOCALE, + HOTFIX_SEL_CHAT_CHANNELS, HOTFIX_SEL_CHAT_CHANNELS_LOCALE, @@ -80,6 +88,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA, + HOTFIX_SEL_CREATURE_FAMILY, + HOTFIX_SEL_CREATURE_FAMILY_LOCALE, + HOTFIX_SEL_CREATURE_TYPE, HOTFIX_SEL_CREATURE_TYPE_LOCALE, @@ -95,12 +106,21 @@ enum HotfixDatabaseStatements HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA, + HOTFIX_SEL_DIFFICULTY, + HOTFIX_SEL_DIFFICULTY_LOCALE, + + HOTFIX_SEL_DUNGEON_ENCOUNTER, + HOTFIX_SEL_DUNGEON_ENCOUNTER_LOCALE, + HOTFIX_SEL_DURABILITY_COSTS, HOTFIX_SEL_DURABILITY_QUALITY, HOTFIX_SEL_EMOTES, + HOTFIX_SEL_EMOTES_TEXT, + HOTFIX_SEL_EMOTES_TEXT_LOCALE, + HOTFIX_SEL_EMOTES_TEXT_SOUND, HOTFIX_SEL_GAMEOBJECTS, @@ -240,6 +260,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_MAIL_TEMPLATE, HOTFIX_SEL_MAIL_TEMPLATE_LOCALE, + HOTFIX_SEL_MAP, + HOTFIX_SEL_MAP_LOCALE, + HOTFIX_SEL_MODIFIER_TREE, HOTFIX_SEL_MOUNT, @@ -262,6 +285,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_OVERRIDE_SPELL_DATA, + HOTFIX_SEL_PHASE, + HOTFIX_SEL_PHASE_X_PHASE_GROUP, HOTFIX_SEL_PLAYER_CONDITION, diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 6a0ee3b11e2..a869699dbec 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1168,8 +1168,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } - PhaseEntry const* phase = sPhaseStore.LookupEntry(phaseId); - if (!phase) + if (!sPhaseStore.LookupEntry(phaseId)) { TC_LOG_ERROR("sql.sql", "SmartScript: SMART_ACTION_SET_INGAME_PHASE_ID uses invalid phaseid %u for creature " SI64FMTD ", skipped", phaseId, e.entryOrGuid); return false; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 15743a0e686..85d803a6948 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -305,9 +305,10 @@ bool ChatHandler::ExecuteCommandInTable(std::vector const& table, c std::string zoneName = "Unknown"; if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId)) { - areaName = area->AreaName_lang; + int32 locale = GetSessionDbcLocale(); + areaName = area->AreaName->Str[locale]; if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->ParentAreaID)) - zoneName = zone->AreaName_lang; + zoneName = zone->AreaName->Str[locale]; } sLog->outCommand(m_session->GetAccountId(), "Command: %s [Player: %s (%s) (Account: %u) X: %f Y: %f Z: %f Map: %u (%s) Area: %u (%s) Zone: %s Selected: %s (%s)]", diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 1778a0b97aa..f985a266e29 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -27,6 +27,8 @@ DB2Storage sAchievementStore("Achievement.db2", AchievementFormat, HOTFIX_SEL_ACHIEVEMENT); DB2Storage sAnimKitStore("AnimKit.db2", AnimKitFormat, HOTFIX_SEL_ANIM_KIT); DB2Storage sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER); +DB2Storage sAreaTableStore("AreaTable.db2", AreaTableFormat, HOTFIX_SEL_AREA_TABLE); +DB2Storage sAreaTriggerStore("AreaTrigger.db2", AreaTriggerFormat, HOTFIX_SEL_AREA_TRIGGER); DB2Storage sArmorLocationStore("ArmorLocation.db2", ArmorLocationFormat, HOTFIX_SEL_ARMOR_LOCATION); DB2Storage sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE); DB2Storage sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesFormat, HOTFIX_SEL_BANK_BAG_SLOT_PRICES); @@ -38,21 +40,26 @@ DB2Storage sBattlePetSpeciesStateStore("Bat DB2Storage sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsFormat, HOTFIX_SEL_CHAT_CHANNELS); DB2Storage sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT); +DB2Storage sCharTitlesStore("CharTitles.db2", CharTitlesFormat, HOTFIX_SEL_CHAR_TITLES); DB2Storage sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); DB2Storage sChrRacesStore("ChrRaces.db2", ChrRacesFormat, HOTFIX_SEL_CHR_RACES); DB2Storage sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationFormat, HOTFIX_SEL_CHR_SPECIALIZATION); DB2Storage sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES); DB2Storage sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO); DB2Storage sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA); +DB2Storage sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyFormat, HOTFIX_SEL_CREATURE_FAMILY); DB2Storage sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE); DB2Storage sCriteriaStore("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA); DB2Storage sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE); DB2Storage sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES); DB2Storage sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT); DB2Storage sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA); +DB2Storage sDifficultyStore("Difficulty.db2", DifficultyFormat, HOTFIX_SEL_DIFFICULTY); +DB2Storage sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterFormat, HOTFIX_SEL_DUNGEON_ENCOUNTER); DB2Storage sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsFormat, HOTFIX_SEL_DURABILITY_COSTS); DB2Storage sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY); DB2Storage sEmotesStore("Emotes.db2", EmotesFormat, HOTFIX_SEL_EMOTES); +DB2Storage sEmotesTextStore("EmotesText.db2", EmotesTextFormat, HOTFIX_SEL_EMOTES_TEXT); DB2Storage sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundFormat, HOTFIX_SEL_EMOTES_TEXT_SOUND); DB2Storage sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); DB2Storage sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoFormat, HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO); @@ -114,6 +121,7 @@ DB2Storage sItemXBonusTreeStore("ItemXBonus DB2Storage sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); DB2Storage sLockStore("Lock.db2", LockFormat, HOTFIX_SEL_LOCK); DB2Storage sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE); +DB2Storage sMapStore("Map.db2", MapFormat, HOTFIX_SEL_MAP); DB2Storage sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE); DB2Storage sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY); DB2Storage sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT); @@ -124,6 +132,7 @@ DB2Storage sNamesProfanityStore("NamesProfa DB2Storage sNamesReservedStore("NamesReserved.db2", NamesReservedFormat, HOTFIX_SEL_NAMES_RESERVED); DB2Storage sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleFormat, HOTFIX_SEL_NAMES_RESERVED_LOCALE); DB2Storage sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA); +DB2Storage sPhaseStore("Phase.db2", PhaseFormat, HOTFIX_SEL_PHASE); DB2Storage sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP); DB2Storage sPlayerConditionStore("PlayerCondition.db2", PlayerConditionFormat, HOTFIX_SEL_PLAYER_CONDITION); DB2Storage sPowerDisplayStore("PowerDisplay.db2", PowerDisplayFormat, HOTFIX_SEL_POWER_DISPLAY); @@ -207,8 +216,16 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D ++DB2FilesCount; +#define EXPECTED_DB2_BUILD 20950 + if (storage->Load(db2Path + localeNames[defaultLocale] + '/', defaultLocale)) { + if (storage->GetBuild() != EXPECTED_DB2_BUILD) + { + errlist.push_back(Trinity::StringFormat("DB2 file %s is from wrong client version!", storage->GetFileName())); + return; + } + storage->LoadFromDB(); for (uint32 i = 0; i < TOTAL_LOCALES; ++i) @@ -263,6 +280,8 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sAnimKitStore); LOAD_DB2(sArmorLocationStore); LOAD_DB2(sAreaGroupMemberStore); + LOAD_DB2(sAreaTableStore); + LOAD_DB2(sAreaTriggerStore); LOAD_DB2(sBankBagSlotPricesStore); LOAD_DB2(sBattlePetBreedQualityStore); LOAD_DB2(sBattlePetBreedStateStore); @@ -272,6 +291,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sBattlePetSpeciesStateStore); LOAD_DB2(sBroadcastTextStore); LOAD_DB2(sCharStartOutfitStore); + LOAD_DB2(sCharTitlesStore); LOAD_DB2(sChatChannelsStore); LOAD_DB2(sChrClassesXPowerTypesStore); LOAD_DB2(sChrRacesStore); @@ -279,15 +299,19 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sCinematicSequencesStore); LOAD_DB2(sCreatureDisplayInfoStore); LOAD_DB2(sCreatureDisplayInfoExtraStore); + LOAD_DB2(sCreatureFamilyStore); LOAD_DB2(sCreatureTypeStore); LOAD_DB2(sCriteriaStore); LOAD_DB2(sCriteriaTreeStore); LOAD_DB2(sCurrencyTypesStore); LOAD_DB2(sCurvePointStore); LOAD_DB2(sDestructibleModelDataStore); + LOAD_DB2(sDifficultyStore); + LOAD_DB2(sDungeonEncounterStore); LOAD_DB2(sDurabilityCostsStore); LOAD_DB2(sDurabilityQualityStore); LOAD_DB2(sEmotesStore); + LOAD_DB2(sEmotesTextStore); LOAD_DB2(sEmotesTextSoundStore); LOAD_DB2(sGameObjectsStore); LOAD_DB2(sGameObjectDisplayInfoStore); @@ -349,6 +373,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sKeyChainStore); LOAD_DB2(sLockStore); LOAD_DB2(sMailTemplateStore); + LOAD_DB2(sMapStore); LOAD_DB2(sModifierTreeStore); LOAD_DB2(sMountCapabilityStore); LOAD_DB2(sMountStore); @@ -359,6 +384,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sNamesReservedStore); LOAD_DB2(sNamesReservedLocaleStore); LOAD_DB2(sOverrideSpellDataStore); + LOAD_DB2(sPhaseStore); LOAD_DB2(sPhaseXPhaseGroupStore); LOAD_DB2(sPlayerConditionStore); LOAD_DB2(sPowerDisplayStore); @@ -460,6 +486,10 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) } } + ASSERT(MAX_DIFFICULTY >= sDifficultyStore.GetNumRows(), + "MAX_DIFFICULTY is not large enough to contain all difficulties! (current value %d, required %d)", + MAX_DIFFICULTY, sDifficultyStore.GetNumRows()); + for (EmotesTextSoundEntry const* emoteTextSound : sEmotesTextSoundStore) _emoteTextSounds[EmotesTextSoundContainer::key_type(emoteTextSound->EmotesTextId, emoteTextSound->RaceId, emoteTextSound->SexId, emoteTextSound->ClassId)] = emoteTextSound; @@ -563,7 +593,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (PhaseXPhaseGroupEntry const* group : sPhaseXPhaseGroupStore) if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) - _phasesByGroup[group->PhaseGroupID].insert(phase->ID); + _phasesByGroup[group->PhaseGroupID].insert(group->PhaseID); for (PvPDifficultyEntry const* entry : sPvpDifficultyStore) { @@ -686,9 +716,12 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) } // Check loaded DB2 files proper version - if (!sGemPropertiesStore.LookupEntry(2960) || // last gem property added in 7.0.1 (20914) + if (!sAreaTableStore.LookupEntry(6719) || // last area (areaflag) added in 7.0.1 (20810) + !sCharTitlesStore.LookupEntry(469) || // last char title added in 7.0.1 (20810) + !sGemPropertiesStore.LookupEntry(2960) || // last gem property added in 7.0.1 (20914) !sItemStore.LookupEntry(136350) || // last item added in 7.0.1 (20810) - !sItemExtendedCostStore.LookupEntry(5951) || // last item extended cost added in 7.0.1 (20810) + !sItemExtendedCostStore.LookupEntry(5951) || // last item extended cost added in 7.0.1 (20810) + !sMapStore.LookupEntry(1602) || // last map added in 7.0.1 (20810) !sSpellStore.LookupEntry(207511)) // last spell added in 7.0.1 (20810) { TC_LOG_ERROR("misc", "You have _outdated_ DB2 files. Please extract correct versions from current using client."); @@ -813,6 +846,18 @@ char const* DB2Manager::GetChrRaceName(uint8 race, LocaleConstant locale /*= DEF return raceEntry->Name->Str[DEFAULT_LOCALE]; } +char const* DB2Manager::GetCreatureFamilyPetName(uint32 petfamily, uint32 locale) +{ + if (!petfamily) + return nullptr; + + CreatureFamilyEntry const* petFamily = sCreatureFamilyStore.LookupEntry(petfamily); + if (!petFamily) + return nullptr; + + return petFamily->Name->Str[locale][0] != '\0' ? petFamily->Name->Str[locale] : nullptr; +} + EmotesTextSoundEntry const* DB2Manager::GetTextSoundEmoteFor(uint32 emote, uint8 race, uint8 gender, uint8 class_) const { auto itr = _emoteTextSounds.find(EmotesTextSoundContainer::key_type(emote, race, gender, class_)); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index ded2bf01b4f..5dbd24dacf6 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -26,6 +26,8 @@ TC_GAME_API extern DB2Storage sAchievementStore; TC_GAME_API extern DB2Storage sAnimKitStore; +TC_GAME_API extern DB2Storage sAreaTableStore; +TC_GAME_API extern DB2Storage sAreaTriggerStore; TC_GAME_API extern DB2Storage sArmorLocationStore; TC_GAME_API extern DB2Storage sAuctionHouseStore; TC_GAME_API extern DB2Storage sBankBagSlotPricesStore; @@ -36,20 +38,25 @@ TC_GAME_API extern DB2Storage sBattlePetSp TC_GAME_API extern DB2Storage sBattlePetSpeciesStateStore; TC_GAME_API extern DB2Storage sBroadcastTextStore; TC_GAME_API extern DB2Storage sCharStartOutfitStore; +TC_GAME_API extern DB2Storage sCharTitlesStore; TC_GAME_API extern DB2Storage sChatChannelsStore; TC_GAME_API extern DB2Storage sChrRacesStore; TC_GAME_API extern DB2Storage sChrSpecializationStore; TC_GAME_API extern DB2Storage sCinematicSequencesStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoExtraStore; +TC_GAME_API extern DB2Storage sCreatureFamilyStore; TC_GAME_API extern DB2Storage sCreatureTypeStore; TC_GAME_API extern DB2Storage sCriteriaStore; TC_GAME_API extern DB2Storage sCriteriaTreeStore; TC_GAME_API extern DB2Storage sCurrencyTypesStore; TC_GAME_API extern DB2Storage sDestructibleModelDataStore; +TC_GAME_API extern DB2Storage sDifficultyStore; +TC_GAME_API extern DB2Storage sDungeonEncounterStore; TC_GAME_API extern DB2Storage sDurabilityCostsStore; TC_GAME_API extern DB2Storage sDurabilityQualityStore; TC_GAME_API extern DB2Storage sEmotesStore; +TC_GAME_API extern DB2Storage sEmotesTextStore; TC_GAME_API extern DB2Storage sGameObjectsStore; TC_GAME_API extern DB2Storage sGameObjectDisplayInfoStore; TC_GAME_API extern DB2Storage sGameTablesStore; @@ -102,10 +109,12 @@ TC_GAME_API extern DB2Storage sItemSpecOve TC_GAME_API extern DB2Storage sItemToBattlePetSpeciesStore; TC_GAME_API extern DB2Storage sLockStore; TC_GAME_API extern DB2Storage sMailTemplateStore; +TC_GAME_API extern DB2Storage sMapStore; TC_GAME_API extern DB2Storage sModifierTreeStore; TC_GAME_API extern DB2Storage sMountCapabilityStore; TC_GAME_API extern DB2Storage sMovieStore; TC_GAME_API extern DB2Storage sOverrideSpellDataStore; +TC_GAME_API extern DB2Storage sPhaseStore; TC_GAME_API extern DB2Storage sPlayerConditionStore; TC_GAME_API extern DB2Storage sPowerDisplayStore; TC_GAME_API extern DB2Storage sQuestFactionRewardStore; @@ -229,6 +238,7 @@ public: ChrSpecializationEntry const* GetChrSpecializationByIndex(uint32 class_, uint32 index) const; uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId) const; static char const* GetChrRaceName(uint8 race, LocaleConstant locale = DEFAULT_LOCALE); + static char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); EmotesTextSoundEntry const* GetTextSoundEmoteFor(uint32 emote, uint8 race, uint8 gender, uint8 class_) const; GlyphSlotContainer const& GetGlyphSlots() const { return _glyphSlots; } uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 171d4324a62..692ae88847e 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -56,6 +56,60 @@ struct AreaGroupMemberEntry uint16 AreaID; }; +struct AreaTableEntry +{ + uint32 Flags[2]; + char const* ZoneName; + float AmbientMultiplier; + LocalizedString* AreaName; + uint16 MapID; + uint16 ParentAreaID; + int16 AreaBit; + uint16 AmbienceID; + uint16 ZoneMusic; + uint16 IntroSound; + uint16 LiquidTypeID[4]; + uint16 UWZoneMusic; + uint16 UWAmbience; + uint16 PvPCombastWorldStateID; + uint8 SoundProviderPref; + uint8 SoundProviderPrefUnderwater; + uint8 ExplorationLevel; + uint8 FactionGroupMask; + uint8 MountFlags; + uint8 UWIntroMusic; + uint8 WildBattlePetLevelMin; + uint8 WildBattlePetLevelMax; + uint8 WindSettingsID; + + // helpers + bool IsSanctuary() const + { + if (MapID == 609) + return true; + return (Flags[0] & AREA_FLAG_SANCTUARY) != 0; + } +}; + +struct AreaTriggerEntry +{ + uint32 ID; + DBCPosition3D Pos; + float Radius; + float BoxLength; + float BoxWidth; + float BoxHeight; + float BoxYaw; + uint16 MapID; + uint16 PhaseID; + uint16 PhaseGroupID; + uint16 ShapeID; + uint16 AreaTriggerActionSetID; + uint8 PhaseUseFlags; + uint8 ShapeType; + uint8 Flag; +}; + struct ArmorLocationEntry { float Modifier[5]; @@ -148,6 +202,15 @@ struct CharStartOutfitEntry uint8 PetFamilyID; // Pet Family Entry for starting pet }; +struct CharTitlesEntry +{ + LocalizedString* NameMale; + LocalizedString* NameFemale; + uint16 ConditionID; + uint16 MaskID; + uint8 Flags; +}; + struct ChatChannelsEntry { uint32 Flags; @@ -268,6 +331,20 @@ struct CreatureDisplayInfoExtraEntry uint8 Flags; }; +struct CreatureFamilyEntry +{ + float MinScale; + float MaxScale; + LocalizedString* Name; + char const* IconFile; + uint16 SkillLine[2]; + uint16 PetFoodMask; + uint8 MinScaleLevel; + uint8 MaxScaleLevel; + uint8 PetTalentType; + uint8 CategoryEnumID; +}; + struct CreatureTypeEntry { LocalizedString* Name; @@ -467,6 +544,36 @@ struct DestructibleModelDataEntry uint8 HealEffect; }; +struct DifficultyEntry +{ + uint32 ID; + LocalizedString* Name; + uint8 FallbackDifficultyID; + uint8 InstanceType; + uint8 MinPlayers; + uint8 MaxPlayers; + int8 OldEnumValue; + uint8 Flags; + uint8 ToggleDifficultyID; + uint8 GroupSizeHealthCurveID; + uint8 GroupSizeDmgCurveID; + uint8 GroupSizeSpellPointsCurveID; + uint8 ItemBonusTreeModID; + uint8 OrderIndex; +}; + +struct DungeonEncounterEntry +{ + LocalizedString* Name; + uint32 CreatureDisplayID; + uint16 MapID; + uint16 OrderIndex; + uint16 SpellIconID; + uint8 DifficultyID; + uint8 Bit; + uint8 Flags; +}; + struct DurabilityCostsEntry { uint16 WeaponSubClassCost[21]; @@ -489,6 +596,12 @@ struct EmotesEntry uint8 EmoteSpecProcParam; }; +struct EmotesTextEntry +{ + LocalizedString* Name; + uint16 EmoteID; +}; + struct EmotesTextSoundEntry { uint16 EmotesTextId; @@ -1097,6 +1210,62 @@ struct MailTemplateEntry LocalizedString* Body; }; +struct MapEntry +{ + uint32 ID; + char* Directory; + uint32 Flags; + uint32 MapType; + float MinimapIconScale; + DBCPosition2D CorpsePos; // entrance coordinates in ghost mode (in most cases = normal entrance) + uint32 RaidOffset; + LocalizedString* MapName; + LocalizedString* MapDescription0; // Horde + LocalizedString* MapDescription1; // Alliance + uint16 AreaTableID; + uint16 LoadingScreenID; + int16 CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) + uint16 TimeOfDayOverride; + int16 ParentMapID; + int16 CosmeticParentMapID; + uint8 InstanceType; + uint8 unk5; + uint8 ExpansionID; + uint8 MaxPlayers; + uint8 TimeOffset; + + // Helpers + uint8 Expansion() const { return ExpansionID; } + + bool IsDungeon() const { return (InstanceType == MAP_INSTANCE || InstanceType == MAP_RAID) && !IsGarrison(); } + bool IsNonRaidDungeon() const { return InstanceType == MAP_INSTANCE; } + bool Instanceable() const { return InstanceType == MAP_INSTANCE || InstanceType == MAP_RAID || InstanceType == MAP_BATTLEGROUND || InstanceType == MAP_ARENA; } + bool IsRaid() const { return InstanceType == MAP_RAID; } + bool IsBattleground() const { return InstanceType == MAP_BATTLEGROUND; } + bool IsBattleArena() const { return InstanceType == MAP_ARENA; } + bool IsBattlegroundOrArena() const { return InstanceType == MAP_BATTLEGROUND || InstanceType == MAP_ARENA; } + bool IsWorldMap() const { return InstanceType == MAP_COMMON; } + + bool GetEntrancePos(int32& mapid, float& x, float& y) const + { + if (CorpseMapID < 0) + return false; + + mapid = CorpseMapID; + x = CorpsePos.X; + y = CorpsePos.Y; + return true; + } + + bool IsContinent() const + { + return ID == 0 || ID == 1 || ID == 530 || ID == 571 || ID == 870 || ID == 1116; + } + + bool IsDynamicDifficultyMap() const { return (Flags & MAP_FLAG_CAN_TOGGLE_DIFFICULTY) != 0; } + bool IsGarrison() const { return (Flags & MAP_FLAG_GARRISON) != 0; } +}; + struct ModifierTreeEntry { uint32 Asset[2]; @@ -1181,6 +1350,11 @@ struct OverrideSpellDataEntry uint8 Flags; }; +struct PhaseEntry +{ + uint16 Flags; +}; + struct PhaseXPhaseGroupEntry { uint16 PhaseID; diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h index 596a67bd35d..58ab1319b98 100644 --- a/src/server/game/DataStores/DB2fmt.h +++ b/src/server/game/DataStores/DB2fmt.h @@ -21,6 +21,8 @@ char const AchievementFormat[] = "nssishhhhhhhbbb"; char const AnimKitFormat[] = "dihh"; char const AreaGroupMemberFormat[] = "dhh"; +char const AreaTableFormat[] = "diiSfshhhhhhhhhhhhhbbbbbbbbb"; +char const AreaTriggerFormat[] = "nffffffffhhhhhbbb"; char const ArmorLocationFormat[] = "dfffff"; char const AuctionHouseFormat[] = "dshbb"; char const BankBagSlotPricesFormat[] = "di"; @@ -31,6 +33,7 @@ char const BattlePetSpeciesFormat[] = "niiisshbb"; char const BattlePetSpeciesStateFormat[] = "nihb"; char const BroadcastTextFormat[] = "dsshhhhhhhhbb"; char const CharStartOutfitFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiibbbbb"; +char const CharTitlesFormat[] = "dsshhb"; char const ChatChannelsFormat[] = "dissb"; char const ChrClassesXPowerTypesFormat[] = "dbb"; char const ChrRacesFormat[] = "niSSsssSSSiiffffffihhhhhhhhhhhhbbbbbbbbb"; @@ -38,15 +41,19 @@ char const ChrSpecializationFormat[] = "niiiisssShbbbbb"; char const CinematicSequencesFormat[] = "dhhhhhhhhh"; char const CreatureDisplayInfoFormat[] = "niffiiiSiiihhhhhhbbbbbb"; char const CreatureDisplayInfoExtraFormat[] = "diibbbbbbbbbbbb"; +char const CreatureFamilyFormat[] = "dffsshhhbbbb"; char const CreatureTypeFormat[] = "dsb"; char const CriteriaFormat[] = "diiihhhbbbbb"; char const CriteriaTreeFormat[] = "dishhhhb"; char const CurrencyTypesFormat[] = "nSSsiiisbbbb"; char const CurvePointFormat[] = "dffhb"; char const DestructibleModelDataFormat[] = "dhhhhhbbbbbbbbbbbbbbbbb"; +char const DifficultyFormat[] = "nsbbbbbbbbbbbb"; +char const DungeonEncounterFormat[] = "dsihhhbbb"; char const DurabilityCostsFormat[] = "dhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"; char const DurabilityQualityFormat[] = "df"; char const EmotesFormat[] = "dSiihhbb"; +char const EmotesTextFormat[] = "dsh"; char const EmotesTextSoundFormat[] = "dhhbbb"; char const GameObjectsFormat[] = "nffffffffiiiiiiiishhhhbb"; char const GameObjectDisplayInfoFormat[] = "diffffffffh"; @@ -108,6 +115,7 @@ char const ItemXBonusTreeFormat[] = "dih"; char const KeyChainFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const LockFormat[] = "diiiiiiiihhhhhhhhbbbbbbbbbbbbbbbb"; char const MailTemplateFormat[] = "ds"; +char const MapFormat[] = "nsiifffissshhhhhhbbbbb"; char const ModifierTreeFormat[] = "diihbbbb"; char const MountFormat[] = "niissshhhb"; char const MountCapabilityFormat[] = "niihhhbb"; @@ -118,6 +126,7 @@ char const NamesProfanityFormat[] = "dSb"; char const NamesReservedFormat[] = "dS"; char const NamesReservedLocaleFormat[] = "dSb"; char const OverrideSpellDataFormat[] = "diiiiiiiiiiib"; +char const PhaseFormat[] = "dh"; char const PhaseXPhaseGroupFormat[] = "dhh"; char const PlayerConditionFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const PowerDisplayFormat[] = "dSbbbb"; diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 739b4ac51a0..f1f391f39ab 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -415,28 +415,30 @@ enum CriteriaTreeOperator enum Difficulty : uint8 { - DIFFICULTY_NONE = 0, - DIFFICULTY_NORMAL = 1, - DIFFICULTY_HEROIC = 2, - DIFFICULTY_10_N = 3, - DIFFICULTY_25_N = 4, - DIFFICULTY_10_HC = 5, - DIFFICULTY_25_HC = 6, - DIFFICULTY_LFR = 7, - DIFFICULTY_CHALLENGE = 8, - DIFFICULTY_40 = 9, - DIFFICULTY_HC_SCENARIO = 11, - DIFFICULTY_N_SCENARIO = 12, - DIFFICULTY_NORMAL_RAID = 14, - DIFFICULTY_HEROIC_RAID = 15, - DIFFICULTY_MYTHIC_RAID = 16, - DIFFICULTY_LFR_NEW = 17, - DIFFICULTY_EVENT_RAID = 18, - DIFFICULTY_EVENT_DUNGEON = 19, - DIFFICULTY_EVENT_SCENARIO = 20, - DIFFICULTY_MYTHIC = 23, - DIFFICULTY_TIMEWALKER = 24, - DIFFICULTY_PVP_SCENARIO = 25, + DIFFICULTY_NONE = 0, + DIFFICULTY_NORMAL = 1, + DIFFICULTY_HEROIC = 2, + DIFFICULTY_10_N = 3, + DIFFICULTY_25_N = 4, + DIFFICULTY_10_HC = 5, + DIFFICULTY_25_HC = 6, + DIFFICULTY_LFR = 7, + DIFFICULTY_CHALLENGE = 8, + DIFFICULTY_40 = 9, + DIFFICULTY_3_MAN_SCENARIO_HC = 11, + DIFFICULTY_3_MAN_SCENARIO_N = 12, + DIFFICULTY_NORMAL_RAID = 14, + DIFFICULTY_HEROIC_RAID = 15, + DIFFICULTY_MYTHIC_RAID = 16, + DIFFICULTY_LFR_NEW = 17, + DIFFICULTY_EVENT_RAID = 18, + DIFFICULTY_EVENT_DUNGEON = 19, + DIFFICULTY_EVENT_SCENARIO = 20, + DIFFICULTY_MYTHIC = 23, + DIFFICULTY_TIMEWALKER = 24, + DIFFICULTY_PVP_SCENARIO = 25, + DIFFICULTY_5_MAN_SCENARIO_N = 26, + DIFFICULTY_20_MAN_SCENARIO_N = 27, MAX_DIFFICULTY }; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 04313191799..03e1c365bc7 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -46,24 +46,14 @@ typedef std::multimap CharSectionsMap; typedef std::map> FactionTeamMap; typedef std::map WMOAreaInfoByTripple; -DBCStorage sAreaTableStore(AreaTablefmt); -DBCStorage sAreaTriggerStore(AreaTriggerfmt); - DBCStorage sBannedAddOnsStore(BannedAddOnsfmt); DBCStorage sBattlemasterListStore(BattlemasterListfmt); DBCStorage sCharSectionsStore(CharSectionsfmt); CharSectionsMap sCharSectionMap; -DBCStorage sCharTitlesStore(CharTitlesfmt); DBCStorage sChrClassesStore(ChrClassesfmt); -DBCStorage sCreatureFamilyStore(CreatureFamilyfmt); DBCStorage sCreatureModelDataStore(CreatureModelDatafmt); -DBCStorage sDifficultyStore(DifficultyFmt); -DBCStorage sDungeonEncounterStore(DungeonEncounterfmt); - -DBCStorage sEmotesTextStore(EmotesTextfmt); - DBCStorage sFactionStore(Factionfmt); static FactionTeamMap sFactionTeamMap; DBCStorage sFactionTemplateStore(FactionTemplatefmt); @@ -72,12 +62,9 @@ DBCStorage sLFGDungeonStore(LFGDungeonfmt); DBCStorage sLightStore(Lightfmt); DBCStorage sLiquidTypeStore(LiquidTypefmt); -DBCStorage sMapStore(Mapfmt); DBCStorage sMapDifficultyStore(MapDifficultyfmt); // only for loading MapDifficultyMap sMapDifficultyMap; -DBCStorage sPhaseStore(Phasefmt); - DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); DBCStorage sTalentStore(Talentfmt); @@ -224,26 +211,17 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) #define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, defaultLocale) - LOAD_DBC(sAreaTableStore, "AreaTable.dbc");//20810 - LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//20810 LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20810 LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20810 LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20810 - LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20810 LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20810 - LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20810 LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20810 - LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20810 - LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20810 - LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20810 LOAD_DBC(sFactionStore, "Faction.dbc");//20810 LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20810 LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20810 LOAD_DBC(sLightStore, "Light.dbc"); //20810 LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20810 LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20810 - LOAD_DBC(sMapStore, "Map.dbc");//20810 - LOAD_DBC(sPhaseStore, "Phase.dbc");//20810 LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20810 LOAD_DBC(sTalentStore, "Talent.dbc");//20810 LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20810 @@ -258,28 +236,11 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); - uint32 storageIndex = chrSpec->ClassID; - if (chrSpec->Flags & CHR_SPECIALIZATION_FLAG_PET_OVERRIDE_SPEC) - { - ASSERT(!chrSpec->ClassID); - storageIndex = PET_SPEC_OVERRIDE_CLASS_INDEX; - } - - sChrSpecializationByIndexStore[storageIndex][chrSpec->OrderIndex] = chrSpec; - } - - ASSERT(MAX_DIFFICULTY >= sDifficultyStore.GetNumRows(), - "MAX_DIFFICULTY is not large enough to contain all difficulties! (current value %d, required %d)", - MAX_DIFFICULTY, sDifficultyStore.GetNumRows()); - for (uint32 i = 0; i < sFactionStore.GetNumRows(); ++i) { FactionEntry const* faction = sFactionStore.LookupEntry(i); if (faction && faction->ParentFactionID) - { - std::vector &flist = sFactionTeamMap[faction->ParentFactionID]; - flist.push_back(i); - } + sFactionTeamMap[faction->ParentFactionID].push_back(i); } // fill data @@ -320,15 +281,6 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) exit(1); } - // Check loaded DBC files proper version - if (!sAreaTableStore.LookupEntry(6719) || // last area (areaflag) added in 7.0.1 (20810) - !sCharTitlesStore.LookupEntry(469) || // last char title added in 7.0.1 (20810) - !sMapStore.LookupEntry(1602) ) // last map added in 7.0.1 (20810) - { - TC_LOG_ERROR("misc", "You have _outdated_ DBC files. Please extract correct versions from current using client."); - exit(1); - } - TC_LOG_INFO("server.loading", ">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime)); } @@ -401,18 +353,6 @@ std::vector const* GetFactionTeamList(uint32 faction) return NULL; } -char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 /*locale*/) -{ - if (!petfamily) - return nullptr; - - CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily); - if (!pet_family) - return nullptr; - - return pet_family->Name_lang ? pet_family->Name_lang : NULL; -} - WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid) { WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid)); diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index b55c9573421..ef8056a06fc 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -30,9 +30,6 @@ TC_GAME_API CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSection // ChrClasses TC_GAME_API char const* GetClassName(uint8 class_, uint8 locale); -// CreatureFamilty -TC_GAME_API char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); - // Faction TC_GAME_API std::vector const* GetFactionTeamList(uint32 faction); @@ -93,25 +90,16 @@ private: GameTablesEntry const* _gtEntry; }; -TC_GAME_API extern DBCStorage sAreaTableStore; -TC_GAME_API extern DBCStorage sAreaTriggerStore; TC_GAME_API extern DBCStorage sBannedAddOnsStore; TC_GAME_API extern DBCStorage sBattlemasterListStore; TC_GAME_API extern DBCStorage sCharSectionsStore; -TC_GAME_API extern DBCStorage sCharTitlesStore; TC_GAME_API extern DBCStorage sChrClassesStore; -TC_GAME_API extern DBCStorage sCreatureFamilyStore; TC_GAME_API extern DBCStorage sCreatureModelDataStore; -TC_GAME_API extern DBCStorage sDifficultyStore; -TC_GAME_API extern DBCStorage sDungeonEncounterStore; -TC_GAME_API extern DBCStorage sEmotesTextStore; TC_GAME_API extern DBCStorage sFactionStore; TC_GAME_API extern DBCStorage sFactionTemplateStore; TC_GAME_API extern DBCStorage sLFGDungeonStore; TC_GAME_API extern DBCStorage sLiquidTypeStore; -TC_GAME_API extern DBCStorage sMapStore; TC_GAME_API extern MapDifficultyMap sMapDifficultyMap; -TC_GAME_API extern DBCStorage sPhaseStore; TC_GAME_API extern DBCStorage sSpellItemEnchantmentStore; TC_GAME_API extern DBCStorage sTalentStore; TC_GAME_API extern TalentsByPosition sTalentByPos; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 8dcb1a687a4..d831231cb88 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -26,61 +26,6 @@ // Structures using to access raw DBC data and required packing to portability #pragma pack(push, 1) -struct AreaTableEntry -{ - uint32 ID; // 0 - uint32 MapID; // 1 - uint32 ParentAreaID; // 2 if 0 then it's zone, else it's zone id of this area - int32 AreaBit; // 3 - uint32 Flags[2]; // 4-5, - //uint32 SoundProviderPref; // 6, - //uint32 SoundProviderPrefUnderwater; // 7, - //uint32 AmbienceID; // 8, - //uint32 ZoneMusic; // 9, - //char* ZoneName; // 10 - Internal name - //uint32 IntroSound; // 11 - uint32 ExplorationLevel; // 12 - char* AreaName_lang; // 13 - In-game name - uint32 FactionGroupMask; // 14 - uint32 LiquidTypeID[4]; // 15-18 - //float AmbientMultiplier; // 19 - //uint32 MountFlags; // 20 - //uint32 UWIntroMusic; // 21 - //uint32 UWZoneMusic; // 22 - //uint32 UWAmbience; // 23 - //uint32 PvPCombastWorldStateID; // 25 - //uint32 WildBattlePetLevelMin; // 26 - //uint32 WildBattlePetLevelMax; // 27 - //uint32 WindSettingsID; // 28 - - // helpers - bool IsSanctuary() const - { - if (MapID == 609) - return true; - return (Flags[0] & AREA_FLAG_SANCTUARY) != 0; - } -}; - -struct AreaTriggerEntry -{ - uint32 ID; // 0 - uint32 MapID; // 1 - DBCPosition3D Pos; // 2-4 - //uint32 PhaseUseFlags // 5 - //uint32 PhaseID // 6 - //uint32 PhaseGroupID // 7 - float Radius; // 8 - float BoxLength; // 9 - float BoxWidth; // 10 - float BoxHeight; // 11 - float BoxYaw; // 12 - //uint32 ShapeType // 13 - //uint32 ShapeID // 14 - //uint32 AreaTriggerActionSetID // 15 - //uint32 Flags // 16 -}; - struct BannedAddOnsEntry { uint32 ID; // 0 @@ -141,16 +86,6 @@ struct CharSectionsEntry uint32 Color; }; -struct CharTitlesEntry -{ - uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId() - //uint32 ConditionID; // 1 - char* NameMale_lang; // 2 m_name_lang - char* NameFemale_lang; // 3 m_name1_lang - uint32 MaskID; // 4 m_mask_ID used in PLAYER_CHOSEN_TITLE and 1<, X - skip, s - char*, f - float, i - uint32, b - uint8, d - index (not included) // n - index (included), l - uint64, p - field present in sql dbc, a - field absent in sql dbc -char const AreaTablefmt[] = "niiiiixxxxxxisiiiiixxxxxxxxx"; -char const AreaTriggerfmt[] = "nifffxxxfffffxxxx"; char const BannedAddOnsfmt[] = "nxxxxxxxxxx"; char const BattlemasterListfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx"; char const CharSectionsfmt[] = "diiixxxiii"; -char const CharTitlesfmt[] = "nxssix"; char const ChrClassesfmt[] = "nixsxxxixiiiiixxxxx"; -char const CreatureFamilyfmt[] = "nfifiiiiixsx"; char const CreatureModelDatafmt[] = "niixxxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx"; -char const DifficultyFmt[] = "niiiixiixxxxix"; -char const DungeonEncounterfmt[] = "niiixsxxx"; -char const EmotesTextfmt[] = "nxixxxxxxxxxxxxxxxx"; char const EmotesTextSoundEntryfmt[] = "niiii"; char const Factionfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx"; char const FactionTemplatefmt[] = "niiiiiiiiiiiii"; char const LFGDungeonfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx"; char const Lightfmt[] = "nifffxxxxxxxxxx"; char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const Mapfmt[] = "nxiixxsixxixiffxiiiiix"; char const MapDifficultyfmt[] = "diisiiii"; -char const MinorTalentfmt[] = "niii"; -char const Phasefmt[] = "ni"; char const SpellItemEnchantmentfmt[] = "niiiiiiiiiixiiiiiiiiiifffxxx"; char const Talentfmt[] = "niiiiiiiiix"; char const Vehiclefmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii"; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 6e723a29191..d80c2eabe3b 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -181,12 +181,12 @@ struct TC_GAME_API CreatureTemplate case DIFFICULTY_NORMAL: case DIFFICULTY_10_N: case DIFFICULTY_40: - case DIFFICULTY_N_SCENARIO: + case DIFFICULTY_3_MAN_SCENARIO_N: case DIFFICULTY_NORMAL_RAID: return -1; case DIFFICULTY_HEROIC: case DIFFICULTY_25_N: - case DIFFICULTY_HC_SCENARIO: + case DIFFICULTY_3_MAN_SCENARIO_HC: case DIFFICULTY_HEROIC_RAID: return 0; case DIFFICULTY_10_HC: diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index deefff1423b..a3ca26c99c5 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -753,7 +753,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) SetDisplayId(creature->GetDisplayId()); if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name_lang); + SetName(cFamily->Name->Str[GetOwner()->GetSession()->GetSessionDbcLocale()]); else SetName(creature->GetNameForLocaleIdx(sObjectMgr->GetDBCLocaleIndex())); @@ -766,7 +766,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner) return false; if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name_lang); + SetName(cFamily->Name->Str[GetOwner()->GetSession()->GetSessionDbcLocale()]); Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation()); @@ -1828,7 +1828,7 @@ void Pet::LearnPetPassives() if (!cFamily) return; - PetFamilySpellsStore::const_iterator petStore = sPetFamilySpellsStore.find(cFamily->ID); + PetFamilySpellsStore::const_iterator petStore = sPetFamilySpellsStore.find(cInfo->family); if (petStore != sPetFamilySpellsStore.end()) { // For general hunter pets skill 270 diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 04d7c07aa3d..303ef5d4c5d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4727,7 +4727,7 @@ void Player::UpdateLocalChannels(uint32 newZone) if (channel->Flags & CHANNEL_DBC_FLAG_CITY_ONLY) currentNameExt = sObjectMgr->GetTrinityStringForDBCLocale(LANG_CHANNEL_CITY); else - currentNameExt = current_zone->AreaName_lang; + currentNameExt = current_zone->AreaName->Str[GetSession()->GetSessionDbcLocale()]; snprintf(new_channel_name_buf, 100, channel->Name->Str[m_session->GetSessionDbcLocale()], currentNameExt); @@ -6906,9 +6906,9 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) if (sWorld->getBoolConfig(CONFIG_WEATHER) && !HasAuraType(SPELL_AURA_FORCE_WEATHER)) { - if (Weather* weather = WeatherMgr::FindWeather(zone->ID)) + if (Weather* weather = WeatherMgr::FindWeather(newZone)) weather->SendWeatherUpdateToPlayer(this); - else if (!WeatherMgr::AddWeather(zone->ID)) + else if (!WeatherMgr::AddWeather(newZone)) // send fine weather packet to remove old zone's weather WeatherMgr::SendFineWeatherUpdateToPlayer(this); } @@ -18060,7 +18060,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) bool deleteInstance = false; MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); - std::string mapname = mapEntry ? mapEntry->MapName_lang : "Unknown"; + std::string mapname = mapEntry ? mapEntry->MapName->Str[sWorld->GetDefaultDbcLocale()] : "Unknown"; if (!mapEntry || !mapEntry->IsDungeon()) { @@ -25792,9 +25792,9 @@ std::string Player::GetMapAreaAndZoneString() const std::string zoneName = "Unknown"; if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId)) { - areaName = area->AreaName_lang; + areaName = area->AreaName->Str[GetSession()->GetSessionDbcLocale()]; if (AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->ParentAreaID)) - zoneName = zone->AreaName_lang; + zoneName = zone->AreaName->Str[GetSession()->GetSessionDbcLocale()]; } std::ostringstream str; diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp index 33bf14d4c15..7ba412f5a69 100644 --- a/src/server/game/Garrison/Garrison.cpp +++ b/src/server/game/Garrison/Garrison.cpp @@ -224,8 +224,8 @@ bool Garrison::Create(uint32 garrSiteId) if (siteLevelItr == sGarrSiteLevelStore.end()) return false; - _siteLevelId = siteLevelItr.Key(); - _siteLevel = siteLevelItr.Value(); + _siteLevelId = siteLevelItr.ID(); + _siteLevel = siteLevelItr.Data(); InitializePlots(); diff --git a/src/server/game/Garrison/GarrisonMgr.cpp b/src/server/game/Garrison/GarrisonMgr.cpp index e2cba691910..c07d9a82c45 100644 --- a/src/server/game/Garrison/GarrisonMgr.cpp +++ b/src/server/game/Garrison/GarrisonMgr.cpp @@ -33,7 +33,7 @@ GarrisonMgr& GarrisonMgr::Instance() void GarrisonMgr::Initialize() { for (auto itr = sGarrSiteLevelPlotInstStore.begin(); itr != sGarrSiteLevelPlotInstStore.end(); ++itr) - _garrisonPlotInstBySiteLevel[itr->GarrSiteLevelID].push_back(std::make_pair(itr.Key(), itr.Value())); + _garrisonPlotInstBySiteLevel[itr->GarrSiteLevelID].push_back(std::make_pair(itr.ID(), itr.Data())); for (GameObjectsEntry const* gameObject : sGameObjectsStore) if (gameObject->Type == GAMEOBJECT_TYPE_GARRISON_PLOT) @@ -46,7 +46,7 @@ void GarrisonMgr::Initialize() _garrisonBuildingPlotInstances[MAKE_PAIR64(buildingPlotInst->GarrBuildingID, buildingPlotInst->GarrSiteLevelPlotInstID)] = buildingPlotInst->ID; for (auto itr = sGarrBuildingStore.begin(); itr != sGarrBuildingStore.end(); ++itr) - _garrisonBuildingsByType[itr->Type].push_back(itr.Key()); + _garrisonBuildingsByType[itr->Type].push_back(itr.ID()); for (GarrFollowerXAbilityEntry const* followerAbility : sGarrFollowerXAbilityStore) { diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index c52622bd966..aec1bba1e65 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1857,8 +1857,7 @@ void ObjectMgr::LoadCreatures() if (data.phaseid) { - PhaseEntry const* phase = sPhaseStore.LookupEntry(data.phaseid); - if (!phase) + if (!sPhaseStore.LookupEntry(data.phaseid)) { TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: " UI64FMTD " Entry: %u) with `phaseid` %u does not exist, set to 0", guid, data.id, data.phaseid); data.phaseid = 0; @@ -2144,8 +2143,7 @@ void ObjectMgr::LoadGameobjects() if (data.phaseid) { - PhaseEntry const* phase = sPhaseStore.LookupEntry(data.phaseid); - if (!phase) + if (!sPhaseStore.LookupEntry(data.phaseid)) { TC_LOG_ERROR("sql.sql", "Table `gameobject` have gameobject (GUID: " UI64FMTD " Entry: %u) with `phaseid` %u does not exist, set to 0", guid, data.id, data.phaseid); data.phaseid = 0; @@ -2626,13 +2624,13 @@ void ObjectMgr::LoadItemTemplates() for (auto itr = sItemSparseStore.begin(); itr != sItemSparseStore.end(); ++itr) { - ItemSparseEntry const* sparse = itr->second; - ItemEntry const* db2Data = sItemStore.LookupEntry(itr->first); + ItemSparseEntry const* sparse = itr.Data(); + ItemEntry const* db2Data = sItemStore.LookupEntry(itr.ID()); if (!db2Data) continue; - ItemTemplate& itemTemplate = _itemTemplateStore[itr->first]; - itemTemplate.Id = itr->first; + ItemTemplate& itemTemplate = _itemTemplateStore[itr.ID()]; + itemTemplate.Id = itr.ID(); itemTemplate.BasicData = db2Data; itemTemplate.ExtendedData = sparse; @@ -5284,7 +5282,7 @@ void ObjectMgr::LoadInstanceEncounters() } uint32 count = 0; - std::map dungeonLastBosses; + std::map> dungeonLastBosses; do { Field* fields = result->Fetch(); @@ -5301,20 +5299,22 @@ void ObjectMgr::LoadInstanceEncounters() if (lastEncounterDungeon && !sLFGMgr->GetLFGDungeonEntry(lastEncounterDungeon)) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->Name_lang, lastEncounterDungeon); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", + entry, dungeonEncounter->Name->Str[sWorld->GetDefaultDbcLocale()], lastEncounterDungeon); continue; } - std::map::const_iterator itr = dungeonLastBosses.find(lastEncounterDungeon); + std::map>::const_iterator itr = dungeonLastBosses.find(lastEncounterDungeon); if (lastEncounterDungeon) { if (itr != dungeonLastBosses.end()) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->Name_lang, itr->second->ID, itr->second->Name_lang); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", + entry, dungeonEncounter->Name->Str[sWorld->GetDefaultDbcLocale()], itr->second.first, itr->second.second->Name->Str[sWorld->GetDefaultDbcLocale()]); continue; } - dungeonLastBosses[lastEncounterDungeon] = dungeonEncounter; + dungeonLastBosses[lastEncounterDungeon] = std::make_pair(entry, dungeonEncounter); } switch (creditType) @@ -5324,7 +5324,8 @@ void ObjectMgr::LoadInstanceEncounters() CreatureTemplate const* creatureInfo = GetCreatureTemplate(creditEntry); if (!creatureInfo) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->Name_lang); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", + creditEntry, entry, dungeonEncounter->Name->Str[sWorld->GetDefaultDbcLocale()]); continue; } const_cast(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS; @@ -5333,12 +5334,14 @@ void ObjectMgr::LoadInstanceEncounters() case ENCOUNTER_CREDIT_CAST_SPELL: if (!sSpellMgr->GetSpellInfo(creditEntry)) { - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->Name_lang); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", + creditEntry, entry, dungeonEncounter->Name->Str[sWorld->GetDefaultDbcLocale()]); continue; } break; default: - TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->Name_lang); + TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", + creditType, entry, dungeonEncounter->Name->Str[sWorld->GetDefaultDbcLocale()]); continue; } @@ -6894,7 +6897,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry) if (!cinfo) return std::string(); - char const* petname = GetCreatureFamilyPetName(cinfo->family, sWorld->GetDefaultDbcLocale()); + char const* petname = DB2Manager::GetCreatureFamilyPetName(cinfo->family, sWorld->GetDefaultDbcLocale()); if (petname) return std::string(petname); else @@ -9025,8 +9028,7 @@ void ObjectMgr::LoadTerrainPhaseInfo() uint32 phaseId = fields[0].GetUInt32(); - PhaseEntry const* phase = sPhaseStore.LookupEntry(phaseId); - if (!phase) + if (!sPhaseStore.LookupEntry(phaseId)) { TC_LOG_ERROR("sql.sql", "Phase %u defined in `terrain_phase_info` does not exist, skipped.", phaseId); continue; diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index a43ec6c2202..a2634390cbc 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -199,7 +199,7 @@ void WorldSession::HandleWhoOpcode(WorldPackets::Who::WhoRequestPkt& whoRequest) { std::string aName; if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(target->GetZoneId())) - aName = areaEntry->AreaName_lang; + aName = areaEntry->AreaName->Str[GetSessionDbcLocale()]; bool show = false; for (size_t i = 0; i < wWords.size(); ++i) diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index dc008aa881e..a8d347a57a7 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -677,11 +677,12 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi DungeonEncounter const* encounter = *itr; if (encounter->creditType == type && encounter->creditEntry == creditEntry) { - completedEncounters |= 1 << encounter->dbcEntry->OrderIndex; + completedEncounters |= 1 << encounter->dbcEntry->Bit; if (encounter->lastEncounterDungeon) { dungeonId = encounter->lastEncounterDungeon; - TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->Name_lang, dungeonId); + TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", + instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->Name->Str[sWorld->GetDefaultDbcLocale()], dungeonId); break; } } diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index be4f71e8b71..2452c8f913e 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1586,10 +1586,9 @@ void LoadLootTemplates_Fishing() uint32 count = LootTemplates_Fishing.LoadAndCollectLootIds(lootIdSet); // remove real entries and check existence loot - for (uint32 i = 1; i < sAreaTableStore.GetNumRows(); ++i) - if (AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i)) - if (lootIdSet.find(areaEntry->ID) != lootIdSet.end()) - lootIdSet.erase(areaEntry->ID); + for (auto itr = sAreaTableStore.begin(); itr != sAreaTableStore.end(); ++itr) + if (lootIdSet.find(itr.ID()) != lootIdSet.end()) + lootIdSet.erase(itr.ID()); // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Fishing.ReportUnusedIds(lootIdSet); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 2389d8e0fc1..cce2671b69b 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2438,20 +2438,20 @@ uint32 Map::GetAreaId(float x, float y, float z, bool *isOutdoors) const WMOAreaTableEntry const* wmoEntry = nullptr; AreaTableEntry const* atEntry = nullptr; bool haveAreaInfo = false; + uint32 areaId = 0; if (GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId)) { haveAreaInfo = true; wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); if (wmoEntry) + { + areaId = wmoEntry->AreaTableID; atEntry = sAreaTableStore.LookupEntry(wmoEntry->AreaTableID); + } } - uint32 areaId = 0; - - if (atEntry) - areaId = atEntry->ID; - else + if (!areaId) { if (GridMap* gmap = const_cast(this)->GetGrid(x, y)) areaId = gmap->getArea(x, y); @@ -2651,7 +2651,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const char const* Map::GetMapName() const { - return i_mapEntry ? i_mapEntry->MapName_lang : "UNNAMEDMAP\x0"; + return i_mapEntry ? i_mapEntry->MapName->Str[sWorld->GetDefaultDbcLocale()] : "UNNAMEDMAP\x0"; } void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellCoord cellpair) diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 3acd04543ad..5a31bb822b4 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -148,7 +148,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool if (player->IsGameMaster()) return Map::CAN_ENTER; - char const* mapName = entry->MapName_lang; + char const* mapName = entry->MapName->Str[sWorld->GetDefaultDbcLocale()]; Group* group = player->GetGroup(); if (entry->IsRaid()) // can only enter in a raid group diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d5f3c0c5d77..ebf82122e00 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2386,7 +2386,7 @@ void SpellMgr::LoadPetLevelupSpellMap() if (!spell->SpellLevel) continue; - PetLevelupSpellSet& spellSet = mPetLevelupSpellMap[creatureFamily->ID]; + PetLevelupSpellSet& spellSet = mPetLevelupSpellMap[i]; if (spellSet.empty()) ++family_count; diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 6f59e6e40da..f9aca4b607b 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -270,7 +270,7 @@ public: if (titleInfo && target->HasTitle(titleInfo)) { - std::string name = target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang; + std::string name = (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()]; if (name.empty()) continue; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 081280532fb..dd048ce3c57 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -504,12 +504,12 @@ public: if (map->Instanceable()) { - handler->PSendSysMessage(LANG_INVALID_ZONE_MAP, areaEntry->ID, areaEntry->AreaName_lang, map->GetId(), map->GetMapName()); + handler->PSendSysMessage(LANG_INVALID_ZONE_MAP, areaId, areaEntry->AreaName->Str[handler->GetSessionDbcLocale()], map->GetId(), map->GetMapName()); handler->SetSentErrorMessage(true); return false; } - Zone2MapCoordinates(x, y, zoneEntry->ID); + Zone2MapCoordinates(x, y, areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId); if (!MapManager::IsValidMapCoord(zoneEntry->MapID, x, y)) { diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 33356409f17..47588000173 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -352,7 +352,7 @@ public: { AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->ParentAreaID); if (zone) - zoneName = zone->AreaName_lang; + zoneName = zone->AreaName->Str[handler->GetSessionDbcLocale()]; } } else diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 4ff0d1a70a9..2b3752c00be 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -102,30 +102,48 @@ public: AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i); if (areaEntry) { - std::string name = areaEntry->AreaName_lang; + int32 locale = handler->GetSessionDbcLocale(); + std::string name = areaEntry->AreaName->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && count++ == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = areaEntry->AreaName->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } } - // send area in "id - [name]" format - std::ostringstream ss; - if (handler->GetSession()) - ss << i << " - |cffffffff|Harea:" << i << "|h[" << name<< "]|h|r"; - else - ss << i << " - " << name; + if (locale < TOTAL_LOCALES) + { + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - handler->SendSysMessage(ss.str().c_str()); + // send area in "id - [name]" format + std::ostringstream ss; + if (handler->GetSession()) + ss << i << " - |cffffffff|Harea:" << i << "|h[" << name << "]|h|r"; + else + ss << i << " - " << name; - if (!found) - found = true; + handler->SendSysMessage(ss.str().c_str()); + + if (!found) + found = true; + } } } @@ -1091,36 +1109,54 @@ public: if (target && target->getGender() != gender) continue; - std::string name = gender == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang; + int32 locale = handler->GetSessionDbcLocale(); + std::string name = (gender == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && counter == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = (gender == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } } - char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : ""; + if (locale < TOTAL_LOCALES) + { + if (maxResults && counter == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID - ? handler->GetTrinityString(LANG_ACTIVE) - : ""; + char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : ""; - char titleNameStr[80]; - snprintf(titleNameStr, 80, name.c_str(), targetName); + char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID + ? handler->GetTrinityString(LANG_ACTIVE) + : ""; - // send title in "id (idx:idx) - [namedlink locale]" format - if (handler->GetSession()) - handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->MaskID, id, titleNameStr, "", knownStr, activeStr); - else - handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->MaskID, titleNameStr, "", knownStr, activeStr); + char titleNameStr[80]; + snprintf(titleNameStr, 80, name.c_str(), targetName); - ++counter; + // send title in "id (idx:idx) - [namedlink locale]" format + if (handler->GetSession()) + handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->MaskID, id, titleNameStr, "", knownStr, activeStr); + else + handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->MaskID, titleNameStr, "", knownStr, activeStr); + + ++counter; + } } } } @@ -1145,18 +1181,35 @@ public: uint32 counter = 0; uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS); - uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale(); // search in Map.dbc for (uint32 id = 0; id < sMapStore.GetNumRows(); id++) { if (MapEntry const* mapInfo = sMapStore.LookupEntry(id)) { - std::string name = mapInfo->MapName_lang; + int32 locale = handler->GetSessionDbcLocale(); + std::string name = mapInfo->MapName->Str[locale]; if (name.empty()) continue; - if (Utf8FitTo(name, wNamePart) && locale < TOTAL_LOCALES) + if (!Utf8FitTo(name, wNamePart) && handler->GetSession()) + { + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; + + name = mapInfo->MapName->Str[locale]; + if (name.empty()) + continue; + + if (Utf8FitTo(name, wNamePart)) + break; + } + } + + if (locale < TOTAL_LOCALES) { if (maxResults && counter == maxResults) { diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index e6fb42853e3..d66a6d24cc2 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -235,9 +235,9 @@ public: char const* unknown = handler->GetTrinityString(LANG_UNKNOWN); handler->PSendSysMessage(LANG_MAP_POSITION, - mapId, (mapEntry ? mapEntry->MapName_lang : unknown), - zoneId, (zoneEntry ? zoneEntry->AreaName_lang : unknown), - areaId, (areaEntry ? areaEntry->AreaName_lang : unknown), + mapId, (mapEntry ? mapEntry->MapName->Str[handler->GetSessionDbcLocale()] : unknown), + zoneId, (zoneEntry ? zoneEntry->AreaName->Str[handler->GetSessionDbcLocale()] : unknown), + areaId, (areaEntry ? areaEntry->AreaName->Str[handler->GetSessionDbcLocale()] : unknown), object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation()); if (Transport* transport = object->GetTransport()) @@ -1816,15 +1816,15 @@ public: AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId); if (area) { - areaName = area->AreaName_lang; + areaName = area->AreaName->Str[handler->GetSessionDbcLocale()]; AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->ParentAreaID); if (zone) - zoneName = zone->AreaName_lang; + zoneName = zone->AreaName->Str[handler->GetSessionDbcLocale()]; } if (target) - handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->MapName_lang, + handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->MapName->Str[handler->GetSessionDbcLocale()], (!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)), (!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN))); diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 85f4a43b3e4..11c9921a90c 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -93,7 +93,9 @@ public: target->SetTitle(titleInfo); // to be sure that title now known target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->MaskID); - handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, tNameLink.c_str()); + handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, + (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + tNameLink.c_str()); return true; } @@ -135,7 +137,9 @@ public: std::string tNameLink = handler->GetNameLink(target); char titleNameStr[80]; - snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, target->GetName().c_str()); + snprintf(titleNameStr, 80, + (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + target->GetName().c_str()); target->SetTitle(titleInfo); handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str()); @@ -183,7 +187,9 @@ public: std::string tNameLink = handler->GetNameLink(target); char titleNameStr[80]; - snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, target->GetName().c_str()); + snprintf(titleNameStr, 80, + (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + target->GetName().c_str()); handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str()); diff --git a/src/server/shared/DataStores/DB2SparseStorageLoader.h b/src/server/shared/DataStores/DB2SparseStorageLoader.h index 13f31e12d56..ac75e6b82d5 100644 --- a/src/server/shared/DataStores/DB2SparseStorageLoader.h +++ b/src/server/shared/DataStores/DB2SparseStorageLoader.h @@ -65,6 +65,7 @@ class DB2SparseFileLoader uint32 GetNumRows() const { return recordCount; } uint32 GetCols() const { return fieldCount; } uint32 GetHash() const { return tableHash; } + uint32 GetBuild() const { return build; } bool IsLoaded() const { return (data != NULL); } char* AutoProduceData(const char* fmt, IndexTable const& indexTable, uint32 locale, std::vector& stringPool); char* AutoProduceStrings(const char* fmt, char* dataTable, uint32 locale); diff --git a/src/server/shared/DataStores/DB2StorageLoader.h b/src/server/shared/DataStores/DB2StorageLoader.h index 67525779ef5..c84f38b74b9 100644 --- a/src/server/shared/DataStores/DB2StorageLoader.h +++ b/src/server/shared/DataStores/DB2StorageLoader.h @@ -92,6 +92,7 @@ class TC_SHARED_API DB2FileLoader uint32 GetCols() const { return fieldCount; } uint32 GetOffset(size_t id) const { return (fieldsOffset != NULL && id < fieldCount) ? fieldsOffset[id] : 0; } uint32 GetHash() const { return tableHash; } + uint32 GetBuild() const { return build; } bool IsLoaded() const { return (data != NULL); } char* AutoProduceData(const char* fmt, uint32& count, char**& indexTable); char* AutoProduceStringsArrayHolders(const char* fmt, char* dataTable); diff --git a/src/server/shared/DataStores/DB2Store.h b/src/server/shared/DataStores/DB2Store.h index 570e8174a39..d1542faa194 100644 --- a/src/server/shared/DataStores/DB2Store.h +++ b/src/server/shared/DataStores/DB2Store.h @@ -29,7 +29,7 @@ class DB2StorageBase { public: DB2StorageBase(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) - : _tableHash(0), _fileName(fileName), _fieldCount(0), _format(format), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex) { } + : _tableHash(0), _build(0), _fileName(fileName), _fieldCount(0), _format(format), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex) { } virtual ~DB2StorageBase() { @@ -41,6 +41,8 @@ public: uint32 GetHash() const { return _tableHash; } + uint32 GetBuild() const { return _build; } + virtual bool HasRecord(uint32 id) const = 0; virtual void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const = 0; @@ -114,6 +116,7 @@ protected: } uint32 _tableHash; + uint32 _build; std::string _fileName; uint32 _fieldCount; char const* _format; @@ -163,6 +166,7 @@ public: _fieldCount = db2.GetCols(); _tableHash = db2.GetHash(); + _build = db2.GetBuild(); // load raw non-string data _dataTable = db2.AutoProduceData(_format, _indexTableSize, _indexTable.AsChar); @@ -233,7 +237,17 @@ class DB2SparseStorage : public DB2StorageBase static_assert(std::is_pod::value, "T in DB2SparseStorage must be POD-type."); public: - typedef typename std::unordered_map::const_iterator iterator; + typedef struct iterator_wrapper : public std::unordered_map::const_iterator + { + typedef typename std::unordered_map::const_iterator Base; + + iterator_wrapper() = default; + iterator_wrapper(iterator_wrapper const& right) = default; + iterator_wrapper(Base const& baseItr) : Base(baseItr) { } + + uint32 ID() const { return (*this)->first; } + T const* Data() const { return (*this)->second; } + } iterator; DB2SparseStorage(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) : DB2StorageBase(fileName, format, preparedStmtIndex) @@ -273,6 +287,7 @@ public: _fieldCount = db2.GetCols(); _tableHash = db2.GetHash(); + _build = db2.GetBuild(); // load raw non-string data _dataTable = db2.AutoProduceData(_format, IndexTableAdapter(_indexTable), locale, _stringPool); @@ -312,8 +327,8 @@ public: DB2SparseDatabaseLoader(_fileName).LoadStrings(_format, HotfixDatabaseStatements(_hotfixStatement + 1), locale, IndexTableAdapter(_indexTable), _stringPool); } - iterator begin() const { return _indexTable.begin(); } - iterator end() const { return _indexTable.end(); } + iterator begin() const { return iterator(_indexTable.begin()); } + iterator end() const { return iterator(_indexTable.end()); } private: std::unordered_map _indexTable; diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp index ec3a95f74b9..ace59bb9ebb 100644 --- a/src/server/shared/DataStores/DBCFileLoader.cpp +++ b/src/server/shared/DataStores/DBCFileLoader.cpp @@ -182,11 +182,11 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char** if (i >= 0) { - int32 maxi = 0; + uint32 maxi = 0; //find max index for (uint32 y = 0; y < recordCount; ++y) { - int32 ind = int32(getRecord(y).getUInt(i)); + uint32 ind = getRecord(y).getUInt(i); if (ind > maxi) maxi = ind; } @@ -213,10 +213,7 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char** for (uint32 y = 0; y < recordCount; ++y) { if (i >= 0) - { - if (int32(getRecord(y).getUInt(i)) >= 0) - indexTable[getRecord(y).getUInt(i)] = &dataTable[offset]; - } + indexTable[getRecord(y).getUInt(i)] = &dataTable[offset]; else indexTable[y] = &dataTable[offset]; diff --git a/src/server/shared/DataStores/DBStorageIterator.h b/src/server/shared/DataStores/DBStorageIterator.h index 8e7d03f2756..3f9fa6eed24 100644 --- a/src/server/shared/DataStores/DBStorageIterator.h +++ b/src/server/shared/DataStores/DBStorageIterator.h @@ -35,8 +35,8 @@ public: } } - uint32 Key() const { return _pos; } - T const* Value() const { return _index[_pos]; } + uint32 ID() const { return _pos; } + T const* Data() const { return _index[_pos]; } T const* operator->() { return _index[_pos]; } T const* operator*() { return _index[_pos]; } -- cgit v1.2.3 From 70102f32fe38ae7d49acbd5ddee0239602d3cb94 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 25 Apr 2016 22:03:34 +0200 Subject: Core/DataStores: Updated opcodes and db2 to 7.0.3.21414 --- .../hotfixes/2016_xx_xx_xx_hotfixes_legion_01.sql | 2 +- .../hotfixes/2016_xx_xx_xx_hotfixes_legion_04.sql | 801 ++++++++++ src/common/Define.h | 22 +- .../Database/Implementation/HotfixDatabase.cpp | 192 ++- .../Database/Implementation/HotfixDatabase.h | 49 +- src/server/game/Addons/AddonMgr.cpp | 2 +- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 1 - src/server/game/AuctionHouse/AuctionHouseMgr.h | 1 - .../game/AuctionHouseBot/AuctionHouseBotSeller.cpp | 1 - src/server/game/Battlegrounds/BattlegroundMgr.cpp | 2 +- src/server/game/Chat/ChatLink.cpp | 1 - src/server/game/Combat/HostileRefManager.cpp | 1 - src/server/game/Conditions/DisableMgr.cpp | 8 +- src/server/game/DataStores/DB2Stores.cpp | 344 ++++- src/server/game/DataStores/DB2Stores.h | 62 +- src/server/game/DataStores/DB2Structure.h | 613 +++++++- src/server/game/DataStores/DB2fmt.h | 69 +- src/server/game/DataStores/DBCEnums.h | 21 +- src/server/game/DataStores/DBCStores.cpp | 564 ------- src/server/game/DataStores/DBCStores.h | 131 -- src/server/game/DataStores/DBCStructure.h | 614 -------- src/server/game/DataStores/DBCfmt.h | 18 - src/server/game/DataStores/GameTables.cpp | 133 ++ src/server/game/DataStores/GameTables.h | 228 +++ src/server/game/DungeonFinding/LFGMgr.cpp | 23 +- src/server/game/DungeonFinding/LFGMgr.h | 13 +- src/server/game/DungeonFinding/LFGQueue.cpp | 2 - src/server/game/Entities/Item/Item.cpp | 5 +- .../game/Entities/Item/ItemEnchantmentMgr.cpp | 1 - src/server/game/Entities/Item/ItemTemplate.cpp | 1 - src/server/game/Entities/Item/ItemTemplate.h | 3 +- src/server/game/Entities/Player/Player.cpp | 324 +++-- src/server/game/Entities/Player/Player.h | 4 - src/server/game/Entities/Taxi/TaxiPathGraph.cpp | 1 - src/server/game/Entities/Transport/Transport.cpp | 1 - src/server/game/Entities/Unit/StatSystem.cpp | 13 +- src/server/game/Entities/Unit/Unit.cpp | 27 +- src/server/game/Entities/Unit/Unit.h | 25 +- src/server/game/Garrison/Garrison.cpp | 26 +- src/server/game/Garrison/Garrison.h | 1 - src/server/game/Garrison/GarrisonMgr.cpp | 20 +- src/server/game/Garrison/GarrisonMgr.h | 6 +- src/server/game/Globals/ObjectMgr.cpp | 47 +- src/server/game/Globals/ObjectMgr.h | 2 +- src/server/game/Groups/Group.cpp | 4 +- src/server/game/Groups/GroupMgr.cpp | 1 - src/server/game/Guilds/Guild.cpp | 6 +- src/server/game/Guilds/Guild.h | 1 - src/server/game/Handlers/CharacterHandler.cpp | 16 - src/server/game/Handlers/ItemHandler.cpp | 17 +- src/server/game/Handlers/MailHandler.cpp | 1 - src/server/game/Handlers/MiscHandler.cpp | 2 +- src/server/game/Handlers/MovementHandler.cpp | 4 +- src/server/game/Handlers/ReferAFriendHandler.cpp | 24 + src/server/game/Handlers/SpellHandler.cpp | 1 - src/server/game/Instances/InstanceSaveMgr.cpp | 18 +- src/server/game/Loot/LootMgr.cpp | 6 +- src/server/game/Maps/Map.cpp | 72 +- src/server/game/Maps/Map.h | 61 +- src/server/game/Maps/MapInstanced.cpp | 2 +- src/server/game/Maps/MapManager.cpp | 2 +- src/server/game/Maps/TransportMgr.h | 1 - src/server/game/Miscellaneous/Formulas.h | 30 +- src/server/game/Reputation/ReputationMgr.cpp | 11 +- src/server/game/Reputation/ReputationMgr.h | 1 - src/server/game/Scripting/ScriptMgr.cpp | 1 - src/server/game/Scripting/ScriptMgr.h | 3 +- .../game/Server/Packets/CharacterPackets.cpp | 10 - src/server/game/Server/Packets/CharacterPackets.h | 20 - src/server/game/Server/Packets/GarrisonPackets.h | 3 +- src/server/game/Server/Packets/TaxiPackets.h | 1 - src/server/game/Server/Protocol/Opcodes.cpp | 2 - src/server/game/Server/Protocol/Opcodes.h | 1534 ++++++++++---------- src/server/game/Server/WorldSession.h | 6 - src/server/game/Spells/SpellEffects.cpp | 2 +- src/server/game/Spells/SpellInfo.cpp | 26 +- src/server/game/Spells/SpellInfo.h | 3 +- src/server/game/Spells/SpellMgr.cpp | 1 - src/server/game/Spells/SpellMgr.h | 1 - src/server/game/Tools/CharacterDatabaseCleaner.cpp | 1 - src/server/game/World/World.cpp | 7 +- src/server/scripts/Commands/cs_character.cpp | 2 +- src/server/scripts/Commands/cs_debug.cpp | 6 +- src/server/scripts/Commands/cs_go.cpp | 2 +- src/server/scripts/Commands/cs_lookup.cpp | 97 +- src/server/scripts/Commands/cs_misc.cpp | 10 +- src/server/scripts/Commands/cs_modify.cpp | 4 +- src/server/scripts/ScriptPCH.h | 3 +- src/server/scripts/Spells/spell_item.cpp | 1 - src/server/scripts/Spells/spell_mage.cpp | 2 + src/server/scripts/Spells/spell_pet.cpp | 24 +- .../shared/DataStores/DB2SparseStorageLoader.cpp | 19 +- src/server/shared/DataStores/DB2StorageLoader.cpp | 65 +- src/server/shared/DataStores/DB2Store.h | 4 +- src/server/shared/DataStores/DBCFileLoader.cpp | 314 ---- src/server/shared/DataStores/DBCFileLoader.h | 105 -- src/server/shared/DataStores/DBCStore.h | 325 ----- src/server/shared/DataStores/DBStorageIterator.h | 3 - 98 files changed, 3721 insertions(+), 3592 deletions(-) create mode 100644 sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_04.sql delete mode 100644 src/server/game/DataStores/DBCStores.cpp delete mode 100644 src/server/game/DataStores/DBCStores.h delete mode 100644 src/server/game/DataStores/DBCStructure.h create mode 100644 src/server/game/DataStores/GameTables.cpp create mode 100644 src/server/game/DataStores/GameTables.h delete mode 100644 src/server/shared/DataStores/DBCFileLoader.cpp delete mode 100644 src/server/shared/DataStores/DBCFileLoader.h delete mode 100644 src/server/shared/DataStores/DBCStore.h (limited to 'src/server/scripts') diff --git a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_01.sql b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_01.sql index f90c81333a9..5011a0bd29d 100644 --- a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_01.sql +++ b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_01.sql @@ -2132,7 +2132,7 @@ ALTER TABLE `spell_power` -- Table structure for table `spell_power_difficulty` -- ALTER TABLE `spell_power_difficulty` DROP PRIMARY KEY; -ALTER TABLE `spell_power_difficulty` ADD `ID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, +ALTER TABLE `spell_power_difficulty` MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellPowerID`, MODIFY `PowerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`; ALTER TABLE `spell_power_difficulty` ADD PRIMARY KEY (`ID`); diff --git a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_04.sql b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_04.sql new file mode 100644 index 00000000000..d8bf16bf9d6 --- /dev/null +++ b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_04.sql @@ -0,0 +1,801 @@ +-- +-- Table structure for table `area_table` +-- +ALTER TABLE `area_table` CHANGE `UWIntroMusic` `UWIntroMusic` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `LiquidTypeID4`; + +-- +-- Table structure for table `banned_addons` +-- +DROP TABLE IF EXISTS `banned_addons`; +CREATE TABLE `banned_addons` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Version` text, + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `battlemaster_list` +-- +DROP TABLE IF EXISTS `battlemaster_list`; +CREATE TABLE `battlemaster_list` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `IconFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `GameType` text, + `MapID1` smallint(6) NOT NULL DEFAULT '0', + `MapID2` smallint(6) NOT NULL DEFAULT '0', + `MapID3` smallint(6) NOT NULL DEFAULT '0', + `MapID4` smallint(6) NOT NULL DEFAULT '0', + `MapID5` smallint(6) NOT NULL DEFAULT '0', + `MapID6` smallint(6) NOT NULL DEFAULT '0', + `MapID7` smallint(6) NOT NULL DEFAULT '0', + `MapID8` smallint(6) NOT NULL DEFAULT '0', + `MapID9` smallint(6) NOT NULL DEFAULT '0', + `MapID10` smallint(6) NOT NULL DEFAULT '0', + `MapID11` smallint(6) NOT NULL DEFAULT '0', + `MapID12` smallint(6) NOT NULL DEFAULT '0', + `MapID13` smallint(6) NOT NULL DEFAULT '0', + `MapID14` smallint(6) NOT NULL DEFAULT '0', + `MapID15` smallint(6) NOT NULL DEFAULT '0', + `MapID16` smallint(6) NOT NULL DEFAULT '0', + `HolidayWorldState` smallint(5) unsigned NOT NULL DEFAULT '0', + `PlayerConditionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `InstanceType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GroupsAllowed` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxGroupSize` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RatedPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `battlemaster_list_locale` +-- +DROP TABLE IF EXISTS `battlemaster_list_locale`; +CREATE TABLE `battlemaster_list_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `GameType_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `char_sections` +-- +DROP TABLE IF EXISTS `char_sections`; +CREATE TABLE `char_sections` ( + `Id` int(10) unsigned NOT NULL DEFAULT '0', + `TextureFileDataID1` int(10) unsigned NOT NULL DEFAULT '0', + `TextureFileDataID2` int(10) unsigned NOT NULL DEFAULT '0', + `TextureFileDataID3` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `Race` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Gender` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GenType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Color` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`Id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_classes` +-- +DROP TABLE IF EXISTS `chr_classes`; +CREATE TABLE `chr_classes` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `PowerType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PetNameToken` text, + `Name` text, + `NameFemale` text, + `NameMale` text, + `Filename` text, + `CreateScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `SelectScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `LowResScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `CinematicSequenceID` smallint(5) unsigned NOT NULL DEFAULT '0', + `DefaultSpec` smallint(5) unsigned NOT NULL DEFAULT '0', + `SpellClassSet` tinyint(3) unsigned NOT NULL DEFAULT '0', + `AttackPowerPerStrength` tinyint(3) unsigned NOT NULL DEFAULT '0', + `AttackPowerPerAgility` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RangedAttackPowerPerAgility` tinyint(3) unsigned NOT NULL DEFAULT '0', + `IconFileDataID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Unk1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_classes_locale` +-- +DROP TABLE IF EXISTS `chr_classes_locale`; +CREATE TABLE `chr_classes_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `NameFemale_lang` text, + `NameMale_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_races` +-- +ALTER TABLE `chr_races` ADD `ItemAppearanceFrameRaceID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `NeutralRaceID`; + +-- +-- Table structure for table `creature_display_info` +-- +ALTER TABLE `creature_display_info` ADD `InstanceOtherPlayerPetScale` float NOT NULL DEFAULT '0' AFTER `StateSpellVisualKitID`; + +-- +-- Table structure for table `creature_model_data` +-- +DROP TABLE IF EXISTS `creature_model_data`; +CREATE TABLE `creature_model_data` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `ModelScale` float NOT NULL DEFAULT '0', + `FootprintTextureLength` float NOT NULL DEFAULT '0', + `FootprintTextureWidth` float NOT NULL DEFAULT '0', + `FootprintParticleScale` float NOT NULL DEFAULT '0', + `CollisionWidth` float NOT NULL DEFAULT '0', + `CollisionHeight` float NOT NULL DEFAULT '0', + `MountHeight` float NOT NULL DEFAULT '0', + `GeoBoxMin1` float NOT NULL DEFAULT '0', + `GeoBoxMin2` float NOT NULL DEFAULT '0', + `GeoBoxMin3` float NOT NULL DEFAULT '0', + `GeoBoxMax1` float NOT NULL DEFAULT '0', + `GeoBoxMax2` float NOT NULL DEFAULT '0', + `GeoBoxMax3` float NOT NULL DEFAULT '0', + `WorldEffectScale` float NOT NULL DEFAULT '0', + `AttachedEffectScale` float NOT NULL DEFAULT '0', + `MissileCollisionRadius` float NOT NULL DEFAULT '0', + `MissileCollisionPush` float NOT NULL DEFAULT '0', + `MissileCollisionRaise` float NOT NULL DEFAULT '0', + `OverrideLootEffectScale` float NOT NULL DEFAULT '0', + `OverrideNameScale` float NOT NULL DEFAULT '0', + `OverrideSelectionRadius` float NOT NULL DEFAULT '0', + `TamedPetBaseScale` float NOT NULL DEFAULT '0', + `HoverHeight` float NOT NULL DEFAULT '0', + `SoundID` smallint(5) unsigned NOT NULL DEFAULT '0', + `CreatureGeosetDataID` smallint(5) unsigned NOT NULL DEFAULT '0', + `SizeClass` tinyint(3) unsigned NOT NULL DEFAULT '0', + `BloodID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FootprintTextureID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FoleyMaterialID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Unk700_1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Unk700_2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FootstepShakeSize` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DeathThudShakeSize` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `emotes` +-- +ALTER TABLE `emotes` + ADD `Unk703_1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EmoteFlags`, + ADD `Unk703_2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Unk703_1`, + CHANGE `EmoteSpecProcParam` `EmoteSpecProcParam` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AnimID`; + +-- +-- Table structure for table `faction` +-- +DROP TABLE IF EXISTS `faction`; +CREATE TABLE `faction` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ReputationRaceMask1` int(10) unsigned NOT NULL DEFAULT '0', + `ReputationRaceMask2` int(10) unsigned NOT NULL DEFAULT '0', + `ReputationRaceMask3` int(10) unsigned NOT NULL DEFAULT '0', + `ReputationRaceMask4` int(10) unsigned NOT NULL DEFAULT '0', + `ReputationBase1` int(11) NOT NULL DEFAULT '0', + `ReputationBase2` int(11) NOT NULL DEFAULT '0', + `ReputationBase3` int(11) NOT NULL DEFAULT '0', + `ReputationBase4` int(11) NOT NULL DEFAULT '0', + `ParentFactionModIn` float NOT NULL DEFAULT '0', + `ParentFactionModOut` float NOT NULL DEFAULT '0', + `Name` text, + `Description` text, + `ReputationIndex` smallint(6) NOT NULL DEFAULT '0', + `ReputationClassMask1` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationClassMask2` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationClassMask3` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationClassMask4` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationFlags1` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationFlags2` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationFlags3` smallint(5) unsigned NOT NULL DEFAULT '0', + `ReputationFlags4` smallint(5) unsigned NOT NULL DEFAULT '0', + `ParentFactionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ParentFactionCapIn` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ParentFactionCapOut` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Expansion` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FriendshipRepID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `faction_locale` +-- +DROP TABLE IF EXISTS `faction_locale`; +CREATE TABLE `faction_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `faction_template` +-- +DROP TABLE IF EXISTS `faction_template`; +CREATE TABLE `faction_template` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Faction` smallint(5) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `Enemies1` smallint(5) unsigned NOT NULL DEFAULT '0', + `Enemies2` smallint(5) unsigned NOT NULL DEFAULT '0', + `Enemies3` smallint(5) unsigned NOT NULL DEFAULT '0', + `Enemies4` smallint(5) unsigned NOT NULL DEFAULT '0', + `Friends1` smallint(5) unsigned NOT NULL DEFAULT '0', + `Friends2` smallint(5) unsigned NOT NULL DEFAULT '0', + `Friends3` smallint(5) unsigned NOT NULL DEFAULT '0', + `Friends4` smallint(5) unsigned NOT NULL DEFAULT '0', + `Mask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `FriendMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `EnemyMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `garr_ability` +-- +ALTER TABLE `garr_ability` CHANGE `Flags` `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `IconFileDataID`; + +-- +-- Table structure for table `garr_ability` +-- +ALTER TABLE `garr_class_spec` + ADD `Limit` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrFollItemSetID`, + CHANGE `Unknown700` `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Limit`; + +-- +-- Table structure for table `garr_follower` +-- +ALTER TABLE `garr_follower` + ADD `MaxDurability` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrTypeID`, + ADD `Class` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxDurability`; + +-- +-- Table structure for table `garr_plot` +-- +ALTER TABLE `garr_plot` CHANGE `MinCount` `MinCount` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `HordeConstructionGameObjectID`; +ALTER TABLE `garr_plot` CHANGE `MaxCount` `MaxCount` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MinCount`; + +-- +-- Table structure for table `gem_properties` +-- +ALTER TABLE `gem_properties` + DROP `MaxCountInv`, + DROP COLUMN `MaxCountItem`; + +-- +-- Table structure for table `glyph_slot` +-- +ALTER TABLE `glyph_slot` MODIFY COLUMN `Tooltip` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +-- +-- Table structure for table `guild_perk_spells` +-- +ALTER TABLE `guild_perk_spells` DROP COLUMN `GuildLevel`; + +-- +-- Table structure for table `item_appearance` +-- +ALTER TABLE `item_appearance` ADD COLUMN `UIOrder` int(10) unsigned NOT NULL DEFAULT '0' AFTER `IconFileDataID`; + +-- +-- Table structure for table `item_modified_appearance` +-- +ALTER TABLE `item_modified_appearance` ADD COLUMN `SourceType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Index`; + +-- +-- Table structure for table `item_set` +-- +ALTER TABLE `item_set` ADD COLUMN `Unknown703` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemID17`; + +-- +-- Table structure for table `item_sparse` +-- +ALTER TABLE `item_sparse` ADD COLUMN `RequiredExpansion` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ArtifactID`; + +-- +-- Table structure for table `lfg_dungeons` +-- +DROP TABLE IF EXISTS `lfg_dungeons`; +CREATE TABLE `lfg_dungeons` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `TextureFilename` text, + `Description` text, + `MaxLevel` smallint(5) unsigned NOT NULL DEFAULT '0', + `TargetLevelMax` smallint(5) unsigned NOT NULL DEFAULT '0', + `MapID` smallint(6) NOT NULL DEFAULT '0', + `RandomID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ScenarioID` smallint(5) unsigned NOT NULL DEFAULT '0', + `LastBossJournalEncounterID` smallint(5) unsigned NOT NULL DEFAULT '0', + `BonusReputationAmount` smallint(5) unsigned NOT NULL DEFAULT '0', + `MentorItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `TargetLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `TargetLevelMin` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Faction` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Expansion` tinyint(3) unsigned NOT NULL DEFAULT '0', + `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GroupID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CountTank` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CountHealer` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CountDamage` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinCountTank` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinCountHealer` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinCountDamage` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SubType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MentorCharLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `lfg_dungeons_locale` +-- +DROP TABLE IF EXISTS `lfg_dungeons_locale`; +CREATE TABLE `lfg_dungeons_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `light` +-- +DROP TABLE IF EXISTS `light`; +CREATE TABLE `light` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `PosX` float NOT NULL DEFAULT '0', + `PosY` float NOT NULL DEFAULT '0', + `PosZ` float NOT NULL DEFAULT '0', + `FalloffStart` float NOT NULL DEFAULT '0', + `FalloffEnd` float NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID1` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID2` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID3` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID4` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID5` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID6` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID7` smallint(5) unsigned NOT NULL DEFAULT '0', + `LightParamsID8` smallint(5) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `liquid_type` +-- +DROP TABLE IF EXISTS `liquid_type`; +CREATE TABLE `liquid_type` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `MaxDarkenDepth` float NOT NULL DEFAULT '0', + `FogDarkenIntensity` float NOT NULL DEFAULT '0', + `AmbDarkenIntensity` float NOT NULL DEFAULT '0', + `DirDarkenIntensity` float NOT NULL DEFAULT '0', + `ParticleScale` float NOT NULL DEFAULT '0', + `Texture1` text, + `Texture2` text, + `Texture3` text, + `Texture4` text, + `Texture5` text, + `Texture6` text, + `Color1` int(10) unsigned NOT NULL DEFAULT '0', + `Color2` int(10) unsigned NOT NULL DEFAULT '0', + `Float1` float NOT NULL DEFAULT '0', + `Float2` float NOT NULL DEFAULT '0', + `Float3` float NOT NULL DEFAULT '0', + `Float4` float NOT NULL DEFAULT '0', + `Float5` float NOT NULL DEFAULT '0', + `Float6` float NOT NULL DEFAULT '0', + `Float7` float NOT NULL DEFAULT '0', + `Float8` float NOT NULL DEFAULT '0', + `Float9` float NOT NULL DEFAULT '0', + `Float10` float NOT NULL DEFAULT '0', + `Float11` float NOT NULL DEFAULT '0', + `Float12` float NOT NULL DEFAULT '0', + `Float13` float NOT NULL DEFAULT '0', + `Float14` float NOT NULL DEFAULT '0', + `Float15` float NOT NULL DEFAULT '0', + `Float16` float NOT NULL DEFAULT '0', + `Float17` float NOT NULL DEFAULT '0', + `Float18` float NOT NULL DEFAULT '0', + `Int1` int(10) unsigned NOT NULL DEFAULT '0', + `Int2` int(10) unsigned NOT NULL DEFAULT '0', + `Int3` int(10) unsigned NOT NULL DEFAULT '0', + `Int4` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `SoundID` smallint(5) unsigned NOT NULL DEFAULT '0', + `Type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LightID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ParticleMovement` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ParticleTexSlots` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaterialID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DepthTexCount6` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `liquid_type_locale` +-- +DROP TABLE IF EXISTS `liquid_type_locale`; +CREATE TABLE `liquid_type_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `map` +-- +ALTER TABLE `map` DROP `RaidOffset`; + +-- +-- Table structure for table `map_difficulty` +-- +DROP TABLE IF EXISTS `map_difficulty`; +CREATE TABLE `map_difficulty` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Message` text, + `Context` int(10) unsigned NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RaidDurationType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LockID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ItemBonusTreeModID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `map_difficulty_locale` +-- +DROP TABLE IF EXISTS `map_difficulty_locale`; +CREATE TABLE `map_difficulty_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Message_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `mount_capability` +-- +ALTER TABLE `mount_capability` MODIFY COLUMN `RequiredAura` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +-- +-- Table structure for table `quest_sort` +-- +ALTER TABLE `quest_sort` ADD COLUMN `SortOrder` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SortName`; + +-- +-- Table structure for table `rand_prop_points` +-- +ALTER TABLE `rand_prop_points` + CHANGE `EpicPropertiesPoints1` `EpicPropertiesPoints1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`, + CHANGE `EpicPropertiesPoints2` `EpicPropertiesPoints2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EpicPropertiesPoints1`, + CHANGE `EpicPropertiesPoints3` `EpicPropertiesPoints3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EpicPropertiesPoints2`, + CHANGE `EpicPropertiesPoints4` `EpicPropertiesPoints4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EpicPropertiesPoints3`, + CHANGE `EpicPropertiesPoints5` `EpicPropertiesPoints5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EpicPropertiesPoints4`, + CHANGE `RarePropertiesPoints1` `RarePropertiesPoints1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EpicPropertiesPoints5`, + CHANGE `RarePropertiesPoints2` `RarePropertiesPoints2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RarePropertiesPoints1`, + CHANGE `RarePropertiesPoints3` `RarePropertiesPoints3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RarePropertiesPoints2`, + CHANGE `RarePropertiesPoints4` `RarePropertiesPoints4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RarePropertiesPoints3`, + CHANGE `RarePropertiesPoints5` `RarePropertiesPoints5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RarePropertiesPoints4`, + CHANGE `UncommonPropertiesPoints1` `UncommonPropertiesPoints1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RarePropertiesPoints5`, + CHANGE `UncommonPropertiesPoints2` `UncommonPropertiesPoints2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `UncommonPropertiesPoints1`, + CHANGE `UncommonPropertiesPoints3` `UncommonPropertiesPoints3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `UncommonPropertiesPoints2`, + CHANGE `UncommonPropertiesPoints4` `UncommonPropertiesPoints4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `UncommonPropertiesPoints3`, + CHANGE `UncommonPropertiesPoints5` `UncommonPropertiesPoints5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `UncommonPropertiesPoints4`; + +-- +-- Table structure for table `skill_race_class_info` +-- +ALTER TABLE `skill_race_class_info` MODIFY COLUMN `ClassMask` int(11) NOT NULL DEFAULT '0' AFTER `RaceMask`; + +-- +-- Table structure for table `sound_kit` +-- +ALTER TABLE `sound_kit` + CHANGE `BusOverwriteID` `BusOverwriteID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SoundEntriesAdvancedID`, + CHANGE `SoundType` `SoundType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `BusOverwriteID`; + +-- +-- Table structure for table `spell_category` +-- +ALTER TABLE `spell_category` ADD COLUMN `Unk703` int(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `ChargeRecoveryTime`; + +-- +-- Table structure for table `spell_item_enchantment` +-- +DROP TABLE IF EXISTS `spell_item_enchantment`; +CREATE TABLE `spell_item_enchantment` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `EffectSpellID1` int(10) unsigned NOT NULL DEFAULT '0', + `EffectSpellID2` int(10) unsigned NOT NULL DEFAULT '0', + `EffectSpellID3` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `EffectScalingPoints1` float NOT NULL DEFAULT '0', + `EffectScalingPoints2` float NOT NULL DEFAULT '0', + `EffectScalingPoints3` float NOT NULL DEFAULT '0', + `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0', + `TransmogCost` int(10) unsigned NOT NULL DEFAULT '0', + `TextureFileDataID` int(10) unsigned NOT NULL DEFAULT '0', + `EffectPointsMin1` smallint(5) unsigned NOT NULL DEFAULT '0', + `EffectPointsMin2` smallint(5) unsigned NOT NULL DEFAULT '0', + `EffectPointsMin3` smallint(5) unsigned NOT NULL DEFAULT '0', + `ItemVisual` smallint(5) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkillID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0', + `ItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0', + `Charges` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Effect1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Effect2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Effect3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ConditionID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ScalingClass` tinyint(4) NOT NULL DEFAULT '0', + `ScalingClassRestricted` tinyint(4) NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_item_enchantment_locale` +-- +DROP TABLE IF EXISTS `spell_item_enchantment_locale`; +CREATE TABLE `spell_item_enchantment_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_scaling` +-- +ALTER TABLE `spell_scaling` ADD COLUMN `MinScalingLevel` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `ScalingClass`; + +-- +-- Table structure for table `talent` +-- +DROP TABLE IF EXISTS `talent`; +CREATE TABLE `talent` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `OverridesSpellID` int(10) unsigned NOT NULL DEFAULT '0', + `Description` text, + `SpecID` smallint(5) unsigned NOT NULL DEFAULT '0', + `TierID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ColumnIndex` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CategoryMask1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `CategoryMask2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ClassID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `talent_locale` +-- +DROP TABLE IF EXISTS `talent_locale`; +CREATE TABLE `talent_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `vehicle` +-- +DROP TABLE IF EXISTS `vehicle`; +CREATE TABLE `vehicle` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `TurnSpeed` float NOT NULL DEFAULT '0', + `PitchSpeed` float NOT NULL DEFAULT '0', + `PitchMin` float NOT NULL DEFAULT '0', + `PitchMax` float NOT NULL DEFAULT '0', + `MouseLookOffsetPitch` float NOT NULL DEFAULT '0', + `CameraFadeDistScalarMin` float NOT NULL DEFAULT '0', + `CameraFadeDistScalarMax` float NOT NULL DEFAULT '0', + `CameraPitchOffset` float NOT NULL DEFAULT '0', + `FacingLimitRight` float NOT NULL DEFAULT '0', + `FacingLimitLeft` float NOT NULL DEFAULT '0', + `MsslTrgtTurnLingering` float NOT NULL DEFAULT '0', + `MsslTrgtPitchLingering` float NOT NULL DEFAULT '0', + `MsslTrgtMouseLingering` float NOT NULL DEFAULT '0', + `MsslTrgtEndOpacity` float NOT NULL DEFAULT '0', + `MsslTrgtArcSpeed` float NOT NULL DEFAULT '0', + `MsslTrgtArcRepeat` float NOT NULL DEFAULT '0', + `MsslTrgtArcWidth` float NOT NULL DEFAULT '0', + `MsslTrgtImpactRadius1` float NOT NULL DEFAULT '0', + `MsslTrgtImpactRadius2` float NOT NULL DEFAULT '0', + `MsslTrgtArcTexture` text, + `MsslTrgtImpactTexture` text, + `MsslTrgtImpactModel1` text, + `MsslTrgtImpactModel2` text, + `CameraYawOffset` float NOT NULL DEFAULT '0', + `MsslTrgtImpactTexRadius` float NOT NULL DEFAULT '0', + `SeatID1` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID2` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID3` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID4` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID5` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID6` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID7` smallint(5) unsigned NOT NULL DEFAULT '0', + `SeatID8` smallint(5) unsigned NOT NULL DEFAULT '0', + `VehicleUIIndicatorID` smallint(5) unsigned NOT NULL DEFAULT '0', + `PowerDisplayID1` smallint(5) unsigned NOT NULL DEFAULT '0', + `PowerDisplayID2` smallint(5) unsigned NOT NULL DEFAULT '0', + `PowerDisplayID3` smallint(5) unsigned NOT NULL DEFAULT '0', + `FlagsB` tinyint(3) unsigned NOT NULL DEFAULT '0', + `UILocomotionType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `vehicle_seat` +-- +ALTER TABLE `vehicle_seat` + CHANGE `EnterUISoundID` `EnterUISoundID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `VehicleExitAnimDelay`, + CHANGE `ExitUISoundID` `ExitUISoundID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EnterUISoundID`; + +-- +-- Table structure for table `wmo_area_table` +-- +DROP TABLE IF EXISTS `wmo_area_table`; +CREATE TABLE `wmo_area_table` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `WMOGroupID` int(11) NOT NULL DEFAULT '0', + `AreaName` text, + `WMOID` smallint(6) NOT NULL DEFAULT '0', + `AmbienceID` int(10) unsigned NOT NULL DEFAULT '0', + `ZoneMusic` int(10) unsigned NOT NULL DEFAULT '0', + `IntroSound` int(10) unsigned NOT NULL DEFAULT '0', + `AreaTableID` int(10) unsigned NOT NULL DEFAULT '0', + `UWIntroSound` int(10) unsigned NOT NULL DEFAULT '0', + `UWAmbience` int(10) unsigned NOT NULL DEFAULT '0', + `NameSet` tinyint(4) NOT NULL DEFAULT '0', + `SoundProviderPref` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SoundProviderPrefUnderwater` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `UWZoneMusic` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `wmo_area_table_locale` +-- +DROP TABLE IF EXISTS `wmo_area_table_locale`; +CREATE TABLE `wmo_area_table_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `AreaName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `world_map_area` +-- +DROP TABLE IF EXISTS `world_map_area`; +CREATE TABLE `world_map_area` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `AreaName` text, + `LocLeft` float NOT NULL DEFAULT '0', + `LocRight` float NOT NULL DEFAULT '0', + `LocTop` float NOT NULL DEFAULT '0', + `LocBottom` float NOT NULL DEFAULT '0', + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `AreaID` smallint(5) unsigned NOT NULL DEFAULT '0', + `DisplayMapID` smallint(6) NOT NULL DEFAULT '0', + `DefaultDungeonFloor` smallint(6) NOT NULL DEFAULT '0', + `ParentWorldMapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `Flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `PlayerConditionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `LevelRangeMin` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LevelRangeMax` tinyint(3) unsigned NOT NULL DEFAULT '0', + `BountySetID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `BountyBoardLocation` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `world_map_overlay` +-- +ALTER TABLE `world_map_overlay` ADD `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PlayerConditionID`; + +-- +-- Table structure for table `world_safe_locs` +-- +DROP TABLE IF EXISTS `world_safe_locs`; +CREATE TABLE `world_safe_locs` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `LocX` float NOT NULL DEFAULT '0', + `LocY` float NOT NULL DEFAULT '0', + `LocZ` float NOT NULL DEFAULT '0', + `Facing` float NOT NULL DEFAULT '0', + `AreaName` text, + `MapID` smallint(5) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `world_safe_locs_locale` +-- +DROP TABLE IF EXISTS `world_safe_locs_locale`; +CREATE TABLE `world_safe_locs_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `AreaName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +DROP TABLE `game_tables`; +DROP TABLE `game_tables_locale`; +DROP TABLE `item_to_battle_pet_species`; diff --git a/src/common/Define.h b/src/common/Define.h index c9eb42791e9..5bbb77916f5 100644 --- a/src/common/Define.h +++ b/src/common/Define.h @@ -159,19 +159,15 @@ typedef uint8_t uint8; enum DBCFormer { - FT_NA = 'x', //not used or unknown, 4 byte size - FT_NA_BYTE = 'X', //not used or unknown, byte - FT_STRING = 's', //char* - FT_STRING_NOT_LOCALIZED = 'S', //char* but without locale in DB2 - FT_FLOAT = 'f', //float - FT_INT = 'i', //uint32 - FT_BYTE = 'b', //uint8 - FT_LONG = 'l', //uint64 - FT_SHORT = 'h', //uint16 - FT_SORT = 'd', //sorted by this field, field is not included - FT_IND = 'n', //the same, but parsed to data - FT_SQL_PRESENT = 'p', //Used in sql format to mark column present in sql dbc - FT_SQL_ABSENT = 'a' //Used in sql format to mark column absent in sql dbc + FT_STRING = 's', // LocalizedString* + FT_STRING_NOT_LOCALIZED = 'S', // char* + FT_FLOAT = 'f', // float + FT_INT = 'i', // uint32 + FT_BYTE = 'b', // uint8 + FT_LONG = 'l', // uint64 + FT_SHORT = 'h', // uint16 + FT_SORT = 'd', // sorted by this field but not present in DB2 data block (calculated) + FT_IND = 'n' // sorted by this field }; #endif //TRINITY_DEFINE_H diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 9b9363f6724..e40be4e167a 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -43,8 +43,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() // AreaTable.db2 PrepareStatement(HOTFIX_SEL_AREA_TABLE, "SELECT ID, Flags1, Flags2, ZoneName, AmbientMultiplier, AreaName, MapID, ParentAreaID, AreaBit, " - "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWZoneMusic, UWAmbience, " - "PvPCombastWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, UWIntroMusic, " + "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWIntroMusic, UWZoneMusic, UWAmbience, " + "PvPCombastWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, " "WildBattlePetLevelMin, WildBattlePetLevelMax, WindSettingsID FROM area_table ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_AREA_TABLE, "SELECT ID, AreaName_lang FROM area_table_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -62,6 +62,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() // BankBagSlotPrices.db2 PrepareStatement(HOTFIX_SEL_BANK_BAG_SLOT_PRICES, "SELECT ID, Cost FROM bank_bag_slot_prices ORDER BY ID DESC", CONNECTION_SYNCH); + // BannedAddons.db2 + PrepareStatement(HOTFIX_SEL_BANNED_ADDONS, "SELECT ID, Name, Version, Flags FROM banned_addons ORDER BY ID DESC", CONNECTION_SYNCH); + // BarberShopStyle.db2 PrepareStatement(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT ID, DisplayName, Description, CostModifier, Type, Race, Sex, Data FROM barber_shop_style" " ORDER BY ID DESC", CONNECTION_SYNCH); @@ -81,11 +84,21 @@ void HotfixDatabaseConnection::DoPrepareStatements() // BattlePetSpeciesState.db2 PrepareStatement(HOTFIX_SEL_BATTLE_PET_SPECIES_STATE, "SELECT ID, Value, SpeciesID, State FROM battle_pet_species_state ORDER BY ID DESC", CONNECTION_SYNCH); + // BattlemasterList.db2 + PrepareStatement(HOTFIX_SEL_BATTLEMASTER_LIST, "SELECT ID, Name, IconFileDataID, GameType, MapID1, MapID2, MapID3, MapID4, MapID5, MapID6, " + "MapID7, MapID8, MapID9, MapID10, MapID11, MapID12, MapID13, MapID14, MapID15, MapID16, HolidayWorldState, PlayerConditionID, InstanceType, " + "GroupsAllowed, MaxGroupSize, MinLevel, MaxLevel, RatedPlayers, MinPlayers, MaxPlayers, Flags FROM battlemaster_list ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_BATTLEMASTER_LIST, "SELECT ID, Name_lang, GameType_lang FROM battlemaster_list_locale WHERE locale = ?", CONNECTION_SYNCH); + // BroadcastText.db2 PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, " "EmoteDelay3, SoundID, UnkEmoteID, Language, Type FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_locale WHERE locale = ?", CONNECTION_SYNCH); + // CharSections.db2 + PrepareStatement(HOTFIX_SEL_CHAR_SECTIONS, "SELECT Id, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, Race, Gender, GenType, " + "Type, Color FROM char_sections ORDER BY Id DESC", CONNECTION_SYNCH); + // CharStartOutfit.db2 PrepareStatement(HOTFIX_SEL_CHAR_START_OUTFIT, "SELECT ID, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, ItemID18, ItemID19, ItemID20, ItemID21, ItemID22, ItemID23, " @@ -99,6 +112,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Flags, Name, Shortcut, FactionGroup FROM chat_channels ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Name_lang, Shortcut_lang FROM chat_channels_locale WHERE locale = ?", CONNECTION_SYNCH); + // ChrClasses.db2 + PrepareStatement(HOTFIX_SEL_CHR_CLASSES, "SELECT ID, PowerType, PetNameToken, Name, NameFemale, NameMale, Filename, CreateScreenFileDataID, " + "SelectScreenFileDataID, LowResScreenFileDataID, Flags, CinematicSequenceID, DefaultSpec, SpellClassSet, AttackPowerPerStrength, " + "AttackPowerPerAgility, RangedAttackPowerPerAgility, IconFileDataID, Unk1 FROM chr_classes ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_CLASSES, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_classes_locale WHERE locale = ?", CONNECTION_SYNCH); + // ChrClassesXPowerTypes.db2 PrepareStatement(HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT ID, ClassID, PowerType FROM chr_classes_x_power_types ORDER BY ID DESC", CONNECTION_SYNCH); @@ -108,8 +127,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() "MaleCustomizeOffset3, FemaleCustomizeOffset1, FemaleCustomizeOffset2, FemaleCustomizeOffset3, LowResScreenFileDataID, FactionID, " "ExplorationSoundID, MaleDisplayID, FemaleDisplayID, ResSicknessSpellID, SplashSoundID, CinematicSequenceID, UAMaleCreatureSoundDataID, " "UAFemaleCreatureSoundDataID, HighResMaleDisplayID, HighResFemaleDisplayID, Unk, BaseLanguage, CreatureType, TeamID, RaceRelated, " - "UnalteredVisualRaceID, CharComponentTextureLayoutID, DefaultClassID, NeutralRaceID, CharComponentTexLayoutHiResID FROM chr_races" - " ORDER BY ID DESC", CONNECTION_SYNCH); + "UnalteredVisualRaceID, CharComponentTextureLayoutID, DefaultClassID, NeutralRaceID, ItemAppearanceFrameRaceID, " + "CharComponentTexLayoutHiResID FROM chr_races ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_RACES, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_races_locale WHERE locale = ?", CONNECTION_SYNCH); // ChrSpecialization.db2 @@ -125,8 +144,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() // CreatureDisplayInfo.db2 PrepareStatement(HOTFIX_SEL_CREATURE_DISPLAY_INFO, "SELECT ID, ExtendedDisplayInfoID, CreatureModelScale, PlayerModelScale, TextureVariation1, " "TextureVariation2, TextureVariation3, PortraitTextureName, PortraitCreatureDisplayInfoID, CreatureGeosetData, StateSpellVisualKitID, " - "ModelID, SoundID, NPCSoundID, ParticleColorID, ObjectEffectPackageID, AnimReplacementSetID, CreatureModelAlpha, SizeClass, BloodID, Flags, " - "Gender, Unk700 FROM creature_display_info ORDER BY ID DESC", CONNECTION_SYNCH); + "InstanceOtherPlayerPetScale, ModelID, SoundID, NPCSoundID, ParticleColorID, ObjectEffectPackageID, AnimReplacementSetID, CreatureModelAlpha, " + "SizeClass, BloodID, Flags, Gender, Unk700 FROM creature_display_info ORDER BY ID DESC", CONNECTION_SYNCH); // CreatureDisplayInfoExtra.db2 PrepareStatement(HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA, "SELECT ID, FileDataID, HDFileDataID, DisplayRaceID, DisplaySexID, DisplayClassID, " @@ -138,6 +157,14 @@ void HotfixDatabaseConnection::DoPrepareStatements() "MaxScaleLevel, PetTalentType, CategoryEnumID FROM creature_family ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_FAMILY, "SELECT ID, Name_lang FROM creature_family_locale WHERE locale = ?", CONNECTION_SYNCH); + // CreatureModelData.db2 + PrepareStatement(HOTFIX_SEL_CREATURE_MODEL_DATA, "SELECT ID, Flags, FileDataID, ModelScale, FootprintTextureLength, FootprintTextureWidth, " + "FootprintParticleScale, CollisionWidth, CollisionHeight, MountHeight, GeoBoxMin1, GeoBoxMin2, GeoBoxMin3, GeoBoxMax1, GeoBoxMax2, " + "GeoBoxMax3, WorldEffectScale, AttachedEffectScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, " + "OverrideLootEffectScale, OverrideNameScale, OverrideSelectionRadius, TamedPetBaseScale, HoverHeight, SoundID, CreatureGeosetDataID, " + "SizeClass, BloodID, FootprintTextureID, FoleyMaterialID, Unk700_1, Unk700_2, FootstepShakeSize, DeathThudShakeSize FROM creature_model_data" + " ORDER BY ID DESC", CONNECTION_SYNCH); + // CreatureType.db2 PrepareStatement(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -190,8 +217,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_DURABILITY_QUALITY, "SELECT ID, QualityMod FROM durability_quality ORDER BY ID DESC", CONNECTION_SYNCH); // Emotes.db2 - PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, AnimID, EmoteSoundID, EmoteSpecProc, " - "EmoteSpecProcParam FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, Unk703_1, Unk703_2, AnimID, EmoteSpecProcParam, " + "EmoteSoundID, EmoteSpecProc FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); // EmotesText.db2 PrepareStatement(HOTFIX_SEL_EMOTES_TEXT, "SELECT ID, Name, EmoteID FROM emotes_text ORDER BY ID DESC", CONNECTION_SYNCH); @@ -200,6 +227,18 @@ void HotfixDatabaseConnection::DoPrepareStatements() // EmotesTextSound.db2 PrepareStatement(HOTFIX_SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, SoundId, RaceId, SexId, ClassId FROM emotes_text_sound ORDER BY ID DESC", CONNECTION_SYNCH); + // Faction.db2 + PrepareStatement(HOTFIX_SEL_FACTION, "SELECT ID, ReputationRaceMask1, ReputationRaceMask2, ReputationRaceMask3, ReputationRaceMask4, " + "ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ParentFactionModIn, ParentFactionModOut, Name, Description, " + "ReputationIndex, ReputationClassMask1, ReputationClassMask2, ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, " + "ReputationFlags3, ReputationFlags4, ParentFactionID, ParentFactionCapIn, ParentFactionCapOut, Expansion, Flags, FriendshipRepID FROM faction" + " ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_FACTION, "SELECT ID, Name_lang, Description_lang FROM faction_locale WHERE locale = ?", CONNECTION_SYNCH); + + // FactionTemplate.db2 + PrepareStatement(HOTFIX_SEL_FACTION_TEMPLATE, "SELECT ID, Faction, Flags, Enemies1, Enemies2, Enemies3, Enemies4, Friends1, Friends2, Friends3, " + "Friends4, Mask, FriendMask, EnemyMask FROM faction_template ORDER BY ID DESC", CONNECTION_SYNCH); + // Gameobjects.db2 PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, Data1, " "Data2, Data3, Data4, Data5, Data6, Data7, Data8, Name, MapID, DisplayID, PhaseID, PhaseGroupID, PhaseUseFlags, Type FROM gameobjects" @@ -210,12 +249,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO, "SELECT ID, FileDataID, GeoBoxMinX, GeoBoxMinY, GeoBoxMinZ, GeoBoxMaxX, GeoBoxMaxY, " "GeoBoxMaxZ, OverrideLootEffectScale, OverrideNameScale, ObjectEffectPackageID FROM gameobject_display_info ORDER BY ID DESC", CONNECTION_SYNCH); - // GameTables.db2 - PrepareStatement(HOTFIX_SEL_GAME_TABLES, "SELECT ID, Name, NumRows, NumColumns FROM game_tables ORDER BY ID DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_GAME_TABLES, "SELECT ID, Name_lang FROM game_tables_locale WHERE locale = ?", CONNECTION_SYNCH); - // GarrAbility.db2 - PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name, Description, IconFileDataID, OtherFactionGarrAbilityID, Flags, GarrAbilityCategoryID, " + PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name, Description, IconFileDataID, Flags, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " "FollowerTypeID FROM garr_ability ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name_lang, Description_lang FROM garr_ability_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -232,7 +267,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() "GarrSiteLevelPlotInstID, GarrBuildingID FROM garr_building_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); // GarrClassSpec.db2 - PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, Unknown700" + PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, `Limit`, Flags" " FROM garr_class_spec ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -241,8 +276,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeCreatureID, AllianceCreatureID, HordeSourceText, AllianceSourceText, " "HordePortraitIconID, AlliancePortraitIconID, ItemLevelWeapon, ItemLevelArmor, FollowerTypeID, HordeUiAnimRaceInfoID, " "AllianceUiAnimRaceInfoID, Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, Level, " - "Unknown1, Flags, Unknown2, Unknown3, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, GarrTypeID FROM garr_follower" - " ORDER BY ID DESC", CONNECTION_SYNCH); + "Unknown1, Flags, Unknown2, Unknown3, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, GarrTypeID, MaxDurability, Class" + " FROM garr_follower ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeSourceText_lang, AllianceSourceText_lang FROM garr_follower_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrFollowerXAbility.db2 @@ -250,8 +285,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // GarrPlot.db2 - PrepareStatement(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, GarrPlotUICategoryID, " - "PlotType, Flags, MinCount, MaxCount FROM garr_plot ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, MinCount, MaxCount, " + "GarrPlotUICategoryID, PlotType, Flags FROM garr_plot ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name_lang FROM garr_plot_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrPlotBuilding.db2 @@ -270,15 +305,14 @@ void HotfixDatabaseConnection::DoPrepareStatements() " FROM garr_site_level_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); // GemProperties.db2 - PrepareStatement(HOTFIX_SEL_GEM_PROPERTIES, "SELECT ID, Type, EnchantID, MinItemLevel, MaxCountInv, MaxCountItem FROM gem_properties" - " ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GEM_PROPERTIES, "SELECT ID, Type, EnchantID, MinItemLevel FROM gem_properties ORDER BY ID DESC", CONNECTION_SYNCH); // GlyphProperties.db2 PrepareStatement(HOTFIX_SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, SpellIconID, Type, GlyphExclusiveCategoryID FROM glyph_properties" " ORDER BY ID DESC", CONNECTION_SYNCH); // GlyphSlot.db2 - PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Type, Tooltip FROM glyph_slot ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Tooltip, Type FROM glyph_slot ORDER BY ID DESC", CONNECTION_SYNCH); // GuildColorBackground.db2 PrepareStatement(HOTFIX_SEL_GUILD_COLOR_BACKGROUND, "SELECT ID, Red, Green, Blue FROM guild_color_background ORDER BY ID DESC", CONNECTION_SYNCH); @@ -290,7 +324,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GUILD_COLOR_EMBLEM, "SELECT ID, Red, Green, Blue FROM guild_color_emblem ORDER BY ID DESC", CONNECTION_SYNCH); // GuildPerkSpells.db2 - PrepareStatement(HOTFIX_SEL_GUILD_PERK_SPELLS, "SELECT ID, SpellID, GuildLevel FROM guild_perk_spells ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GUILD_PERK_SPELLS, "SELECT ID, SpellID FROM guild_perk_spells ORDER BY ID DESC", CONNECTION_SYNCH); // Heirloom.db2 PrepareStatement(HOTFIX_SEL_HEIRLOOM, "SELECT ID, ItemID, SourceText, OldItem1, OldItem2, NextDifficultyItemID, UpgradeItemID1, UpgradeItemID2, " @@ -322,7 +356,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() " FROM item ORDER BY ID DESC", CONNECTION_SYNCH); // ItemAppearance.db2 - PrepareStatement(HOTFIX_SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID, ObjectComponentSlot FROM item_appearance ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID, UIOrder, ObjectComponentSlot FROM item_appearance" + " ORDER BY ID DESC", CONNECTION_SYNCH); // ItemArmorQuality.db2 PrepareStatement(HOTFIX_SEL_ITEM_ARMOR_QUALITY, "SELECT ID, QualityMod1, QualityMod2, QualityMod3, QualityMod4, QualityMod5, QualityMod6, " @@ -393,8 +428,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_LIMIT_CATEGORY, "SELECT ID, Name_lang FROM item_limit_category_locale WHERE locale = ?", CONNECTION_SYNCH); // ItemModifiedAppearance.db2 - PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceID, AppearanceModID, `Index` FROM item_modified_appearance" - " ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceID, AppearanceModID, `Index`, SourceType" + " FROM item_modified_appearance ORDER BY ID DESC", CONNECTION_SYNCH); // ItemPriceBase.db2 PrepareStatement(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT ID, ArmorFactor, WeaponFactor, ItemLevel FROM item_price_base ORDER BY ID DESC", CONNECTION_SYNCH); @@ -411,7 +446,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() // ItemSet.db2 PrepareStatement(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " - "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, RequiredSkillRank, RequiredSkill FROM item_set" + "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, Unknown703, RequiredSkillRank, RequiredSkill FROM item_set" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name_lang FROM item_set_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -431,7 +466,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() "HolidayID, ItemNameDescriptionID, Quality, BuyCount, InventoryType, RequiredLevel, RequiredHonorRank, RequiredCityRank, " "RequiredReputationRank, ContainerSlots, ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, ItemStatType5, ItemStatType6, " "ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, DamageType, Bonding, LanguageID, PageMaterial, Material, Sheath, TotemCategory, " - "SocketColor1, SocketColor2, SocketColor3, CurrencySubstitutionID, CurrencySubstitutionCount, ArtifactID FROM item_sparse ORDER BY ID DESC", CONNECTION_SYNCH); + "SocketColor1, SocketColor2, SocketColor3, CurrencySubstitutionID, CurrencySubstitutionCount, ArtifactID, RequiredExpansion FROM item_sparse" + " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -442,9 +478,6 @@ void HotfixDatabaseConnection::DoPrepareStatements() // ItemSpecOverride.db2 PrepareStatement(HOTFIX_SEL_ITEM_SPEC_OVERRIDE, "SELECT ID, ItemID, SpecID FROM item_spec_override ORDER BY ID DESC", CONNECTION_SYNCH); - // ItemToBattlePetSpecies.db2 - PrepareStatement(HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES, "SELECT ID, BattlePetSpeciesID FROM item_to_battle_pet_species ORDER BY ID DESC", CONNECTION_SYNCH); - // ItemXBonusTree.db2 PrepareStatement(HOTFIX_SEL_ITEM_X_BONUS_TREE, "SELECT ID, ItemID, BonusTreeID FROM item_x_bonus_tree ORDER BY ID DESC", CONNECTION_SYNCH); @@ -453,6 +486,25 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Key15, Key16, Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM key_chain" " ORDER BY ID DESC", CONNECTION_SYNCH); + // LfgDungeons.db2 + PrepareStatement(HOTFIX_SEL_LFG_DUNGEONS, "SELECT ID, Name, Flags, TextureFilename, Description, MaxLevel, TargetLevelMax, MapID, RandomID, " + "ScenarioID, LastBossJournalEncounterID, BonusReputationAmount, MentorItemLevel, MinLevel, TargetLevel, TargetLevelMin, DifficultyID, Type, " + "Faction, Expansion, OrderIndex, GroupID, CountTank, CountHealer, CountDamage, MinCountTank, MinCountHealer, MinCountDamage, SubType, " + "MentorCharLevel FROM lfg_dungeons ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_LFG_DUNGEONS, "SELECT ID, Name_lang, Description_lang FROM lfg_dungeons_locale WHERE locale = ?", CONNECTION_SYNCH); + + // Light.db2 + PrepareStatement(HOTFIX_SEL_LIGHT, "SELECT ID, PosX, PosY, PosZ, FalloffStart, FalloffEnd, MapID, LightParamsID1, LightParamsID2, LightParamsID3, " + "LightParamsID4, LightParamsID5, LightParamsID6, LightParamsID7, LightParamsID8 FROM light ORDER BY ID DESC", CONNECTION_SYNCH); + + // LiquidType.db2 + PrepareStatement(HOTFIX_SEL_LIQUID_TYPE, "SELECT ID, Name, SpellID, MaxDarkenDepth, FogDarkenIntensity, AmbDarkenIntensity, DirDarkenIntensity, " + "ParticleScale, Texture1, Texture2, Texture3, Texture4, Texture5, Texture6, Color1, Color2, Float1, Float2, Float3, `Float4`, Float5, Float6, " + "Float7, `Float8`, Float9, Float10, Float11, Float12, Float13, Float14, Float15, Float16, Float17, Float18, `Int1`, `Int2`, `Int3`, `Int4`, Flags, " + "SoundID, Type, LightID, ParticleMovement, ParticleTexSlots, MaterialID, DepthTexCount1, DepthTexCount2, DepthTexCount3, DepthTexCount4, " + "DepthTexCount5, DepthTexCount6 FROM liquid_type ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_LIQUID_TYPE, "SELECT ID, Name_lang FROM liquid_type_locale WHERE locale = ?", CONNECTION_SYNCH); + // Lock.db2 PrepareStatement(HOTFIX_SEL_LOCK, "SELECT ID, Index1, Index2, Index3, Index4, Index5, Index6, Index7, Index8, Skill1, Skill2, Skill3, Skill4, " "Skill5, Skill6, Skill7, Skill8, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Action1, Action2, Action3, Action4, Action5, " @@ -463,11 +515,16 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?", CONNECTION_SYNCH); // Map.db2 - PrepareStatement(HOTFIX_SEL_MAP, "SELECT ID, Directory, Flags, MapType, MinimapIconScale, CorpsePosX, CorpsePosY, RaidOffset, MapName, " - "MapDescription0, MapDescription1, AreaTableID, LoadingScreenID, CorpseMapID, TimeOfDayOverride, ParentMapID, CosmeticParentMapID, " - "InstanceType, unk5, ExpansionID, MaxPlayers, TimeOffset FROM map ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MAP, "SELECT ID, Directory, Flags, MapType, MinimapIconScale, CorpsePosX, CorpsePosY, MapName, MapDescription0, " + "MapDescription1, AreaTableID, LoadingScreenID, CorpseMapID, TimeOfDayOverride, ParentMapID, CosmeticParentMapID, InstanceType, unk5, " + "ExpansionID, MaxPlayers, TimeOffset FROM map ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang FROM map_locale WHERE locale = ?", CONNECTION_SYNCH); + // MapDifficulty.db2 + PrepareStatement(HOTFIX_SEL_MAP_DIFFICULTY, "SELECT ID, Message, Context, MapID, DifficultyID, RaidDurationType, MaxPlayers, LockID, " + "ItemBonusTreeModID FROM map_difficulty ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP_DIFFICULTY, "SELECT ID, Message_lang FROM map_difficulty_locale WHERE locale = ?", CONNECTION_SYNCH); + // ModifierTree.db2 PrepareStatement(HOTFIX_SEL_MODIFIER_TREE, "SELECT ID, Asset1, Asset2, Parent, Type, Unk700, Operator, Amount FROM modifier_tree ORDER BY ID DESC", CONNECTION_SYNCH); @@ -477,8 +534,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_MOUNT, "SELECT ID, Name_lang, Description_lang, SourceDescription_lang FROM mount_locale WHERE locale = ?", CONNECTION_SYNCH); // MountCapability.db2 - PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, RequiredMap, Flags, " - "RequiredAura FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, RequiredAura, RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, " + "RequiredMap, Flags FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH); // MountTypeXCapability.db2 PrepareStatement(HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, MountCapabilityID, OrderIndex FROM mount_type_x_capability" @@ -548,7 +605,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_QUEST_PACKAGE_ITEM, "SELECT ID, ItemID, QuestPackageID, ItemCount, FilterType FROM quest_package_item ORDER BY ID DESC", CONNECTION_SYNCH); // QuestSort.db2 - PrepareStatement(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName FROM quest_sort ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName, SortOrder FROM quest_sort ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName_lang FROM quest_sort_locale WHERE locale = ?", CONNECTION_SYNCH); // QuestV2.db2 @@ -579,13 +636,13 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // SkillRaceClassInfo.db2 - PrepareStatement(HOTFIX_SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, ClassMask, Flags, SkillTierID, Availability, MinLevel" + PrepareStatement(HOTFIX_SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, ClassMask, SkillID, Flags, SkillTierID, Availability, MinLevel" " FROM skill_race_class_info ORDER BY ID DESC", CONNECTION_SYNCH); // SoundKit.db2 - PrepareStatement(HOTFIX_SEL_SOUND_KIT, "SELECT ID, SoundType, Name, VolumeFloat, MinDistance, DistanceCutoff, VolumeVariationPlus, " - "VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, PitchAdjust, Flags, SoundEntriesAdvancedID, EAXDef, DialogType, " - "BusOverwriteID, Unk700 FROM sound_kit ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SOUND_KIT, "SELECT ID, Name, VolumeFloat, MinDistance, DistanceCutoff, VolumeVariationPlus, VolumeVariationMinus, " + "PitchVariationPlus, PitchVariationMinus, PitchAdjust, Flags, SoundEntriesAdvancedID, BusOverwriteID, SoundType, EAXDef, DialogType, Unk700" + " FROM sound_kit ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SOUND_KIT, "SELECT ID, Name_lang FROM sound_kit_locale WHERE locale = ?", CONNECTION_SYNCH); // SpecializationSpells.db2 @@ -620,7 +677,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() "DispelType, Mechanic, PreventionType FROM spell_categories ORDER BY ID DESC", CONNECTION_SYNCH); // SpellCategory.db2 - PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges FROM spell_category" + PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Unk703, Flags, UsesPerWeek, MaxCharges FROM spell_category" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name_lang FROM spell_category_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -658,6 +715,13 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_SPELL_INTERRUPTS, "SELECT ID, SpellID, AuraInterruptFlags1, AuraInterruptFlags2, ChannelInterruptFlags1, " "ChannelInterruptFlags2, InterruptFlags, DifficultyID FROM spell_interrupts ORDER BY ID DESC", CONNECTION_SYNCH); + // SpellItemEnchantment.db2 + PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, EffectSpellID1, EffectSpellID2, EffectSpellID3, Name, EffectScalingPoints1, " + "EffectScalingPoints2, EffectScalingPoints3, PlayerConditionID, TransmogCost, TextureFileDataID, EffectPointsMin1, EffectPointsMin2, " + "EffectPointsMin3, ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ConditionID, " + "MinLevel, MaxLevel, ScalingClass, ScalingClassRestricted FROM spell_item_enchantment ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name_lang FROM spell_item_enchantment_locale WHERE locale = ?", CONNECTION_SYNCH); + // SpellItemEnchantmentCondition.db2 PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT ID, LTOperandType1, LTOperandType2, LTOperandType3, LTOperandType4, " "LTOperandType5, LTOperand1, LTOperand2, LTOperand3, LTOperand4, LTOperand5, Operator1, Operator2, Operator3, Operator4, Operator5, " @@ -682,8 +746,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() " FROM spell_power ORDER BY ID DESC", CONNECTION_SYNCH); // SpellPowerDifficulty.db2 - PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT ID, SpellPowerID, DifficultyID, PowerIndex FROM spell_power_difficulty" - " ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT SpellPowerID, DifficultyID, PowerIndex FROM spell_power_difficulty" + " ORDER BY SpellPowerID DESC", CONNECTION_SYNCH); // SpellProcsPerMinute.db2 PrepareStatement(HOTFIX_SEL_SPELL_PROCS_PER_MINUTE, "SELECT ID, BaseProcRate, Flags FROM spell_procs_per_minute ORDER BY ID DESC", CONNECTION_SYNCH); @@ -706,8 +770,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellScaling.db2 - PrepareStatement(HOTFIX_SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, ScalingClass, MaxScalingLevel FROM spell_scaling" - " ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, ScalingClass, MinScalingLevel, MaxScalingLevel" + " FROM spell_scaling ORDER BY ID DESC", CONNECTION_SYNCH); // SpellShapeshift.db2 PrepareStatement(HOTFIX_SEL_SPELL_SHAPESHIFT, "SELECT ID, SpellID, ShapeshiftExclude1, ShapeshiftExclude2, ShapeshiftMask1, ShapeshiftMask2, " @@ -735,6 +799,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() // SummonProperties.db2 PrepareStatement(HOTFIX_SEL_SUMMON_PROPERTIES, "SELECT ID, Category, Faction, Type, Slot, Flags FROM summon_properties ORDER BY ID DESC", CONNECTION_SYNCH); + // Talent.db2 + PrepareStatement(HOTFIX_SEL_TALENT, "SELECT ID, SpellID, OverridesSpellID, Description, SpecID, TierID, ColumnIndex, Flags, CategoryMask1, " + "CategoryMask2, ClassID FROM talent ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_TALENT, "SELECT ID, Description_lang FROM talent_locale WHERE locale = ?", CONNECTION_SYNCH); + // TaxiNodes.db2 PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, MapID, " "ConditionID, LearnableIndex, Flags FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH); @@ -769,24 +838,45 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" " WHERE locale = ?", CONNECTION_SYNCH); + // Vehicle.db2 + PrepareStatement(HOTFIX_SEL_VEHICLE, "SELECT ID, Flags, TurnSpeed, PitchSpeed, PitchMin, PitchMax, MouseLookOffsetPitch, CameraFadeDistScalarMin, " + "CameraFadeDistScalarMax, CameraPitchOffset, FacingLimitRight, FacingLimitLeft, MsslTrgtTurnLingering, MsslTrgtPitchLingering, " + "MsslTrgtMouseLingering, MsslTrgtEndOpacity, MsslTrgtArcSpeed, MsslTrgtArcRepeat, MsslTrgtArcWidth, MsslTrgtImpactRadius1, " + "MsslTrgtImpactRadius2, MsslTrgtArcTexture, MsslTrgtImpactTexture, MsslTrgtImpactModel1, MsslTrgtImpactModel2, CameraYawOffset, " + "MsslTrgtImpactTexRadius, SeatID1, SeatID2, SeatID3, SeatID4, SeatID5, SeatID6, SeatID7, SeatID8, VehicleUIIndicatorID, PowerDisplayID1, " + "PowerDisplayID2, PowerDisplayID3, FlagsB, UILocomotionType FROM vehicle ORDER BY ID DESC", CONNECTION_SYNCH); + // VehicleSeat.db2 PrepareStatement(HOTFIX_SEL_VEHICLE_SEAT, "SELECT ID, Flags1, Flags2, Flags3, AttachmentOffsetX, AttachmentOffsetY, AttachmentOffsetZ, " "EnterPreDelay, EnterSpeed, EnterGravity, EnterMinDuration, EnterMaxDuration, EnterMinArcHeight, EnterMaxArcHeight, ExitPreDelay, ExitSpeed, " "ExitGravity, ExitMinDuration, ExitMaxDuration, ExitMinArcHeight, ExitMaxArcHeight, PassengerYaw, PassengerPitch, PassengerRoll, " - "VehicleEnterAnimDelay, VehicleExitAnimDelay, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, CameraExitingDuration, " - "CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, CameraSeatZoomMin, " - "CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, RideUpperAnimLoop, " - "ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterUISoundID, ExitUISoundID, " - "EnterAnimKitID, RideAnimKitID, ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, " + "VehicleEnterAnimDelay, VehicleExitAnimDelay, EnterUISoundID, ExitUISoundID, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, " + "CameraExitingDuration, CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, " + "CameraSeatZoomMin, CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, " + "RideUpperAnimLoop, ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterAnimKitID, " + "RideAnimKitID, ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, " "PassengerAttachmentID, VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay FROM vehicle_seat" " ORDER BY ID DESC", CONNECTION_SYNCH); + // WmoAreaTable.db2 + PrepareStatement(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT ID, WMOGroupID, AreaName, WMOID, AmbienceID, ZoneMusic, IntroSound, AreaTableID, " + "UWIntroSound, UWAmbience, NameSet, SoundProviderPref, SoundProviderPrefUnderwater, Flags, UWZoneMusic FROM wmo_area_table ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT ID, AreaName_lang FROM wmo_area_table_locale WHERE locale = ?", CONNECTION_SYNCH); + + // WorldMapArea.db2 + PrepareStatement(HOTFIX_SEL_WORLD_MAP_AREA, "SELECT ID, AreaName, LocLeft, LocRight, LocTop, LocBottom, MapID, AreaID, DisplayMapID, " + "DefaultDungeonFloor, ParentWorldMapID, Flags, PlayerConditionID, LevelRangeMin, LevelRangeMax FROM world_map_area ORDER BY ID DESC", CONNECTION_SYNCH); + // WorldMapOverlay.db2 PrepareStatement(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName, MapAreaID, AreaID1, AreaID2, AreaID3, AreaID4, TextureWidth, " - "TextureHeight, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID FROM world_map_overlay" + "TextureHeight, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID, Flags FROM world_map_overlay" " ORDER BY ID DESC", CONNECTION_SYNCH); // WorldMapTransforms.db2 PrepareStatement(HOTFIX_SEL_WORLD_MAP_TRANSFORMS, "SELECT ID, RegionMinX, RegionMinY, RegionMinZ, RegionMaxX, RegionMaxY, RegionMaxZ, " "RegionOffsetX, RegionOffsetY, RegionScale, MapID, NewMapID, NewDungeonMapID, NewAreaID, Flags FROM world_map_transforms ORDER BY ID DESC", CONNECTION_SYNCH); + + // WorldSafeLocs.db2 + PrepareStatement(HOTFIX_SEL_WORLD_SAFE_LOCS, "SELECT ID, LocX, LocY, LocZ, Facing, AreaName, MapID FROM world_safe_locs ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_WORLD_SAFE_LOCS, "SELECT ID, AreaName_lang FROM world_safe_locs_locale WHERE locale = ?", CONNECTION_SYNCH); } diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 0c915c06b92..f9ef5610ca3 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -51,6 +51,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_BANK_BAG_SLOT_PRICES, + HOTFIX_SEL_BANNED_ADDONS, + HOTFIX_SEL_BARBER_SHOP_STYLE, HOTFIX_SEL_BARBER_SHOP_STYLE_LOCALE, @@ -63,9 +65,14 @@ enum HotfixDatabaseStatements HOTFIX_SEL_BATTLE_PET_SPECIES_STATE, + HOTFIX_SEL_BATTLEMASTER_LIST, + HOTFIX_SEL_BATTLEMASTER_LIST_LOCALE, + HOTFIX_SEL_BROADCAST_TEXT, HOTFIX_SEL_BROADCAST_TEXT_LOCALE, + HOTFIX_SEL_CHAR_SECTIONS, + HOTFIX_SEL_CHAR_START_OUTFIT, HOTFIX_SEL_CHAR_TITLES, @@ -74,6 +81,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_CHAT_CHANNELS, HOTFIX_SEL_CHAT_CHANNELS_LOCALE, + HOTFIX_SEL_CHR_CLASSES, + HOTFIX_SEL_CHR_CLASSES_LOCALE, + HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, HOTFIX_SEL_CHR_RACES, @@ -91,6 +101,8 @@ enum HotfixDatabaseStatements HOTFIX_SEL_CREATURE_FAMILY, HOTFIX_SEL_CREATURE_FAMILY_LOCALE, + HOTFIX_SEL_CREATURE_MODEL_DATA, + HOTFIX_SEL_CREATURE_TYPE, HOTFIX_SEL_CREATURE_TYPE_LOCALE, @@ -123,14 +135,16 @@ enum HotfixDatabaseStatements HOTFIX_SEL_EMOTES_TEXT_SOUND, + HOTFIX_SEL_FACTION, + HOTFIX_SEL_FACTION_LOCALE, + + HOTFIX_SEL_FACTION_TEMPLATE, + HOTFIX_SEL_GAMEOBJECTS, HOTFIX_SEL_GAMEOBJECTS_LOCALE, HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO, - HOTFIX_SEL_GAME_TABLES, - HOTFIX_SEL_GAME_TABLES_LOCALE, - HOTFIX_SEL_GARR_ABILITY, HOTFIX_SEL_GARR_ABILITY_LOCALE, @@ -249,12 +263,18 @@ enum HotfixDatabaseStatements HOTFIX_SEL_ITEM_SPEC_OVERRIDE, - HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES, - HOTFIX_SEL_ITEM_X_BONUS_TREE, HOTFIX_SEL_KEY_CHAIN, + HOTFIX_SEL_LFG_DUNGEONS, + HOTFIX_SEL_LFG_DUNGEONS_LOCALE, + + HOTFIX_SEL_LIGHT, + + HOTFIX_SEL_LIQUID_TYPE, + HOTFIX_SEL_LIQUID_TYPE_LOCALE, + HOTFIX_SEL_LOCK, HOTFIX_SEL_MAIL_TEMPLATE, @@ -263,6 +283,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_MAP, HOTFIX_SEL_MAP_LOCALE, + HOTFIX_SEL_MAP_DIFFICULTY, + HOTFIX_SEL_MAP_DIFFICULTY_LOCALE, + HOTFIX_SEL_MODIFIER_TREE, HOTFIX_SEL_MOUNT, @@ -359,6 +382,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_SPELL_INTERRUPTS, + HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, + HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_LOCALE, + HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, HOTFIX_SEL_SPELL_LEARN_SPELL, @@ -397,6 +423,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_SUMMON_PROPERTIES, + HOTFIX_SEL_TALENT, + HOTFIX_SEL_TALENT_LOCALE, + HOTFIX_SEL_TAXI_NODES, HOTFIX_SEL_TAXI_NODES_LOCALE, @@ -417,12 +446,22 @@ enum HotfixDatabaseStatements HOTFIX_SEL_UNIT_POWER_BAR, HOTFIX_SEL_UNIT_POWER_BAR_LOCALE, + HOTFIX_SEL_VEHICLE, + HOTFIX_SEL_VEHICLE_SEAT, + HOTFIX_SEL_WMO_AREA_TABLE, + HOTFIX_SEL_WMO_AREA_TABLE_LOCALE, + + HOTFIX_SEL_WORLD_MAP_AREA, + HOTFIX_SEL_WORLD_MAP_OVERLAY, HOTFIX_SEL_WORLD_MAP_TRANSFORMS, + HOTFIX_SEL_WORLD_SAFE_LOCS, + HOTFIX_SEL_WORLD_SAFE_LOCS_LOCALE, + MAX_HOTFIXDATABASE_STATEMENTS }; diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index c9aa3a7966a..55728de5bd1 100644 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -18,7 +18,7 @@ #include "AddonMgr.h" #include "DatabaseEnv.h" -#include "DBCStores.h" +#include "DB2Stores.h" #include "Log.h" #include "Timer.h" diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 3e2ec0ef7ff..53cc4d57033 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -23,7 +23,6 @@ #include "WorldPacket.h" #include "WorldSession.h" #include "DatabaseEnv.h" -#include "DBCStores.h" #include "ScriptMgr.h" #include "AccountMgr.h" #include "AuctionHouseMgr.h" diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 160cab40771..233459de97b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -21,7 +21,6 @@ #include "Common.h" #include "DatabaseEnv.h" -#include "DBCStructure.h" #include "ObjectGuid.h" #include "AuctionHousePackets.h" #include diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index d7e17b266f3..d5d5816f4c1 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -16,7 +16,6 @@ */ #include "Log.h" -#include "DBCStores.h" #include "ObjectMgr.h" #include "AuctionHouseMgr.h" #include "AuctionHouseBotSeller.h" diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index a35d9d3ad5a..8585aa42a03 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -446,7 +446,7 @@ bool BattlegroundMgr::CreateBattleground(BattlegroundTemplate const* bgTemplate) } bg->SetMapId(bgTemplate->BattlemasterEntry->MapID[0]); - bg->SetName(bgTemplate->BattlemasterEntry->Name_lang); + bg->SetName(bgTemplate->BattlemasterEntry->Name->Str[sWorld->GetDefaultDbcLocale()]); bg->SetInstanceID(0); bg->SetArenaorBGType(bgTemplate->IsArena()); bg->SetMinPlayersPerTeam(bgTemplate->MinPlayersPerTeam); diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index c11c25219a5..483981261be 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -19,7 +19,6 @@ #include "SpellMgr.h" #include "ObjectMgr.h" #include "SpellInfo.h" -#include "DBCStores.h" #include "AchievementMgr.h" // Supported shift-links (client generated and server side) diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 0265a4c05b2..4da808c83e5 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -19,7 +19,6 @@ #include "HostileRefManager.h" #include "ThreatManager.h" #include "Unit.h" -#include "DBCStructure.h" #include "SpellInfo.h" HostileRefManager::~HostileRefManager() diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index 62d5ecfa88a..21957198bac 100644 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -144,11 +144,11 @@ void LoadDisables() break; case MAP_INSTANCE: case MAP_RAID: - if (flags & DUNGEON_STATUSFLAG_HEROIC && !GetMapDifficultyData(entry, DIFFICULTY_HEROIC)) + if (flags & DUNGEON_STATUSFLAG_HEROIC && !sDB2Manager.GetMapDifficultyData(entry, DIFFICULTY_HEROIC)) flags -= DUNGEON_STATUSFLAG_HEROIC; - if (flags & RAID_STATUSFLAG_10MAN_HEROIC && !GetMapDifficultyData(entry, DIFFICULTY_10_HC)) + if (flags & RAID_STATUSFLAG_10MAN_HEROIC && !sDB2Manager.GetMapDifficultyData(entry, DIFFICULTY_10_HC)) flags -= RAID_STATUSFLAG_10MAN_HEROIC; - if (flags & RAID_STATUSFLAG_25MAN_HEROIC && !GetMapDifficultyData(entry, DIFFICULTY_25_HC)) + if (flags & RAID_STATUSFLAG_25MAN_HEROIC && !sDB2Manager.GetMapDifficultyData(entry, DIFFICULTY_25_HC)) flags -= RAID_STATUSFLAG_25MAN_HEROIC; if (!flags) isFlagInvalid = true; @@ -334,7 +334,7 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags { uint8 disabledModes = itr->second.flags; Difficulty targetDifficulty = player->GetDifficultyID(mapEntry); - GetDownscaledMapDifficultyData(entry, targetDifficulty); + sDB2Manager.GetDownscaledMapDifficultyData(entry, targetDifficulty); switch (targetDifficulty) { case DIFFICULTY_NORMAL: diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index f985a266e29..7899b4ada83 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -18,8 +18,8 @@ #include "DB2Stores.h" #include "Common.h" #include "Containers.h" -#include "DBCStores.h" #include "DB2fmt.h" +#include "HotfixDatabase.h" #include "Log.h" #include "TransportMgr.h" #include "World.h" @@ -32,15 +32,19 @@ DB2Storage sAreaTriggerStore("AreaTrigger.d DB2Storage sArmorLocationStore("ArmorLocation.db2", ArmorLocationFormat, HOTFIX_SEL_ARMOR_LOCATION); DB2Storage sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE); DB2Storage sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesFormat, HOTFIX_SEL_BANK_BAG_SLOT_PRICES); +DB2Storage sBannedAddOnsStore("BannedAddOns.db2", BannedAddOnsFormat, HOTFIX_SEL_BANNED_ADDONS); DB2Storage sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleFormat, HOTFIX_SEL_BARBER_SHOP_STYLE); DB2Storage sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityFormat, HOTFIX_SEL_BATTLE_PET_BREED_QUALITY); DB2Storage sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateFormat, HOTFIX_SEL_BATTLE_PET_BREED_STATE); DB2Storage sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesFormat, HOTFIX_SEL_BATTLE_PET_SPECIES); DB2Storage sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateFormat, HOTFIX_SEL_BATTLE_PET_SPECIES_STATE); +DB2Storage sBattlemasterListStore("BattlemasterList.db2", BattlemasterListFormat, HOTFIX_SEL_BATTLEMASTER_LIST); DB2Storage sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); -DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsFormat, HOTFIX_SEL_CHAT_CHANNELS); +DB2Storage sCharSectionsStore("CharSections.db2", CharSectionsFormat, HOTFIX_SEL_CHAR_SECTIONS); DB2Storage sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT); DB2Storage sCharTitlesStore("CharTitles.db2", CharTitlesFormat, HOTFIX_SEL_CHAR_TITLES); +DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsFormat, HOTFIX_SEL_CHAT_CHANNELS); +DB2Storage sChrClassesStore("ChrClasses.db2", ChrClassesFormat, HOTFIX_SEL_CHR_CLASSES); DB2Storage sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); DB2Storage sChrRacesStore("ChrRaces.db2", ChrRacesFormat, HOTFIX_SEL_CHR_RACES); DB2Storage sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationFormat, HOTFIX_SEL_CHR_SPECIALIZATION); @@ -48,6 +52,7 @@ DB2Storage sCinematicSequencesStore("Cinema DB2Storage sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO); DB2Storage sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA); DB2Storage sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyFormat, HOTFIX_SEL_CREATURE_FAMILY); +DB2Storage sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataFormat, HOTFIX_SEL_CREATURE_MODEL_DATA); DB2Storage sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE); DB2Storage sCriteriaStore("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA); DB2Storage sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE); @@ -61,9 +66,10 @@ DB2Storage sDurabilityQualityStore("Durabil DB2Storage sEmotesStore("Emotes.db2", EmotesFormat, HOTFIX_SEL_EMOTES); DB2Storage sEmotesTextStore("EmotesText.db2", EmotesTextFormat, HOTFIX_SEL_EMOTES_TEXT); DB2Storage sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundFormat, HOTFIX_SEL_EMOTES_TEXT_SOUND); +DB2Storage sFactionStore("Faction.db2", FactionFormat, HOTFIX_SEL_FACTION); +DB2Storage sFactionTemplateStore("FactionTemplate.db2", FactionTemplateFormat, HOTFIX_SEL_FACTION_TEMPLATE); DB2Storage sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); DB2Storage sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoFormat, HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO); -DB2Storage sGameTablesStore("GameTables.db2", GameTablesFormat, HOTFIX_SEL_GAME_TABLES); DB2Storage sGarrAbilityStore("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY); DB2Storage sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING); DB2Storage sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST); @@ -116,12 +122,15 @@ DB2Storage sItemSetSpellStore("ItemSetSpell DB2SparseStorage sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE); DB2Storage sItemSpecStore("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC); DB2Storage sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideFormat, HOTFIX_SEL_ITEM_SPEC_OVERRIDE); -DB2Storage sItemToBattlePetSpeciesStore("ItemToBattlePetSpecies.db2", ItemToBattlePetSpeciesFormat, HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES); DB2Storage sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE); DB2Storage sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); +DB2Storage sLfgDungeonsStore("LfgDungeons.db2", LfgDungeonsFormat, HOTFIX_SEL_LFG_DUNGEONS); +DB2Storage sLightStore("Light.db2", LightFormat, HOTFIX_SEL_LIGHT); +DB2Storage sLiquidTypeStore("LiquidType.db2", LiquidTypeFormat, HOTFIX_SEL_LIQUID_TYPE); DB2Storage sLockStore("Lock.db2", LockFormat, HOTFIX_SEL_LOCK); DB2Storage sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE); DB2Storage sMapStore("Map.db2", MapFormat, HOTFIX_SEL_MAP); +DB2Storage sMapDifficultyStore("MapDifficulty.db2", MapDifficultyFormat, HOTFIX_SEL_MAP_DIFFICULTY); DB2Storage sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE); DB2Storage sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY); DB2Storage sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT); @@ -165,6 +174,7 @@ DB2Storage sSpellEffectScalingStore("SpellE DB2Storage sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsFormat, HOTFIX_SEL_SPELL_EQUIPPED_ITEMS); DB2Storage sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectFormat, HOTFIX_SEL_SPELL_FOCUS_OBJECT); DB2Storage sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsFormat, HOTFIX_SEL_SPELL_INTERRUPTS); +DB2Storage sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT); DB2Storage sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); DB2Storage sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL); DB2Storage sSpellLevelsStore("SpellLevels.db2", SpellLevelsFormat, HOTFIX_SEL_SPELL_LEVELS); @@ -183,6 +193,7 @@ DB2Storage sSpellTargetRestrictionsStore("S DB2Storage sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS); DB2Storage sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL); DB2Storage sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesFormat, HOTFIX_SEL_SUMMON_PROPERTIES); +DB2Storage sTalentStore("Talent.db2", TalentFormat, HOTFIX_SEL_TALENT); DB2Storage sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES); DB2Storage sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH); DB2Storage sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE); @@ -191,9 +202,13 @@ DB2Storage sToyStore("Toy.db2", ToyFormat, DB2Storage sTransportAnimationStore("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION); DB2Storage sTransportRotationStore("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION); DB2Storage sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR); +DB2Storage sVehicleStore("Vehicle.db2", VehicleFormat, HOTFIX_SEL_VEHICLE); DB2Storage sVehicleSeatStore("VehicleSeat.db2", VehicleSeatFormat, HOTFIX_SEL_VEHICLE_SEAT); +DB2Storage sWMOAreaTableStore("WMOAreaTable.db2", WMOAreaTableFormat, HOTFIX_SEL_WMO_AREA_TABLE); +DB2Storage sWorldMapAreaStore("WorldMapArea.db2", WorldMapAreaFormat, HOTFIX_SEL_WORLD_MAP_AREA); DB2Storage sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY); DB2Storage sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsFormat, HOTFIX_SEL_WORLD_MAP_TRANSFORMS); +DB2Storage sWorldSafeLocsStore("WorldSafeLocs.db2", WorldSafeLocsFormat, HOTFIX_SEL_WORLD_SAFE_LOCS); TaxiMask sTaxiNodesMask; TaxiMask sOldContinentsNodesMask; @@ -216,7 +231,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D ++DB2FilesCount; -#define EXPECTED_DB2_BUILD 20950 +#define EXPECTED_DB2_BUILD 21414 if (storage->Load(db2Path + localeNames[defaultLocale] + '/', defaultLocale)) { @@ -243,7 +258,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D else { // sort problematic db2 to (1) non compatible and (2) nonexistent - if (FILE* f = fopen((db2Path + storage->GetFileName()).c_str(), "rb")) + if (FILE* f = fopen((db2Path + localeNames[defaultLocale] + '/' + storage->GetFileName()).c_str(), "rb")) { std::ostringstream stream; stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << strlen(storage->GetFormat()) @@ -278,21 +293,25 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sAchievementStore); LOAD_DB2(sAnimKitStore); - LOAD_DB2(sArmorLocationStore); LOAD_DB2(sAreaGroupMemberStore); LOAD_DB2(sAreaTableStore); LOAD_DB2(sAreaTriggerStore); + LOAD_DB2(sArmorLocationStore); + LOAD_DB2(sAuctionHouseStore); LOAD_DB2(sBankBagSlotPricesStore); + LOAD_DB2(sBannedAddOnsStore); + LOAD_DB2(sBarberShopStyleStore); LOAD_DB2(sBattlePetBreedQualityStore); LOAD_DB2(sBattlePetBreedStateStore); - LOAD_DB2(sAuctionHouseStore); - LOAD_DB2(sBarberShopStyleStore); LOAD_DB2(sBattlePetSpeciesStore); LOAD_DB2(sBattlePetSpeciesStateStore); + LOAD_DB2(sBattlemasterListStore); LOAD_DB2(sBroadcastTextStore); + LOAD_DB2(sCharSectionsStore); LOAD_DB2(sCharStartOutfitStore); LOAD_DB2(sCharTitlesStore); LOAD_DB2(sChatChannelsStore); + LOAD_DB2(sChrClassesStore); LOAD_DB2(sChrClassesXPowerTypesStore); LOAD_DB2(sChrRacesStore); LOAD_DB2(sChrSpecializationStore); @@ -300,6 +319,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sCreatureDisplayInfoStore); LOAD_DB2(sCreatureDisplayInfoExtraStore); LOAD_DB2(sCreatureFamilyStore); + LOAD_DB2(sCreatureModelDataStore); LOAD_DB2(sCreatureTypeStore); LOAD_DB2(sCriteriaStore); LOAD_DB2(sCriteriaTreeStore); @@ -313,20 +333,21 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sEmotesStore); LOAD_DB2(sEmotesTextStore); LOAD_DB2(sEmotesTextSoundStore); + LOAD_DB2(sFactionStore); + LOAD_DB2(sFactionTemplateStore); LOAD_DB2(sGameObjectsStore); LOAD_DB2(sGameObjectDisplayInfoStore); - LOAD_DB2(sGameTablesStore); LOAD_DB2(sGarrAbilityStore); - LOAD_DB2(sGarrBuildingPlotInstStore); LOAD_DB2(sGarrBuildingStore); + LOAD_DB2(sGarrBuildingPlotInstStore); LOAD_DB2(sGarrClassSpecStore); LOAD_DB2(sGarrFollowerStore); LOAD_DB2(sGarrFollowerXAbilityStore); LOAD_DB2(sGarrPlotBuildingStore); - LOAD_DB2(sGarrPlotInstanceStore); LOAD_DB2(sGarrPlotStore); - LOAD_DB2(sGarrSiteLevelPlotInstStore); + LOAD_DB2(sGarrPlotInstanceStore); LOAD_DB2(sGarrSiteLevelStore); + LOAD_DB2(sGarrSiteLevelPlotInstStore); LOAD_DB2(sGemPropertiesStore); LOAD_DB2(sGlyphPropertiesStore); LOAD_DB2(sGlyphSlotStore); @@ -350,12 +371,13 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sItemClassStore); LOAD_DB2(sItemCurrencyCostStore); LOAD_DB2(sItemDamageAmmoStore); - LOAD_DB2(sItemDamageOneHandCasterStore); LOAD_DB2(sItemDamageOneHandStore); - LOAD_DB2(sItemDamageTwoHandCasterStore); + LOAD_DB2(sItemDamageOneHandCasterStore); LOAD_DB2(sItemDamageTwoHandStore); + LOAD_DB2(sItemDamageTwoHandCasterStore); LOAD_DB2(sItemDisenchantLootStore); LOAD_DB2(sItemEffectStore); + LOAD_DB2(sItemStore); LOAD_DB2(sItemExtendedCostStore); LOAD_DB2(sItemLimitCategoryStore); LOAD_DB2(sItemModifiedAppearanceStore); @@ -365,15 +387,17 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sItemSetStore); LOAD_DB2(sItemSetSpellStore); LOAD_DB2(sItemSparseStore); - LOAD_DB2(sItemSpecOverrideStore); LOAD_DB2(sItemSpecStore); - LOAD_DB2(sItemStore); - LOAD_DB2(sItemToBattlePetSpeciesStore); + LOAD_DB2(sItemSpecOverrideStore); LOAD_DB2(sItemXBonusTreeStore); LOAD_DB2(sKeyChainStore); + LOAD_DB2(sLfgDungeonsStore); + LOAD_DB2(sLightStore); + LOAD_DB2(sLiquidTypeStore); LOAD_DB2(sLockStore); LOAD_DB2(sMailTemplateStore); LOAD_DB2(sMapStore); + LOAD_DB2(sMapDifficultyStore); LOAD_DB2(sModifierTreeStore); LOAD_DB2(sMountCapabilityStore); LOAD_DB2(sMountStore); @@ -395,6 +419,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sQuestSortStore); LOAD_DB2(sQuestV2Store); LOAD_DB2(sQuestXPStore); + LOAD_DB2(sRandPropPointsStore); LOAD_DB2(sScalingStatDistributionStore); LOAD_DB2(sSkillLineStore); LOAD_DB2(sSkillLineAbilityStore); @@ -411,11 +436,12 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sSpellClassOptionsStore); LOAD_DB2(sSpellCooldownsStore); LOAD_DB2(sSpellDurationStore); - LOAD_DB2(sSpellEffectScalingStore); LOAD_DB2(sSpellEffectStore); + LOAD_DB2(sSpellEffectScalingStore); LOAD_DB2(sSpellEquippedItemsStore); LOAD_DB2(sSpellFocusObjectStore); LOAD_DB2(sSpellInterruptsStore); + LOAD_DB2(sSpellItemEnchantmentStore); LOAD_DB2(sSpellItemEnchantmentConditionStore); LOAD_DB2(sSpellLearnSpellStore); LOAD_DB2(sSpellLevelsStore); @@ -428,29 +454,38 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sSpellRangeStore); LOAD_DB2(sSpellReagentsStore); LOAD_DB2(sSpellScalingStore); - LOAD_DB2(sSpellShapeshiftFormStore); LOAD_DB2(sSpellShapeshiftStore); + LOAD_DB2(sSpellShapeshiftFormStore); LOAD_DB2(sSpellTargetRestrictionsStore); LOAD_DB2(sSpellTotemsStore); LOAD_DB2(sSpellXSpellVisualStore); LOAD_DB2(sSummonPropertiesStore); + LOAD_DB2(sTalentStore); LOAD_DB2(sTaxiNodesStore); - LOAD_DB2(sTaxiPathNodeStore); LOAD_DB2(sTaxiPathStore); + LOAD_DB2(sTaxiPathNodeStore); LOAD_DB2(sTotemCategoryStore); LOAD_DB2(sToyStore); LOAD_DB2(sTransportAnimationStore); LOAD_DB2(sTransportRotationStore); LOAD_DB2(sUnitPowerBarStore); + LOAD_DB2(sVehicleStore); LOAD_DB2(sVehicleSeatStore); + LOAD_DB2(sWMOAreaTableStore); + LOAD_DB2(sWorldMapAreaStore); LOAD_DB2(sWorldMapOverlayStore); LOAD_DB2(sWorldMapTransformsStore); + LOAD_DB2(sWorldSafeLocsStore); #undef LOAD_DB2 for (AreaGroupMemberEntry const* areaGroupMember : sAreaGroupMemberStore) _areaGroupMembers[areaGroupMember->AreaGroupID].push_back(areaGroupMember->AreaID); + for (CharSectionsEntry const* charSection : sCharSectionsStore) + if (charSection->Race && ((1 << (charSection->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races + _charSections.insert({ charSection->GenType | (charSection->Gender << 8) | (charSection->Race << 16), charSection }); + for (CharStartOutfitEntry const* outfit : sCharStartOutfitStore) _charStartOutfits[outfit->RaceID | (outfit->ClassID << 8) | (outfit->GenderID << 16)] = outfit; @@ -476,14 +511,11 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) } memset(_chrSpecializationsByIndex, 0, sizeof(_chrSpecializationsByIndex)); - for (uint32 i = 0; i < sChrSpecializationStore.GetNumRows(); ++i) + for (ChrSpecializationEntry const* chrSpec : sChrSpecializationStore) { - if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(i)) - { - ASSERT(chrSpec->ClassID < MAX_CLASSES); - ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS); - _chrSpecializationsByIndex[chrSpec->ClassID][chrSpec->OrderIndex] = chrSpec; - } + ASSERT(chrSpec->ClassID < MAX_CLASSES); + ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS); + _chrSpecializationsByIndex[chrSpec->ClassID][chrSpec->OrderIndex] = chrSpec; } ASSERT(MAX_DIFFICULTY >= sDifficultyStore.GetNumRows(), @@ -493,6 +525,10 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (EmotesTextSoundEntry const* emoteTextSound : sEmotesTextSoundStore) _emoteTextSounds[EmotesTextSoundContainer::key_type(emoteTextSound->EmotesTextId, emoteTextSound->RaceId, emoteTextSound->SexId, emoteTextSound->ClassId)] = emoteTextSound; + for (FactionEntry const* faction : sFactionStore) + if (faction->ParentFactionID) + _factionTeams[faction->ParentFactionID].push_back(faction->ID); + for (GameObjectDisplayInfoEntry const* gameObjectDisplayInfo : sGameObjectDisplayInfoStore) { if (gameObjectDisplayInfo->GeoBoxMax.X < gameObjectDisplayInfo->GeoBoxMin.X) @@ -530,11 +566,11 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) if (ItemAppearanceEntry const* appearance = sItemAppearanceStore.LookupEntry(appearanceMod->AppearanceID)) _itemDisplayIDs[appearanceMod->ItemID | (appearanceMod->AppearanceModID << 24)] = appearance->DisplayID; - for (ItemSetSpellEntry const* entry : sItemSetSpellStore) - _itemSetSpells[entry->ItemSetID].push_back(entry); + for (ItemSetSpellEntry const* itemSetSpell : sItemSetSpellStore) + _itemSetSpells[itemSetSpell->ItemSetID].push_back(itemSetSpell); - for (ItemSpecOverrideEntry const* entry : sItemSpecOverrideStore) - _itemSpecOverrides[entry->ItemID].push_back(entry); + for (ItemSpecOverrideEntry const* itemSpecOverride : sItemSpecOverrideStore) + _itemSpecOverrides[itemSpecOverride->ItemID].push_back(itemSpecOverride); for (ItemXBonusTreeEntry const* itemBonusTreeAssignment : sItemXBonusTreeStore) _itemToBonusTree.insert({ itemBonusTreeAssignment->ItemID, itemBonusTreeAssignment->BonusTreeID }); @@ -549,14 +585,18 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) _heirloomCurvePoints[curvePoint->CurveID][curvePoint->Index] = curvePoint; } + for (MapDifficultyEntry const* entry : sMapDifficultyStore) + _mapDifficulties[entry->MapID][entry->DifficultyID] = entry; + _mapDifficulties[0][0] = _mapDifficulties[1][0]; // map 0 is missing from MapDifficulty.dbc so we cheat a bit + for (MountEntry const* mount : sMountStore) _mountsBySpellId[mount->SpellId] = mount; - for (MountTypeXCapabilityEntry const* mount : sMountTypeXCapabilityStore) - _mountCapabilitiesByType[mount->MountTypeID].insert(mount); + for (MountTypeXCapabilityEntry const* mountTypeCapability : sMountTypeXCapabilityStore) + _mountCapabilitiesByType[mountTypeCapability->MountTypeID].insert(mountTypeCapability); - for (NameGenEntry const* entry : sNameGenStore) - _nameGenData[entry->Race][entry->Sex].push_back(entry); + for (NameGenEntry const* nameGen : sNameGenStore) + _nameGenData[nameGen->Race][nameGen->Sex].push_back(nameGen); for (NamesProfanityEntry const* namesProfanity : sNamesProfanityStore) { @@ -633,6 +673,15 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (SpellProcsPerMinuteModEntry const* ppmMod : sSpellProcsPerMinuteModStore) _spellProcsPerMinuteMods[ppmMod->SpellProcsPerMinuteID].push_back(ppmMod); + for (TalentEntry const* talentInfo : sTalentStore) + { + ASSERT(talentInfo->ClassID < MAX_CLASSES); + ASSERT(talentInfo->TierID < MAX_TALENT_TIERS, "MAX_TALENT_TIERS must be at least %u", MAX_TALENT_TIERS); + ASSERT(talentInfo->ColumnIndex < MAX_TALENT_COLUMNS, "MAX_TALENT_COLUMNS must be at least %u", MAX_TALENT_COLUMNS); + + _talentsByPosition[talentInfo->ClassID][talentInfo->TierID][talentInfo->ColumnIndex].push_back(talentInfo); + } + for (TaxiPathEntry const* entry : sTaxiPathStore) sTaxiPathSetBySource[entry->From][entry->To] = TaxiPathBySourceAndDestination(entry->ID, entry->Cost); @@ -699,6 +748,12 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (ToyEntry const* toy : sToyStore) _toys.insert(toy->ItemID); + for (WMOAreaTableEntry const* entry : sWMOAreaTableStore) + _wmoAreaTableLookup[WMOAreaTableKey(entry->WMOID, entry->NameSet, entry->WMOGroupID)] = entry; + + for (WorldMapAreaEntry const* worldMapArea : sWorldMapAreaStore) + _worldMapAreaByAreaID[worldMapArea->AreaID] = worldMapArea; + // error checks if (bad_db2_files.size() >= DB2FilesCount) { @@ -716,13 +771,13 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) } // Check loaded DB2 files proper version - if (!sAreaTableStore.LookupEntry(6719) || // last area (areaflag) added in 7.0.1 (20810) - !sCharTitlesStore.LookupEntry(469) || // last char title added in 7.0.1 (20810) - !sGemPropertiesStore.LookupEntry(2960) || // last gem property added in 7.0.1 (20914) - !sItemStore.LookupEntry(136350) || // last item added in 7.0.1 (20810) - !sItemExtendedCostStore.LookupEntry(5951) || // last item extended cost added in 7.0.1 (20810) - !sMapStore.LookupEntry(1602) || // last map added in 7.0.1 (20810) - !sSpellStore.LookupEntry(207511)) // last spell added in 7.0.1 (20810) + if (!sAreaTableStore.LookupEntry(8343) || // last area (areaflag) added in 7.0.3 (21414) + !sCharTitlesStore.LookupEntry(480) || // last char title added in 7.0.3 (21414) + !sGemPropertiesStore.LookupEntry(3217) || // last gem property added in 7.0.3 (21414) + !sItemStore.LookupEntry(139410) || // last item added in 7.0.3 (21414) + !sItemExtendedCostStore.LookupEntry(6038) || // last item extended cost added in 7.0.3 (21414) + !sMapStore.LookupEntry(1632) || // last map added in 7.0.3 (21414) + !sSpellStore.LookupEntry(220019)) // last spell added in 7.0.3 (21414) { TC_LOG_ERROR("misc", "You have _outdated_ DB2 files. Please extract correct versions from current using client."); exit(1); @@ -815,6 +870,16 @@ char const* DB2Manager::GetBroadcastTextValue(BroadcastTextEntry const* broadcas return broadcastText->MaleText->Str[DEFAULT_LOCALE]; } +CharSectionsEntry const* DB2Manager::GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color) const +{ + auto eqr = _charSections.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16)); + for (auto itr = eqr.first; itr != eqr.second; ++itr) + if (itr->second->Type == type && itr->second->Color == color) + return itr->second; + + return nullptr; +} + CharStartOutfitEntry const* DB2Manager::GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) const { auto itr = _charStartOutfits.find(race | (class_ << 8) | (gender << 16)); @@ -824,9 +889,16 @@ CharStartOutfitEntry const* DB2Manager::GetCharStartOutfitEntry(uint8 race, uint return itr->second; } -ChrSpecializationEntry const* DB2Manager::GetChrSpecializationByIndex(uint32 class_, uint32 index) const +char const* DB2Manager::GetClassName(uint8 class_, LocaleConstant locale /*= DEFAULT_LOCALE*/) { - return _chrSpecializationsByIndex[class_][index]; + ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_); + if (!classEntry) + return ""; + + if (classEntry->Name->Str[locale][0] != '\0') + return classEntry->Name->Str[locale]; + + return classEntry->Name->Str[DEFAULT_LOCALE]; } uint32 DB2Manager::GetPowerIndexByClass(uint32 powerType, uint32 classId) const @@ -846,6 +918,11 @@ char const* DB2Manager::GetChrRaceName(uint8 race, LocaleConstant locale /*= DEF return raceEntry->Name->Str[DEFAULT_LOCALE]; } +ChrSpecializationEntry const* DB2Manager::GetChrSpecializationByIndex(uint32 class_, uint32 index) const +{ + return _chrSpecializationsByIndex[class_][index]; +} + char const* DB2Manager::GetCreatureFamilyPetName(uint32 petfamily, uint32 locale) { if (!petfamily) @@ -871,6 +948,15 @@ EmotesTextSoundEntry const* DB2Manager::GetTextSoundEmoteFor(uint32 emote, uint8 return nullptr; } +std::vector const* DB2Manager::GetFactionTeamList(uint32 faction) const +{ + auto itr = _factionTeams.find(faction); + if (itr != _factionTeams.end()) + return &itr->second; + + return nullptr; +} + uint32 DB2Manager::GetHeirloomItemLevel(uint32 curveId, uint32 level) const { // Assuming linear item level scaling for heirlooms @@ -964,21 +1050,102 @@ std::vector const* DB2Manager::GetItemSpecOverride return nullptr; } -std::string DB2Manager::GetNameGenEntry(uint8 race, uint8 gender, LocaleConstant locale) const +LfgDungeonsEntry const* DB2Manager::GetLfgDungeon(uint32 mapId, Difficulty difficulty) { - ASSERT(gender < GENDER_NONE); - auto ritr = _nameGenData.find(race); - if (ritr == _nameGenData.end()) - return ""; + for (LfgDungeonsEntry const* dungeon : sLfgDungeonsStore) + if (dungeon->MapID == int32(mapId) && Difficulty(dungeon->DifficultyID) == difficulty) + return dungeon; - if (ritr->second[gender].empty()) - return ""; + return nullptr; +} - LocalizedString* data = Trinity::Containers::SelectRandomContainerElement(ritr->second[gender])->Name; - if (*data->Str[locale] != '\0') - return data->Str[locale]; +uint32 DB2Manager::GetDefaultMapLight(uint32 mapId) +{ + for (int32 i = sLightStore.GetNumRows(); i >= 0; --i) + { + LightEntry const* light = sLightStore.LookupEntry(uint32(i)); + if (!light) + continue; - return data->Str[sWorld->GetDefaultDbcLocale()]; + if (light->MapID == mapId && light->Pos.X == 0.0f && light->Pos.Y == 0.0f && light->Pos.Z == 0.0f) + return uint32(i); + } + + return 0; +} + +uint32 DB2Manager::GetLiquidFlags(uint32 liquidType) +{ + if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType)) + return 1 << liq->Type; + + return 0; +} + +MapDifficultyEntry const* DB2Manager::GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty /*= nullptr*/) const +{ + auto itr = _mapDifficulties.find(mapId); + if (itr == _mapDifficulties.end()) + return nullptr; + + if (itr->second.empty()) + return nullptr; + + for (auto& p : itr->second) + { + DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(p.first); + if (!difficultyEntry) + continue; + + if (difficultyEntry->Flags & DIFFICULTY_FLAG_DEFAULT) + { + if (difficulty) + *difficulty = Difficulty(p.first); + + return p.second; + } + } + + if (difficulty) + *difficulty = Difficulty(itr->second.begin()->first); + + return itr->second.begin()->second; +} + +MapDifficultyEntry const* DB2Manager::GetMapDifficultyData(uint32 mapId, Difficulty difficulty) const +{ + auto itr = _mapDifficulties.find(mapId); + if (itr == _mapDifficulties.end()) + return nullptr; + + auto diffItr = itr->second.find(difficulty); + if (diffItr == itr->second.end()) + return nullptr; + + return diffItr->second; +} + +MapDifficultyEntry const* DB2Manager::GetDownscaledMapDifficultyData(uint32 mapId, Difficulty& difficulty) const +{ + DifficultyEntry const* diffEntry = sDifficultyStore.LookupEntry(difficulty); + if (!diffEntry) + return GetDefaultMapDifficulty(mapId, &difficulty); + + uint32 tmpDiff = difficulty; + MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff)); + while (!mapDiff) + { + tmpDiff = diffEntry->FallbackDifficultyID; + diffEntry = sDifficultyStore.LookupEntry(tmpDiff); + if (!diffEntry) + return GetDefaultMapDifficulty(mapId, &difficulty); + + // pull new data + mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff)); // we are 10 normal or 25 normal + } + + difficulty = Difficulty(tmpDiff); + return mapDiff; } MountEntry const* DB2Manager::GetMount(uint32 spellId) const @@ -1004,6 +1171,23 @@ DB2Manager::MountTypeXCapabilitySet const* DB2Manager::GetMountCapabilities(uint return nullptr; } +std::string DB2Manager::GetNameGenEntry(uint8 race, uint8 gender, LocaleConstant locale) const +{ + ASSERT(gender < GENDER_NONE); + auto ritr = _nameGenData.find(race); + if (ritr == _nameGenData.end()) + return ""; + + if (ritr->second[gender].empty()) + return ""; + + LocalizedString* data = Trinity::Containers::SelectRandomContainerElement(ritr->second[gender])->Name; + if (*data->Str[locale] != '\0') + return data->Str[locale]; + + return data->Str[sWorld->GetDefaultDbcLocale()]; +} + ResponseCodes DB2Manager::ValidateName(std::string const& name, LocaleConstant locale) const { for (boost::regex const& regex : _nameValidators[locale]) @@ -1155,6 +1339,11 @@ std::vector DB2Manager::GetSpellProcsPerMinu return std::vector(); } +std::vector const& DB2Manager::GetTalentsByPosition(uint32 class_, uint32 tier, uint32 column) const +{ + return _talentsByPosition[class_][tier][column]; +} + bool DB2Manager::IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId) { if (requiredTotemCategoryId == 0) @@ -1180,6 +1369,49 @@ bool DB2Manager::IsToyItem(uint32 toy) const return _toys.count(toy) > 0; } +WMOAreaTableEntry const* DB2Manager::GetWMOAreaTable(int32 rootId, int32 adtId, int32 groupId) const +{ + auto i = _wmoAreaTableLookup.find(WMOAreaTableKey(int8(rootId), int16(adtId), groupId)); + if (i != _wmoAreaTableLookup.end()) + return i->second; + + return nullptr; +} + +uint32 DB2Manager::GetVirtualMapForMapAndZone(uint32 mapId, uint32 zoneId) const +{ + if (mapId != 530 && mapId != 571 && mapId != 732) // speed for most cases + return mapId; + + auto itr = _worldMapAreaByAreaID.find(zoneId); + if (itr != _worldMapAreaByAreaID.end()) + return itr->second->DisplayMapID >= 0 ? itr->second->DisplayMapID : itr->second->MapID; + + return mapId; +} + +void DB2Manager::Zone2MapCoordinates(uint32 areaId, float& x, float& y) const +{ + auto itr = _worldMapAreaByAreaID.find(areaId); + if (itr == _worldMapAreaByAreaID.end()) + return; + + std::swap(x, y); // at client map coords swapped + x = x*((itr->second->LocBottom - itr->second->LocTop) / 100) + itr->second->LocTop; + y = y*((itr->second->LocRight - itr->second->LocLeft) / 100) + itr->second->LocLeft; // client y coord from top to down +} + +void DB2Manager::Map2ZoneCoordinates(uint32 areaId, float& x, float& y) const +{ + auto itr = _worldMapAreaByAreaID.find(areaId); + if (itr == _worldMapAreaByAreaID.end()) + return; + + x = (x - itr->second->LocTop) / ((itr->second->LocBottom - itr->second->LocTop) / 100); + y = (y - itr->second->LocLeft) / ((itr->second->LocRight - itr->second->LocLeft) / 100); // client y coord from top to down + std::swap(x, y); // client have map coords swapped +} + void DB2Manager::DeterminaAlternateMapPosition(uint32 mapId, float x, float y, float z, uint32* newMapId /*= nullptr*/, DBCPosition2D* newPos /*= nullptr*/) { ASSERT(newMapId || newPos); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 5dbd24dacf6..59bb91b4a30 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -31,21 +31,25 @@ TC_GAME_API extern DB2Storage sAreaTrigger TC_GAME_API extern DB2Storage sArmorLocationStore; TC_GAME_API extern DB2Storage sAuctionHouseStore; TC_GAME_API extern DB2Storage sBankBagSlotPricesStore; +TC_GAME_API extern DB2Storage sBannedAddOnsStore; TC_GAME_API extern DB2Storage sBarberShopStyleStore; TC_GAME_API extern DB2Storage sBattlePetBreedQualityStore; TC_GAME_API extern DB2Storage sBattlePetBreedStateStore; TC_GAME_API extern DB2Storage sBattlePetSpeciesStore; TC_GAME_API extern DB2Storage sBattlePetSpeciesStateStore; +TC_GAME_API extern DB2Storage sBattlemasterListStore; TC_GAME_API extern DB2Storage sBroadcastTextStore; TC_GAME_API extern DB2Storage sCharStartOutfitStore; TC_GAME_API extern DB2Storage sCharTitlesStore; TC_GAME_API extern DB2Storage sChatChannelsStore; +TC_GAME_API extern DB2Storage sChrClassesStore; TC_GAME_API extern DB2Storage sChrRacesStore; TC_GAME_API extern DB2Storage sChrSpecializationStore; TC_GAME_API extern DB2Storage sCinematicSequencesStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoStore; TC_GAME_API extern DB2Storage sCreatureDisplayInfoExtraStore; TC_GAME_API extern DB2Storage sCreatureFamilyStore; +TC_GAME_API extern DB2Storage sCreatureModelDataStore; TC_GAME_API extern DB2Storage sCreatureTypeStore; TC_GAME_API extern DB2Storage sCriteriaStore; TC_GAME_API extern DB2Storage sCriteriaTreeStore; @@ -57,9 +61,10 @@ TC_GAME_API extern DB2Storage sDurabilityC TC_GAME_API extern DB2Storage sDurabilityQualityStore; TC_GAME_API extern DB2Storage sEmotesStore; TC_GAME_API extern DB2Storage sEmotesTextStore; +TC_GAME_API extern DB2Storage sFactionStore; +TC_GAME_API extern DB2Storage sFactionTemplateStore; TC_GAME_API extern DB2Storage sGameObjectsStore; TC_GAME_API extern DB2Storage sGameObjectDisplayInfoStore; -TC_GAME_API extern DB2Storage sGameTablesStore; TC_GAME_API extern DB2Storage sGarrAbilityStore; TC_GAME_API extern DB2Storage sGarrBuildingStore; TC_GAME_API extern DB2Storage sGarrBuildingPlotInstStore; @@ -106,7 +111,8 @@ TC_GAME_API extern DB2Storage sItemSetSpel TC_GAME_API extern DB2SparseStorage sItemSparseStore; TC_GAME_API extern DB2Storage sItemSpecStore; TC_GAME_API extern DB2Storage sItemSpecOverrideStore; -TC_GAME_API extern DB2Storage sItemToBattlePetSpeciesStore; +TC_GAME_API extern DB2Storage sLfgDungeonsStore; +TC_GAME_API extern DB2Storage sLiquidTypeStore; TC_GAME_API extern DB2Storage sLockStore; TC_GAME_API extern DB2Storage sMailTemplateStore; TC_GAME_API extern DB2Storage sMapStore; @@ -142,6 +148,7 @@ TC_GAME_API extern DB2Storage sSpellEffect TC_GAME_API extern DB2Storage sSpellEquippedItemsStore; TC_GAME_API extern DB2Storage sSpellFocusObjectStore; TC_GAME_API extern DB2Storage sSpellInterruptsStore; +TC_GAME_API extern DB2Storage sSpellItemEnchantmentStore; TC_GAME_API extern DB2Storage sSpellItemEnchantmentConditionStore; TC_GAME_API extern DB2Storage sSpellLearnSpellStore; TC_GAME_API extern DB2Storage sSpellLevelsStore; @@ -158,11 +165,32 @@ TC_GAME_API extern DB2Storage sSpellTarget TC_GAME_API extern DB2Storage sSpellTotemsStore; TC_GAME_API extern DB2Storage sSpellXSpellVisualStore; TC_GAME_API extern DB2Storage sSummonPropertiesStore; +TC_GAME_API extern DB2Storage sTalentStore; TC_GAME_API extern DB2Storage sTaxiNodesStore; TC_GAME_API extern DB2Storage sTaxiPathStore; TC_GAME_API extern DB2Storage sUnitPowerBarStore; +TC_GAME_API extern DB2Storage sVehicleStore; TC_GAME_API extern DB2Storage sVehicleSeatStore; TC_GAME_API extern DB2Storage sWorldMapOverlayStore; +TC_GAME_API extern DB2Storage sWorldSafeLocsStore; + +struct TaxiPathBySourceAndDestination +{ + TaxiPathBySourceAndDestination() : ID(0), price(0) { } + TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) { } + + uint32 ID; + uint32 price; +}; + +typedef std::map TaxiPathSetForSource; +typedef std::map TaxiPathSetBySource; + +typedef std::vector TaxiPathNodeList; +typedef std::vector TaxiPathNodesByPath; + +#define TaxiMaskSize 232 +typedef std::array TaxiMask; TC_GAME_API extern TaxiMask sTaxiNodesMask; TC_GAME_API extern TaxiMask sOldContinentsNodesMask; @@ -196,9 +224,11 @@ public: typedef std::map StorageMap; typedef std::unordered_map> AreaGroupMemberContainer; + typedef std::unordered_multimap CharSectionsContainer; typedef std::unordered_map CharStartOutfitContainer; typedef ChrSpecializationEntry const* ChrSpecializationByIndexContainer[MAX_CLASSES][MAX_SPECIALIZATIONS]; typedef std::map, EmotesTextSoundEntry const*> EmotesTextSoundContainer; + typedef std::unordered_map> FactionTeamContainer; typedef std::set GlyphSlotContainer; typedef std::map>> HeirloomCurvesContainer; typedef std::unordered_map HeirloomItemsContainer; @@ -209,6 +239,7 @@ public: typedef std::unordered_map> ItemBonusTreeContainer; typedef std::unordered_map> ItemSetSpellContainer; typedef std::unordered_map> ItemSpecOverridesContainer; + typedef std::unordered_map> MapDifficultyContainer; typedef std::unordered_map MountContainer; typedef std::set MountTypeXCapabilitySet; typedef std::unordered_map MountCapabilitiesByTypeContainer; @@ -221,7 +252,11 @@ public: typedef std::unordered_map> SpellPowerContainer; typedef std::unordered_map>> SpellPowerDifficultyContainer; typedef std::unordered_map> SpellProcsPerMinuteModContainer; + typedef std::vector TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]; typedef std::unordered_set ToyItemIdsContainer; + typedef std::tuple WMOAreaTableKey; + typedef std::map WMOAreaTableLookupContainer; + typedef std::unordered_map WorldMapAreaByAreaIDContainer; static DB2Manager& Instance(); @@ -234,12 +269,15 @@ public: std::vector GetAreasForGroup(uint32 areaGroupId) const; static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false); + CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color) const; CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) const; - ChrSpecializationEntry const* GetChrSpecializationByIndex(uint32 class_, uint32 index) const; + static char const* GetClassName(uint8 class_, LocaleConstant locale = DEFAULT_LOCALE); uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId) const; static char const* GetChrRaceName(uint8 race, LocaleConstant locale = DEFAULT_LOCALE); + ChrSpecializationEntry const* GetChrSpecializationByIndex(uint32 class_, uint32 index) const; static char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); EmotesTextSoundEntry const* GetTextSoundEmoteFor(uint32 emote, uint8 race, uint8 gender, uint8 class_) const; + std::vector const* GetFactionTeamList(uint32 faction) const; GlyphSlotContainer const& GetGlyphSlots() const { return _glyphSlots; } uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const; HeirloomEntry const* GetHeirloomByItemId(uint32 itemId) const; @@ -249,6 +287,13 @@ public: uint32 GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const; std::vector const* GetItemSetSpells(uint32 itemSetId) const; std::vector const* GetItemSpecOverrides(uint32 itemId) const; + static LfgDungeonsEntry const* GetLfgDungeon(uint32 mapId, Difficulty difficulty); + static uint32 GetDefaultMapLight(uint32 mapId); + static uint32 GetLiquidFlags(uint32 liquidType); + MapDifficultyContainer const& GetMapDifficulties() const { return _mapDifficulties; } + MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr) const; + MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty) const; + MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty) const; std::string GetNameGenEntry(uint8 race, uint8 gender, LocaleConstant locale) const; MountEntry const* GetMount(uint32 spellId) const; MountEntry const* GetMountById(uint32 id) const; @@ -263,8 +308,13 @@ public: std::vector const* GetSpecializationSpells(uint32 specId) const; std::vector GetSpellPowers(uint32 spellId, Difficulty difficulty = DIFFICULTY_NONE, bool* hasDifficultyPowers = nullptr) const; std::vector GetSpellProcsPerMinuteMods(uint32 spellprocsPerMinuteId) const; + std::vector const& GetTalentsByPosition(uint32 class_, uint32 tier, uint32 column) const; static bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId); bool IsToyItem(uint32 toy) const; + WMOAreaTableEntry const* GetWMOAreaTable(int32 rootId, int32 adtId, int32 groupId) const; + uint32 GetVirtualMapForMapAndZone(uint32 mapId, uint32 zoneId) const; + void Zone2MapCoordinates(uint32 areaId, float& x, float& y) const; + void Map2ZoneCoordinates(uint32 areaId, float& x, float& y) const; static void DeterminaAlternateMapPosition(uint32 mapId, float x, float y, float z, uint32* newMapId = nullptr, DBCPosition2D* newPos = nullptr); private: @@ -272,10 +322,12 @@ private: HotfixData _hotfixData; AreaGroupMemberContainer _areaGroupMembers; + CharSectionsContainer _charSections; CharStartOutfitContainer _charStartOutfits; uint32 _powersByClass[MAX_CLASSES][MAX_POWERS]; ChrSpecializationByIndexContainer _chrSpecializationsByIndex; EmotesTextSoundContainer _emoteTextSounds; + FactionTeamContainer _factionTeams; GlyphSlotContainer _glyphSlots; HeirloomItemsContainer _heirlooms; HeirloomCurvesContainer _heirloomCurvePoints; @@ -286,6 +338,7 @@ private: ItemToBonusTreeContainer _itemToBonusTree; ItemSetSpellContainer _itemSetSpells; ItemSpecOverridesContainer _itemSpecOverrides; + MapDifficultyContainer _mapDifficulties; MountContainer _mountsBySpellId; MountCapabilitiesByTypeContainer _mountCapabilitiesByType; NameGenContainer _nameGenData; @@ -297,7 +350,10 @@ private: SpellPowerContainer _spellPowers; SpellPowerDifficultyContainer _spellPowerDifficulties; SpellProcsPerMinuteModContainer _spellProcsPerMinuteMods; + TalentsByPosition _talentsByPosition; ToyItemIdsContainer _toys; + WMOAreaTableLookupContainer _wmoAreaTableLookup; + WorldMapAreaByAreaIDContainer _worldMapAreaByAreaID; }; #define sDB2Manager DB2Manager::Instance() diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 692ae88847e..ab29ec77c11 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -45,6 +45,7 @@ struct AchievementEntry struct AnimKitEntry { + uint32 ID; uint32 OneShotDuration; uint16 OneShotStopAnimKitID; uint16 LowDefAnimKitID; @@ -52,12 +53,14 @@ struct AnimKitEntry struct AreaGroupMemberEntry { + uint32 ID; uint16 AreaGroupID; uint16 AreaID; }; struct AreaTableEntry { + uint32 ID; uint32 Flags[2]; char const* ZoneName; float AmbientMultiplier; @@ -69,6 +72,7 @@ struct AreaTableEntry uint16 ZoneMusic; uint16 IntroSound; uint16 LiquidTypeID[4]; + uint16 UWIntroMusic; uint16 UWZoneMusic; uint16 UWAmbience; uint16 PvPCombastWorldStateID; @@ -77,7 +81,6 @@ struct AreaTableEntry uint8 ExplorationLevel; uint8 FactionGroupMask; uint8 MountFlags; - uint8 UWIntroMusic; uint8 WildBattlePetLevelMin; uint8 WildBattlePetLevelMax; uint8 WindSettingsID; @@ -112,11 +115,13 @@ struct AreaTriggerEntry struct ArmorLocationEntry { + uint32 ID; float Modifier[5]; }; struct AuctionHouseEntry { + uint32 ID; LocalizedString* Name; uint16 FactionID; // id of faction.dbc for player factions associated with city uint8 DepositRate; @@ -125,9 +130,18 @@ struct AuctionHouseEntry struct BankBagSlotPricesEntry { + uint32 ID; uint32 Cost; }; +struct BannedAddOnsEntry +{ + uint32 ID; + char const* Name; + char const* Version; + uint8 Flags; +}; + struct BarberShopStyleEntry { uint32 ID; @@ -142,6 +156,7 @@ struct BarberShopStyleEntry struct BattlePetBreedQualityEntry { + uint32 ID; float Modifier; uint8 Quality; }; @@ -175,10 +190,31 @@ struct BattlePetSpeciesStateEntry uint8 State; }; +struct BattlemasterListEntry +{ + uint32 ID; + LocalizedString* Name; + uint32 IconFileDataID; + LocalizedString* GameType; + int16 MapID[16]; + uint16 HolidayWorldState; + uint16 PlayerConditionID; + uint8 InstanceType; + uint8 GroupsAllowed; + uint8 MaxGroupSize; + uint8 MinLevel; + uint8 MaxLevel; + uint8 RatedPlayers; + uint8 MinPlayers; + uint8 MaxPlayers; + uint8 Flags; +}; + #define MAX_BROADCAST_TEXT_EMOTES 3 struct BroadcastTextEntry { + uint32 ID; LocalizedString* MaleText; LocalizedString* FemaleText; uint16 EmoteID[MAX_BROADCAST_TEXT_EMOTES]; @@ -189,10 +225,23 @@ struct BroadcastTextEntry uint8 Type; }; +struct CharSectionsEntry +{ + uint32 Id; + uint32 TextureFileDataID[3]; + uint16 Flags; + uint8 Race; + uint8 Gender; + uint8 GenType; + uint8 Type; + uint8 Color; +}; + #define MAX_OUTFIT_ITEMS 24 struct CharStartOutfitEntry { + uint32 ID; int32 ItemID[MAX_OUTFIT_ITEMS]; uint32 PetDisplayID; // Pet Model ID for starting pet uint8 RaceID; @@ -204,6 +253,7 @@ struct CharStartOutfitEntry struct CharTitlesEntry { + uint32 ID; LocalizedString* NameMale; LocalizedString* NameFemale; uint16 ConditionID; @@ -213,14 +263,39 @@ struct CharTitlesEntry struct ChatChannelsEntry { + uint32 ID; uint32 Flags; LocalizedString* Name; LocalizedString* Shortcut; uint8 FactionGroup; }; +struct ChrClassesEntry +{ + uint32 ID; + uint8 PowerType; + char const* PetNameToken; + LocalizedString* Name; + LocalizedString* NameFemale; + LocalizedString* NameMale; + char const* Filename; + uint32 CreateScreenFileDataID; + uint32 SelectScreenFileDataID; + uint32 LowResScreenFileDataID; + uint16 Flags; + uint16 CinematicSequenceID; + uint16 DefaultSpec; + uint8 SpellClassSet; + uint8 AttackPowerPerStrength; + uint8 AttackPowerPerAgility; + uint8 RangedAttackPowerPerAgility; + uint8 IconFileDataID; + uint8 Unk1; +}; + struct ChrClassesXPowerTypesEntry { + uint32 ID; uint8 ClassID; uint8 PowerType; }; @@ -261,6 +336,7 @@ struct ChrRacesEntry uint8 CharComponentTextureLayoutID; uint8 DefaultClassID; uint8 NeutralRaceID; + uint8 ItemAppearanceFrameRaceID; uint8 CharComponentTexLayoutHiResID; }; @@ -286,6 +362,7 @@ struct ChrSpecializationEntry struct CinematicSequencesEntry { + uint32 ID; uint16 SoundID; uint16 Camera[8]; }; @@ -301,6 +378,7 @@ struct CreatureDisplayInfoEntry uint32 PortraitCreatureDisplayInfoID; uint32 CreatureGeosetData; uint32 StateSpellVisualKitID; + float InstanceOtherPlayerPetScale; // scale of not own player pets inside dungeons/raids/scenarios uint16 ModelID; uint16 SoundID; uint16 NPCSoundID; @@ -317,6 +395,7 @@ struct CreatureDisplayInfoEntry struct CreatureDisplayInfoExtraEntry { + uint32 ID; uint32 FileDataID; uint32 HDFileDataID; uint8 DisplayRaceID; @@ -333,6 +412,7 @@ struct CreatureDisplayInfoExtraEntry struct CreatureFamilyEntry { + uint32 ID; float MinScale; float MaxScale; LocalizedString* Name; @@ -345,14 +425,52 @@ struct CreatureFamilyEntry uint8 CategoryEnumID; }; +struct CreatureModelDataEntry +{ + uint32 ID; + uint32 Flags; + uint32 FileDataID; + float ModelScale; + float FootprintTextureLength; + float FootprintTextureWidth; + float FootprintParticleScale; + float CollisionWidth; + float CollisionHeight; + float MountHeight; + float GeoBoxMin[3]; + float GeoBoxMax[3]; + float WorldEffectScale; + float AttachedEffectScale; + float MissileCollisionRadius; + float MissileCollisionPush; + float MissileCollisionRaise; + float OverrideLootEffectScale; + float OverrideNameScale; + float OverrideSelectionRadius; + float TamedPetBaseScale; + float HoverHeight; + uint16 SoundID; + uint16 CreatureGeosetDataID; + uint8 SizeClass; + uint8 BloodID; + uint8 FootprintTextureID; + uint8 FoleyMaterialID; + uint8 Unk700_1; + uint8 Unk700_2; + uint8 FootstepShakeSize; + uint8 DeathThudShakeSize; +}; + struct CreatureTypeEntry { + uint32 ID; LocalizedString* Name; uint8 Flags; // no exp? critters, non-combat pets, gas cloud. }; struct CriteriaEntry { + uint32 ID; union { uint32 ID; @@ -486,6 +604,7 @@ struct CriteriaEntry struct CriteriaTreeEntry { + uint32 ID; uint32 Amount; LocalizedString* Description; uint16 CriteriaID; @@ -512,6 +631,7 @@ struct CurrencyTypesEntry struct CurvePointEntry { + uint32 ID; float X; float Y; uint16 CurveID; @@ -520,6 +640,7 @@ struct CurvePointEntry struct DestructibleModelDataEntry { + uint32 ID; uint16 StateDamagedDisplayID; uint16 StateDestroyedDisplayID; uint16 StateRebuildingDisplayID; @@ -564,6 +685,7 @@ struct DifficultyEntry struct DungeonEncounterEntry { + uint32 ID; LocalizedString* Name; uint32 CreatureDisplayID; uint16 MapID; @@ -576,34 +698,41 @@ struct DungeonEncounterEntry struct DurabilityCostsEntry { + uint32 ID; uint16 WeaponSubClassCost[21]; uint16 ArmorSubClassCost[8]; }; struct DurabilityQualityEntry { + uint32 ID; float QualityMod; }; struct EmotesEntry { + uint32 ID; char const* EmoteSlashCommand; uint32 SpellVisualKitID; uint32 EmoteFlags; + int32 Unk703_1; + int32 Unk703_2; uint16 AnimID; + uint16 EmoteSpecProcParam; uint16 EmoteSoundID; uint8 EmoteSpecProc; - uint8 EmoteSpecProcParam; }; struct EmotesTextEntry { + uint32 ID; LocalizedString* Name; uint16 EmoteID; }; struct EmotesTextSoundEntry { + uint32 ID; uint16 EmotesTextId; uint16 SoundId; uint8 RaceId; @@ -611,6 +740,89 @@ struct EmotesTextSoundEntry uint8 ClassId; }; +struct FactionEntry +{ + uint32 ID; + uint32 ReputationRaceMask[4]; + int32 ReputationBase[4]; + float ParentFactionModIn; // Faction gains incoming rep * ParentFactionModIn + float ParentFactionModOut; // Faction outputs rep * ParentFactionModOut as spillover reputation + LocalizedString* Name; + LocalizedString* Description; + int16 ReputationIndex; + uint16 ReputationClassMask[4]; + uint16 ReputationFlags[4]; + uint16 ParentFactionID; + uint8 ParentFactionCapIn; // The highest rank the faction will profit from incoming spillover + uint8 ParentFactionCapOut; + uint8 Expansion; + uint8 Flags; + uint8 FriendshipRepID; + + // helpers + bool CanHaveReputation() const + { + return ReputationIndex >= 0; + } +}; + +#define MAX_FACTION_RELATIONS 4 + +struct FactionTemplateEntry +{ + uint32 ID; + uint16 Faction; + uint16 Flags; + uint16 Enemies[MAX_FACTION_RELATIONS]; + uint16 Friends[MAX_FACTION_RELATIONS]; + uint8 Mask; + uint8 FriendMask; + uint8 EnemyMask; + + //------------------------------------------------------- end structure + + // helpers + bool IsFriendlyTo(FactionTemplateEntry const* entry) const + { + if (this == entry) + return true; + if (entry->Faction) + { + for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Enemies[i] == entry->Faction) + return false; + for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Friends[i] == entry->Faction) + return true; + } + return (FriendMask & entry->Mask) || (Mask & entry->FriendMask); + } + bool IsHostileTo(FactionTemplateEntry const* entry) const + { + if (this == entry) + return false; + if (entry->Faction) + { + for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Enemies[i] == entry->Faction) + return true; + for (int32 i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Friends[i] == entry->Faction) + return false; + } + return (EnemyMask & entry->Mask) != 0; + } + bool IsHostileToPlayers() const { return (EnemyMask & FACTION_MASK_PLAYER) !=0; } + bool IsNeutralToAll() const + { + for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) + if (Enemies[i] != 0) + return false; + return EnemyMask == 0 && FriendMask == 0; + } + bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } +}; + struct GameObjectsEntry { uint32 ID; @@ -632,6 +844,7 @@ struct GameObjectsEntry struct GameObjectDisplayInfoEntry { + uint32 ID; uint32 FileDataID; DBCPosition3D GeoBoxMin; DBCPosition3D GeoBoxMax; @@ -640,27 +853,21 @@ struct GameObjectDisplayInfoEntry uint16 ObjectEffectPackageID; }; -struct GameTablesEntry -{ - LocalizedString* Name; - uint16 NumRows; - uint8 NumColumns; -}; - struct GarrAbilityEntry { uint32 ID; LocalizedString* Name; LocalizedString* Description; uint32 IconFileDataID; + uint16 Flags; uint16 OtherFactionGarrAbilityID; - uint8 Flags; uint8 GarrAbilityCategoryID; uint8 FollowerTypeID; }; struct GarrBuildingEntry { + uint32 ID; uint32 HordeGameObjectID; uint32 AllianceGameObjectID; LocalizedString* NameAlliance; @@ -704,11 +911,13 @@ struct GarrClassSpecEntry LocalizedString* NameGenderless; uint16 ClassAtlasID; // UiTextureAtlasMember.db2 ref uint8 GarrFollItemSetID; - uint8 Unknown700; + uint8 Limit; + uint8 Flags; }; struct GarrFollowerEntry { + uint32 ID; uint32 HordeCreatureID; uint32 AllianceCreatureID; LocalizedString* HordeSourceText; @@ -733,10 +942,13 @@ struct GarrFollowerEntry uint8 HordeListPortraitTextureKitID; uint8 AllianceListPortraitTextureKitID; uint8 GarrTypeID; + uint8 MaxDurability; + uint8 Class; }; struct GarrFollowerXAbilityEntry { + uint32 ID; uint16 GarrFollowerID; uint16 GarrAbilityID; uint8 FactionIndex; @@ -744,30 +956,34 @@ struct GarrFollowerXAbilityEntry struct GarrPlotEntry { + uint32 ID; LocalizedString* Name; uint32 AllianceConstructionGameObjectID; uint32 HordeConstructionGameObjectID; + uint16 MinCount; + uint16 MaxCount; uint8 GarrPlotUICategoryID; uint8 PlotType; uint8 Flags; - uint8 MinCount; - uint8 MaxCount; }; struct GarrPlotBuildingEntry { + uint32 ID; uint8 GarrPlotID; uint8 GarrBuildingID; }; struct GarrPlotInstanceEntry { + uint32 ID; LocalizedString* Name; uint8 GarrPlotID; }; struct GarrSiteLevelEntry { + uint32 ID; DBCPosition2D TownHall; uint16 MapID; uint16 UpgradeResourceCost; @@ -781,6 +997,7 @@ struct GarrSiteLevelEntry struct GarrSiteLevelPlotInstEntry { + uint32 ID; DBCPosition2D Landmark; uint16 GarrSiteLevelID; uint8 GarrPlotInstanceID; @@ -789,15 +1006,15 @@ struct GarrSiteLevelPlotInstEntry struct GemPropertiesEntry { + uint32 ID; uint32 Type; uint16 EnchantID; uint16 MinItemLevel; - uint8 MaxCountInv; - uint8 MaxCountItem; }; struct GlyphPropertiesEntry { + uint32 ID; uint32 SpellID; uint16 SpellIconID; uint8 Type; @@ -806,12 +1023,14 @@ struct GlyphPropertiesEntry struct GlyphSlotEntry { + uint32 ID; + uint16 Tooltip; uint8 Type; - uint8 Tooltip; }; struct GuildColorBackgroundEntry { + uint32 ID; uint8 Red; uint8 Green; uint8 Blue; @@ -819,6 +1038,7 @@ struct GuildColorBackgroundEntry struct GuildColorBorderEntry { + uint32 ID; uint8 Red; uint8 Green; uint8 Blue; @@ -826,6 +1046,7 @@ struct GuildColorBorderEntry struct GuildColorEmblemEntry { + uint32 ID; uint8 Red; uint8 Green; uint8 Blue; @@ -833,8 +1054,8 @@ struct GuildColorEmblemEntry struct GuildPerkSpellsEntry { + uint32 ID; uint32 SpellID; - uint8 GuildLevel; }; struct HeirloomEntry @@ -856,6 +1077,7 @@ struct HeirloomEntry struct HolidaysEntry { + uint32 ID; uint32 Date[MAX_HOLIDAY_DATES]; // dates in unix time starting at January, 1, 2000 char const* TextureFilename; uint16 Duration[MAX_HOLIDAY_DURATIONS]; @@ -871,6 +1093,7 @@ struct HolidaysEntry struct ImportPriceArmorEntry { + uint32 ID; float ClothFactor; float LeatherFactor; float MailFactor; @@ -879,21 +1102,25 @@ struct ImportPriceArmorEntry struct ImportPriceQualityEntry { + uint32 ID; float Factor; }; struct ImportPriceShieldEntry { + uint32 ID; float Factor; }; struct ImportPriceWeaponEntry { + uint32 ID; float Factor; }; struct ItemEntry { + uint32 ID; uint32 FileDataID; uint8 Class; uint8 SubClass; @@ -906,31 +1133,37 @@ struct ItemEntry struct ItemAppearanceEntry { + uint32 ID; uint32 DisplayID; uint32 IconFileDataID; + uint32 UIOrder; uint8 ObjectComponentSlot; }; struct ItemArmorQualityEntry { + uint32 ID; float QualityMod[7]; uint16 ItemLevel; }; struct ItemArmorShieldEntry { + uint32 ID; float Quality[7]; uint16 ItemLevel; }; struct ItemArmorTotalEntry { + uint32 ID; float Value[4]; uint16 ItemLevel; }; struct ItemBagFamilyEntry { + uint32 ID; LocalizedString* Name; }; @@ -945,6 +1178,7 @@ struct ItemBonusEntry struct ItemBonusTreeNodeEntry { + uint32 ID; uint16 BonusTreeID; uint16 SubTreeID; uint16 BonusListID; @@ -953,6 +1187,7 @@ struct ItemBonusTreeNodeEntry struct ItemClassEntry { + uint32 ID; float PriceMod; LocalizedString* Name; uint8 Flags; @@ -960,41 +1195,48 @@ struct ItemClassEntry struct ItemCurrencyCostEntry { + uint32 ID; uint32 ItemId; }; struct ItemDamageAmmoEntry { + uint32 ID; float DPS[7]; uint16 ItemLevel; }; struct ItemDamageOneHandEntry { + uint32 ID; float DPS[7]; uint16 ItemLevel; }; struct ItemDamageOneHandCasterEntry { + uint32 ID; float DPS[7]; uint16 ItemLevel; }; struct ItemDamageTwoHandEntry { + uint32 ID; float DPS[7]; uint16 ItemLevel; }; struct ItemDamageTwoHandCasterEntry { + uint32 ID; float DPS[7]; uint16 ItemLevel; }; struct ItemDisenchantLootEntry { + uint32 ID; uint16 MinItemLevel; uint16 MaxItemLevel; uint16 RequiredDisenchantSkill; @@ -1005,6 +1247,7 @@ struct ItemDisenchantLootEntry struct ItemEffectEntry { + uint32 ID; uint32 ItemID; uint32 SpellID; int32 Cooldown; @@ -1021,6 +1264,7 @@ struct ItemEffectEntry struct ItemExtendedCostEntry { + uint32 ID; uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // required item id uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES]; // required curency count uint32 RequiredMoney; @@ -1036,6 +1280,7 @@ struct ItemExtendedCostEntry struct ItemLimitCategoryEntry { + uint32 ID; LocalizedString* Name; uint8 Quantity; uint8 Flags; @@ -1048,10 +1293,12 @@ struct ItemModifiedAppearanceEntry uint16 AppearanceID; uint8 AppearanceModID; uint8 Index; + uint8 SourceType; }; struct ItemPriceBaseEntry { + uint32 ID; float ArmorFactor; float WeaponFactor; uint16 ItemLevel; @@ -1061,12 +1308,14 @@ struct ItemPriceBaseEntry struct ItemRandomPropertiesEntry { + uint32 ID; LocalizedString* Name; uint16 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; }; struct ItemRandomSuffixEntry { + uint32 ID; LocalizedString* Name; LocalizedString* InternalName; uint16 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; @@ -1077,14 +1326,17 @@ struct ItemRandomSuffixEntry struct ItemSetEntry { + uint32 ID; LocalizedString* Name; uint32 ItemID[MAX_ITEM_SET_ITEMS]; + uint32 Unknown703; uint16 RequiredSkillRank; uint8 RequiredSkill; }; struct ItemSetSpellEntry { + uint32 ID; uint32 SpellID; uint16 ItemSetID; uint16 ChrSpecID; @@ -1097,6 +1349,7 @@ struct ItemSetSpellEntry struct ItemSparseEntry { + uint32 ID; uint32 Flags[MAX_ITEM_PROTO_FLAGS]; float Unk1; float Unk2; @@ -1159,10 +1412,12 @@ struct ItemSparseEntry uint8 CurrencySubstitutionID; uint8 CurrencySubstitutionCount; uint8 ArtifactID; + uint8 RequiredExpansion; }; struct ItemSpecEntry { + uint32 ID; uint16 SpecID; uint8 MinLevel; uint8 MaxLevel; @@ -1173,17 +1428,14 @@ struct ItemSpecEntry struct ItemSpecOverrideEntry { + uint32 ID; uint32 ItemID; uint16 SpecID; }; -struct ItemToBattlePetSpeciesEntry -{ - uint16 BattlePetSpeciesID; -}; - struct ItemXBonusTreeEntry { + uint32 ID; uint32 ItemID; uint16 BonusTreeID; }; @@ -1192,13 +1444,86 @@ struct ItemXBonusTreeEntry struct KeyChainEntry { + uint32 ID; uint8 Key[KEYCHAIN_SIZE]; }; +struct LfgDungeonsEntry +{ + uint32 ID; + LocalizedString* Name; + uint32 Flags; + char const* TextureFilename; + LocalizedString* Description; + uint16 MaxLevel; + uint16 TargetLevelMax; + int16 MapID; + uint16 RandomID; + uint16 ScenarioID; + uint16 LastBossJournalEncounterID; + uint16 BonusReputationAmount; + uint16 MentorItemLevel; + uint8 MinLevel; + uint8 TargetLevel; + uint8 TargetLevelMin; + uint8 DifficultyID; + uint8 Type; + uint8 Faction; + uint8 Expansion; + uint8 OrderIndex; + uint8 GroupID; + uint8 CountTank; + uint8 CountHealer; + uint8 CountDamage; + uint8 MinCountTank; + uint8 MinCountHealer; + uint8 MinCountDamage; + uint8 SubType; + uint8 MentorCharLevel; + + // Helpers + uint32 Entry() const { return ID + (Type << 24); } +}; + +struct LightEntry +{ + uint32 ID; + DBCPosition3D Pos; + float FalloffStart; + float FalloffEnd; + uint16 MapID; + uint16 LightParamsID[8]; +}; + +struct LiquidTypeEntry +{ + uint32 ID; + LocalizedString* Name; + uint32 SpellID; + float MaxDarkenDepth; + float FogDarkenIntensity; + float AmbDarkenIntensity; + float DirDarkenIntensity; + float ParticleScale; + char const* Texture[6]; + uint32 Color[2]; + float Float[18]; + uint32 Int[4]; + uint16 Flags; + uint16 SoundID; + uint8 Type; + uint8 LightID; + uint8 ParticleMovement; + uint8 ParticleTexSlots; + uint8 MaterialID; + uint8 DepthTexCount[6]; +}; + #define MAX_LOCK_CASE 8 struct LockEntry { + uint32 ID; uint32 Index[MAX_LOCK_CASE]; uint16 Skill[MAX_LOCK_CASE]; uint8 Type[MAX_LOCK_CASE]; @@ -1207,6 +1532,7 @@ struct LockEntry struct MailTemplateEntry { + uint32 ID; LocalizedString* Body; }; @@ -1218,7 +1544,6 @@ struct MapEntry uint32 MapType; float MinimapIconScale; DBCPosition2D CorpsePos; // entrance coordinates in ghost mode (in most cases = normal entrance) - uint32 RaidOffset; LocalizedString* MapName; LocalizedString* MapDescription0; // Horde LocalizedString* MapDescription1; // Alliance @@ -1266,8 +1591,31 @@ struct MapEntry bool IsGarrison() const { return (Flags & MAP_FLAG_GARRISON) != 0; } }; +struct MapDifficultyEntry +{ + uint32 ID; + LocalizedString* Message_lang; // m_message_lang (text showed when transfer to map failed) + uint32 Context; + uint16 MapID; + uint8 DifficultyID; + uint8 RaidDurationType; // 1 means daily reset, 2 means weekly + uint8 MaxPlayers; // m_maxPlayers some heroic versions have 0 when expected same amount as in normal version + uint8 LockID; + uint8 ItemBonusTreeModID; + + uint32 GetRaidDuration() const + { + if (RaidDurationType == 1) + return 86400; + if (RaidDurationType == 2) + return 604800; + return 0; + } +}; + struct ModifierTreeEntry { + uint32 ID; uint32 Asset[2]; uint16 Parent; uint8 Type; @@ -1293,17 +1641,18 @@ struct MountEntry struct MountCapabilityEntry { uint32 ID; + uint32 RequiredAura; uint32 RequiredSpell; uint32 SpeedModSpell; uint16 RequiredRidingSkill; uint16 RequiredArea; int16 RequiredMap; uint8 Flags; - uint8 RequiredAura; }; struct MountTypeXCapabilityEntry { + uint32 ID; uint16 MountTypeID; uint16 MountCapabilityID; uint8 OrderIndex; @@ -1311,6 +1660,7 @@ struct MountTypeXCapabilityEntry struct MovieEntry { + uint32 ID; uint32 AudioFileDataID; uint32 SubtitleFileDataID; uint8 Volume; @@ -1319,6 +1669,7 @@ struct MovieEntry struct NameGenEntry { + uint32 ID; LocalizedString* Name; uint8 Race; uint8 Sex; @@ -1326,17 +1677,20 @@ struct NameGenEntry struct NamesProfanityEntry { + uint32 ID; char const* Name; int8 Language; }; struct NamesReservedEntry { + uint32 ID; char const* Name; }; struct NamesReservedLocaleEntry { + uint32 ID; char const* Name; uint8 LocaleMask; }; @@ -1345,6 +1699,7 @@ struct NamesReservedLocaleEntry struct OverrideSpellDataEntry { + uint32 ID; uint32 SpellID[MAX_OVERRIDE_SPELL]; uint32 PlayerActionbarFileDataID; uint8 Flags; @@ -1352,17 +1707,20 @@ struct OverrideSpellDataEntry struct PhaseEntry { + uint32 ID; uint16 Flags; }; struct PhaseXPhaseGroupEntry { + uint32 ID; uint16 PhaseID; uint16 PhaseGroupID; }; struct PlayerConditionEntry { + uint32 ID; uint32 RaceMask; uint32 SkillLogic; uint32 ReputationLogic; @@ -1447,6 +1805,7 @@ struct PlayerConditionEntry struct PowerDisplayEntry { + uint32 ID; char const* GlobalStringBaseTag; uint8 PowerType; uint8 Red; @@ -1456,6 +1815,7 @@ struct PowerDisplayEntry struct PvPDifficultyEntry { + uint32 ID; uint16 MapID; uint8 BracketID; uint8 MinLevel; @@ -1467,16 +1827,19 @@ struct PvPDifficultyEntry struct QuestFactionRewardEntry { + uint32 ID; int16 QuestRewFactionValue[10]; }; struct QuestMoneyRewardEntry { + uint32 ID; uint32 Money[10]; }; struct QuestPackageItemEntry { + uint32 ID; uint32 ItemID; uint16 QuestPackageID; uint8 ItemCount; @@ -1485,28 +1848,34 @@ struct QuestPackageItemEntry struct QuestSortEntry { + uint32 ID; LocalizedString* SortName; + uint8 SortOrder; }; struct QuestV2Entry { + uint32 ID; uint16 UniqueBitFlag; }; struct QuestXPEntry { + uint32 ID; uint16 Exp[10]; }; struct RandPropPointsEntry { - uint16 EpicPropertiesPoints[5]; - uint16 RarePropertiesPoints[5]; - uint16 UncommonPropertiesPoints[5]; + uint32 ID; + uint32 EpicPropertiesPoints[5]; + uint32 RarePropertiesPoints[5]; + uint32 UncommonPropertiesPoints[5]; }; struct ScalingStatDistributionEntry { + uint32 ID; uint16 ItemLevelCurveID; uint8 MinLevel; uint8 MaxLevel; @@ -1514,6 +1883,7 @@ struct ScalingStatDistributionEntry struct SkillLineEntry { + uint32 ID; LocalizedString* DisplayName; LocalizedString* Description; LocalizedString* AlternateVerb; @@ -1526,6 +1896,7 @@ struct SkillLineEntry struct SkillLineAbilityEntry { + uint32 ID; uint32 SpellID; uint32 RaceMask; uint32 ClassMask; @@ -1542,9 +1913,10 @@ struct SkillLineAbilityEntry struct SkillRaceClassInfoEntry { + uint32 ID; int32 RaceMask; + int32 ClassMask; uint16 SkillID; - int16 ClassMask; uint16 Flags; uint16 SkillTierID; uint8 Availability; @@ -1554,7 +1926,6 @@ struct SkillRaceClassInfoEntry struct SoundKitEntry { uint32 ID; - uint8 SoundType; LocalizedString* Name; float VolumeFloat; float MinDistance; @@ -1566,9 +1937,10 @@ struct SoundKitEntry float PitchAdjust; uint16 Flags; uint16 SoundEntriesAdvancedID; + uint16 BusOverwriteID; + uint8 SoundType; uint8 EAXDef; uint8 DialogType; - uint8 BusOverwriteID; uint8 Unk700; }; @@ -1595,6 +1967,7 @@ struct SpellEntry struct SpellAuraOptionsEntry { + uint32 ID; uint32 SpellID; uint32 ProcCharges; uint32 ProcTypeMask; @@ -1607,6 +1980,7 @@ struct SpellAuraOptionsEntry struct SpellAuraRestrictionsEntry { + uint32 ID; uint32 SpellID; uint32 CasterAuraSpell; uint32 TargetAuraSpell; @@ -1621,6 +1995,7 @@ struct SpellAuraRestrictionsEntry struct SpellCastTimesEntry { + uint32 ID; int32 CastTime; int32 MinCastTime; int16 CastTimePerLevel; @@ -1628,6 +2003,7 @@ struct SpellCastTimesEntry struct SpellCastingRequirementsEntry { + uint32 ID; uint32 SpellID; uint16 MinFactionID; uint16 RequiredAreasID; @@ -1639,6 +2015,7 @@ struct SpellCastingRequirementsEntry struct SpellCategoriesEntry { + uint32 ID; uint32 SpellID; uint16 Category; uint16 StartRecoveryCategory; @@ -1652,8 +2029,10 @@ struct SpellCategoriesEntry struct SpellCategoryEntry { + uint32 ID; LocalizedString* Name; int32 ChargeRecoveryTime; + uint32 Unk703; uint8 Flags; uint8 UsesPerWeek; uint8 MaxCharges; @@ -1661,6 +2040,7 @@ struct SpellCategoryEntry struct SpellClassOptionsEntry { + uint32 ID; uint32 SpellID; flag128 SpellClassMask; uint16 ModalNextSpell; @@ -1669,6 +2049,7 @@ struct SpellClassOptionsEntry struct SpellCooldownsEntry { + uint32 ID; uint32 SpellID; uint32 CategoryRecoveryTime; uint32 RecoveryTime; @@ -1678,6 +2059,7 @@ struct SpellCooldownsEntry struct SpellDurationEntry { + uint32 ID; int32 Duration; int32 MaxDuration; int16 DurationPerLevel; @@ -1719,6 +2101,7 @@ struct SpellEffectEntry struct SpellEffectScalingEntry { + uint32 ID; float Coefficient; float Variance; float ResourceCoefficient; @@ -1727,6 +2110,7 @@ struct SpellEffectScalingEntry struct SpellEquippedItemsEntry { + uint32 ID; uint32 SpellID; int32 EquippedItemInventoryTypeMask; int32 EquippedItemSubClassMask; @@ -1735,11 +2119,13 @@ struct SpellEquippedItemsEntry struct SpellFocusObjectEntry { + uint32 ID; LocalizedString* Name; }; struct SpellInterruptsEntry { + uint32 ID; uint32 SpellID; uint32 AuraInterruptFlags[2]; uint32 ChannelInterruptFlags[2]; @@ -1747,8 +2133,35 @@ struct SpellInterruptsEntry uint8 DifficultyID; }; +#define MAX_ITEM_ENCHANTMENT_EFFECTS 3 + +struct SpellItemEnchantmentEntry +{ + uint32 ID; + uint32 EffectSpellID[MAX_ITEM_ENCHANTMENT_EFFECTS]; + LocalizedString* Name; + float EffectScalingPoints[MAX_ITEM_ENCHANTMENT_EFFECTS]; + uint32 PlayerConditionID; + uint32 TransmogCost; + uint32 TextureFileDataID; + uint16 EffectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS]; + uint16 ItemVisual; + uint16 Flags; + uint16 RequiredSkillID; + uint16 RequiredSkillRank; + uint16 ItemLevel; + uint8 Charges; + uint8 Effect[MAX_ITEM_ENCHANTMENT_EFFECTS]; + uint8 ConditionID; + uint8 MinLevel; + uint8 MaxLevel; + int8 ScalingClass; + int8 ScalingClassRestricted; +}; + struct SpellItemEnchantmentConditionEntry { + uint32 ID; uint8 LTOperandType[5]; uint8 LTOperand[5]; uint8 Operator[5]; @@ -1759,6 +2172,7 @@ struct SpellItemEnchantmentConditionEntry struct SpellLearnSpellEntry { + uint32 ID; uint32 LearnSpellID; uint32 SpellID; uint32 OverridesSpellID; @@ -1766,6 +2180,7 @@ struct SpellLearnSpellEntry struct SpellLevelsEntry { + uint32 ID; uint32 SpellID; uint16 BaseLevel; uint16 MaxLevel; @@ -1776,6 +2191,7 @@ struct SpellLevelsEntry struct SpellMiscEntry { + uint32 ID; uint32 Attributes; uint32 AttributesEx; uint32 AttributesExB; @@ -1844,6 +2260,7 @@ struct SpellProcsPerMinuteModEntry struct SpellRadiusEntry { + uint32 ID; float Radius; float RadiusPerLevel; float RadiusMin; @@ -1852,6 +2269,7 @@ struct SpellRadiusEntry struct SpellRangeEntry { + uint32 ID; float MinRangeHostile; float MinRangeFriend; float MaxRangeHostile; @@ -1865,6 +2283,7 @@ struct SpellRangeEntry struct SpellReagentsEntry { + uint32 ID; uint32 SpellID; int32 Reagent[MAX_SPELL_REAGENTS]; uint16 ReagentCount[MAX_SPELL_REAGENTS]; @@ -1872,14 +2291,17 @@ struct SpellReagentsEntry struct SpellScalingEntry { + uint32 ID; uint32 SpellID; uint16 ScalesFromItemLevel; int8 ScalingClass; + uint8 MinScalingLevel; uint8 MaxScalingLevel; }; struct SpellShapeshiftEntry { + uint32 ID; uint32 SpellID; uint32 ShapeshiftExclude[2]; uint32 ShapeshiftMask[2]; @@ -1890,6 +2312,7 @@ struct SpellShapeshiftEntry struct SpellShapeshiftFormEntry { + uint32 ID; LocalizedString* Name; float WeaponDamageVariance; uint32 Flags; @@ -1904,6 +2327,7 @@ struct SpellShapeshiftFormEntry struct SpellTargetRestrictionsEntry { + uint32 ID; uint32 SpellID; float ConeAngle; float Width; @@ -1918,6 +2342,7 @@ struct SpellTargetRestrictionsEntry struct SpellTotemsEntry { + uint32 ID; uint32 SpellID; uint32 Totem[MAX_SPELL_TOTEMS]; uint8 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; @@ -1936,6 +2361,7 @@ struct SpellXSpellVisualEntry struct SummonPropertiesEntry { + uint32 ID; uint32 Category; uint32 Faction; uint32 Type; @@ -1943,6 +2369,23 @@ struct SummonPropertiesEntry uint32 Flags; }; +#define MAX_TALENT_TIERS 7 +#define MAX_TALENT_COLUMNS 3 + +struct TalentEntry +{ + uint32 ID; + uint32 SpellID; + uint32 OverridesSpellID; + LocalizedString* Description; + uint16 SpecID; + uint8 TierID; + uint8 ColumnIndex; + uint8 Flags; + uint8 CategoryMask[2]; + uint8 ClassID; +}; + struct TaxiNodesEntry { uint32 ID; @@ -1979,6 +2422,7 @@ struct TaxiPathNodeEntry struct TotemCategoryEntry { + uint32 ID; LocalizedString* Name; uint32 CategoryMask; uint8 CategoryType; @@ -1995,6 +2439,7 @@ struct ToyEntry struct TransportAnimationEntry { + uint32 ID; uint32 TransportID; uint32 TimeIndex; DBCPosition3D Pos; @@ -2003,6 +2448,7 @@ struct TransportAnimationEntry struct TransportRotationEntry { + uint32 ID; uint32 TransportID; uint32 TimeIndex; float X; @@ -2013,6 +2459,7 @@ struct TransportRotationEntry struct UnitPowerBarEntry { + uint32 ID; uint32 MaxPower; float RegenerationPeace; float RegenerationCombat; @@ -2031,8 +2478,45 @@ struct UnitPowerBarEntry uint8 BarType; }; +#define MAX_VEHICLE_SEATS 8 + +struct VehicleEntry +{ + uint32 ID; + uint32 Flags; + float TurnSpeed; + float PitchSpeed; + float PitchMin; + float PitchMax; + float MouseLookOffsetPitch; + float CameraFadeDistScalarMin; + float CameraFadeDistScalarMax; + float CameraPitchOffset; + float FacingLimitRight; + float FacingLimitLeft; + float MsslTrgtTurnLingering; + float MsslTrgtPitchLingering; + float MsslTrgtMouseLingering; + float MsslTrgtEndOpacity; + float MsslTrgtArcSpeed; + float MsslTrgtArcRepeat; + float MsslTrgtArcWidth; + float MsslTrgtImpactRadius[2]; + char const* MsslTrgtArcTexture; + char const* MsslTrgtImpactTexture; + char const* MsslTrgtImpactModel[2]; + float CameraYawOffset; + float MsslTrgtImpactTexRadius; + uint16 SeatID[MAX_VEHICLE_SEATS]; + uint16 VehicleUIIndicatorID; + uint16 PowerDisplayID[3]; + uint8 FlagsB; + uint8 UILocomotionType; +}; + struct VehicleSeatEntry { + uint32 ID; uint32 Flags[3]; DBCPosition3D AttachmentOffset; float EnterPreDelay; @@ -2054,6 +2538,8 @@ struct VehicleSeatEntry float PassengerRoll; float VehicleEnterAnimDelay; float VehicleExitAnimDelay; + uint32 EnterUISoundID; + uint32 ExitUISoundID; float CameraEnteringDelay; float CameraEnteringDuration; float CameraExitingDelay; @@ -2077,8 +2563,6 @@ struct VehicleSeatEntry int16 VehicleEnterAnim; int16 VehicleExitAnim; int16 VehicleRideAnimLoop; - uint16 EnterUISoundID; - uint16 ExitUISoundID; uint16 EnterAnimKitID; uint16 RideAnimKitID; uint16 ExitAnimKitID; @@ -2109,10 +2593,51 @@ struct VehicleSeatEntry bool IsEjectable() const { return (Flags[1] & VEHICLE_SEAT_FLAG_B_EJECTABLE) != 0; } }; +struct WMOAreaTableEntry +{ + uint32 ID; + int32 WMOGroupID; // used in group WMO + LocalizedString* AreaName; + int16 WMOID; // used in root WMO + uint16 AmbienceID; + uint16 ZoneMusic; + uint16 IntroSound; + uint16 AreaTableID; + uint16 UWIntroSound; + uint16 UWAmbience; + int8 NameSet; // used in adt file + uint8 SoundProviderPref; + uint8 SoundProviderPrefUnderwater; + uint8 Flags; + uint8 UWZoneMusic; +}; + +struct WorldMapAreaEntry +{ + uint32 ID; + char const* AreaName; + float LocLeft; + float LocRight; + float LocTop; + float LocBottom; + uint16 MapID; + uint16 AreaID; + int16 DisplayMapID; + int16 DefaultDungeonFloor; + uint16 ParentWorldMapID; + uint16 Flags; + uint16 PlayerConditionID; + uint8 LevelRangeMin; + uint8 LevelRangeMax; + uint8 BountySetID; + uint8 BountyBoardLocation; +}; + #define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4 struct WorldMapOverlayEntry { + uint32 ID; char const* TextureName; uint16 MapAreaID; // idx in WorldMapArea.dbc uint16 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; @@ -2125,10 +2650,12 @@ struct WorldMapOverlayEntry uint16 HitRectBottom; uint16 HitRectRight; uint16 PlayerConditionID; + uint8 Flags; }; struct WorldMapTransformsEntry { + uint32 ID; DBCPosition3D RegionMin; DBCPosition3D RegionMax; DBCPosition2D RegionOffset; @@ -2140,24 +2667,14 @@ struct WorldMapTransformsEntry uint8 Flags; }; -#pragma pack(pop) - -struct TaxiPathBySourceAndDestination +struct WorldSafeLocsEntry { - TaxiPathBySourceAndDestination() : ID(0), price(0) { } - TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) { } - uint32 ID; - uint32 price; + DBCPosition3D Loc; + float Facing; + LocalizedString* AreaName; + uint16 MapID; }; -typedef std::map TaxiPathSetForSource; -typedef std::map TaxiPathSetBySource; - -typedef std::vector TaxiPathNodeList; -typedef std::vector TaxiPathNodesByPath; - -#define TaxiMaskSize 226 -typedef std::array TaxiMask; - +#pragma pack(pop) #endif diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h index 58ab1319b98..5e2bf12a12a 100644 --- a/src/server/game/DataStores/DB2fmt.h +++ b/src/server/game/DataStores/DB2fmt.h @@ -21,27 +21,32 @@ char const AchievementFormat[] = "nssishhhhhhhbbb"; char const AnimKitFormat[] = "dihh"; char const AreaGroupMemberFormat[] = "dhh"; -char const AreaTableFormat[] = "diiSfshhhhhhhhhhhhhbbbbbbbbb"; +char const AreaTableFormat[] = "diiSfshhhhhhhhhhhhhhbbbbbbbb"; char const AreaTriggerFormat[] = "nffffffffhhhhhbbb"; char const ArmorLocationFormat[] = "dfffff"; char const AuctionHouseFormat[] = "dshbb"; char const BankBagSlotPricesFormat[] = "di"; +char const BannedAddOnsFormat[] = "dSSb"; char const BarberShopStyleFormat[] = "nssfbbbb"; char const BattlePetBreedQualityFormat[] = "dfb"; char const BattlePetBreedStateFormat[] = "nhbb"; char const BattlePetSpeciesFormat[] = "niiisshbb"; char const BattlePetSpeciesStateFormat[] = "nihb"; +char const BattlemasterListFormat[] = "nsishhhhhhhhhhhhhhhhhhbbbbbbbbb"; char const BroadcastTextFormat[] = "dsshhhhhhhhbb"; char const CharStartOutfitFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiibbbbb"; +char const CharSectionsFormat[] = "niiihbbbbb"; char const CharTitlesFormat[] = "dsshhb"; char const ChatChannelsFormat[] = "dissb"; +char const ChrClassesFormat[] = "nSsssSiiihhhbbbbbbb"; char const ChrClassesXPowerTypesFormat[] = "dbb"; -char const ChrRacesFormat[] = "niSSsssSSSiiffffffihhhhhhhhhhhhbbbbbbbbb"; +char const ChrRacesFormat[] = "niSSsssSSSiiffffffihhhhhhhhhhhhbbbbbbbbbb"; char const ChrSpecializationFormat[] = "niiiisssShbbbbb"; char const CinematicSequencesFormat[] = "dhhhhhhhhh"; -char const CreatureDisplayInfoFormat[] = "niffiiiSiiihhhhhhbbbbbb"; +char const CreatureDisplayInfoFormat[] = "diffiiiSiiifhhhhhhbbbbbb"; char const CreatureDisplayInfoExtraFormat[] = "diibbbbbbbbbbbb"; char const CreatureFamilyFormat[] = "dffsshhhbbbb"; +char const CreatureModelDataFormat[] = "diifffffffffffffffffffffffhhbbbbbbbb"; char const CreatureTypeFormat[] = "dsb"; char const CriteriaFormat[] = "diiihhhbbbbb"; char const CriteriaTreeFormat[] = "dishhhhb"; @@ -52,30 +57,31 @@ char const DifficultyFormat[] = "nsbbbbbbbbbbbb"; char const DungeonEncounterFormat[] = "dsihhhbbb"; char const DurabilityCostsFormat[] = "dhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"; char const DurabilityQualityFormat[] = "df"; -char const EmotesFormat[] = "dSiihhbb"; +char const EmotesFormat[] = "dSiiiihhhb"; char const EmotesTextFormat[] = "dsh"; char const EmotesTextSoundFormat[] = "dhhbbb"; +char const FactionFormat[] = "diiiiiiiiffsshhhhhhhhhhbbbbb"; +char const FactionTemplateFormat[] = "dhhhhhhhhhhbbb"; char const GameObjectsFormat[] = "nffffffffiiiiiiiishhhhbb"; char const GameObjectDisplayInfoFormat[] = "diffffffffh"; -char const GameTablesFormat[] = "dshb"; -char const GarrAbilityFormat[] = "nssihbbb"; +char const GarrAbilityFormat[] = "nssihhbb"; char const GarrBuildingFormat[] = "diissssihhhhhhbbbbbbbbbbb"; char const GarrBuildingPlotInstFormat[] = "nffhhb"; -char const GarrClassSpecFormat[] = "nssshbb"; -char const GarrFollowerFormat[] = "diissiihhbbbbbbbbbbbbbbbb"; +char const GarrClassSpecFormat[] = "nssshbbb"; +char const GarrFollowerFormat[] = "niissiihhbbbbbbbbbbbbbbbbbb"; char const GarrFollowerXAbilityFormat[] = "dhhb"; -char const GarrPlotFormat[] = "dsiibbbbb"; +char const GarrPlotFormat[] = "dsiihhbbb"; char const GarrPlotBuildingFormat[] = "dbb"; char const GarrPlotInstanceFormat[] = "dsb"; char const GarrSiteLevelFormat[] = "dffhhhbbbbb"; char const GarrSiteLevelPlotInstFormat[] = "dffhbb"; -char const GemPropertiesFormat[] = "dihhbb"; +char const GemPropertiesFormat[] = "dihh"; char const GlyphPropertiesFormat[] = "dihbb"; -char const GlyphSlotFormat[] = "dbb"; +char const GlyphSlotFormat[] = "dhb"; char const GuildColorBackgroundFormat[] = "dbbb"; char const GuildColorBorderFormat[] = "dbbb"; char const GuildColorEmblemFormat[] = "dbbb"; -char const GuildPerkSpellsFormat[] = "dib"; +char const GuildPerkSpellsFormat[] = "di"; char const HeirloomFormat[] = "nisiiiiihhbb"; char const HolidaysEntryFormat[] = "diiiiiiiiiiiiiiiiShhhhhhhhhhhbbbbbbbbbbbbbbbb"; char const ImportPriceArmorFormat[] = "dffff"; @@ -83,7 +89,7 @@ char const ImportPriceQualityFormat[] = "df"; char const ImportPriceShieldFormat[] = "df"; char const ImportPriceWeaponFormat[] = "df"; char const ItemFormat[] = "dibbbbbbb"; -char const ItemAppearanceFormat[] = "diib"; +char const ItemAppearanceFormat[] = "diiib"; char const ItemArmorQualityFormat[] = "dfffffffh"; char const ItemArmorShieldFormat[] = "dfffffffh"; char const ItemArmorTotalFormat[] = "dffffh"; @@ -101,24 +107,27 @@ char const ItemDisenchantLootFormat[] = "dhhhbbb"; char const ItemEffectFormat[] = "diiiihhhbb"; char const ItemExtendedCostFormat[] = "diiiiiiiiiiihhhhhhhhhhhbbbbb"; char const ItemLimitCategoryFormat[] = "dsbb"; -char const ItemModifiedAppearanceFormat[] = "nihbb"; +char const ItemModifiedAppearanceFormat[] = "nihbbb"; char const ItemPriceBaseFormat[] = "dffh"; char const ItemRandomPropertiesFormat[] = "dshhhhh"; char const ItemRandomSuffixFormat[] = "dsshhhhhhhhhh"; -char const ItemSetFormat[] = "dsiiiiiiiiiiiiiiiiihb"; +char const ItemSetFormat[] = "dsiiiiiiiiiiiiiiiiiihb"; char const ItemSetSpellFormat[] = "dihhb"; -char const ItemSparseFormat[] = "iiiffiiiiiiiiiiiiiiiiifffffffffffsssssififhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; +char const ItemSparseFormat[] = "diiiffiiiiiiiiiiiiiiiiifffffffffffsssssififhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const ItemSpecFormat[] = "dhbbbbb"; char const ItemSpecOverrideFormat[] = "dih"; -char const ItemToBattlePetSpeciesFormat[] = "dh"; char const ItemXBonusTreeFormat[] = "dih"; char const KeyChainFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; +char const LfgDungeonsFormat[] = "nsiSshhhhhhhhbbbbbbbbbbbbbbbbb"; +char const LightFormat[] = "dfffffhhhhhhhhh"; +char const LiquidTypeFormat[] = "dsifffffssssssiiffffffffffffffffffiiiihhbbbbbbbbbbb"; char const LockFormat[] = "diiiiiiiihhhhhhhhbbbbbbbbbbbbbbbb"; char const MailTemplateFormat[] = "ds"; -char const MapFormat[] = "nsiifffissshhhhhhbbbbb"; +char const MapFormat[] = "dsiifffssshhhhhhbbbbb"; +char const MapDifficultyFormat[] = "dsihbbbbb"; char const ModifierTreeFormat[] = "diihbbbb"; char const MountFormat[] = "niissshhhb"; -char const MountCapabilityFormat[] = "niihhhbb"; +char const MountCapabilityFormat[] = "niiihhhb"; char const MountTypeXCapabilityFormat[] = "dhhb"; char const MovieFormat[] = "diibb"; char const NameGenFormat[] = "dsbb"; @@ -134,15 +143,15 @@ char const PvpDifficultyFormat[] = "dhbbb"; char const QuestFactionRewardFormat[] = "dhhhhhhhhhh"; char const QuestMoneyRewardFormat[] = "diiiiiiiiii"; char const QuestPackageItemFormat[] = "dihbb"; -char const QuestSortFormat[] = "ds"; +char const QuestSortFormat[] = "dsb"; char const QuestV2Format[] = "dh"; char const QuestXPFormat[] = "dhhhhhhhhhh"; -char const RandPropPointsFormat[] = "dhhhhhhhhhhhhhhh"; +char const RandPropPointsFormat[] = "diiiiiiiiiiiiiii"; char const ScalingStatDistributionFormat[] = "dhbb"; char const SkillLineFormat[] = "dssshhbbb"; char const SkillLineAbilityFormat[] = "diiiihhhhhhbb"; -char const SkillRaceClassInfoFormat[] = "dihhhhbb"; -char const SoundKitFormat[] = "nsffffffffhhbbbbb"; +char const SkillRaceClassInfoFormat[] = "diihhhbb"; +char const SoundKitFormat[] = "nsffffffffhhhbbbb"; char const SpecializationSpellsFormat[] = "niishb"; char const SpellFormat[] = "nssssih"; char const SpellAuraOptionsFormat[] = "diiiihbbb"; @@ -150,7 +159,7 @@ char const SpellAuraRestrictionsFormat[] = "diiiiibbbbb"; char const SpellCastTimesFormat[] = "diih"; char const SpellCastingRequirementsFormat[] = "dihhhbbb"; char const SpellCategoriesFormat[] = "dihhhbbbbb"; -char const SpellCategoryFormat[] = "dsibbb"; +char const SpellCategoryFormat[] = "dsiibbb"; char const SpellClassOptionsFormat[] = "diiiiihb"; char const SpellCooldownsFormat[] = "diiiib"; char const SpellDurationFormat[] = "diih"; @@ -159,6 +168,7 @@ char const SpellEffectScalingFormat[] = "dfffi"; char const SpellEquippedItemsFormat[] = "diiib"; char const SpellFocusObjectFormat[] = "ds"; char const SpellInterruptsFormat[] = "diiiiihb"; +char const SpellItemEnchantmentFormat[] = "diiisfffiiihhhhhhhhbbbbbbbbb"; char const SpellItemEnchantmentConditionFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; char const SpellLearnSpellFormat[] = "diii"; char const SpellLevelsFormat[] = "dihhhbb"; @@ -168,13 +178,14 @@ char const SpellPowerDifficultyFormat[] = "nbb"; char const SpellRadiusFormat[] = "dffff"; char const SpellRangeFormat[] = "dffffssb"; char const SpellReagentsFormat[] = "diiiiiiiiihhhhhhhh"; -char const SpellScalingFormat[] = "dihbb"; +char const SpellScalingFormat[] = "dihbbb"; char const SpellShapeshiftFormat[] = "diiiiib"; char const SpellShapeshiftFormFormat[] = "dsfihhhhhhhhhhhhhhbbb"; char const SpellTargetRestrictionsFormat[] = "diffihhbb"; char const SpellTotemsFormat[] = "diiibb"; char const SpellXSpellVisualFormat[] = "nifhhhbb"; char const SummonPropertiesFormat[] = "diiiii"; +char const TalentFormat[] = "diishbbbbbb"; char const TaxiNodesFormat[] = "nfffsiiffhhhb"; char const TaxiPathFormat[] = "nhhh"; char const TaxiPathNodeFormat[] = "nfffihhhhbb"; @@ -183,8 +194,12 @@ char const ToyFormat[] = "nisbb"; char const TransportAnimationFormat[] = "diifffb"; char const TransportRotationFormat[] = "diiffff"; char const UnitPowerBarFormat[] = "diffiiiiiiiiiiiissssffhhbbb"; -char const VehicleSeatFormat[] = "diiiffffffffffffffffffffffffffffffffffihhhhhhhhhhhhhhhhhhhhhbbbbbb"; -char const WorldMapOverlayFormat[] = "dShhhhhhhhhhhhhh"; +char const VehicleFormat[] = "difffffffffffffffffffSSSSffhhhhhhhhhhhhbb"; +char const VehicleSeatFormat[] = "diiiffffffffffffffffffffffiiffffffffffffihhhhhhhhhhhhhhhhhhhbbbbbb"; +char const WMOAreaTableFormat[] = "nishhhhhhhbbbbb"; +char const WorldMapAreaFormat[] = "nSffffhhhhhhhbbbb"; +char const WorldMapOverlayFormat[] = "dShhhhhhhhhhhhhhb"; char const WorldMapTransformsFormat[] = "dfffffffffhhhhb"; +char const WorldSafeLocsFormat[] = "dffffsh"; #endif diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index f1f391f39ab..f71e105a62b 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -57,7 +57,7 @@ enum LevelLimit enum BattlegroundBracketId // bracketId for level ranges { BG_BRACKET_ID_FIRST = 0, - BG_BRACKET_ID_LAST = 10, + BG_BRACKET_ID_LAST = 11, // must be max value in PvPDificulty slot + 1 MAX_BATTLEGROUND_BRACKETS @@ -413,6 +413,25 @@ enum CriteriaTreeOperator CRITERIA_TREE_OPERATOR_ANY = 8 }; +enum CharSectionFlags +{ + SECTION_FLAG_PLAYER = 0x01, + SECTION_FLAG_DEATH_KNIGHT = 0x04, + SECTION_FLAG_DEMON_HUNTER = 0x40 +}; + +enum CharSectionType +{ + SECTION_TYPE_SKIN = 0, + SECTION_TYPE_FACE = 1, + SECTION_TYPE_FACIAL_HAIR = 2, + SECTION_TYPE_HAIR = 3, + SECTION_TYPE_UNDERWEAR = 4, + SECTION_TYPE_CUSTOM_DISPLAY_1 = 10, + SECTION_TYPE_CUSTOM_DISPLAY_2 = 12, + SECTION_TYPE_CUSTOM_DISPLAY_3 = 14 +}; + enum Difficulty : uint8 { DIFFICULTY_NONE = 0, diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp deleted file mode 100644 index 03e1c365bc7..00000000000 --- a/src/server/game/DataStores/DBCStores.cpp +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "DBCStores.h" -#include "Log.h" -#include "SharedDefines.h" -#include "SpellInfo.h" -#include "DBCfmt.h" -#include "Timer.h" -#include "DB2Stores.h" -#include - -struct WMOAreaTableTripple -{ - WMOAreaTableTripple(int32 r, int32 a, int32 g) : groupId(g), rootId(r), adtId(a) - { - } - - bool operator <(const WMOAreaTableTripple& b) const - { - return memcmp(this, &b, sizeof(WMOAreaTableTripple))<0; - } - - // ordered by entropy; that way memcmp will have a minimal medium runtime - int32 groupId; - int32 rootId; - int32 adtId; -}; - -typedef std::multimap CharSectionsMap; -typedef std::map> FactionTeamMap; -typedef std::map WMOAreaInfoByTripple; - -DBCStorage sBannedAddOnsStore(BannedAddOnsfmt); -DBCStorage sBattlemasterListStore(BattlemasterListfmt); - -DBCStorage sCharSectionsStore(CharSectionsfmt); -CharSectionsMap sCharSectionMap; -DBCStorage sChrClassesStore(ChrClassesfmt); -DBCStorage sCreatureModelDataStore(CreatureModelDatafmt); - -DBCStorage sFactionStore(Factionfmt); -static FactionTeamMap sFactionTeamMap; -DBCStorage sFactionTemplateStore(FactionTemplatefmt); - -DBCStorage sLFGDungeonStore(LFGDungeonfmt); -DBCStorage sLightStore(Lightfmt); -DBCStorage sLiquidTypeStore(LiquidTypefmt); - -DBCStorage sMapDifficultyStore(MapDifficultyfmt); // only for loading -MapDifficultyMap sMapDifficultyMap; - -DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); - -DBCStorage sTalentStore(Talentfmt); -TalentsByPosition sTalentByPos; - -DBCStorage sVehicleStore(Vehiclefmt); - -DBCStorage sWMOAreaTableStore(WMOAreaTablefmt); -static WMOAreaInfoByTripple sWMOAreaInfoByTripple; -DBCStorage sWorldMapAreaStore(WorldMapAreafmt); -DBCStorage sWorldSafeLocsStore(WorldSafeLocsfmt); - -GameTable sGtBarberShopCostBaseStore; -GameTable sGtChanceToMeleeCritBaseStore; -GameTable sGtChanceToMeleeCritStore; -GameTable sGtChanceToSpellCritBaseStore; -GameTable sGtChanceToSpellCritStore; -GameTable sGtCombatRatingsStore; -GameTable sGtItemSocketCostPerLevelStore; -GameTable sGtNPCManaCostScalerStore; -GameTable sGtNpcTotalHpStore[MAX_EXPANSIONS]; -GameTable sGtNpcDamageByClassStore[MAX_EXPANSIONS]; -GameTable sGtOCTBaseHPByClassStore; -GameTable sGtOCTBaseMPByClassStore; -GameTable sGtOCTHpPerStaminaStore; -GameTable sGtOCTLevelExperienceStore; -GameTable sGtRegenMPPerSptStore; -GameTable sGtSpellScalingStore; - -typedef std::list StoreProblemList; - -uint32 DBCFileCount = 0; -uint32 GameTableCount = 0; - -template -inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errors, DBCStorage& storage, std::string const& dbcPath, std::string const& filename, uint32 defaultLocale, std::string const* customFormat = NULL, std::string const* customIndexName = NULL) -{ - // compatibility format and C++ structure sizes - ASSERT(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T), - "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", - filename.c_str(), DBCFileLoader::GetFormatRecordSize(storage.GetFormat()), uint32(sizeof(T))); - - ++DBCFileCount; - std::string dbcFilename = dbcPath + localeNames[defaultLocale] + '/' + filename; - SqlDbc * sql = NULL; - if (customFormat) - sql = new SqlDbc(&filename, customFormat, customIndexName, storage.GetFormat()); - - if (storage.Load(dbcFilename.c_str(), sql)) - { - for (uint8 i = 0; i < TOTAL_LOCALES; ++i) - { - if (i == LOCALE_none || !(availableDbcLocales & (1 << i))) - continue; - - std::string localizedName(dbcPath); - localizedName.append(localeNames[i]); - localizedName.push_back('/'); - localizedName.append(filename); - - if (!storage.LoadStringsFrom(localizedName.c_str())) - availableDbcLocales &= ~(1< -inline void LoadGameTable(StoreProblemList& errors, std::string const& tableName, GameTable& storage, std::string const& dbcPath, std::string const& filename) -{ - // compatibility format and C++ structure sizes - ASSERT(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T), - "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", - filename.c_str(), DBCFileLoader::GetFormatRecordSize(storage.GetFormat()), uint32(sizeof(T))); - - ++GameTableCount; - std::string dbcFilename = dbcPath + filename; - - if (storage.Load(dbcFilename.c_str())) - { - bool found = false; - // Find table definition in GameTables.db2 - for (uint32 i = 0; i < sGameTablesStore.GetNumRows(); ++i) - { - GameTablesEntry const* gt = sGameTablesStore.LookupEntry(i); - if (!gt) - continue; - - for (uint32 l = 0; l < TOTAL_LOCALES; ++l) - { - if (l != LOCALE_none && tableName == gt->Name->Str[l]) - { - found = true; - storage.SetGameTableEntry(gt); - break; - } - } - - if (found) - break; - } - - ASSERT(found, "Game table %s definition not found in GameTables.db2", tableName.c_str()); - } - else - { - // sort problematic dbc to (1) non compatible and (2) non-existed - if (FILE* f = fopen(dbcFilename.c_str(), "rb")) - { - std::ostringstream stream; - stream << dbcFilename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version or a database-update has been forgotten."; - std::string buf = stream.str(); - errors.push_back(buf); - fclose(f); - } - else - errors.push_back(dbcFilename); - } -} - -void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale) -{ - uint32 oldMSTime = getMSTime(); - - std::string dbcPath = dataPath + "dbc/"; - - StoreProblemList bad_dbc_files; - uint32 availableDbcLocales = 0xFFFFFFFF; - -#define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, defaultLocale) - - LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20810 - LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20810 - LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20810 - LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20810 - LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20810 - LOAD_DBC(sFactionStore, "Faction.dbc");//20810 - LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20810 - LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20810 - LOAD_DBC(sLightStore, "Light.dbc"); //20810 - LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20810 - LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20810 - LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20810 - LOAD_DBC(sTalentStore, "Talent.dbc");//20810 - LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20810 - LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20810 - LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20810 - LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20810 - -#undef LOAD_DBC - - for (uint32 i = 0; i < sCharSectionsStore.GetNumRows(); ++i) - if (CharSectionsEntry const* entry = sCharSectionsStore.LookupEntry(i)) - if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races - sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); - - for (uint32 i = 0; i < sFactionStore.GetNumRows(); ++i) - { - FactionEntry const* faction = sFactionStore.LookupEntry(i); - if (faction && faction->ParentFactionID) - sFactionTeamMap[faction->ParentFactionID].push_back(i); - } - - // fill data - for (uint32 i = 0; i < sMapDifficultyStore.GetNumRows(); ++i) - if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i)) - sMapDifficultyMap[entry->MapID][entry->DifficultyID] = entry; - sMapDifficultyMap[0][0] = sMapDifficultyMap[1][0]; //map 0 is missing from MapDifficulty.dbc use this till its ported to sql - - for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) - { - if (TalentEntry const* talentInfo = sTalentStore.LookupEntry(i)) - { - if (talentInfo->ClassID < MAX_CLASSES && talentInfo->TierID < MAX_TALENT_TIERS && talentInfo->ColumnIndex < MAX_TALENT_COLUMNS) - sTalentByPos[talentInfo->ClassID][talentInfo->TierID][talentInfo->ColumnIndex].push_back(talentInfo); - else - TC_LOG_ERROR("server.loading", "Value of class (found: %u, max allowed %u) or (found: %u, max allowed %u) tier or column (found: %u, max allowed %u) is invalid.", - talentInfo->ClassID, MAX_CLASSES, talentInfo->TierID, MAX_TALENT_TIERS, talentInfo->ColumnIndex, MAX_TALENT_COLUMNS); - } - } - - for (uint32 i = 0; i < sWMOAreaTableStore.GetNumRows(); ++i) - if (WMOAreaTableEntry const* entry = sWMOAreaTableStore.LookupEntry(i)) - sWMOAreaInfoByTripple.insert(WMOAreaInfoByTripple::value_type(WMOAreaTableTripple(entry->WMOID, entry->NameSet, entry->WMOGroupID), entry)); - - // error checks - if (bad_dbc_files.size() >= DBCFileCount) - { - TC_LOG_ERROR("misc", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc/%s/", DBCFileCount, dataPath.c_str(), localeNames[defaultLocale]); - exit(1); - } - else if (!bad_dbc_files.empty()) - { - std::string str; - for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i) - str += *i + "\n"; - - TC_LOG_ERROR("misc", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str()); - exit(1); - } - - TC_LOG_INFO("server.loading", ">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime)); -} - -void LoadGameTables(const std::string& dataPath, uint32 defaultLocale) -{ - uint32 oldMSTime = getMSTime(); - - std::string dbcPath = dataPath + "dbc/" + localeNames[defaultLocale] + '/'; - - StoreProblemList bad_dbc_files; - -#define LOAD_GT(tableName, store, file) LoadGameTable(bad_dbc_files, tableName, store, dbcPath, file) - - LOAD_GT("BarberShopCostBase", sGtBarberShopCostBaseStore, "gtBarberShopCostBase.dbc"); // 20810 - LOAD_GT("CombatRatings", sGtCombatRatingsStore, "gtCombatRatings.dbc"); // 20810 - LOAD_GT("ChanceToMeleeCritBase", sGtChanceToMeleeCritBaseStore, "gtChanceToMeleeCritBase.dbc"); // 20810 - LOAD_GT("ChanceToMeleeCrit", sGtChanceToMeleeCritStore, "gtChanceToMeleeCrit.dbc"); // 20810 - LOAD_GT("ChanceToSpellCritBase", sGtChanceToSpellCritBaseStore, "gtChanceToSpellCritBase.dbc"); // 20810 - LOAD_GT("ChanceToSpellCrit", sGtChanceToSpellCritStore, "gtChanceToSpellCrit.dbc"); // 20810 - LOAD_GT("ItemSocketCostPerLevel", sGtItemSocketCostPerLevelStore, "gtItemSocketCostPerLevel.dbc"); // 20810 - LOAD_GT("NPCManaCostScaler", sGtNPCManaCostScalerStore, "gtNPCManaCostScaler.dbc"); // 20810 - LOAD_GT("NpcTotalHp", sGtNpcTotalHpStore[0], "gtNpcTotalHp.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp1", sGtNpcTotalHpStore[1], "gtNpcTotalHpExp1.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp2", sGtNpcTotalHpStore[2], "gtNpcTotalHpExp2.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp3", sGtNpcTotalHpStore[3], "gtNpcTotalHpExp3.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp4", sGtNpcTotalHpStore[4], "gtNpcTotalHpExp4.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp5", sGtNpcTotalHpStore[5], "gtNpcTotalHpExp5.dbc"); // 20810 - LOAD_GT("NpcTotalHpExp6", sGtNpcTotalHpStore[6], "gtNpcTotalHpExp6.dbc"); // 20810 - LOAD_GT("NpcDamageByClass", sGtNpcDamageByClassStore[0], "gtNpcDamageByClass.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp1", sGtNpcDamageByClassStore[1], "gtNpcDamageByClassExp1.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp2", sGtNpcDamageByClassStore[2], "gtNpcDamageByClassExp2.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp3", sGtNpcDamageByClassStore[3], "gtNpcDamageByClassExp3.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp4", sGtNpcDamageByClassStore[4], "gtNpcDamageByClassExp4.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp5", sGtNpcDamageByClassStore[5], "gtNpcDamageByClassExp5.dbc"); // 20810 - LOAD_GT("NpcDamageByClassExp6", sGtNpcDamageByClassStore[6], "gtNpcDamageByClassExp6.dbc"); // 20810 - LOAD_GT("OCTHPPerStamina", sGtOCTHpPerStaminaStore, "gtOCTHpPerStamina.dbc"); // 20810 - LOAD_GT("OCTLevelExperience", sGtOCTLevelExperienceStore, "gtOCTLevelExperience.dbc"); // 20810 - LOAD_GT("RegenMPPerSpt", sGtRegenMPPerSptStore, "gtRegenMPPerSpt.dbc"); // 20810 - LOAD_GT("SpellScaling", sGtSpellScalingStore, "gtSpellScaling.dbc"); // 20810 - LOAD_GT("OCTBaseHPByClass", sGtOCTBaseHPByClassStore, "gtOCTBaseHPByClass.dbc"); // 20810 - LOAD_GT("OCTBaseMPByClass", sGtOCTBaseMPByClassStore, "gtOCTBaseMPByClass.dbc"); // 20810 - -#undef LOAD_GT - - // error checks - if (bad_dbc_files.size() >= GameTableCount) - { - TC_LOG_ERROR("misc", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc GameTable files (%d) not found by path: %sdbc/%s/", DBCFileCount, dataPath.c_str(), localeNames[defaultLocale]); - exit(1); - } - else if (!bad_dbc_files.empty()) - { - std::string str; - for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i) - str += *i + "\n"; - - TC_LOG_ERROR("misc", "Some required *.dbc GameTable files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), GameTableCount, str.c_str()); - exit(1); - } - - TC_LOG_INFO("server.loading", ">> Initialized %d DBC GameTables data stores in %u ms", GameTableCount, GetMSTimeDiffToNow(oldMSTime)); -} - -std::vector const* GetFactionTeamList(uint32 faction) -{ - FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction); - if (itr != sFactionTeamMap.end()) - return &itr->second; - - return NULL; -} - -WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid) -{ - WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid)); - if (i == sWMOAreaInfoByTripple.end()) - return NULL; - return i->second; -} - -char const* GetClassName(uint8 class_, uint8 /*locale*/) -{ - ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_); - return classEntry ? classEntry->Name_lang : NULL; -} - -uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) -{ - if (mapid != 530 && mapid != 571 && mapid != 732) // speed for most cases - return mapid; - - if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId)) - return wma->DisplayMapID >= 0 ? wma->DisplayMapID : wma->MapID; - - return mapid; -} - -uint32 GetMaxLevelForExpansion(uint32 expansion) -{ - switch (expansion) - { - case EXPANSION_CLASSIC: - return 60; - case EXPANSION_THE_BURNING_CRUSADE: - return 70; - case EXPANSION_WRATH_OF_THE_LICH_KING: - return 80; - case EXPANSION_CATACLYSM: - return 85; - case EXPANSION_MISTS_OF_PANDARIA: - return 90; - case EXPANSION_WARLORDS_OF_DRAENOR: - return 100; - case EXPANSION_LEGION: - return 110; - default: - break; - } - return 0; -} - -uint32 GetExpansionForLevel(uint32 level) -{ - if (level < 60) - return EXPANSION_CLASSIC; - else if (level < 70) - return EXPANSION_THE_BURNING_CRUSADE; - else if (level < 80) - return EXPANSION_WRATH_OF_THE_LICH_KING; - else if (level < 85) - return EXPANSION_CATACLYSM; - else if (level < 90) - return EXPANSION_MISTS_OF_PANDARIA; - else if (level < 100) - return EXPANSION_WARLORDS_OF_DRAENOR; - else - return CURRENT_EXPANSION; -} - -void Zone2MapCoordinates(float& x, float& y, uint32 worldMapAreaId) -{ - WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(worldMapAreaId); - - // if not listed then map coordinates (instance) - if (!maEntry) - return; - - std::swap(x, y); // at client map coords swapped - x = x*((maEntry->LocBottom-maEntry->LocTop)/100)+maEntry->LocTop; - y = y*((maEntry->LocRight-maEntry->LocLeft)/100)+maEntry->LocLeft; // client y coord from top to down -} - -void Map2ZoneCoordinates(float& x, float& y, uint32 worldMapAreaId) -{ - WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(worldMapAreaId); - - // if not listed then map coordinates (instance) - if (!maEntry) - return; - - x = (x - maEntry->LocTop) / ((maEntry->LocBottom - maEntry->LocTop) / 100); - y = (y - maEntry->LocLeft) / ((maEntry->LocRight - maEntry->LocLeft) / 100); // client y coord from top to down - std::swap(x, y); // client have map coords swapped -} - -MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty /*= nullptr*/) -{ - auto itr = sMapDifficultyMap.find(mapId); - if (itr == sMapDifficultyMap.end()) - return nullptr; - - if (itr->second.empty()) - return nullptr; - - for (auto& p : itr->second) - { - DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(p.first); - if (!difficultyEntry) - continue; - - if (difficultyEntry->Flags & DIFFICULTY_FLAG_DEFAULT) - { - if (difficulty) - *difficulty = Difficulty(p.first); - - return p.second; - } - } - - if (difficulty) - *difficulty = Difficulty(itr->second.begin()->first); - - return itr->second.begin()->second; -} - -MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty) -{ - auto itr = sMapDifficultyMap.find(mapId); - if (itr == sMapDifficultyMap.end()) - return nullptr; - - auto diffItr = itr->second.find(difficulty); - if (diffItr == itr->second.end()) - return nullptr; - - return diffItr->second; -} - -MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty) -{ - DifficultyEntry const* diffEntry = sDifficultyStore.LookupEntry(difficulty); - if (!diffEntry) - return GetDefaultMapDifficulty(mapId, &difficulty); - - uint32 tmpDiff = difficulty; - MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff)); - while (!mapDiff) - { - tmpDiff = diffEntry->FallbackDifficultyID; - diffEntry = sDifficultyStore.LookupEntry(tmpDiff); - if (!diffEntry) - return GetDefaultMapDifficulty(mapId, &difficulty); - - // pull new data - mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff)); // we are 10 normal or 25 normal - } - - difficulty = Difficulty(tmpDiff); - return mapDiff; -} - -uint32 GetLiquidFlags(uint32 liquidType) -{ - if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType)) - return 1 << liq->Type; - - return 0; -} - -CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color) -{ - std::pair eqr = sCharSectionMap.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16)); - for (CharSectionsMap::const_iterator itr = eqr.first; itr != eqr.second; ++itr) - { - if (itr->second->Type == type && itr->second->Color == color) - return itr->second; - } - - return NULL; -} - -/// Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery) -LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty) -{ - for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) - { - LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); - if (!dungeon) - continue; - - if (dungeon->MapID == int32(mapId) && Difficulty(dungeon->DifficultyID) == difficulty) - return dungeon; - } - - return NULL; -} - -uint32 GetDefaultMapLight(uint32 mapId) -{ - for (int32 i = sLightStore.GetNumRows(); i >= 0; --i) - { - LightEntry const* light = sLightStore.LookupEntry(uint32(i)); - if (!light) - continue; - - if (light->MapID == mapId && light->Pos.X == 0.0f && light->Pos.Y == 0.0f && light->Pos.Z == 0.0f) - return light->ID; - } - - return 0; -} diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h deleted file mode 100644 index ef8056a06fc..00000000000 --- a/src/server/game/DataStores/DBCStores.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef TRINITY_DBCSTORES_H -#define TRINITY_DBCSTORES_H - -#include "DBCStore.h" -#include "DBCStructure.h" -#include "DB2Structure.h" -#include "SharedDefines.h" - -// CharSections -TC_GAME_API CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); - -// ChrClasses -TC_GAME_API char const* GetClassName(uint8 class_, uint8 locale); - -// Faction -TC_GAME_API std::vector const* GetFactionTeamList(uint32 faction); - -// LfgDungeons -TC_GAME_API LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); - -// Light -TC_GAME_API uint32 GetDefaultMapLight(uint32 mapId); - -// LiquidType -TC_GAME_API uint32 GetLiquidFlags(uint32 liquidType); - -// MapDifficulty -typedef std::unordered_map> MapDifficultyMap; -TC_GAME_API MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr); -TC_GAME_API MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty); -TC_GAME_API MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty); - -// Talent -typedef std::vector TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]; - -// WMOAreaTable -TC_GAME_API WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid); - -// WorldMapArea -TC_GAME_API uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId); -TC_GAME_API void Zone2MapCoordinates(float &x, float &y, uint32 worldMapAreaId); -TC_GAME_API void Map2ZoneCoordinates(float &x, float &y, uint32 worldMapAreaId); - -TC_GAME_API uint32 GetMaxLevelForExpansion(uint32 expansion); -TC_GAME_API uint32 GetExpansionForLevel(uint32 level); - -template -class GameTable -{ -public: - GameTable() : _storage("df"), _gtEntry(nullptr) { } - - void SetGameTableEntry(GameTablesEntry const* gtEntry) { _gtEntry = gtEntry; } - - T const* EvaluateTable(uint32 row, uint32 column) const - { - ASSERT(row < _gtEntry->NumRows, "Requested row %u from GameTable %s but there are only %u rows!", row, _gtEntry->Name->Str[0], _gtEntry->NumRows); - ASSERT(column < _gtEntry->NumColumns, "Requested column %u from GameTable %s but there are only %u columns!", column, _gtEntry->Name->Str[0], _gtEntry->NumColumns); - - return _storage.LookupEntry(_gtEntry->NumRows * column + row); - } - - char const* GetFormat() const { return _storage.GetFormat(); } - uint32 GetFieldCount() const { return _storage.GetFieldCount(); } - bool Load(char const* fileName) { return _storage.Load(fileName, nullptr); } - - uint32 GetTableRowCount() const { return _gtEntry->NumRows; } - uint32 GetTableColumnCount() const { return _gtEntry->NumColumns; } - -private: - DBCStorage _storage; - GameTablesEntry const* _gtEntry; -}; - -TC_GAME_API extern DBCStorage sBannedAddOnsStore; -TC_GAME_API extern DBCStorage sBattlemasterListStore; -TC_GAME_API extern DBCStorage sCharSectionsStore; -TC_GAME_API extern DBCStorage sChrClassesStore; -TC_GAME_API extern DBCStorage sCreatureModelDataStore; -TC_GAME_API extern DBCStorage sFactionStore; -TC_GAME_API extern DBCStorage sFactionTemplateStore; -TC_GAME_API extern DBCStorage sLFGDungeonStore; -TC_GAME_API extern DBCStorage sLiquidTypeStore; -TC_GAME_API extern MapDifficultyMap sMapDifficultyMap; -TC_GAME_API extern DBCStorage sSpellItemEnchantmentStore; -TC_GAME_API extern DBCStorage sTalentStore; -TC_GAME_API extern TalentsByPosition sTalentByPos; -TC_GAME_API extern DBCStorage sVehicleStore; -TC_GAME_API extern DBCStorage sWMOAreaTableStore; -TC_GAME_API extern DBCStorage sWorldSafeLocsStore; - -TC_GAME_API extern GameTable sGtArmorMitigationByLvlStore; -TC_GAME_API extern GameTable sGtBarberShopCostBaseStore; -TC_GAME_API extern GameTable sGtChanceToMeleeCritBaseStore; -TC_GAME_API extern GameTable sGtChanceToMeleeCritStore; -TC_GAME_API extern GameTable sGtChanceToSpellCritBaseStore; -TC_GAME_API extern GameTable sGtChanceToSpellCritStore; -TC_GAME_API extern GameTable sGtCombatRatingsStore; -TC_GAME_API extern GameTable sGtItemSocketCostPerLevelStore; -TC_GAME_API extern GameTable sGtNPCManaCostScalerStore; -TC_GAME_API extern GameTable sGtNpcTotalHpStore[MAX_EXPANSIONS]; -TC_GAME_API extern GameTable sGtNpcDamageByClassStore[MAX_EXPANSIONS]; -TC_GAME_API extern GameTable sGtOCTBaseHPByClassStore; -TC_GAME_API extern GameTable sGtOCTBaseMPByClassStore; -TC_GAME_API extern GameTable sGtOCTLevelExperienceStore; -TC_GAME_API extern GameTable sGtRegenMPPerSptStore; -TC_GAME_API extern GameTable sGtSpellScalingStore; -TC_GAME_API extern GameTable sGtOCTHpPerStaminaStore; - -TC_GAME_API void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale); -TC_GAME_API void LoadGameTables(const std::string& dataPath, uint32 defaultLocale); - -#endif diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h deleted file mode 100644 index d831231cb88..00000000000 --- a/src/server/game/DataStores/DBCStructure.h +++ /dev/null @@ -1,614 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef TRINITY_DBCSTRUCTURE_H -#define TRINITY_DBCSTRUCTURE_H - -#include "Common.h" -#include "DBCEnums.h" -#include "Util.h" - -// Structures using to access raw DBC data and required packing to portability -#pragma pack(push, 1) - -struct BannedAddOnsEntry -{ - uint32 ID; // 0 - //uint32 NameMD5[4]; // 1 - //uint32 VersionMD5[4]; // 2 - //uint32 LastModified; // 3 - //uint32 Flags; // 4 -}; - -struct BattlemasterListEntry -{ - uint32 ID; // 0 - int32 MapID[16]; // 1-16 mapid - uint32 InstanceType; // 17 map type (3 - BG, 4 - arena) - //uint32 GroupsAllowed; // 18 (0 or 1) - char* Name_lang; // 19 - uint32 MaxGroupSize; // 20 maxGroupSize, used for checking if queue as group - uint32 HolidayWorldState; // 21 new 3.1 - uint32 MinLevel; // 22, min level (sync with PvPDifficulty.dbc content) - uint32 MaxLevel; // 23, max level (sync with PvPDifficulty.dbc content) - //uint32 RatedPlayers; // 24 4.0.1 - //uint32 MinPlayers; // 25 - 4.0.6.13596 - //uint32 MaxPlayers; // 26 4.0.1 - //uint32 Flags; // 27 4.0.3, value 2 for Rated Battlegrounds - //uint32 IconFileDataID; // 28 - //char* GameType_lang; // 29 - //uint32 PlayerConditionID; // 30 -}; - -enum CharSectionFlags -{ - SECTION_FLAG_PLAYER = 0x01, - SECTION_FLAG_DEATH_KNIGHT = 0x04, - SECTION_FLAG_DEMON_HUNTER = 0x40 -}; - -enum CharSectionType -{ - SECTION_TYPE_SKIN = 0, - SECTION_TYPE_FACE = 1, - SECTION_TYPE_FACIAL_HAIR = 2, - SECTION_TYPE_HAIR = 3, - SECTION_TYPE_UNDERWEAR = 4, - SECTION_TYPE_CUSTOM_DISPLAY_1 = 10, - SECTION_TYPE_CUSTOM_DISPLAY_2 = 12, - SECTION_TYPE_CUSTOM_DISPLAY_3 = 14 -}; - -struct CharSectionsEntry -{ - //uint32 Id; - uint32 Race; - uint32 Gender; - uint32 GenType; - //uint32 TextureFileDataID[3]; - uint32 Flags; - uint32 Type; - uint32 Color; -}; - -struct ChrClassesEntry -{ - uint32 ID; // 0 - uint32 PowerType; // 1 - //char* PetNameToken // 2 - char* Name_lang; // 3 - //char* NameFemale_lang; // 4 - //char* NameMale_lang; // 5 - //char* Filename; // 6 - uint32 SpellClassSet; // 7 - //uint32 Flags; // 8 - uint32 CinematicSequenceID; // 9 - uint32 AttackPowerPerStrength; // 10 Attack Power bonus per point of strength - uint32 AttackPowerPerAgility; // 11 Attack Power bonus per point of agility - uint32 RangedAttackPowerPerAgility; // 12 Ranged Attack Power bonus per point of agility - uint32 DefaultSpec; // 13 - //uint32 CreateScreenFileDataID; // 14 - //uint32 SelectScreenFileDataID; // 15 - //uint32 LowResScreenFileDataID; // 16 - //uint32 IconFileDataID; // 17 - //uint32 Unk1; // 18 -}; - -struct CreatureModelDataEntry -{ - uint32 ID; // 0 - uint32 Flags; // 1 - uint32 FileDataID; // 2 - //uint32 SizeClass; // 3 - //float ModelScale; // 4 - //uint32 BloodID; // 5 - //uint32 FootprintTextureID; // 6 - //float FootprintTextureLength; // 7 - //float FootprintTextureWidth; // 8 - //float FootprintParticleScale; // 9 - //uint32 FoleyMaterialID; // 10 - //uint32 Unk700_1; // 11 - //uint32 Unk700_2; // 12 - //uint32 FootstepShakeSize; // 13 - //uint32 DeathThudShakeSize; // 14 - //uint32 SoundID; // 15 - //float CollisionWidth; // 16 - float CollisionHeight; // 17 - float MountHeight; // 18 - //float GeoBoxMin[3]; // 19-21 - //float GeoBoxMax[3]; // 22-24 - //float WorldEffectScale; // 25 - //float AttachedEffectScale; // 26 - //float MissileCollisionRadius; // 27 - //float MissileCollisionPush; // 28 - //float MissileCollisionRaise; // 29 - //float OverrideLootEffectScale; // 30 - //float OverrideNameScale; // 31 - //float OverrideSelectionRadius; // 32 - //float TamedPetBaseScale; // 33 - //uint32 CreatureGeosetDataID; // 34 - //float HoverHeight; // 35 -}; - -/* not used -struct CurrencyCategoryEntry -{ - uint32 ID; // 0 - uint32 Unk1; // 1 0 for known categories and 3 for unknown one (3.0.9) - char* Name[16]; // 2-17 name - // // 18 string flags -}; -*/ - -struct FactionEntry -{ - uint32 ID; // 0 - int32 ReputationIndex; // 1 - uint32 ReputationRaceMask[4]; // 2-5 - uint32 ReputationClassMask[4]; // 6-9 - int32 ReputationBase[4]; // 10-13 - uint32 ReputationFlags[4]; // 14-17 - uint32 ParentFactionID; // 18 - float ParentFactionModIn; // 19 Faction gains incoming rep * ParentFactionModIn - float ParentFactionModOut; // 20 Faction outputs rep * ParentFactionModOut as spillover reputation - uint32 ParentFactionCapIn; // 21 The highest rank the faction will profit from incoming spillover - //uint32 ParentFactionCapOut; // 22 - char* Name_lang; // 23 - //char* Description_lang; // 24 - uint32 Expansion; // 25 - //uint32 Flags; // 26 - //uint32 FriendshipRepID; // 27 - - // helpers - bool CanHaveReputation() const - { - return ReputationIndex >= 0; - } -}; - -#define MAX_FACTION_RELATIONS 4 - -struct FactionTemplateEntry -{ - uint32 ID; // 0 - uint32 Faction; // 1 - uint32 Flags; // 2 - uint32 Mask; // 3 m_factionGroup - uint32 FriendMask; // 4 m_friendGroup - uint32 EnemyMask; // 5 m_enemyGroup - uint32 Enemies[MAX_FACTION_RELATIONS]; // 6 - uint32 Friends[MAX_FACTION_RELATIONS]; // 10 - //------------------------------------------------------- end structure - - // helpers - bool IsFriendlyTo(FactionTemplateEntry const& entry) const - { - if (ID == entry.ID) - return true; - if (entry.Faction) - { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (Enemies[i] == entry.Faction) - return false; - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (Friends[i] == entry.Faction) - return true; - } - return (FriendMask & entry.Mask) || (Mask & entry.FriendMask); - } - bool IsHostileTo(FactionTemplateEntry const& entry) const - { - if (ID == entry.ID) - return false; - if (entry.Faction) - { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (Enemies[i] == entry.Faction) - return true; - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (Friends[i] == entry.Faction) - return false; - } - return (EnemyMask & entry.Mask) != 0; - } - bool IsHostileToPlayers() const { return (EnemyMask & FACTION_MASK_PLAYER) !=0; } - bool IsNeutralToAll() const - { - for (int i = 0; i < MAX_FACTION_RELATIONS; ++i) - if (Enemies[i] != 0) - return false; - return EnemyMask == 0 && FriendMask == 0; - } - bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } -}; - -struct GtArmorMitigationByLvlEntry -{ - //uint32 level; - float KFactor; -}; - -struct GtBarberShopCostBaseEntry -{ - //uint32 level; - float cost; -}; - -struct GtCombatRatingsEntry -{ - //uint32 level; - float ratio; -}; - -struct GtChanceToMeleeCritBaseEntry -{ - //uint32 level; - float base; -}; - -struct GtChanceToMeleeCritEntry -{ - //uint32 level; - float ratio; -}; - -struct GtChanceToSpellCritBaseEntry -{ - float base; -}; - -struct GtItemSocketCostPerLevelEntry -{ - float ratio; -}; - -struct GtNPCManaCostScalerEntry -{ - float ratio; -}; - -struct GtNpcDamageByClassEntry -{ - float Damage; -}; - -struct GtNpcTotalHpEntry -{ - float HP; -}; - -struct GtChanceToSpellCritEntry -{ - float ratio; -}; - -struct GtOCTLevelExperienceEntry -{ - float Data; -}; - -struct GtOCTRegenHPEntry -{ - float ratio; -}; - -struct GtOCTRegenMPEntry -{ - float ratio; -}; - -struct GtOCTHpPerStaminaEntry -{ - float ratio; -}; - -struct GtRegenHPPerSptEntry -{ - float ratio; -}; - -struct GtRegenMPPerSptEntry -{ - float ratio; -}; - -struct GtSpellScalingEntry -{ - float value; -}; - -struct GtOCTBaseHPByClassEntry -{ - float ratio; -}; - -struct GtOCTBaseMPByClassEntry -{ - float ratio; -}; - -struct ItemDisplayInfoEntry -{ - uint32 ID; // 0 - //char* ModelName[2]; // 1-2 - //char* ModelTexture[2]; // 3-4 - //uint32 GeoSetGroup[3]; // 5-7 - //uint32 Flags; // 8 - //uint32 SpellVisualID; // 9 - //uint32 HelmetGeosetVis[2]; // 10-11 - //char* Texture[9]; // 12-20 - //uint32 ItemVisual; // 21 - //uint32 ParticleColorID; // 22 -}; - -struct LFGDungeonEntry -{ - uint32 ID; // 0 - char* Name_lang; // 1 - uint32 MinLevel; // 2 - uint32 MaxLevel; // 3 - uint32 TargetLevel; // 4 - //uint32 TargetLevelMin; // 5 - //uint32 TargetLevelMax; // 6 - int32 MapID; // 7 - uint32 DifficultyID; // 8 - uint32 Flags; // 9 - uint32 Type; // 10 - //uint32 Faction; // 11 - //char* TextureFilename; // 12 - uint32 Expansion; // 13 - //uint32 OrderIndex; // 14 - uint32 GroupID; // 15 - //char* Description_lang; // 16 - //uint32 RandomID; // 17 - //uint32 CountTank; // 18 - //uint32 CountHealer; // 19 - //uint32 CountDamage; // 20 - //uint32 MinCountTank; // 21 - //uint32 MinCountHealer; // 22 - //uint32 MinCountDamage; // 23 - //uint32 ScenarioID; // 24 - //uint32 SubType; // 25 - //uint32 LastBossJournalEncounterID; // 26 - //uint32 BonusReputationAmount; // 27 - //uint32 MentorCharLevel; // 28 - //uint32 MentorItemLevel; // 29 - - // Helpers - uint32 Entry() const { return ID + (Type << 24); } -}; - -struct LightEntry -{ - uint32 ID; // 0 - uint32 MapID; // 1 - DBCPosition3D Pos; // 2-4 - //float FalloffStart; // 5 - //float FalloffEnd; // 6 - //uint32 LightParamsID[8]; // 7-14 -}; - -struct LiquidTypeEntry -{ - uint32 ID; // 0 - //char* Name; // 1 - //uint32 Flags; // 2 - uint32 Type; // 3 m_soundBank - //uint32 SoundID; // 4 - uint32 SpellID; // 5 - //float MaxDarkenDepth; // 6 - //float FogDarkenIntensity; // 7 - //float AmbDarkenIntensity; // 8 - //float DirDarkenIntensity; // 9 - //uint32 LightID; // 10 - //float ParticleScale; // 11 - //uint32 ParticleMovement; // 12 - //uint32 ParticleTexSlots; // 13 - //uint32 MaterialID; // 14 - //char* Texture[6]; // 15-20 - //uint32 DepthTexCount[6] // 21-26 - //uint32 Color[2]; // 27-28 - //float Float[18]; // 29-46 - //uint32 Int[4]; // 47-50 -}; - -struct MapDifficultyEntry -{ - //uint32 ID; // 0 - uint32 MapID; // 1 - uint32 DifficultyID; // 2 (for arenas: arena slot) - char* Message_lang; // 3 m_message_lang (text showed when transfer to map failed) - uint32 RaidDuration; // 4 m_raidDuration in secs, 0 if no fixed reset time - uint32 MaxPlayers; // 5 m_maxPlayers some heroic versions have 0 when expected same amount as in normal version - uint32 LockID; // 6 - uint32 ItemBonusTreeModID; // 7 - - bool HasMessage() const { return Message_lang[0] != '\0'; } -}; - -#define MAX_ITEM_ENCHANTMENT_EFFECTS 3 - -struct SpellItemEnchantmentEntry -{ - uint32 ID; // 0 - uint32 Charges; // 1 - uint32 Effect[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-4 - uint32 EffectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 5-7 - uint32 EffectSpellID[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 8-10 - //char* Name_lang // 11 - uint32 ItemVisual; // 12 - uint32 Flags; // 13 - uint32 ConditionID; // 14 - uint32 RequiredSkillID; // 15 - uint32 RequiredSkillRank; // 16 - uint32 MinLevel; // 17 - uint32 MaxLevel; // 18 - uint32 ItemLevel; // 19 - int32 ScalingClass; // 20 - int32 ScalingClassRestricted; // 21 - float EffectScalingPoints[MAX_ITEM_ENCHANTMENT_EFFECTS];//22-24 - //uint32 PlayerConditionID; // 25 - //uint32 TransmogCost; // 26 - //uint32 TextureFileDataID; // 27 -}; - -struct StableSlotPricesEntry -{ - uint32 Slot; - uint32 Price; -}; - -#define MAX_TALENT_TIERS 7 -#define MAX_TALENT_COLUMNS 3 - -struct TalentEntry -{ - uint32 ID; // 0 - uint32 SpecID; // 1 0 - any specialization - uint32 TierID; // 2 0-6 - uint32 ColumnIndex; // 3 0-2 - uint32 SpellID; // 4 - uint32 Flags; // 5 All 0 - uint32 CategoryMask[2]; // 6 All 0 - uint32 ClassID; // 7 - uint32 OverridesSpellID; // 8 spellid that is replaced by talent - //char* Description_lang -}; - -#define MAX_VEHICLE_SEATS 8 - -struct VehicleEntry -{ - uint32 ID; // 0 - uint32 Flags; // 1 - uint32 FlagsB; // 2 - float TurnSpeed; // 3 - float PitchSpeed; // 4 - float PitchMin; // 5 - float PitchMax; // 6 - uint32 SeatID[MAX_VEHICLE_SEATS]; // 7-14 - float MouseLookOffsetPitch; // 15 - float CameraFadeDistScalarMin; // 16 - float CameraFadeDistScalarMax; // 17 - float CameraPitchOffset; // 18 - float FacingLimitRight; // 19 - float FacingLimitLeft; // 20 - float MsslTrgtTurnLingering; // 21 - float MsslTrgtPitchLingering; // 22 - float MsslTrgtMouseLingering; // 23 - float MsslTrgtEndOpacity; // 24 - float MsslTrgtArcSpeed; // 25 - float MsslTrgtArcRepeat; // 26 - float MsslTrgtArcWidth; // 27 - float MsslTrgtImpactRadius[2]; // 28-29 - //char* MsslTrgtArcTexture; // 30 - //char* MsslTrgtImpactTexture; // 31 - //char* MsslTrgtImpactModel; // 32-33 - float CameraYawOffset; // 34 - uint32 UILocomotionType; // 35 - float MsslTrgtImpactTexRadius; // 36 - uint32 VehicleUIIndicatorID; // 37 - uint32 PowerDisplayID[3]; // 38-40 -}; - -struct WMOAreaTableEntry -{ - uint32 ID; // 0 index - int32 WMOID; // 1 used in root WMO - int32 NameSet; // 2 used in adt file - int32 WMOGroupID; // 3 used in group WMO - //uint32 SoundProviderPref; // 4 - //uint32 SoundProviderPrefUnderwater; // 5 - //uint32 AmbienceID; // 6 - //uint32 ZoneMusic; // 7 - //uint32 IntroSound; // 8 - uint32 Flags; // 9 used for indoor/outdoor determination - uint32 AreaTableID; // 10 link to AreaTableEntry.ID - //char* AreaName_lang; // 11 m_AreaName_lang - //uint32 UWIntroSound; // 12 - //uint32 UWZoneMusic; // 13 - //uint32 UWAmbience; // 14 -}; - -struct WorldMapAreaEntry -{ - //uint32 ID; // 0 - uint32 MapID; // 1 - uint32 AreaID; // 2 index (continent 0 areas ignored) - //char* AreaName // 3 - float LocLeft; // 4 - float LocRight; // 5 - float LocTop; // 6 - float LocBottom; // 7 - int32 DisplayMapID; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally) - //int32 DefaultDungeonFloor; // 9 pointer to DungeonMap.dbc (owerride loc coordinates) - //uint32 ParentWorldMapID; // 10 - //uint32 Flags; // 11 - //uint32 LevelRangeMin; // 12 Minimum recommended level displayed on world map - //uint32 LevelRangeMax; // 13 Maximum recommended level displayed on world map -}; - -struct WorldSafeLocsEntry -{ - uint32 ID; // 0 - uint32 MapID; // 1 - DBCPosition3D Loc; // 2-4 - float Facing; // 5 values are in degrees - //char* AreaName_lang; // 6 -}; - -/* -struct WorldStateSounds -{ - uint32 ID; // 0 Worldstate - uint32 unk; // 1 - uint32 areaTable; // 2 - uint32 WMOAreaTable; // 3 - uint32 zoneIntroMusicTable; // 4 - uint32 zoneIntroMusic; // 5 - uint32 zoneMusic; // 6 - uint32 soundAmbience; // 7 - uint32 soundProviderPreferences; // 8 -}; -*/ - -/* -struct WorldStateUI -{ - uint32 ID; // 0 - uint32 map_id; // 1 Can be -1 to show up everywhere. - uint32 zone; // 2 Can be zero for "everywhere". - uint32 phaseMask; // 3 Phase this WorldState is avaliable in - uint32 icon; // 4 The icon that is used in the interface. - char* textureFilename; // 5 - char* text; // 6-21 The worldstate text - char* description; // 22-38 Text shown when hovering mouse on icon - uint32 worldstateID; // 39 This is the actual ID used - uint32 type; // 40 0 = unknown, 1 = unknown, 2 = not shown in ui, 3 = wintergrasp - uint32 unk1; // 41 - uint32 unk2; // 43 - uint32 unk3; // 44-58 - uint32 unk4; // 59-61 Used for some progress bars. - uint32 unk7; // 62 Unused in 3.3.5a -}; -*/ - -#pragma pack(pop) - -typedef std::map TalentSpellPosMap; -#endif diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 8b2e729a2be..3027402f596 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -22,23 +22,5 @@ // x - skip, X - skip, s - char*, f - float, i - uint32, b - uint8, d - index (not included) // n - index (included), l - uint64, p - field present in sql dbc, a - field absent in sql dbc -char const BannedAddOnsfmt[] = "nxxxxxxxxxx"; -char const BattlemasterListfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx"; -char const CharSectionsfmt[] = "diiixxxiii"; -char const ChrClassesfmt[] = "nixsxxxixiiiiixxxxx"; -char const CreatureModelDatafmt[] = "niixxxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx"; -char const EmotesTextSoundEntryfmt[] = "niiii"; -char const Factionfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx"; -char const FactionTemplatefmt[] = "niiiiiiiiiiiii"; -char const LFGDungeonfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx"; -char const Lightfmt[] = "nifffxxxxxxxxxx"; -char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const MapDifficultyfmt[] = "diisiiii"; -char const SpellItemEnchantmentfmt[] = "niiiiiiiiiixiiiiiiiiiifffxxx"; -char const Talentfmt[] = "niiiiiiiiix"; -char const Vehiclefmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii"; -char const WMOAreaTablefmt[] = "niiixxxxxiixxxx"; -char const WorldMapAreafmt[] = "xinxffffixxxxx"; -char const WorldSafeLocsfmt[] = "niffffx"; #endif diff --git a/src/server/game/DataStores/GameTables.cpp b/src/server/game/DataStores/GameTables.cpp new file mode 100644 index 00000000000..23319e27734 --- /dev/null +++ b/src/server/game/DataStores/GameTables.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2008-2016 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "GameTables.h" +#include "Timer.h" +#include "Log.h" +#include "Util.h" +#include +#include + +GameTable sBarberShopCostBaseGameTable; +GameTable sBaseMPGameTable; +GameTable sCombatRatingsGameTable; +GameTable sHpPerStaGameTable; +GameTable sItemSocketCostPerLevelGameTable; +GameTable sNpcDamageByClassGameTable[MAX_EXPANSIONS]; +GameTable sNpcManaCostScalerGameTable; +GameTable sNpcTotalHpGameTable[MAX_EXPANSIONS]; +GameTable sSpellScalingGameTable; +GameTable sXpGameTable; + +template +inline uint32 LoadGameTable(std::vector& errors, GameTable& storage, boost::filesystem::path const& path) +{ + std::ifstream stream(path.string()); + if (!stream) + { + errors.push_back(Trinity::StringFormat("GameTable file %s cannot be opened.", path.string().c_str())); + return 0; + } + + std::string headers; + if (!std::getline(stream, headers)) + { + errors.push_back(Trinity::StringFormat("GameTable file %s is empty.", path.string().c_str())); + return 0; + } + + Tokenizer columnDefs(headers, '\t'); + + ASSERT(columnDefs.size() - 1 == sizeof(T) / sizeof(float), + "GameTable '%s' has different count of columns " SZFMTD " than expected by size of C++ structure (" SZFMTD ").", + path.string().c_str(), columnDefs.size() - 1, sizeof(T) / sizeof(float)); + + std::vector data; + data.emplace_back(); // row id 0, unused + + std::string line; + while (std::getline(stream, line)) + { + if (line.empty()) + break; + + Tokenizer values(line, '\t', columnDefs.size()); + ASSERT(values.size() == columnDefs.size()); + + ASSERT(strtol(values[0], nullptr, 10) == data.size(), + "Unexpected row identifier %u at row " SZFMTD " (expected " SZFMTD ")", + strtol(values[0], nullptr, 10), data.size(), data.size()); + + data.emplace_back(); + float* row = reinterpret_cast(&data.back()); + for (std::size_t col = 1; col < columnDefs.size(); ++col) + *row++ = strtof(values[col], nullptr); + } + + storage.SetData(std::move(data)); + return 1; +} + +void LoadGameTables(std::string const& dataPath) +{ + uint32 oldMSTime = getMSTime(); + + boost::filesystem::path gtPath(dataPath); + gtPath /= "gt"; + + std::vector bad_gt_files; + uint32 gameTableCount = 0; + +#define LOAD_GT(store, file) gameTableCount += LoadGameTable(bad_gt_files, store, gtPath / file) + + LOAD_GT(sBarberShopCostBaseGameTable, "BarberShopCostBase.txt"); + LOAD_GT(sBaseMPGameTable, "BaseMp.txt"); + LOAD_GT(sCombatRatingsGameTable, "CombatRatings.txt"); + LOAD_GT(sItemSocketCostPerLevelGameTable, "ItemSocketCostPerLevel.txt"); + LOAD_GT(sHpPerStaGameTable, "HpPerSta.txt"); + LOAD_GT(sNpcDamageByClassGameTable[0], "NpcDamageByClass.txt"); + LOAD_GT(sNpcDamageByClassGameTable[1], "NpcDamageByClassExp1.txt"); + LOAD_GT(sNpcDamageByClassGameTable[2], "NpcDamageByClassExp2.txt"); + LOAD_GT(sNpcDamageByClassGameTable[3], "NpcDamageByClassExp3.txt"); + LOAD_GT(sNpcDamageByClassGameTable[4], "NpcDamageByClassExp4.txt"); + LOAD_GT(sNpcDamageByClassGameTable[5], "NpcDamageByClassExp5.txt"); + LOAD_GT(sNpcDamageByClassGameTable[6], "NpcDamageByClassExp6.txt"); + LOAD_GT(sNpcManaCostScalerGameTable, "NpcManaCostScaler.txt"); + LOAD_GT(sNpcTotalHpGameTable[0], "NpcTotalHp.txt"); + LOAD_GT(sNpcTotalHpGameTable[1], "NpcTotalHpExp1.txt"); + LOAD_GT(sNpcTotalHpGameTable[2], "NpcTotalHpExp2.txt"); + LOAD_GT(sNpcTotalHpGameTable[3], "NpcTotalHpExp3.txt"); + LOAD_GT(sNpcTotalHpGameTable[4], "NpcTotalHpExp4.txt"); + LOAD_GT(sNpcTotalHpGameTable[5], "NpcTotalHpExp5.txt"); + LOAD_GT(sNpcTotalHpGameTable[6], "NpcTotalHpExp6.txt"); + LOAD_GT(sSpellScalingGameTable, "SpellScaling.txt"); + LOAD_GT(sXpGameTable, "xp.txt"); + +#undef LOAD_GT + + // error checks + if (!bad_gt_files.empty()) + { + std::ostringstream str; + for (std::string const& err : bad_gt_files) + str << err << std::endl; + + WPFatal("misc", "Some required *.txt GameTable files (" SZFMTD ") not found or not compatible:\n%s", bad_gt_files.size(), str.str().c_str()); + } + + TC_LOG_INFO("server.loading", ">> Initialized %d GameTables in %u ms", gameTableCount, GetMSTimeDiffToNow(oldMSTime)); +} diff --git a/src/server/game/DataStores/GameTables.h b/src/server/game/DataStores/GameTables.h new file mode 100644 index 00000000000..ad79a7e699a --- /dev/null +++ b/src/server/game/DataStores/GameTables.h @@ -0,0 +1,228 @@ +/* + * Copyright (C) 2008-2016 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef GameTables_h__ +#define GameTables_h__ + +#include "SharedDefines.h" +#include "Common.h" + +struct GtBarberShopCostBaseEntry +{ + float Cost = 0.0f; +}; + +struct GtBaseMPEntry +{ + float Rogue = 0.0f; + float Druid = 0.0f; + float Hunter = 0.0f; + float Mage = 0.0f; + float Paladin = 0.0f; + float Priest = 0.0f; + float Shaman = 0.0f; + float Warlock = 0.0f; + float Warrior = 0.0f; + float DeathKnight = 0.0f; + float Monk = 0.0f; + float DemonHunter = 0.0f; +}; + +struct GtCombatRatingsEntry +{ + float Amplify = 0.0f; + float DefenseSkill = 0.0f; + float Dodge = 0.0f; + float Parry = 0.0f; + float Block = 0.0f; + float HitMelee = 0.0f; + float HitRanged = 0.0f; + float HitSpell = 0.0f; + float CritMelee = 0.0f; + float CritRanged = 0.0f; + float CritSpell = 0.0f; + float MultiStrike = 0.0f; + float Readiness = 0.0f; + float Speed = 0.0f; + float ResilienceCritTaken = 0.0f; + float ResiliencePlayerDamage = 0.0f; + float Lifesteal = 0.0f; + float HasteMelee = 0.0f; + float HasteRanged = 0.0f; + float HasteSpell = 0.0f; + float Avoidance = 0.0f; + float Sturdiness = 0.0f; + float Unused7 = 0.0f; + float Expertise = 0.0f; + float ArmorPenetration = 0.0f; + float Mastery = 0.0f; + float PvPPower = 0.0f; + float Cleave = 0.0f; + float VersatilityDamageDone = 0.0f; + float VersatilityHealingDone = 0.0f; + float VersatilityDamageTaken = 0.0f; + float Unused12 = 0.0f; +}; + +struct GtHpPerStaEntry +{ + float Health = 0.0f; +}; + +struct GtItemSocketCostPerLevelEntry +{ + float SocketCost = 0.0f; +}; + +struct GtNpcDamageByClassEntry +{ + float Rogue = 0.0f; + float Druid = 0.0f; + float Hunter = 0.0f; + float Mage = 0.0f; + float Paladin = 0.0f; + float Priest = 0.0f; + float Shaman = 0.0f; + float Warlock = 0.0f; + float Warrior = 0.0f; + float DeathKnight = 0.0f; + float Monk = 0.0f; + float DemonHunter = 0.0f; +}; + +struct GtNpcManaCostScalerEntry +{ + float Scaler = 0.0f; +}; + +struct GtNpcTotalHpEntry +{ + float Rogue = 0.0f; + float Druid = 0.0f; + float Hunter = 0.0f; + float Mage = 0.0f; + float Paladin = 0.0f; + float Priest = 0.0f; + float Shaman = 0.0f; + float Warlock = 0.0f; + float Warrior = 0.0f; + float DeathKnight = 0.0f; + float Monk = 0.0f; + float DemonHunter = 0.0f; +}; + +struct GtSpellScalingEntry +{ + float Rogue = 0.0f; + float Druid = 0.0f; + float Hunter = 0.0f; + float Mage = 0.0f; + float Paladin = 0.0f; + float Priest = 0.0f; + float Shaman = 0.0f; + float Warlock = 0.0f; + float Warrior = 0.0f; + float DeathKnight = 0.0f; + float Monk = 0.0f; + float DemonHunter = 0.0f; + float Item = 0.0f; + float Consumable = 0.0f; + float Gem1 = 0.0f; + float Gem2 = 0.0f; + float Gem3 = 0.0f; + float Health = 0.0f; +}; + +struct GtXpEntry +{ + float Total = 0.0f; + float PerKill = 0.0f; + float Junk = 0.0f; + float Stats = 0.0f; + float Divisor = 0.0f; +}; + +template +class GameTable +{ +public: + T const* GetRow(uint32 row) const + { + if (row >= _data.size()) + return nullptr; + + return &_data[row]; + } + + std::size_t GetTableRowCount() const { return _data.size(); } + + void SetData(std::vector data) { _data = std::move(data); } + +private: + std::vector _data; +}; + +TC_GAME_API extern GameTable sBarberShopCostBaseGameTable; +TC_GAME_API extern GameTable sBaseMPGameTable; +TC_GAME_API extern GameTable sCombatRatingsGameTable; +TC_GAME_API extern GameTable sHpPerStaGameTable; +TC_GAME_API extern GameTable sItemSocketCostPerLevelGameTable; +TC_GAME_API extern GameTable sNpcDamageByClassGameTable[MAX_EXPANSIONS]; +TC_GAME_API extern GameTable sNpcManaCostScalerGameTable; +TC_GAME_API extern GameTable sNpcTotalHpGameTable[MAX_EXPANSIONS]; +TC_GAME_API extern GameTable sSpellScalingGameTable; +TC_GAME_API extern GameTable sXpGameTable; + +TC_GAME_API void LoadGameTables(std::string const& dataPath); + +template +inline float GetGameTableColumnForClass(T const* row, uint32 class_) +{ + switch (class_) + { + case CLASS_WARRIOR: + return row->Warrior; + case CLASS_PALADIN: + return row->Paladin; + case CLASS_HUNTER: + return row->Hunter; + case CLASS_ROGUE: + return row->Rogue; + case CLASS_PRIEST: + return row->Priest; + case CLASS_DEATH_KNIGHT: + return row->DeathKnight; + case CLASS_SHAMAN: + return row->Shaman; + case CLASS_MAGE: + return row->Mage; + case CLASS_WARLOCK: + return row->Warlock; + case CLASS_MONK: + return row->Monk; + case CLASS_DRUID: + return row->Druid; + case CLASS_DEMON_HUNTER: + return row->DemonHunter; + default: + break; + } + + return 0.0f; +} + +#endif // GameTables_h__ diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 94885deeffe..7cd1751d589 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -17,7 +17,6 @@ #include "Common.h" #include "SharedDefines.h" -#include "DBCStores.h" #include "DisableMgr.h" #include "ObjectMgr.h" #include "SocialMgr.h" @@ -37,7 +36,21 @@ namespace lfg { -LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1), +LFGDungeonData::LFGDungeonData() : id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0), +maxlevel(0), difficulty(DIFFICULTY_NONE), seasonal(false), x(0.0f), y(0.0f), z(0.0f), o(0.0f), +requiredItemLevel(0) +{ +} + +LFGDungeonData::LFGDungeonData(LfgDungeonsEntry const* dbc) : id(dbc->ID), name(dbc->Name->Str[sWorld->GetDefaultDbcLocale()]), map(dbc->MapID), +type(uint8(dbc->Type)), expansion(uint8(dbc->Expansion)), group(uint8(dbc->GroupID)), +minlevel(uint8(dbc->MinLevel)), maxlevel(uint8(dbc->MaxLevel)), difficulty(Difficulty(dbc->DifficultyID)), +seasonal((dbc->Flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f), +requiredItemLevel(0) +{ +} + +LFGMgr::LFGMgr() : m_QueueTimer(0), m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)) { } @@ -174,9 +187,9 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) LfgDungeonStore.clear(); // Initialize Dungeon map with data from dbcs - for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sLfgDungeonsStore.GetNumRows(); ++i) { - LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); + LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(i); if (!dungeon) continue; @@ -1597,7 +1610,7 @@ LfgLockMap const LFGMgr::GetLockedDungeons(ObjectGuid guid) for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end(); ++it) { LFGDungeonData const* dungeon = GetLFGDungeon(*it); - if (!dungeon) // should never happen - We provide a list from sLFGDungeonStore + if (!dungeon) // should never happen - We provide a list from sLfgDungeonsStore continue; uint32 lockStatus = 0; diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index f38812549a6..63770e31d8f 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -18,7 +18,6 @@ #ifndef _LFGMGR_H #define _LFGMGR_H -#include "DBCStructure.h" #include "Field.h" #include "LFG.h" #include "LFGQueue.h" @@ -267,16 +266,8 @@ struct LfgPlayerBoot struct LFGDungeonData { - LFGDungeonData(): id(0), name(""), map(0), type(0), expansion(0), group(0), minlevel(0), - maxlevel(0), difficulty(DIFFICULTY_NONE), seasonal(false), x(0.0f), y(0.0f), z(0.0f), o(0.0f), - requiredItemLevel(0) - { } - LFGDungeonData(LFGDungeonEntry const* dbc): id(dbc->ID), name(dbc->Name_lang), map(dbc->MapID), - type(uint8(dbc->Type)), expansion(uint8(dbc->Expansion)), group(uint8(dbc->GroupID)), - minlevel(uint8(dbc->MinLevel)), maxlevel(uint8(dbc->MaxLevel)), difficulty(Difficulty(dbc->DifficultyID)), - seasonal((dbc->Flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f), - requiredItemLevel(0) - { } + LFGDungeonData(); + LFGDungeonData(LfgDungeonsEntry const* dbc); uint32 id; std::string name; diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp index d80485afbf4..9288b7404fb 100644 --- a/src/server/game/DungeonFinding/LFGQueue.cpp +++ b/src/server/game/DungeonFinding/LFGQueue.cpp @@ -17,8 +17,6 @@ #include "ObjectDefines.h" #include "Containers.h" -#include "DBCStructure.h" -#include "DBCStores.h" #include "Group.h" #include "LFGQueue.h" #include "LFGMgr.h" diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 3eba4d58d80..84138cf0b45 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -31,6 +31,7 @@ #include "WorldSession.h" #include "ItemPackets.h" #include "TradeData.h" +#include "GameTables.h" void AddItemsSetItem(Player* player, Item* item) { @@ -1856,8 +1857,8 @@ int32 Item::GetItemStatValue(uint32 index, Player const* owner) const if (uint32 randomPropPoints = GetRandomPropertyPoints(itemLevel, GetQuality(), GetTemplate()->GetInventoryType(), GetTemplate()->GetSubClass())) { float statValue = float(_bonusData.ItemStatAllocation[index] * randomPropPoints) * 0.0001f; - if (GtItemSocketCostPerLevelEntry const* gtCost = sGtItemSocketCostPerLevelStore.EvaluateTable(itemLevel - 1, 0)) - statValue -= float(int32(_bonusData.ItemStatSocketCostMultiplier[index] * gtCost->ratio)); + if (GtItemSocketCostPerLevelEntry const* gtCost = sItemSocketCostPerLevelGameTable.GetRow(itemLevel)) + statValue -= float(int32(_bonusData.ItemStatSocketCostMultiplier[index] * gtCost->SocketCost)); return int32(std::floor(statValue + 0.5f)); } diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 2f82071f66f..a36a4a4c246 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -21,7 +21,6 @@ #include "Log.h" #include "ObjectMgr.h" #include "Util.h" -#include "DBCStores.h" #include #include diff --git a/src/server/game/Entities/Item/ItemTemplate.cpp b/src/server/game/Entities/Item/ItemTemplate.cpp index 04873bdddcf..67f683849a9 100644 --- a/src/server/game/Entities/Item/ItemTemplate.cpp +++ b/src/server/game/Entities/Item/ItemTemplate.cpp @@ -16,7 +16,6 @@ * with this program. If not, see . */ -#include "DBCStores.h" #include "DB2Stores.h" #include "World.h" #include "ItemTemplate.h" diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index 38265cc9fed..5fa6b5583af 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -660,11 +660,10 @@ class Player; struct TC_GAME_API ItemTemplate { - uint32 Id; ItemEntry const* BasicData; ItemSparseEntry const* ExtendedData; - uint32 GetId() const { return Id; } + uint32 GetId() const { return BasicData->ID; } uint32 GetClass() const { return BasicData->Class; } uint32 GetSubClass() const { return BasicData->SubClass; } uint32 GetQuality() const { return ExtendedData->Quality; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 303ef5d4c5d..2809cf121d1 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -101,7 +101,6 @@ #include "WorldPacket.h" #include "WorldSession.h" #include "WorldStatePackets.h" -#include "DBCStructure.h" #define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS) @@ -2402,12 +2401,12 @@ void Player::GiveLevel(uint8 level) PlayerLevelInfo info; sObjectMgr->GetPlayerLevelInfo(getRace(), getClass(), level, &info); - uint32 basehp = 0, basemana = 0; - sObjectMgr->GetPlayerClassLevelInfo(getClass(), level, basehp, basemana); + uint32 basemana = 0; + sObjectMgr->GetPlayerClassLevelInfo(getClass(), level, basemana); WorldPackets::Misc::LevelUpInfo packet; packet.Level = level; - packet.HealthDelta = int32(basehp) - int32(GetCreateHealth()); + packet.HealthDelta = 0; /// @todo find some better solution // for (int i = 0; i < MAX_STORED_POWERS; ++i) @@ -2444,7 +2443,7 @@ void Player::GiveLevel(uint8 level) for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetCreateStat(Stats(i), info.stats[i]); - SetCreateHealth(basehp); + SetCreateHealth(0); SetCreateMana(basemana); InitTalentForLevel(); @@ -2522,7 +2521,7 @@ void Player::InitTalentForLevel() if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED)) for (uint32 t = talentTiers; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - for (TalentEntry const* talent : sTalentByPos[getClass()][t][c]) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), t, c)) RemoveTalent(talent); } @@ -2537,8 +2536,8 @@ void Player::InitStatsForLevel(bool reapplyMods) if (reapplyMods) //reapply stats values only on .reset stats (level) command _RemoveAllStatBonuses(); - uint32 basehp = 0, basemana = 0; - sObjectMgr->GetPlayerClassLevelInfo(getClass(), getLevel(), basehp, basemana); + uint32 basemana = 0; + sObjectMgr->GetPlayerClassLevelInfo(getClass(), getLevel(), basemana); PlayerLevelInfo info; sObjectMgr->GetPlayerLevelInfo(getRace(), getClass(), getLevel(), &info); @@ -2568,7 +2567,7 @@ void Player::InitStatsForLevel(bool reapplyMods) for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetStat(Stats(i), info.stats[i]); - SetCreateHealth(basehp); + SetCreateHealth(0); //set create powers SetCreateMana(basemana); @@ -2662,7 +2661,7 @@ void Player::InitStatsForLevel(bool reapplyMods) for (uint8 i = POWER_MANA; i < MAX_POWERS; ++i) SetMaxPower(Powers(i), GetCreatePowers(Powers(i))); - SetMaxHealth(basehp); // stamina bonus will applied later + SetMaxHealth(0); // stamina bonus will applied later // cleanup mounted state (it will set correctly at aura loading if player saved at mount. SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0); @@ -4831,111 +4830,151 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const return m_auraBaseMod[modGroup][FLAT_MOD] * m_auraBaseMod[modGroup][PCT_MOD]; } -float Player::GetMeleeCritFromAgility() const -{ - uint8 level = getLevel(); - uint32 pclass = getClass(); - - if (level >= sGtChanceToMeleeCritStore.GetTableRowCount()) - level = sGtChanceToMeleeCritStore.GetTableRowCount() - 1; - - GtChanceToMeleeCritBaseEntry const* critBase = sGtChanceToMeleeCritBaseStore.EvaluateTable(pclass - 1, 0); - GtChanceToMeleeCritEntry const* critRatio = sGtChanceToMeleeCritStore.EvaluateTable(level - 1, pclass - 1); - if (critBase == nullptr || critRatio == nullptr) - return 0.0f; - - float crit = critBase->base + GetStat(STAT_AGILITY)*critRatio->ratio; - return crit*100.0f; -} - void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing) const { - // Table for base dodge values - const float dodge_base[MAX_CLASSES] = - { - 0.037580f, // Warrior - 0.036520f, // Paladin - -0.054500f, // Hunter - -0.005900f, // Rogue - 0.031830f, // Priest - 0.036640f, // DK - 0.016750f, // Shaman - 0.034575f, // Mage - 0.020350f, // Warlock - 0.0f, // ?? - 0.049510f // Druid - }; - // Crit/agility to dodge/agility coefficient multipliers; 3.2.0 increased required agility by 15% - const float crit_to_dodge[MAX_CLASSES] = - { - 0.85f/1.15f, // Warrior - 1.00f/1.15f, // Paladin - 1.11f/1.15f, // Hunter - 2.00f/1.15f, // Rogue - 1.00f/1.15f, // Priest - 0.85f/1.15f, // DK - 1.60f/1.15f, // Shaman - 1.00f/1.15f, // Mage - 0.97f/1.15f, // Warlock (?) - 0.0f, // ?? - 2.00f/1.15f // Druid - }; + //// Table for base dodge values + //const float dodge_base[MAX_CLASSES] = + //{ + // 0.037580f, // Warrior + // 0.036520f, // Paladin + // -0.054500f, // Hunter + // -0.005900f, // Rogue + // 0.031830f, // Priest + // 0.036640f, // DK + // 0.016750f, // Shaman + // 0.034575f, // Mage + // 0.020350f, // Warlock + // 0.0f, // ?? + // 0.049510f // Druid + //}; + //// Crit/agility to dodge/agility coefficient multipliers; 3.2.0 increased required agility by 15% + //const float crit_to_dodge[MAX_CLASSES] = + //{ + // 0.85f/1.15f, // Warrior + // 1.00f/1.15f, // Paladin + // 1.11f/1.15f, // Hunter + // 2.00f/1.15f, // Rogue + // 1.00f/1.15f, // Priest + // 0.85f/1.15f, // DK + // 1.60f/1.15f, // Shaman + // 1.00f/1.15f, // Mage + // 0.97f/1.15f, // Warlock (?) + // 0.0f, // ?? + // 2.00f/1.15f // Druid + //}; - uint8 level = getLevel(); - uint32 pclass = getClass(); + //uint8 level = getLevel(); + //uint32 pclass = getClass(); - if (level >= sGtChanceToMeleeCritStore.GetTableRowCount()) - level = sGtChanceToMeleeCritStore.GetTableRowCount() - 1; + //if (level >= sGtChanceToMeleeCritStore.GetTableRowCount()) + // level = sGtChanceToMeleeCritStore.GetTableRowCount() - 1; - // Dodge per agility is proportional to crit per agility, which is available from DBC files - GtChanceToMeleeCritEntry const* dodgeRatio = sGtChanceToMeleeCritStore.EvaluateTable(level - 1, pclass - 1); - if (dodgeRatio == nullptr || pclass > MAX_CLASSES) - return; + //// Dodge per agility is proportional to crit per agility, which is available from DBC files + //GtChanceToMeleeCritEntry const* dodgeRatio = sGtChanceToMeleeCritStore.EvaluateTable(level - 1, pclass - 1); + //if (dodgeRatio == nullptr || pclass > MAX_CLASSES) + // return; - /// @todo research if talents/effects that increase total agility by x% should increase non-diminishing part - float base_agility = GetCreateStat(STAT_AGILITY) * m_auraModifiersGroup[UNIT_MOD_STAT_START + STAT_AGILITY][BASE_PCT]; - float bonus_agility = GetStat(STAT_AGILITY) - base_agility; + ///// @todo research if talents/effects that increase total agility by x% should increase non-diminishing part + //float base_agility = GetCreateStat(STAT_AGILITY) * m_auraModifiersGroup[UNIT_MOD_STAT_START + STAT_AGILITY][BASE_PCT]; + //float bonus_agility = GetStat(STAT_AGILITY) - base_agility; - // calculate diminishing (green in char screen) and non-diminishing (white) contribution - diminishing = 100.0f * bonus_agility * dodgeRatio->ratio * crit_to_dodge[pclass-1]; - nondiminishing = 100.0f * (dodge_base[pclass-1] + base_agility * dodgeRatio->ratio * crit_to_dodge[pclass-1]); + //// calculate diminishing (green in char screen) and non-diminishing (white) contribution + //diminishing = 100.0f * bonus_agility * dodgeRatio->ratio * crit_to_dodge[pclass-1]; + //nondiminishing = 100.0f * (dodge_base[pclass-1] + base_agility * dodgeRatio->ratio * crit_to_dodge[pclass-1]); } -float Player::GetSpellCritFromIntellect() const +inline float GetGameTableColumnForCombatRating(GtCombatRatingsEntry const* row, uint32 rating) { - uint8 level = getLevel(); - uint32 pclass = getClass(); - - if (level >= sGtChanceToSpellCritStore.GetTableRowCount()) - level = sGtChanceToSpellCritStore.GetTableRowCount() - 1; - - GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.EvaluateTable(pclass - 1, 0); - GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.EvaluateTable(level - 1, pclass - 1); - if (critBase == nullptr || critRatio == nullptr) - return 0.0f; + switch (rating) + { + case CR_AMPLIFY: + return row->Amplify; + case CR_DEFENSE_SKILL: + return row->DefenseSkill; + case CR_DODGE: + return row->Dodge; + case CR_PARRY: + return row->Parry; + case CR_BLOCK: + return row->Block; + case CR_HIT_MELEE: + return row->HitMelee; + case CR_HIT_RANGED: + return row->HitRanged; + case CR_HIT_SPELL: + return row->HitSpell; + case CR_CRIT_MELEE: + return row->CritMelee; + case CR_CRIT_RANGED: + return row->CritRanged; + case CR_CRIT_SPELL: + return row->CritSpell; + case CR_MULTISTRIKE: + return row->MultiStrike; + case CR_READINESS: + return row->Readiness; + case CR_SPEED: + return row->Speed; + case CR_RESILIENCE_CRIT_TAKEN: + return row->ResilienceCritTaken; + case CR_RESILIENCE_PLAYER_DAMAGE: + return row->ResiliencePlayerDamage; + case CR_LIFESTEAL: + return row->Lifesteal; + case CR_HASTE_MELEE: + return row->HasteMelee; + case CR_HASTE_RANGED: + return row->HasteRanged; + case CR_HASTE_SPELL: + return row->HasteSpell; + case CR_AVOIDANCE: + return row->Avoidance; + case CR_STURDINESS: + return row->Sturdiness; + case CR_UNUSED_7: + return row->Unused7; + case CR_EXPERTISE: + return row->Expertise; + case CR_ARMOR_PENETRATION: + return row->ArmorPenetration; + case CR_MASTERY: + return row->Mastery; + case CR_PVP_POWER: + return row->PvPPower; + case CR_CLEAVE: + return row->Cleave; + case CR_VERSATILITY_DAMAGE_DONE: + return row->VersatilityDamageDone; + case CR_VERSATILITY_HEALING_DONE: + return row->VersatilityHealingDone; + case CR_VERSATILITY_DAMAGE_TAKEN: + return row->VersatilityDamageTaken; + case CR_UNUSED_12: + return row->Unused12; + default: + break; + } - float crit = critBase->base + GetStat(STAT_INTELLECT) * critRatio->ratio; - return crit * 100.0f; + return 1.0f; } float Player::GetRatingMultiplier(CombatRating cr) const { - uint8 level = getLevel(); - - if (level >= sGtCombatRatingsStore.GetTableRowCount()) - level = sGtCombatRatingsStore.GetTableRowCount() - 1; + GtCombatRatingsEntry const* Rating = sCombatRatingsGameTable.GetRow(getLevel()); + if (!Rating) + return 1.0f; - GtCombatRatingsEntry const* Rating = sGtCombatRatingsStore.EvaluateTable(level - 1, cr); - if (!Rating || !Rating->ratio) + float value = GetGameTableColumnForCombatRating(Rating, cr); + if (!value) return 1.0f; // By default use minimum coefficient (not must be called) - return 1.0f / Rating->ratio; + return 1.0f / value; } float Player::GetRatingBonusValue(CombatRating cr) const { float baseResult = float(GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + cr)) * GetRatingMultiplier(cr); - if (cr != CR_RESILIENCE_PLAYER_DAMAGE_TAKEN) + if (cr != CR_RESILIENCE_PLAYER_DAMAGE) return baseResult; return float(1.0f - pow(0.99f, baseResult)) * 100.0f; } @@ -4955,24 +4994,6 @@ float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const return 0.0f; } -float Player::OCTRegenMPPerSpirit() const -{ - uint8 level = getLevel(); - uint32 pclass = getClass(); - - if (level >= sGtRegenMPPerSptStore.GetTableRowCount()) - level = sGtRegenMPPerSptStore.GetTableRowCount() - 1; - - GtRegenMPPerSptEntry const* moreRatio = sGtRegenMPPerSptStore.EvaluateTable(level - 1, pclass - 1); - if (moreRatio == nullptr) - return 0.0f; - - // Formula get from PaperDollFrame script - float spirit = GetStat(STAT_SPIRIT); - float regen = spirit * moreRatio->ratio; - return regen; -} - void Player::ApplyRatingMod(CombatRating combatRating, int32 value, bool apply) { float oldRating = m_baseRatingValue[combatRating]; @@ -5024,7 +5045,7 @@ void Player::UpdateRating(CombatRating cr) switch (cr) { - case CR_UNUSED_1: + case CR_AMPLIFY: case CR_DEFENSE_SKILL: break; case CR_DODGE: @@ -5063,7 +5084,7 @@ void Player::UpdateRating(CombatRating cr) case CR_MULTISTRIKE: case CR_READINESS: case CR_SPEED: - case CR_RESILIENCE_PLAYER_DAMAGE_TAKEN: + case CR_RESILIENCE_PLAYER_DAMAGE: case CR_RESILIENCE_CRIT_TAKEN: case CR_LIFESTEAL: break; @@ -5072,8 +5093,8 @@ void Player::UpdateRating(CombatRating cr) case CR_HASTE_SPELL: break; case CR_AVOIDANCE: - case CR_UNUSED_2: - case CR_WEAPON_SKILL_RANGED: + case CR_STURDINESS: + case CR_UNUSED_7: break; case CR_EXPERTISE: if (affectStats) @@ -5089,8 +5110,8 @@ void Player::UpdateRating(CombatRating cr) case CR_MASTERY: UpdateMastery(); break; - case CR_UNUSED_3: - case CR_UNUSED_4: + case CR_PVP_POWER: + case CR_CLEAVE: case CR_VERSATILITY_DAMAGE_DONE: case CR_VERSATILITY_DAMAGE_TAKEN: break; @@ -6085,7 +6106,7 @@ void Player::RewardReputation(Unit* victim, float rate) // support for: Championing - http://www.wowwiki.com/Championing Map const* map = GetMap(); if (map->IsNonRaidDungeon()) - if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficultyID())) + if (LfgDungeonsEntry const* dungeon = DB2Manager::GetLfgDungeon(map->GetId(), map->GetDifficultyID())) if (dungeon->TargetLevel == 80) ChampioningFaction = GetChampioningFaction(); } @@ -7235,7 +7256,7 @@ void Player::_ApplyItemBonuses(Item* item, uint8 slot, bool apply) // ApplyRatingMod(CR_CRIT_TAKEN_MELEE, int32(val), apply); // break; case ITEM_MOD_CRIT_TAKEN_RANGED_RATING: - ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, int32(val), apply); + ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE, int32(val), apply); break; // case ITEM_MOD_CRIT_TAKEN_SPELL_RATING: // ApplyRatingMod(CR_CRIT_TAKEN_SPELL, int32(val), apply); @@ -7270,7 +7291,7 @@ void Player::_ApplyItemBonuses(Item* item, uint8 slot, bool apply) // ApplyRatingMod(CR_CRIT_TAKEN_SPELL, int32(val), apply); // break; case ITEM_MOD_RESILIENCE_RATING: - ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, int32(val), apply); + ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE, int32(val), apply); break; case ITEM_MOD_HASTE_RATING: ApplyRatingMod(CR_HASTE_MELEE, int32(val), apply); @@ -7723,7 +7744,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 if (!spellInfo) { TC_LOG_ERROR("entities.player.items", "Player::CastItemCombatSpell: Player '%s' (%s) cast unknown spell (EnchantID: %u, SpellID: %i), ignoring", - GetName().c_str(), GetGUID().ToString().c_str(), pEnchant->ID, pEnchant->EffectSpellID[s]); + GetName().c_str(), GetGUID().ToString().c_str(), enchant_id, pEnchant->EffectSpellID[s]); continue; } @@ -7823,7 +7844,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->EffectSpellID[s]); if (!spellInfo) { - TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->EffectSpellID[s]); + TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Enchant %i, cast unknown spell %i", enchant_id, pEnchant->EffectSpellID[s]); continue; } @@ -13011,7 +13032,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool // ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply); // break; case ITEM_MOD_RESILIENCE_RATING: - ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, enchant_amount, apply); + ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE, enchant_amount, apply); TC_LOG_DEBUG("entities.player.items", "+ %u RESILIENCE", enchant_amount); break; case ITEM_MOD_HASTE_RATING: @@ -18076,7 +18097,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) } else { - MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty)); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetMapDifficultyData(mapId, Difficulty(difficulty)); if (!mapDiff) { TC_LOG_ERROR("entities.player", "Player::_LoadBoundInstances: player '%s' (%s) has bind to not existed difficulty %d instance for map %u (%s)", @@ -18114,7 +18135,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty, bool withExpired) { // some instances only have one difficulty - MapDifficultyEntry const* mapDiff = GetDownscaledMapDifficultyData(mapid, difficulty); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetDownscaledMapDifficultyData(mapid, difficulty); if (!mapDiff) return nullptr; @@ -18128,7 +18149,7 @@ InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty InstancePlayerBind const* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty) const { // some instances only have one difficulty - MapDifficultyEntry const* mapDiff = GetDownscaledMapDifficultyData(mapid, difficulty); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetDownscaledMapDifficultyData(mapid, difficulty); if (!mapDiff) return nullptr; @@ -18360,14 +18381,14 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report missingAchievement = ar->achievement; Difficulty target_difficulty = GetDifficultyID(mapEntry); - MapDifficultyEntry const* mapDiff = GetDownscaledMapDifficultyData(target_map, target_difficulty); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetDownscaledMapDifficultyData(target_map, target_difficulty); if (LevelMin || LevelMax || missingItem || missingQuest || missingAchievement) { if (report) { if (missingQuest && !ar->questFailedText.empty()) ChatHandler(GetSession()).PSendSysMessage("%s", ar->questFailedText.c_str()); - else if (mapDiff->HasMessage()) // if (missingAchievement) covered by this case + else if (mapDiff->Message_lang->Str[sWorld->GetDefaultDbcLocale()][0] != '\0') // if (missingAchievement) covered by this case SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty); else if (missingItem) GetSession()->SendNotification(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(missingItem))->GetName(GetSession()->GetSessionDbcLocale())); @@ -19608,7 +19629,7 @@ void Player::_SaveStats(SQLTransaction& trans) const stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_ATTACK_POWER)); stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER)); stmt->setUInt32(index++, GetBaseSpellPowerBonus()); - stmt->setUInt32(index, GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + CR_RESILIENCE_PLAYER_DAMAGE_TAKEN)); + stmt->setUInt32(index, GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + CR_RESILIENCE_PLAYER_DAMAGE)); trans->Append(stmt); } @@ -23789,7 +23810,7 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z) if (uint32 liqEntry = liquid_status.entry) { LiquidTypeEntry const* liquid = sLiquidTypeStore.LookupEntry(liqEntry); - if (_lastLiquid && _lastLiquid->SpellID && _lastLiquid->ID != liqEntry) + if (_lastLiquid && _lastLiquid->SpellID && _lastLiquid != liquid) RemoveAurasDueToSpell(_lastLiquid->SpellID); if (liquid && liquid->SpellID) @@ -23940,7 +23961,7 @@ bool Player::CanUseBattlegroundObject(GameObject* gameobject) const FactionTemplateEntry const* playerFaction = GetFactionTemplateEntry(); FactionTemplateEntry const* faction = sFactionTemplateStore.LookupEntry(gameobject->GetUInt32Value(GAMEOBJECT_FACTION)); - if (playerFaction && faction && !playerFaction->IsFriendlyTo(*faction)) + if (playerFaction && faction && !playerFaction->IsFriendlyTo(faction)) return false; } @@ -23960,11 +23981,6 @@ bool Player::CanCaptureTowerPoint() const uint32 Player::GetBarberShopCost(BarberShopStyleEntry const* newHairStyle, uint8 newHairColor, BarberShopStyleEntry const* newFacialHair, BarberShopStyleEntry const* newSkin /*= nullptr*/, BarberShopStyleEntry const* newFace /*= nullptr*/) const { - uint8 level = getLevel(); - - if (level >= sGtBarberShopCostBaseStore.GetTableRowCount()) - level = sGtBarberShopCostBaseStore.GetTableRowCount() - 1; - uint8 hairstyle = GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID); uint8 haircolor = GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID); uint8 facialhair = GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE); @@ -23974,26 +23990,26 @@ uint32 Player::GetBarberShopCost(BarberShopStyleEntry const* newHairStyle, uint8 if ((hairstyle == newHairStyle->Data) && (haircolor == newHairColor) && (facialhair == newFacialHair->Data) && (!newSkin || (newSkin->Data == skincolor)) && (!newFace || (newFace->Data == face))) return 0; - GtBarberShopCostBaseEntry const* bsc = sGtBarberShopCostBaseStore.EvaluateTable(level - 1, 0); + GtBarberShopCostBaseEntry const* bsc = sBarberShopCostBaseGameTable.GetRow(getLevel()); if (!bsc) // shouldn't happen return 0xFFFFFFFF; uint32 cost = 0; if (hairstyle != newHairStyle->Data) - cost += uint32(bsc->cost * newHairStyle->CostModifier); + cost += uint32(bsc->Cost * newHairStyle->CostModifier); if ((haircolor != newHairColor) && (hairstyle == newHairStyle->Data)) - cost += uint32(bsc->cost * 0.5f); // +1/2 of price + cost += uint32(bsc->Cost * 0.5f); // +1/2 of price if (facialhair != newFacialHair->Data) - cost += uint32(bsc->cost * newFacialHair->CostModifier); + cost += uint32(bsc->Cost * newFacialHair->CostModifier); if (newSkin && skincolor != newSkin->Data) - cost += uint32(bsc->cost * newSkin->CostModifier); + cost += uint32(bsc->Cost * newSkin->CostModifier); if (newFace && face != newFace->Data) - cost += uint32(bsc->cost * newFace->CostModifier); + cost += uint32(bsc->Cost * newFace->CostModifier); return cost; } @@ -24302,7 +24318,7 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot) bool Player::CanFlyInZone(uint32 mapid, uint32 zone) const { // continent checked in SpellInfo::CheckLocation at cast and area update - uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); + uint32 v_map = sDB2Manager.GetVirtualMapForMapAndZone(mapid, zone); return v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying } @@ -24632,7 +24648,7 @@ bool Player::LearnTalent(uint32 talentId) // but only 2 out of 3 have SpecID != 0 // We need to make sure that if player is in one of these defined specs he will not learn the other choice TalentEntry const* bestSlotMatch = nullptr; - for (TalentEntry const* talent : sTalentByPos[getClass()][talentInfo->TierID][talentInfo->ColumnIndex]) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), talentInfo->TierID, talentInfo->ColumnIndex)) { if (!talent->SpecID) bestSlotMatch = talent; @@ -24648,7 +24664,7 @@ bool Player::LearnTalent(uint32 talentId) // Check if player doesn't have any talent in current tier for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - for (TalentEntry const* talent : sTalentByPos[getClass()][talentInfo->TierID][c]) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), talentInfo->TierID, c)) if (HasTalent(talent->ID, GetActiveTalentGroup())) return false; @@ -24686,8 +24702,8 @@ void Player::LearnTalentSpecialization(uint32 talentSpec) uint32 class_ = getClass(); for (uint32 t = 0; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - if (sTalentByPos[class_][t][c].size() > 1) - for (TalentEntry const* talent : sTalentByPos[class_][t][c]) + if (sDB2Manager.GetTalentsByPosition(class_, t, c).size() > 1) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(class_, t, c)) RemoveTalent(talent); LearnSpecializationSpells(); @@ -24707,8 +24723,8 @@ void Player::ResetTalentSpecialization() uint32 class_ = getClass(); for (uint32 t = 0; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - if (sTalentByPos[class_][t][c].size() > 1) - for (TalentEntry const* talent : sTalentByPos[class_][t][c]) + if (sDB2Manager.GetTalentsByPosition(class_, t, c).size() > 1) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(class_, t, c)) RemoveTalent(talent); RemoveSpecializationSpells(); @@ -26042,7 +26058,7 @@ Difficulty Player::GetDifficultyID(MapEntry const* mapEntry) const if (!mapEntry->IsRaid()) return m_dungeonDifficulty; - MapDifficultyEntry const* defaultDifficulty = GetDefaultMapDifficulty(mapEntry->ID); + MapDifficultyEntry const* defaultDifficulty = sDB2Manager.GetDefaultMapDifficulty(mapEntry->ID); if (!defaultDifficulty) return m_legacyRaidDifficulty; @@ -26191,9 +26207,9 @@ bool Player::ValidateAppearance(uint8 race, uint8 class_, uint8 gender, uint8 ha { // Check skin color // For Skin type is always 0 - if (CharSectionsEntry const* entry = GetCharSectionEntry(race, SECTION_TYPE_SKIN, gender, 0, skinColor)) + if (CharSectionsEntry const* entry = sDB2Manager.GetCharSectionEntry(race, SECTION_TYPE_SKIN, gender, 0, skinColor)) { // Skin Color defined as Face color, too, we check skin & face in one pass - if (CharSectionsEntry const* entry2 = GetCharSectionEntry(race, SECTION_TYPE_FACE, gender, faceID, skinColor)) + if (CharSectionsEntry const* entry2 = sDB2Manager.GetCharSectionEntry(race, SECTION_TYPE_FACE, gender, faceID, skinColor)) { if (!IsSectionFlagValid(entry, class_, create)) return false; @@ -26210,14 +26226,14 @@ bool Player::ValidateAppearance(uint8 race, uint8 class_, uint8 gender, uint8 ha bool excludeCheck = (race == RACE_TAUREN) || (race == RACE_DRAENEI) || (gender == GENDER_FEMALE && race != RACE_NIGHTELF && race != RACE_UNDEAD_PLAYER); // Check Hair - if (CharSectionsEntry const* entry = GetCharSectionEntry(race, SECTION_TYPE_HAIR, gender, hairID, hairColor)) + if (CharSectionsEntry const* entry = sDB2Manager.GetCharSectionEntry(race, SECTION_TYPE_HAIR, gender, hairID, hairColor)) { if (!IsSectionFlagValid(entry, class_, create)) return false; if (!excludeCheck) { - if (CharSectionsEntry const* entry2 = GetCharSectionEntry(race, SECTION_TYPE_FACIAL_HAIR, gender, facialHair, hairColor)) + if (CharSectionsEntry const* entry2 = sDB2Manager.GetCharSectionEntry(race, SECTION_TYPE_FACIAL_HAIR, gender, facialHair, hairColor)) { if (!IsSectionFlagValid(entry2, class_, create)) return false; @@ -26235,7 +26251,7 @@ bool Player::ValidateAppearance(uint8 race, uint8 class_, uint8 gender, uint8 ha return false; for (uint32 i = 0; i < PLAYER_CUSTOM_DISPLAY_SIZE; ++i) - if (CharSectionsEntry const* entry = GetCharSectionEntry(race, CharSectionType(SECTION_TYPE_CUSTOM_DISPLAY_1 + i * 2), gender, customDisplay[i], 0)) + if (CharSectionsEntry const* entry = sDB2Manager.GetCharSectionEntry(race, CharSectionType(SECTION_TYPE_CUSTOM_DISPLAY_1 + i * 2), gender, customDisplay[i], 0)) if (!IsSectionFlagValid(entry, class_, create)) return false; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b538bbbe05c..e943672c4f0 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -19,7 +19,6 @@ #ifndef _PLAYER_H #define _PLAYER_H -#include "DBCStores.h" #include "DB2Stores.h" #include "GroupReference.h" #include "MapReference.h" @@ -1940,10 +1939,7 @@ class TC_GAME_API Player : public Unit, public GridObject void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) override; void RecalculateRating(CombatRating cr) { ApplyRatingMod(cr, 0, true);} - float GetMeleeCritFromAgility() const; void GetDodgeFromAgility(float &diminishing, float &nondiminishing) const; - float GetSpellCritFromIntellect() const; - float OCTRegenMPPerSpirit() const; float GetRatingMultiplier(CombatRating cr) const; float GetRatingBonusValue(CombatRating cr) const; diff --git a/src/server/game/Entities/Taxi/TaxiPathGraph.cpp b/src/server/game/Entities/Taxi/TaxiPathGraph.cpp index 22af722d592..709a5debf4d 100644 --- a/src/server/game/Entities/Taxi/TaxiPathGraph.cpp +++ b/src/server/game/Entities/Taxi/TaxiPathGraph.cpp @@ -18,7 +18,6 @@ #include "TaxiPathGraph.h" #include "ObjectMgr.h" #include "Player.h" -#include "DBCStores.h" #include "DB2Stores.h" #include "Config.h" #include "Util.h" diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index d2a8a31817d..58a9b68e0e5 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -21,7 +21,6 @@ #include "MapManager.h" #include "ObjectMgr.h" #include "ScriptMgr.h" -#include "DBCStores.h" #include "GameObjectAI.h" #include "Vehicle.h" #include "Player.h" diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index da04c39c289..ed6b9ec3696 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -20,6 +20,7 @@ #include "Player.h" #include "Pet.h" #include "Creature.h" +#include "GameTables.h" #include "SharedDefines.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" @@ -265,8 +266,8 @@ float Player::GetHealthBonusFromStamina() { // Taken from PaperDollFrame.lua - 6.0.3.19085 float ratio = 10.0f; - if (GtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.EvaluateTable(getLevel() - 1, 0)) - ratio = hpBase->ratio; + if (GtHpPerStaEntry const* hpBase = sHpPerStaGameTable.GetRow(getLevel())) + ratio = hpBase->Health; float stamina = GetStat(STAT_STAMINA); @@ -512,7 +513,7 @@ void Player::UpdateCritPercentage(WeaponAttackType attType) void Player::UpdateAllCritPercentages() { - float value = GetMeleeCritFromAgility(); + float value = 5.0f; SetBaseModValue(CRIT_PERCENTAGE, PCT_MOD, value); SetBaseModValue(OFFHAND_CRIT_PERCENTAGE, PCT_MOD, value); @@ -654,9 +655,7 @@ void Player::UpdateSpellCritChance(uint32 school) return; } // For others recalculate it from: - float crit = 0.0f; - // Crit from Intellect - crit += GetSpellCritFromIntellect(); + float crit = 5.0f; // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE crit += GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -754,7 +753,7 @@ void Player::UpdateManaRegen() return; // Mana regen from spirit - float spirit_regen = OCTRegenMPPerSpirit(); + float spirit_regen = 0.0f; // Apply PCT bonus from SPELL_AURA_MOD_POWER_REGEN_PERCENT aura on spirit base regen spirit_regen *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, POWER_MANA); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 2bf8d161798..964572e5f02 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1430,7 +1430,7 @@ void Unit::HandleEmoteCommand(uint32 anim_id) SendMessageToSet(packet.Write(), true); } -bool Unit::IsDamageReducedByArmor(SpellSchoolMask schoolMask, SpellInfo const* spellInfo, uint8 effIndex) +bool Unit::IsDamageReducedByArmor(SpellSchoolMask schoolMask, SpellInfo const* spellInfo /*= nullptr*/, int8 effIndex /*= -1*/) { // only physical spells damage gets reduced by armor if ((schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0) @@ -1441,13 +1441,16 @@ bool Unit::IsDamageReducedByArmor(SpellSchoolMask schoolMask, SpellInfo const* s if (spellInfo->HasAttribute(SPELL_ATTR0_CU_IGNORE_ARMOR)) return false; - // bleeding effects are not reduced by armor - if (SpellEffectInfo const* effect = spellInfo->GetEffect(GetMap()->GetDifficultyID(), effIndex)) + if (effIndex != -1) { - if (effect->ApplyAuraName == SPELL_AURA_PERIODIC_DAMAGE || - effect->Effect == SPELL_EFFECT_SCHOOL_DAMAGE) - if (spellInfo->GetEffectMechanicMask(effIndex) & (1<GetEffect(GetMap()->GetDifficultyID(), effIndex)) + { + if (effect->ApplyAuraName == SPELL_AURA_PERIODIC_DAMAGE || + effect->Effect == SPELL_EFFECT_SCHOOL_DAMAGE) + if (spellInfo->GetEffectMechanicMask(effIndex) & (1 << MECHANIC_BLEED)) + return false; + } } } return true; @@ -6733,11 +6736,11 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem } // common faction based check - if (factionTemplateEntry->IsHostileTo(*targetFactionTemplateEntry)) + if (factionTemplateEntry->IsHostileTo(targetFactionTemplateEntry)) return REP_HOSTILE; - if (factionTemplateEntry->IsFriendlyTo(*targetFactionTemplateEntry)) + if (factionTemplateEntry->IsFriendlyTo(targetFactionTemplateEntry)) return REP_FRIENDLY; - if (targetFactionTemplateEntry->IsFriendlyTo(*factionTemplateEntry)) + if (targetFactionTemplateEntry->IsFriendlyTo(factionTemplateEntry)) return REP_FRIENDLY; if (factionTemplateEntry->Flags & FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT) return REP_HOSTILE; @@ -8952,7 +8955,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT { if (Player* player = ToPlayer()) { - float mod = player->GetRatingBonusValue(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN) * (-8.0f); + float mod = player->GetRatingBonusValue(CR_RESILIENCE_PLAYER_DAMAGE) * (-8.0f); AddPct(TakenTotalMod, std::max(mod, float((*i)->GetAmount()))); } } @@ -15739,7 +15742,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) { FactionTemplateEntry const* ft1 = GetFactionTemplateEntry(); FactionTemplateEntry const* ft2 = target->GetFactionTemplateEntry(); - if (ft1 && ft2 && !ft1->IsFriendlyTo(*ft2)) + if (ft1 && ft2 && !ft1->IsFriendlyTo(ft2)) { if (index == UNIT_FIELD_BYTES_2) // Allow targetting opposite faction in party when enabled in config diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5ba84c271be..68b27049f71 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -19,7 +19,6 @@ #ifndef __UNIT_H #define __UNIT_H -#include "DBCStructure.h" #include "EventProcessor.h" #include "FollowerReference.h" #include "FollowerRefManager.h" @@ -381,6 +380,7 @@ enum InventorySlot }; struct FactionTemplateEntry; +struct LiquidTypeEntry; struct MountCapabilityEntry; struct SpellValue; @@ -623,8 +623,8 @@ enum WeaponAttackType : uint8 enum CombatRating { - CR_UNUSED_1 = 0, - CR_DEFENSE_SKILL = 1, // Removed in 4.0.1 + CR_AMPLIFY = 0, + CR_DEFENSE_SKILL = 1, CR_DODGE = 2, CR_PARRY = 3, CR_BLOCK = 4, @@ -638,22 +638,23 @@ enum CombatRating CR_READINESS = 12, CR_SPEED = 13, CR_RESILIENCE_CRIT_TAKEN = 14, - CR_RESILIENCE_PLAYER_DAMAGE_TAKEN = 15, + CR_RESILIENCE_PLAYER_DAMAGE = 15, CR_LIFESTEAL = 16, CR_HASTE_MELEE = 17, CR_HASTE_RANGED = 18, CR_HASTE_SPELL = 19, CR_AVOIDANCE = 20, - CR_UNUSED_2 = 21, - CR_WEAPON_SKILL_RANGED = 22, + CR_STURDINESS = 21, + CR_UNUSED_7 = 22, CR_EXPERTISE = 23, CR_ARMOR_PENETRATION = 24, CR_MASTERY = 25, - CR_UNUSED_3 = 26, - CR_UNUSED_4 = 27, + CR_PVP_POWER = 26, + CR_CLEAVE = 27, CR_VERSATILITY_DAMAGE_DONE = 28, - // placeholder = 29, - CR_VERSATILITY_DAMAGE_TAKEN = 30 + CR_VERSATILITY_HEALING_DONE = 29, + CR_VERSATILITY_DAMAGE_TAKEN = 30, + CR_UNUSED_12 = 31 }; #define MAX_COMBAT_RATING 31 @@ -1539,7 +1540,7 @@ class TC_GAME_API Unit : public WorldObject void DealSpellDamage(SpellNonMeleeDamage const* damageInfo, bool durabilityLoss); // player or player's pet resilience (-1%) - uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 1.0f, 100.0f, damage); } + uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE, 1.0f, 100.0f, damage); } void ApplyResilience(Unit const* victim, int32* damage) const; @@ -2079,7 +2080,7 @@ class TC_GAME_API Unit : public WorldObject bool IsImmunedToDamage(SpellInfo const* spellInfo) const; virtual bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // redefined in Creature - bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS); + bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = nullptr, int8 effIndex = -1); uint32 CalcArmorReducedDamage(Unit* attacker, Unit* victim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = MAX_ATTACK); uint32 CalcSpellResistance(Unit* victim, SpellSchoolMask schoolMask, SpellInfo const* spellInfo) const; void CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32* absorb, uint32* resist, SpellInfo const* spellInfo = NULL); diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp index 7ba412f5a69..2789978a7fe 100644 --- a/src/server/game/Garrison/Garrison.cpp +++ b/src/server/game/Garrison/Garrison.cpp @@ -23,7 +23,7 @@ #include "ObjectMgr.h" #include "VehicleDefines.h" -Garrison::Garrison(Player* owner) : _owner(owner), _siteLevelId(0), _siteLevel(nullptr), _followerActivationsRemainingToday(1) +Garrison::Garrison(Player* owner) : _owner(owner), _siteLevel(nullptr), _followerActivationsRemainingToday(1) { } @@ -34,8 +34,7 @@ bool Garrison::LoadFromDB(PreparedQueryResult garrison, PreparedQueryResult blue return false; Field* fields = garrison->Fetch(); - _siteLevelId = fields[0].GetUInt32(); - _siteLevel = sGarrSiteLevelStore.LookupEntry(_siteLevelId); + _siteLevel = sGarrSiteLevelStore.LookupEntry(_siteLevel->ID); _followerActivationsRemainingToday = fields[1].GetUInt32(); if (!_siteLevel) return false; @@ -142,7 +141,7 @@ void Garrison::SaveToDB(SQLTransaction trans) PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHARACTER_GARRISON); stmt->setUInt64(0, _owner->GetGUID().GetCounter()); - stmt->setUInt32(1, _siteLevelId); + stmt->setUInt32(1, _siteLevel->ID); stmt->setUInt32(2, _followerActivationsRemainingToday); trans->Append(stmt); @@ -220,17 +219,16 @@ void Garrison::DeleteFromDB(ObjectGuid::LowType ownerGuid, SQLTransaction trans) bool Garrison::Create(uint32 garrSiteId) { - DBStorageIterator siteLevelItr = sGarrisonMgr.GetGarrSiteLevelEntry(garrSiteId, 1); - if (siteLevelItr == sGarrSiteLevelStore.end()) + GarrSiteLevelEntry const* siteLevel = sGarrisonMgr.GetGarrSiteLevelEntry(garrSiteId, 1); + if (!siteLevel) return false; - _siteLevelId = siteLevelItr.ID(); - _siteLevel = siteLevelItr.Data(); + _siteLevel = siteLevel; InitializePlots(); WorldPackets::Garrison::GarrisonCreateResult garrisonCreateResult; - garrisonCreateResult.GarrSiteLevelID = _siteLevelId; + garrisonCreateResult.GarrSiteLevelID = _siteLevel->ID; _owner->SendDirectMessage(garrisonCreateResult.Write()); _owner->SendUpdatePhasing(); SendRemoteInfo(); @@ -251,11 +249,11 @@ void Garrison::Delete() void Garrison::InitializePlots() { - if (std::vector> const* plots = sGarrisonMgr.GetGarrPlotInstForSiteLevel(_siteLevelId)) + if (std::vector const* plots = sGarrisonMgr.GetGarrPlotInstForSiteLevel(_siteLevel->ID)) { for (std::size_t i = 0; i < plots->size(); ++i) { - uint32 garrPlotInstanceId = plots->at(i).second->GarrPlotInstanceID; + uint32 garrPlotInstanceId = plots->at(i)->GarrPlotInstanceID; GarrPlotInstanceEntry const* plotInstance = sGarrPlotInstanceStore.LookupEntry(garrPlotInstanceId); GameObjectsEntry const* gameObject = sGarrisonMgr.GetPlotGameObject(_siteLevel->MapID, garrPlotInstanceId); if (!plotInstance || !gameObject) @@ -270,7 +268,7 @@ void Garrison::InitializePlots() plotInfo.PacketInfo.PlotPos.Relocate(gameObject->Position.X, gameObject->Position.Y, gameObject->Position.Z, 2 * std::acos(gameObject->RotationW)); plotInfo.PacketInfo.PlotType = plot->PlotType; plotInfo.EmptyGameObjectId = gameObject->ID; - plotInfo.GarrSiteLevelPlotInstId = plots->at(i).first; + plotInfo.GarrSiteLevelPlotInstId = plots->at(i)->ID; } } } @@ -531,7 +529,7 @@ void Garrison::SendInfo() { WorldPackets::Garrison::GetGarrisonInfoResult garrisonInfo; garrisonInfo.GarrSiteID = _siteLevel->SiteID; - garrisonInfo.GarrSiteLevelID = _siteLevelId; + garrisonInfo.GarrSiteLevelID = _siteLevel->ID; garrisonInfo.FactionIndex = GetFaction(); garrisonInfo.NumFollowerActivationsRemaining = _followerActivationsRemainingToday; for (auto& p : _plots) @@ -558,7 +556,7 @@ void Garrison::SendRemoteInfo() const remoteInfo.Sites.resize(1); WorldPackets::Garrison::GarrisonRemoteSiteInfo& remoteSiteInfo = remoteInfo.Sites[0]; - remoteSiteInfo.GarrSiteLevelID = _siteLevelId; + remoteSiteInfo.GarrSiteLevelID = _siteLevel->ID; for (auto const& p : _plots) if (p.second.BuildingInfo.PacketInfo) remoteSiteInfo.Buildings.emplace_back(p.first, p.second.BuildingInfo.PacketInfo->GarrBuildingID); diff --git a/src/server/game/Garrison/Garrison.h b/src/server/game/Garrison/Garrison.h index 68ebbc4c0b9..2aa38ee6ad3 100644 --- a/src/server/game/Garrison/Garrison.h +++ b/src/server/game/Garrison/Garrison.h @@ -157,7 +157,6 @@ private: GarrisonError CheckBuildingPlacement(uint32 garrPlotInstanceId, uint32 garrBuildingId) const; GarrisonError CheckBuildingRemoval(uint32 garrPlotInstanceId) const; Player* _owner; - uint32 _siteLevelId; GarrSiteLevelEntry const* _siteLevel; uint32 _followerActivationsRemainingToday; diff --git a/src/server/game/Garrison/GarrisonMgr.cpp b/src/server/game/Garrison/GarrisonMgr.cpp index c07d9a82c45..5836ee2da4b 100644 --- a/src/server/game/Garrison/GarrisonMgr.cpp +++ b/src/server/game/Garrison/GarrisonMgr.cpp @@ -32,8 +32,8 @@ GarrisonMgr& GarrisonMgr::Instance() void GarrisonMgr::Initialize() { - for (auto itr = sGarrSiteLevelPlotInstStore.begin(); itr != sGarrSiteLevelPlotInstStore.end(); ++itr) - _garrisonPlotInstBySiteLevel[itr->GarrSiteLevelID].push_back(std::make_pair(itr.ID(), itr.Data())); + for (GarrSiteLevelPlotInstEntry const* siteLevelPlotInst : sGarrSiteLevelPlotInstStore) + _garrisonPlotInstBySiteLevel[siteLevelPlotInst->GarrSiteLevelID].push_back(siteLevelPlotInst); for (GameObjectsEntry const* gameObject : sGameObjectsStore) if (gameObject->Type == GAMEOBJECT_TYPE_GARRISON_PLOT) @@ -45,8 +45,8 @@ void GarrisonMgr::Initialize() for (GarrBuildingPlotInstEntry const* buildingPlotInst : sGarrBuildingPlotInstStore) _garrisonBuildingPlotInstances[MAKE_PAIR64(buildingPlotInst->GarrBuildingID, buildingPlotInst->GarrSiteLevelPlotInstID)] = buildingPlotInst->ID; - for (auto itr = sGarrBuildingStore.begin(); itr != sGarrBuildingStore.end(); ++itr) - _garrisonBuildingsByType[itr->Type].push_back(itr.ID()); + for (GarrBuildingEntry const* building : sGarrBuildingStore) + _garrisonBuildingsByType[building->Type].push_back(building->ID); for (GarrFollowerXAbilityEntry const* followerAbility : sGarrFollowerXAbilityStore) { @@ -73,16 +73,16 @@ void GarrisonMgr::Initialize() LoadFollowerClassSpecAbilities(); } -DBStorageIterator GarrisonMgr::GetGarrSiteLevelEntry(uint32 garrSiteId, uint32 level) const +GarrSiteLevelEntry const* GarrisonMgr::GetGarrSiteLevelEntry(uint32 garrSiteId, uint32 level) const { - for (auto itr = sGarrSiteLevelStore.begin(); itr != sGarrSiteLevelStore.end(); ++itr) - if (itr->SiteID == garrSiteId && itr->Level == level) - return itr; + for (GarrSiteLevelEntry const* siteLevel : sGarrSiteLevelStore) + if (siteLevel->SiteID == garrSiteId && siteLevel->Level == level) + return siteLevel; - return sGarrSiteLevelStore.end(); + return nullptr; } -std::vector> const* GarrisonMgr::GetGarrPlotInstForSiteLevel(uint32 garrSiteLevelId) const +std::vector const* GarrisonMgr::GetGarrPlotInstForSiteLevel(uint32 garrSiteLevelId) const { auto itr = _garrisonPlotInstBySiteLevel.find(garrSiteLevelId); if (itr != _garrisonPlotInstBySiteLevel.end()) diff --git a/src/server/game/Garrison/GarrisonMgr.h b/src/server/game/Garrison/GarrisonMgr.h index 7a93941d59b..b5bb0628ab1 100644 --- a/src/server/game/Garrison/GarrisonMgr.h +++ b/src/server/game/Garrison/GarrisonMgr.h @@ -45,8 +45,8 @@ public: void Initialize(); - DBStorageIterator GetGarrSiteLevelEntry(uint32 garrSiteId, uint32 level) const; - std::vector> const* GetGarrPlotInstForSiteLevel(uint32 garrSiteLevelId) const; + GarrSiteLevelEntry const* GetGarrSiteLevelEntry(uint32 garrSiteId, uint32 level) const; + std::vector const* GetGarrPlotInstForSiteLevel(uint32 garrSiteLevelId) const; GameObjectsEntry const* GetPlotGameObject(uint32 mapId, uint32 garrPlotInstanceId) const; bool IsPlotMatchingBuilding(uint32 garrPlotId, uint32 garrBuildingId) const; uint32 GetGarrBuildingPlotInst(uint32 garrBuildingId, uint32 garrSiteLevelPlotInstId) const; @@ -61,7 +61,7 @@ private: void LoadPlotFinalizeGOInfo(); void LoadFollowerClassSpecAbilities(); - std::unordered_map>> _garrisonPlotInstBySiteLevel; + std::unordered_map> _garrisonPlotInstBySiteLevel; std::unordered_map> _garrisonPlots; std::unordered_map> _garrisonBuildingsByPlot; std::unordered_map _garrisonBuildingPlotInstances; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index aec1bba1e65..0e93e93a136 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -16,6 +16,7 @@ * with this program. If not, see . */ +#include "ObjectMgr.h" #include "AccountMgr.h" #include "AchievementMgr.h" #include "ArenaTeam.h" @@ -24,9 +25,9 @@ #include "Chat.h" #include "Common.h" #include "DatabaseEnv.h" -#include "DB2Structure.h" #include "DB2Stores.h" #include "DisableMgr.h" +#include "GameTables.h" #include "GossipDef.h" #include "GroupMgr.h" #include "GuildMgr.h" @@ -36,7 +37,6 @@ #include "Log.h" #include "MapManager.h" #include "Object.h" -#include "ObjectMgr.h" #include "PoolMgr.h" #include "ReputationMgr.h" #include "ScriptMgr.h" @@ -1734,7 +1734,7 @@ void ObjectMgr::LoadCreatures() // Build single time for check spawnmask std::map spawnMasks; - for (auto& mapDifficultyPair : sMapDifficultyMap) + for (auto& mapDifficultyPair : sDB2Manager.GetMapDifficulties()) for (auto& difficultyPair : mapDifficultyPair.second) spawnMasks[mapDifficultyPair.first] |= (1 << difficultyPair.first); @@ -2046,7 +2046,7 @@ void ObjectMgr::LoadGameobjects() // build single time for check spawnmask std::map spawnMasks; - for (auto& mapDifficultyPair : sMapDifficultyMap) + for (auto& mapDifficultyPair : sDB2Manager.GetMapDifficulties()) for (auto& difficultyPair : mapDifficultyPair.second) spawnMasks[mapDifficultyPair.first] |= (1 << difficultyPair.first); @@ -2622,15 +2622,13 @@ void ObjectMgr::LoadItemTemplates() uint32 oldMSTime = getMSTime(); uint32 sparseCount = 0; - for (auto itr = sItemSparseStore.begin(); itr != sItemSparseStore.end(); ++itr) + for (ItemSparseEntry const* sparse : sItemSparseStore) { - ItemSparseEntry const* sparse = itr.Data(); - ItemEntry const* db2Data = sItemStore.LookupEntry(itr.ID()); + ItemEntry const* db2Data = sItemStore.LookupEntry(sparse->ID); if (!db2Data) continue; - ItemTemplate& itemTemplate = _itemTemplateStore[itr.ID()]; - itemTemplate.Id = itr.ID(); + ItemTemplate& itemTemplate = _itemTemplateStore[sparse->ID]; itemTemplate.BasicData = db2Data; itemTemplate.ExtendedData = sparse; @@ -2644,7 +2642,7 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.FlagsCu = 0; itemTemplate.SpellPPMRate = 0.0f; - if (std::vector const* itemSpecOverrides = sDB2Manager.GetItemSpecOverrides(itemTemplate.Id)) + if (std::vector const* itemSpecOverrides = sDB2Manager.GetItemSpecOverrides(sparse->ID)) { for (ItemSpecOverrideEntry const* itemSpecOverride : *itemSpecOverrides) itemTemplate.Specializations[0].insert(itemSpecOverride->SpecID); @@ -3481,18 +3479,14 @@ void ObjectMgr::LoadPlayerInfo() { uint32 oldMSTime = getMSTime(); - _playerXPperLevel.resize(sGtOCTLevelExperienceStore.GetTableRowCount() + 1, 0); + _playerXPperLevel.resize(sXpGameTable.GetTableRowCount() + 1, 0); // 0 1 QueryResult result = WorldDatabase.Query("SELECT Level, Experience FROM player_xp_for_level"); // load the DBC's levels at first... - GtOCTLevelExperienceEntry const* exp; - for (uint32 level = 0; level < sGtOCTLevelExperienceStore.GetTableRowCount(); ++level) - { - exp = sGtOCTLevelExperienceStore.EvaluateTable(level, 0); - _playerXPperLevel[level + 1] = exp->Data; - } + for (uint32 level = 0; level < sXpGameTable.GetTableRowCount(); ++level) + _playerXPperLevel[level + 1] = sXpGameTable.GetRow(level)->Total; uint32 count = 0; @@ -3537,7 +3531,7 @@ void ObjectMgr::LoadPlayerInfo() } } -void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& baseHP, uint32& baseMana) const +void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& baseMana) const { if (level < 1 || class_ >= MAX_CLASSES) return; @@ -3545,17 +3539,14 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& base if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); - GtOCTBaseHPByClassEntry const* hp = sGtOCTBaseHPByClassStore.EvaluateTable(level - 1, class_ - 1); - GtOCTBaseMPByClassEntry const* mp = sGtOCTBaseMPByClassStore.EvaluateTable(level - 1, class_ - 1); - - if (!hp || !mp) + GtBaseMPEntry const* mp = sBaseMPGameTable.GetRow(level); + if (!mp) { TC_LOG_ERROR("misc", "Tried to get non-existant Class-Level combination data for base hp/mp. Class %u Level %u", class_, level); return; } - baseHP = uint32(hp->ratio); - baseMana = uint32(mp->ratio); + baseMana = uint32(GetGameTableColumnForClass(mp, class_)); } void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const @@ -5349,7 +5340,7 @@ void ObjectMgr::LoadInstanceEncounters() { for (uint32 i = 0; i < MAX_DIFFICULTY; ++i) { - if (GetMapDifficultyData(dungeonEncounter->MapID, Difficulty(i))) + if (sDB2Manager.GetMapDifficultyData(dungeonEncounter->MapID, Difficulty(i))) { DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR64(dungeonEncounter->MapID, i)]; encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon)); @@ -6242,7 +6233,7 @@ void ObjectMgr::LoadAccessRequirements() } uint32 difficulty = fields[1].GetUInt8(); - if (!GetMapDifficultyData(mapid, Difficulty(difficulty))) + if (!sDB2Manager.GetMapDifficultyData(mapid, Difficulty(difficulty))) { TC_LOG_ERROR("sql.sql", "Map %u referenced in `access_requirement` does not have difficulty %u, skipped", mapid, difficulty); continue; @@ -8718,8 +8709,8 @@ void ObjectMgr::LoadCreatureClassLevelStats() for (uint8 i = 0; i < MAX_EXPANSIONS; ++i) { - stats.BaseHealth[0] = sGtNpcTotalHpStore[i].EvaluateTable(Level - 1, Class - 1)->HP; - stats.BaseDamage[0] = sGtNpcDamageByClassStore[i].EvaluateTable(Level - 1, Class - 1)->Damage; + stats.BaseHealth[i] = GetGameTableColumnForClass(sNpcTotalHpGameTable[i].GetRow(Level), Class); + stats.BaseDamage[i] = GetGameTableColumnForClass(sNpcDamageByClassGameTable[i].GetRow(Level), Class); if (stats.BaseDamage[i] < 0.0f) { TC_LOG_ERROR("sql.sql", "Creature base stats for class %u, level %u has invalid negative base damage[%u] - set to 0.0", Class, Level, i); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 31eff02b3dc..c1a77bdd6f9 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -762,7 +762,7 @@ class TC_GAME_API ObjectMgr PetLevelInfo const* GetPetLevelInfo(uint32 creature_id, uint8 level) const; - void GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& baseHP, uint32& baseMana) const; + void GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& baseMana) const; PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const; diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 93e301bf548..7883a445ebd 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -2082,7 +2082,7 @@ Difficulty Group::GetDifficultyID(MapEntry const* mapEntry) const if (!mapEntry->IsRaid()) return m_dungeonDifficulty; - MapDifficultyEntry const* defaultDifficulty = GetDefaultMapDifficulty(mapEntry->ID); + MapDifficultyEntry const* defaultDifficulty = sDB2Manager.GetDefaultMapDifficulty(mapEntry->ID); if (!defaultDifficulty) return m_legacyRaidDifficulty; @@ -2212,7 +2212,7 @@ InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry) InstanceGroupBind* Group::GetBoundInstance(Difficulty difficulty, uint32 mapId) { // some instances only have one difficulty - GetDownscaledMapDifficultyData(mapId, difficulty); + sDB2Manager.GetDownscaledMapDifficultyData(mapId, difficulty); BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapId); if (itr != m_boundInstances[difficulty].end()) diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp index c6046c3a9aa..ad112c59a61 100644 --- a/src/server/game/Groups/GroupMgr.cpp +++ b/src/server/game/Groups/GroupMgr.cpp @@ -19,7 +19,6 @@ #include "GroupMgr.h" #include "InstanceSaveMgr.h" #include "World.h" -#include "DBCStores.h" GroupMgr::GroupMgr() { diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index e0d15e8def0..9c217ea6888 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -2159,8 +2159,7 @@ void Guild::SendLoginInfo(WorldSession* session) } for (GuildPerkSpellsEntry const* entry : sGuildPerkSpellsStore) - if (entry->GuildLevel <= GetLevel()) - player->LearnSpell(entry->SpellID, true); + player->LearnSpell(entry->SpellID, true); m_achievementMgr.SendAllData(player); @@ -2696,8 +2695,7 @@ void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool player->SetGuildLevel(0); for (GuildPerkSpellsEntry const* entry : sGuildPerkSpellsStore) - if (entry->GuildLevel <= GetLevel()) - player->RemoveSpell(entry->SpellID, false, false); + player->RemoveSpell(entry->SpellID, false, false); } _DeleteMemberFromDB(guid.GetCounter()); diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index db20f48c3e7..c365a4bbcbb 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -25,7 +25,6 @@ #include "WorldPacket.h" #include "ObjectMgr.h" #include "Player.h" -#include "DBCStore.h" class Item; diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 95a99736563..d4ea3927f6c 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1243,22 +1243,6 @@ void WorldSession::HandleRequestForcedReactionsOpcode(WorldPackets::Reputation:: _player->GetReputationMgr().SendForceReactions(); } -void WorldSession::HandleShowingHelmOpcode(WorldPackets::Character::ShowingHelm& packet) -{ - if (packet.ShowHelm) - _player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM); - else - _player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM); -} - -void WorldSession::HandleShowingCloakOpcode(WorldPackets::Character::ShowingCloak& packet) -{ - if (packet.ShowCloak) - _player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK); - else - _player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK); -} - void WorldSession::HandleCharRenameOpcode(WorldPackets::Character::CharacterRenameRequest& request) { if (!IsLegitCharacterForAccount(request.RenameInfo->Guid)) diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 80ee0918616..54bbfddb5fa 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1278,14 +1278,19 @@ void WorldSession::HandleUseCritterItem(WorldPackets::Item::UseCritterItem& useC if (!item) return; - ItemToBattlePetSpeciesEntry const* itemToBattlePetSpecies = sItemToBattlePetSpeciesStore.LookupEntry(item->GetEntry()); - if (!itemToBattlePetSpecies) + if (item->GetTemplate()->Effects.size() < 2) return; - BattlePetSpeciesEntry const* battlePetSpecies = sBattlePetSpeciesStore.LookupEntry(itemToBattlePetSpecies->BattlePetSpeciesID); - if (!battlePetSpecies) - return; + uint32 spellToLearn = item->GetTemplate()->Effects[1]->SpellID; + for (BattlePetSpeciesEntry const* entry : sBattlePetSpeciesStore) + { + if (entry->SummonSpellID == spellToLearn) + { + GetBattlePetMgr()->AddPet(entry->ID, entry->CreatureID, BattlePetMgr::RollPetBreed(entry->ID), BattlePetMgr::GetDefaultPetQuality(entry->ID)); + _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_BATTLE_PET_COUNT); + break; + } + } - GetBattlePetMgr()->AddPet(battlePetSpecies->ID, battlePetSpecies->CreatureID, BattlePetMgr::RollPetBreed(battlePetSpecies->ID), BattlePetMgr::GetDefaultPetQuality(battlePetSpecies->ID)); _player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); } diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 81221599b2c..69bafe9bc11 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -26,7 +26,6 @@ #include "Player.h" #include "MailPackets.h" #include "Language.h" -#include "DBCStores.h" #include "Item.h" #include "AccountMgr.h" #include "BattlenetAccountMgr.h" diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index a2634390cbc..0d37806d170 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -577,7 +577,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::Misc::AreaTrigger& pack case Map::CANNOT_ENTER_INSTANCE_BIND_MISMATCH: if (MapEntry const* entry = sMapStore.LookupEntry(at->target_mapId)) { - char const* mapName = entry->MapName_lang; + char const* mapName = entry->MapName->Str[player->GetSession()->GetSessionDbcLocale()]; TC_LOG_DEBUG("maps", "MAP: Player '%s' cannot enter instance map '%s' because their permanent bind is incompatible with their group's", player->GetName().c_str(), mapName); // is there a special opcode for this? // @todo figure out how to get player localized difficulty string (e.g. "10 player", "Heroic" etc) diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index ae0dcc586ef..0349fad420a 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -170,9 +170,9 @@ void WorldSession::HandleMoveWorldportAckOpcode() { // check if this instance has a reset time and send it to player if so Difficulty diff = GetPlayer()->GetDifficultyID(mEntry); - if (MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mEntry->ID, diff)) + if (MapDifficultyEntry const* mapDiff = sDB2Manager.GetMapDifficultyData(mEntry->ID, diff)) { - if (mapDiff->RaidDuration) + if (mapDiff->GetRaidDuration()) { if (time_t timeReset = sInstanceSaveMgr->GetResetTimeFor(mEntry->ID, diff)) { diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp index 23d432ed67c..d4b57b366be 100644 --- a/src/server/game/Handlers/ReferAFriendHandler.cpp +++ b/src/server/game/Handlers/ReferAFriendHandler.cpp @@ -21,6 +21,30 @@ #include "Log.h" #include "ReferAFriendPackets.h" +inline uint32 GetMaxLevelForExpansion(uint32 expansion) +{ + switch (expansion) + { + case EXPANSION_CLASSIC: + return 60; + case EXPANSION_THE_BURNING_CRUSADE: + return 70; + case EXPANSION_WRATH_OF_THE_LICH_KING: + return 80; + case EXPANSION_CATACLYSM: + return 85; + case EXPANSION_MISTS_OF_PANDARIA: + return 90; + case EXPANSION_WARLORDS_OF_DRAENOR: + return 100; + case EXPANSION_LEGION: + return 110; + default: + break; + } + return 0; +} + void WorldSession::HandleGrantLevel(WorldPackets::RaF::GrantLevel& grantLevel) { Player* target = ObjectAccessor::GetPlayer(*_player, grantLevel.Target); diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 7d639d57f80..12dcfcb77df 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -19,7 +19,6 @@ #include "WorldSession.h" #include "Common.h" #include "Config.h" -#include "DBCStores.h" #include "GameObjectAI.h" #include "GameObjectPackets.h" #include "GuildMgr.h" diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 4d979ecb9b3..3a5c65a0932 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -376,7 +376,7 @@ void InstanceSaveManager::LoadResetTimes() Difficulty difficulty = Difficulty(fields[1].GetUInt8()); uint64 oldresettime = fields[2].GetUInt32(); - MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapid, difficulty); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetMapDifficultyData(mapid, difficulty); if (!mapDiff) { TC_LOG_ERROR("misc", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty); @@ -395,7 +395,7 @@ void InstanceSaveManager::LoadResetTimes() // calculate new global reset times for expired instances and those that have never been reset yet // add the global reset times to the priority queue - for (auto& mapDifficultyPair : sMapDifficultyMap) + for (auto& mapDifficultyPair : sDB2Manager.GetMapDifficulties()) { uint32 mapid = mapDifficultyPair.first; @@ -403,11 +403,11 @@ void InstanceSaveManager::LoadResetTimes() { Difficulty difficulty = Difficulty(difficultyPair.first); MapDifficultyEntry const* mapDiff = difficultyPair.second; - if (!mapDiff->RaidDuration) + if (!mapDiff->GetRaidDuration()) continue; // the reset_delay must be at least one day - uint32 period = uint32(((mapDiff->RaidDuration * sWorld->getRate(RATE_INSTANCE_RESET_TIME)) / DAY) * DAY); + uint32 period = uint32(((mapDiff->GetRaidDuration() * sWorld->getRate(RATE_INSTANCE_RESET_TIME)) / DAY) * DAY); if (period < DAY) period = DAY; @@ -447,15 +447,15 @@ void InstanceSaveManager::LoadResetTimes() time_t InstanceSaveManager::GetSubsequentResetTime(uint32 mapid, Difficulty difficulty, time_t resetTime) const { - MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapid, difficulty); - if (!mapDiff || !mapDiff->RaidDuration) + MapDifficultyEntry const* mapDiff = sDB2Manager.GetMapDifficultyData(mapid, difficulty); + if (!mapDiff || !mapDiff->GetRaidDuration()) { TC_LOG_ERROR("misc", "InstanceSaveManager::GetSubsequentResetTime: not valid difficulty or no reset delay for map %u", mapid); return 0; } time_t diff = sWorld->getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR; - time_t period = uint32(((mapDiff->RaidDuration * sWorld->getRate(RATE_INSTANCE_RESET_TIME)) / DAY) * DAY); + time_t period = uint32(((mapDiff->GetRaidDuration() * sWorld->getRate(RATE_INSTANCE_RESET_TIME)) / DAY) * DAY); if (period < DAY) period = DAY; @@ -501,7 +501,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev void InstanceSaveManager::ForceGlobalReset(uint32 mapId, Difficulty difficulty) { - if (!GetDownscaledMapDifficultyData(mapId, difficulty)) + if (!sDB2Manager.GetDownscaledMapDifficultyData(mapId, difficulty)) return; // remove currently scheduled reset times ScheduleReset(false, 0, InstResetEvent(1, mapId, difficulty, 0)); @@ -627,7 +627,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b MapEntry const* mapEntry = sMapStore.LookupEntry(mapid); if (!mapEntry->Instanceable()) return; - TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->MapName_lang, mapid, uint8(difficulty), warn); + TC_LOG_DEBUG("misc", "InstanceSaveManager::ResetOrWarnAll: Processing map %s (%u) on difficulty %u (warn? %u)", mapEntry->MapName->Str[sWorld->GetDefaultDbcLocale()], mapid, uint8(difficulty), warn); time_t now = time(NULL); diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 2452c8f913e..f110425c1a4 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1586,9 +1586,9 @@ void LoadLootTemplates_Fishing() uint32 count = LootTemplates_Fishing.LoadAndCollectLootIds(lootIdSet); // remove real entries and check existence loot - for (auto itr = sAreaTableStore.begin(); itr != sAreaTableStore.end(); ++itr) - if (lootIdSet.find(itr.ID()) != lootIdSet.end()) - lootIdSet.erase(itr.ID()); + for (AreaTableEntry const* areaTable : sAreaTableStore) + if (lootIdSet.find(areaTable->ID) != lootIdSet.end()) + lootIdSet.erase(areaTable->ID); // output error for any still listed (not referenced from appropriate table) ids LootTemplates_Fishing.ReportUnusedIds(lootIdSet); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index cce2671b69b..37321344782 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -239,7 +239,7 @@ m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD), m_activeNonPlayersIter(m_activeNonPlayers.end()), _transportsUpdateIter(_transports.end()), i_gridExpiry(expiry), -i_scriptLock(false), _defaultLight(GetDefaultMapLight(id)) +i_scriptLock(false), _defaultLight(DB2Manager::GetDefaultMapLight(id)) { m_parentMap = (_parent ? _parent : this); for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx) @@ -2403,7 +2403,7 @@ bool Map::IsOutdoors(float x, float y, float z) const return true; AreaTableEntry const* atEntry = nullptr; - WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); + WMOAreaTableEntry const* wmoEntry= sDB2Manager.GetWMOAreaTable(rootId, adtId, groupId); if (wmoEntry) { TC_LOG_DEBUG("maps", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->AreaTableID); @@ -2443,7 +2443,7 @@ uint32 Map::GetAreaId(float x, float y, float z, bool *isOutdoors) const if (GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId)) { haveAreaInfo = true; - wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); + wmoEntry = sDB2Manager.GetWMOAreaTable(rootId, adtId, groupId); if (wmoEntry) { areaId = wmoEntry->AreaTableID; @@ -3413,7 +3413,7 @@ void InstanceMap::SetResetSchedule(bool on) MapDifficultyEntry const* Map::GetMapDifficulty() const { - return GetMapDifficultyData(GetId(), GetDifficultyID()); + return sDB2Manager.GetMapDifficultyData(GetId(), GetDifficultyID()); } uint32 Map::GetDifficultyLootBonusTreeMod() const @@ -3428,6 +3428,36 @@ uint32 Map::GetDifficultyLootBonusTreeMod() const return 0; } +uint32 Map::GetId() const +{ + return i_mapEntry->ID; +} + +bool Map::Instanceable() const +{ + return i_mapEntry && i_mapEntry->Instanceable(); +} + +bool Map::IsDungeon() const +{ + return i_mapEntry && i_mapEntry->IsDungeon(); +} + +bool Map::IsNonRaidDungeon() const +{ + return i_mapEntry && i_mapEntry->IsNonRaidDungeon(); +} + +bool Map::IsRaid() const +{ + return i_mapEntry && i_mapEntry->IsRaid(); +} + +bool Map::IsRaidOrHeroicDungeon() const +{ + return IsRaid() || IsHeroic(); +} + bool Map::IsHeroic() const { if (DifficultyEntry const* difficulty = sDifficultyStore.LookupEntry(i_spawnMode)) @@ -3435,6 +3465,38 @@ bool Map::IsHeroic() const return false; } +bool Map::Is25ManRaid() const +{ + return IsRaid() && (i_spawnMode == DIFFICULTY_25_N || i_spawnMode == DIFFICULTY_25_HC); +} + +bool Map::IsBattleground() const +{ + return i_mapEntry && i_mapEntry->IsBattleground(); +} + +bool Map::IsBattleArena() const +{ + return i_mapEntry && i_mapEntry->IsBattleArena(); +} + +bool Map::IsBattlegroundOrArena() const +{ + return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); +} + +bool Map::IsGarrison() const +{ + return i_mapEntry && i_mapEntry->IsGarrison(); +} + +bool Map::GetEntrancePos(int32 &mapid, float &x, float &y) +{ + if (!i_mapEntry) + return false; + return i_mapEntry->GetEntrancePos(mapid, x, y); +} + bool InstanceMap::HasPermBoundPlayers() const { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PERM_BIND_BY_INSTANCE); @@ -3454,7 +3516,7 @@ uint32 InstanceMap::GetMaxPlayers() const uint32 InstanceMap::GetMaxResetDelay() const { MapDifficultyEntry const* mapDiff = GetMapDifficulty(); - return mapDiff ? mapDiff->RaidDuration : 0; + return mapDiff ? mapDiff->GetRaidDuration() : 0; } /* ******* Battleground Instance Maps ******* */ diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 7d73d9b6625..89edf9823b7 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -21,8 +21,6 @@ #include "Define.h" -#include "DBCStructure.h" -#include "DB2Structure.h" #include "GridDefines.h" #include "Cell.h" #include "Timer.h" @@ -37,24 +35,28 @@ #include #include -class Unit; -class WorldPacket; -class InstanceScript; +class Battleground; +class BattlegroundMap; +class CreatureGroup; class Group; +class InstanceMap; class InstanceSave; +class InstanceScript; +class MapInstanced; class Object; -class WorldObject; -class TempSummon; class Player; -class CreatureGroup; -struct ScriptInfo; -struct ScriptAction; +class TempSummon; +class Unit; +class WorldObject; +class WorldPacket; +struct MapDifficultyEntry; +struct MapEntry; struct Position; -class Battleground; -class MapInstanced; -class BattlegroundMap; -class InstanceMap; +struct ScriptAction; +struct ScriptInfo; +struct SummonPropertiesEntry; class Transport; +enum Difficulty : uint8; enum WeatherState : uint32; namespace Trinity { struct ObjectUpdater; } @@ -323,8 +325,7 @@ class TC_GAME_API Map : public GridRefManager grid.ResetTimeTracker(time_t(float(i_gridExpiry)*factor)); } - time_t GetGridExpiry(void) const { return i_gridExpiry; } - uint32 GetId(void) const { return i_mapEntry->ID; } + time_t GetGridExpiry() const { return i_gridExpiry; } static bool ExistMap(uint32 mapid, int gx, int gy); static bool ExistVMap(uint32 mapid, int gx, int gy); @@ -393,23 +394,19 @@ class TC_GAME_API Map : public GridRefManager MapDifficultyEntry const* GetMapDifficulty() const; uint32 GetDifficultyLootBonusTreeMod() const; - bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); } - bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); } - bool IsNonRaidDungeon() const { return i_mapEntry && i_mapEntry->IsNonRaidDungeon(); } - bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); } - bool IsRaidOrHeroicDungeon() const { return IsRaid() || IsHeroic(); } + uint32 GetId() const; + bool Instanceable() const; + bool IsDungeon() const; + bool IsNonRaidDungeon() const; + bool IsRaid() const; + bool IsRaidOrHeroicDungeon() const; bool IsHeroic() const; - bool Is25ManRaid() const { return IsRaid() && (i_spawnMode == DIFFICULTY_25_N || i_spawnMode == DIFFICULTY_25_HC); } // since 25man difficulties are 1 and 3, we can check them like that - bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); } - bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); } - bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); } - bool IsGarrison() const { return i_mapEntry && i_mapEntry->IsGarrison(); } - bool GetEntrancePos(int32 &mapid, float &x, float &y) - { - if (!i_mapEntry) - return false; - return i_mapEntry->GetEntrancePos(mapid, x, y); - } + bool Is25ManRaid() const; // since 25man difficulties are 1 and 3, we can check them like that + bool IsBattleground() const; + bool IsBattleArena() const; + bool IsBattlegroundOrArena() const; + bool IsGarrison() const; + bool GetEntrancePos(int32 &mapid, float &x, float &y); void AddObjectToRemoveList(WorldObject* obj); void AddObjectToSwitchList(WorldObject* obj, bool on); diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 12cec6d8633..f80c04d7c8c 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -225,7 +225,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, } // some instances only have one difficulty - GetDownscaledMapDifficultyData(GetId(), difficulty); + sDB2Manager.GetDownscaledMapDifficultyData(GetId(), difficulty); TC_LOG_DEBUG("maps", "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save ? "" : "new ", InstanceId, GetId(), difficulty ? "heroic" : "normal"); diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 5a31bb822b4..d85d198fe9c 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -140,7 +140,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool Difficulty targetDifficulty, requestedDifficulty; targetDifficulty = requestedDifficulty = player->GetDifficultyID(entry); // Get the highest available difficulty if current setting is higher than the instance allows - MapDifficultyEntry const* mapDiff = GetDownscaledMapDifficultyData(entry->ID, targetDifficulty); + MapDifficultyEntry const* mapDiff = sDB2Manager.GetDownscaledMapDifficultyData(mapid, targetDifficulty); if (!mapDiff) return Map::CANNOT_ENTER_DIFFICULTY_UNAVAILABLE; diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index d058c0bb111..625f78b53bd 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -20,7 +20,6 @@ #include #include "Spline.h" -#include "DBCStores.h" #include "DB2Stores.h" #include "ObjectGuid.h" diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 94aa48168da..41d0e4b8a15 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -23,9 +23,28 @@ #include "SharedDefines.h" #include "ScriptMgr.h" #include "Player.h" +#include "GameTables.h" namespace Trinity { + inline uint32 GetExpansionForLevel(uint32 level) + { + if (level < 60) + return EXPANSION_CLASSIC; + else if (level < 70) + return EXPANSION_THE_BURNING_CRUSADE; + else if (level < 80) + return EXPANSION_WRATH_OF_THE_LICH_KING; + else if (level < 85) + return EXPANSION_CATACLYSM; + else if (level < 90) + return EXPANSION_MISTS_OF_PANDARIA; + else if (level < 100) + return EXPANSION_WARLORDS_OF_DRAENOR; + else + return CURRENT_EXPANSION; + } + namespace Honor { inline float hk_honor_at_level_f(uint8 level, float multiplier = 1.0f) @@ -120,11 +139,8 @@ namespace Trinity { uint32 baseGain; - GtOCTLevelExperienceEntry const* BaseExpPlayer = sGtOCTLevelExperienceStore.EvaluateTable(pl_level - 1, 1); - GtOCTLevelExperienceEntry const* BaseExpMob = sGtOCTLevelExperienceStore.EvaluateTable(mob_level - 1, 1); - - GtOCTLevelExperienceEntry const* CoefPlayer = sGtOCTLevelExperienceStore.EvaluateTable(pl_level - 1, 4); - GtOCTLevelExperienceEntry const* CoefMob = sGtOCTLevelExperienceStore.EvaluateTable(mob_level - 1, 4); + GtXpEntry const* xpPlayer = sXpGameTable.GetRow(pl_level); + GtXpEntry const* xpMob = sXpGameTable.GetRow(mob_level); if (mob_level >= pl_level) { @@ -132,7 +148,7 @@ namespace Trinity if (nLevelDiff > 4) nLevelDiff = 4; - baseGain = uint32(round(BaseExpPlayer->Data * (1 + 0.05f * nLevelDiff))); + baseGain = uint32(round(xpPlayer->PerKill * (1 + 0.05f * nLevelDiff))); } else { @@ -140,7 +156,7 @@ namespace Trinity if (mob_level > gray_level) { uint8 ZD = GetZeroDifference(pl_level); - baseGain = uint32(round(BaseExpMob->Data * ((1 - ((pl_level - mob_level) / float(ZD))) * (CoefMob->Data / CoefPlayer->Data)))); + baseGain = uint32(round(xpMob->PerKill * ((1 - ((pl_level - mob_level) / float(ZD))) * (xpMob->Divisor / xpPlayer->Divisor)))); } else baseGain = 0; diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index ceecf1a9b85..46ceb14df3d 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -19,7 +19,6 @@ #include "DatabaseEnv.h" #include "ReputationMgr.h" #include "ReputationPackets.h" -#include "DBCStores.h" #include "Player.h" #include "WorldPacket.h" #include "World.h" @@ -235,11 +234,9 @@ void ReputationMgr::Initialize() _exaltedFactionCount = 0; _sendFactionIncreased = false; - for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++) + for (FactionEntry const* factionEntry : sFactionStore) { - FactionEntry const* factionEntry = sFactionStore.LookupEntry(i); - - if (factionEntry && factionEntry->CanHaveReputation()) + if (factionEntry->CanHaveReputation()) { FactionState newFaction; newFaction.ID = factionEntry->ID; @@ -283,7 +280,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi { float spillOverRepOut = float(standing); // check for sub-factions that receive spillover - std::vector const* flist = GetFactionTeamList(factionEntry->ID); + std::vector const* flist = sDB2Manager.GetFactionTeamList(factionEntry->ID); // if has no sub-factions, check for factions with same parent if (!flist && factionEntry->ParentFactionID && factionEntry->ParentFactionModOut != 0.0f) { @@ -298,7 +295,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi } else // spill to "sister" factions { - flist = GetFactionTeamList(factionEntry->ParentFactionID); + flist = sDB2Manager.GetFactionTeamList(factionEntry->ParentFactionID); } } } diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index f2a5f3ba1f3..3486a533d54 100644 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -22,7 +22,6 @@ #include "Common.h" #include "SharedDefines.h" #include "Language.h" -#include "DBCStructure.h" #include "QueryResult.h" #include diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 5d3297b009d..70f0e717e7c 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -20,7 +20,6 @@ #include "ScriptReloadMgr.h" #include "Config.h" #include "DatabaseEnv.h" -#include "DBCStores.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" #include "ScriptSystem.h" diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index c3deab43ee6..17583bd9b5e 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -21,7 +21,6 @@ #include "Common.h" #include -#include "DBCStores.h" #include "QuestDef.h" #include "SharedDefines.h" #include "World.h" @@ -62,10 +61,12 @@ class WorldSocket; class WorldObject; class WorldSession; +struct AreaTriggerEntry; struct AuctionEntry; struct ConditionSourceInfo; struct Condition; struct ItemTemplate; +struct MapEntry; struct OutdoorPvPData; #define VISIBLE_RANGE 166.0f //MAX visible range (size of grid) diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp index dfa4bbb3bfa..a12818f2281 100644 --- a/src/server/game/Server/Packets/CharacterPackets.cpp +++ b/src/server/game/Server/Packets/CharacterPackets.cpp @@ -434,16 +434,6 @@ WorldPacket const* WorldPackets::Character::PlayedTime::Write() return &_worldPacket; } -void WorldPackets::Character::ShowingCloak::Read() -{ - ShowCloak = _worldPacket.ReadBit(); -} - -void WorldPackets::Character::ShowingHelm::Read() -{ - ShowHelm = _worldPacket.ReadBit(); -} - void WorldPackets::Character::SetTitle::Read() { _worldPacket >> TitleID; diff --git a/src/server/game/Server/Packets/CharacterPackets.h b/src/server/game/Server/Packets/CharacterPackets.h index 6edf7bc097c..be4f1153ab2 100644 --- a/src/server/game/Server/Packets/CharacterPackets.h +++ b/src/server/game/Server/Packets/CharacterPackets.h @@ -570,26 +570,6 @@ namespace WorldPackets bool TriggerEvent = false; }; - class ShowingCloak final : public ClientPacket - { - public: - ShowingCloak(WorldPacket&& packet) : ClientPacket(CMSG_SHOWING_CLOAK, std::move(packet)) { } - - void Read() override; - - bool ShowCloak = false; - }; - - class ShowingHelm final : public ClientPacket - { - public: - ShowingHelm(WorldPacket&& packet) : ClientPacket(CMSG_SHOWING_HELM, std::move(packet)) { } - - void Read() override; - - bool ShowHelm = false; - }; - class SetTitle final : public ClientPacket { public: diff --git a/src/server/game/Server/Packets/GarrisonPackets.h b/src/server/game/Server/Packets/GarrisonPackets.h index a5ce42d7488..2b92ab1311f 100644 --- a/src/server/game/Server/Packets/GarrisonPackets.h +++ b/src/server/game/Server/Packets/GarrisonPackets.h @@ -22,7 +22,8 @@ #include "ObjectGuid.h" #include "Position.h" #include "PacketUtilities.h" -#include "DB2Structure.h" + +struct GarrAbilityEntry; namespace WorldPackets { diff --git a/src/server/game/Server/Packets/TaxiPackets.h b/src/server/game/Server/Packets/TaxiPackets.h index c4d4cac3046..0f5bd82d079 100644 --- a/src/server/game/Server/Packets/TaxiPackets.h +++ b/src/server/game/Server/Packets/TaxiPackets.h @@ -20,7 +20,6 @@ #include "Packet.h" #include "ObjectGuid.h" -#include "DB2Structure.h" namespace WorldPackets { diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 900092c126b..23f6a576876 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -710,8 +710,6 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_SET_TRADE_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Trade::SetTradeItem, &WorldSession::HandleSetTradeItemOpcode); DEFINE_HANDLER(CMSG_SET_USING_PARTY_GARRISON, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_SET_WATCHED_FACTION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Character::SetWatchedFaction, &WorldSession::HandleSetWatchedFactionOpcode); - DEFINE_HANDLER(CMSG_SHOWING_CLOAK, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Character::ShowingCloak, &WorldSession::HandleShowingCloakOpcode); - DEFINE_HANDLER(CMSG_SHOWING_HELM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Character::ShowingHelm, &WorldSession::HandleShowingHelmOpcode); DEFINE_HANDLER(CMSG_SHOW_TRADE_SKILL, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_SIGN_PETITION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Petition::SignPetition, &WorldSession::HandleSignPetition); DEFINE_HANDLER(CMSG_SILENCE_PARTY_TALKER, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 715799294de..01d5134a472 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -49,77 +49,80 @@ enum OpcodeClient : uint32 CMSG_ACCEPT_LEVEL_GRANT = 0x34E8, CMSG_ACCEPT_TRADE = 0x315A, CMSG_ACCEPT_WARGAME_INVITE = 0x35DF, - CMSG_ACTIVATE_TAXI = 0x34A4, - CMSG_ADD_BATTLENET_FRIEND = 0x365F, - CMSG_ADD_FRIEND = 0x36D4, - CMSG_ADD_IGNORE = 0x36D8, + CMSG_ACTIVATE_TAXI = 0x34A6, CMSG_ADDON_LIST = 0x35D7, - CMSG_ADD_TOY = 0x3270, + CMSG_ADD_BATTLENET_FRIEND = 0x365F, + CMSG_ADD_FRIEND = 0x36D5, + CMSG_ADD_IGNORE = 0x36D9, + CMSG_ADD_TOY = 0x3274, CMSG_ADVENTURE_JOURNAL_OPEN_QUEST = 0x31EA, - CMSG_ADVENTURE_JOURNAL_START_QUEST = 0x3308, + CMSG_ADVENTURE_JOURNAL_START_QUEST = 0x331B, CMSG_ALTER_APPEARANCE = 0x34E4, - CMSG_AREA_SPIRIT_HEALER_QUERY = 0x34A9, - CMSG_AREA_SPIRIT_HEALER_QUEUE = 0x34AA, + CMSG_AREA_SPIRIT_HEALER_QUERY = 0x34AB, + CMSG_AREA_SPIRIT_HEALER_QUEUE = 0x34AC, CMSG_AREA_TRIGGER = 0x31C1, CMSG_ARTIFACT_ADD_POWER = 0x31A5, - CMSG_ARTIFACT_REMOVE_ALL_POWERS = 0x31A6, CMSG_ARTIFACT_SET_APPEARANCE = 0x31A7, - CMSG_ATTACK_STOP = 0x3237, - CMSG_ATTACK_SWING = 0x3236, - CMSG_AUCTION_HELLO_REQUEST = 0x34B9, - CMSG_AUCTION_LIST_BIDDER_ITEMS = 0x34BF, - CMSG_AUCTION_LIST_ITEMS = 0x34BC, - CMSG_AUCTION_LIST_OWNER_ITEMS = 0x34BE, - CMSG_AUCTION_LIST_PENDING_SALES = 0x34C1, - CMSG_AUCTION_PLACE_BID = 0x34C0, - CMSG_AUCTION_REMOVE_ITEM = 0x34BB, - CMSG_AUCTION_REPLICATE_ITEMS = 0x34BD, - CMSG_AUCTION_SELL_ITEM = 0x34BA, + CMSG_ATTACK_STOP = 0x323A, + CMSG_ATTACK_SWING = 0x3239, + CMSG_AUCTION_HELLO_REQUEST = 0x34BB, + CMSG_AUCTION_LIST_BIDDER_ITEMS = 0x34C1, + CMSG_AUCTION_LIST_ITEMS = 0x34BE, + CMSG_AUCTION_LIST_OWNER_ITEMS = 0x34C0, + CMSG_AUCTION_LIST_PENDING_SALES = 0x34C3, + CMSG_AUCTION_PLACE_BID = 0x34C2, + CMSG_AUCTION_REMOVE_ITEM = 0x34BD, + CMSG_AUCTION_REPLICATE_ITEMS = 0x34BF, + CMSG_AUCTION_SELL_ITEM = 0x34BC, CMSG_AUTH_CONTINUED_SESSION = 0x3766, CMSG_AUTH_SESSION = 0x3765, - CMSG_AUTOBANK_ITEM = 0x3997, - CMSG_AUTOBANK_REAGENT = 0x3999, - CMSG_AUTOSTORE_BANK_ITEM = 0x3996, - CMSG_AUTOSTORE_BANK_REAGENT = 0x3998, + CMSG_AUTOBANK_ITEM = 0x3996, + CMSG_AUTOBANK_REAGENT = 0x3998, + CMSG_AUTOSTORE_BANK_ITEM = 0x3997, + CMSG_AUTOSTORE_BANK_REAGENT = 0x3999, CMSG_AUTO_EQUIP_ITEM = 0x399A, CMSG_AUTO_EQUIP_ITEM_SLOT = 0x399F, CMSG_AUTO_STORE_BAG_ITEM = 0x399B, - CMSG_BANKER_ACTIVATE = 0x34AC, + CMSG_BANKER_ACTIVATE = 0x34AE, CMSG_BATTLEFIELD_LEAVE = 0x3171, CMSG_BATTLEFIELD_LIST = 0x317C, - CMSG_BATTLEFIELD_PORT = 0x350E, - CMSG_BATTLEMASTER_HELLO = 0x3285, - CMSG_BATTLEMASTER_JOIN = 0x350B, - CMSG_BATTLEMASTER_JOIN_ARENA = 0x350C, - CMSG_BATTLEMASTER_JOIN_SKIRMISH = 0x350D, - CMSG_BATTLENET_CHALLENGE_RESPONSE = 0x36D7, - CMSG_BATTLE_PAY_ACK_FAILED_RESPONSE = 0x36CE, - CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE = 0x36CD, + CMSG_BATTLEFIELD_PORT = 0x3512, + CMSG_BATTLEMASTER_HELLO = 0x3289, + CMSG_BATTLEMASTER_JOIN = 0x350F, + CMSG_BATTLEMASTER_JOIN_ARENA = 0x3510, + CMSG_BATTLEMASTER_JOIN_SKIRMISH = 0x3511, + CMSG_BATTLENET_CHALLENGE_RESPONSE = 0x36D8, + CMSG_BATTLENET_REQUEST = 0x36FC, + CMSG_BATTLENET_REQUEST_REALM_LIST_TICKET = 0x36FD, + CMSG_BATTLE_PAY_ACK_FAILED_RESPONSE = 0x36CF, + CMSG_BATTLE_PAY_CONFIRM_PURCHASE_RESPONSE = 0x36CE, CMSG_BATTLE_PAY_DISTRIBUTION_ASSIGN_TO_TARGET = 0x36C7, CMSG_BATTLE_PAY_GET_PRODUCT_LIST = 0x36C2, CMSG_BATTLE_PAY_GET_PURCHASE_LIST = 0x36C3, - CMSG_BATTLE_PAY_START_PURCHASE = 0x36CC, - CMSG_BATTLE_PAY_START_VAS_PURCHASE = 0x36F8, - CMSG_BATTLE_PET_DELETE_PET = 0x3625, - CMSG_BATTLE_PET_DELETE_PET_CHEAT = 0x3626, - CMSG_BATTLE_PET_MODIFY_NAME = 0x3628, - CMSG_BATTLE_PET_REQUEST_JOURNAL = 0x3624, - CMSG_BATTLE_PET_REQUEST_JOURNAL_LOCK = 0x3623, - CMSG_BATTLE_PET_SET_BATTLE_SLOT = 0x362C, + CMSG_BATTLE_PAY_START_PURCHASE = 0x36F8, + CMSG_BATTLE_PAY_START_VAS_PURCHASE = 0x36F9, + CMSG_BATTLE_PAY_TRIAL_BOOST_CHARACTER = 0x36C8, + CMSG_BATTLE_PET_CLEAR_FANFARE = 0x312C, + CMSG_BATTLE_PET_DELETE_PET = 0x3624, + CMSG_BATTLE_PET_DELETE_PET_CHEAT = 0x3625, + CMSG_BATTLE_PET_MODIFY_NAME = 0x3627, + CMSG_BATTLE_PET_REQUEST_JOURNAL = 0x3623, + CMSG_BATTLE_PET_REQUEST_JOURNAL_LOCK = 0x3622, + CMSG_BATTLE_PET_SET_BATTLE_SLOT = 0x362B, CMSG_BATTLE_PET_SET_FLAGS = 0x362F, - CMSG_BATTLE_PET_SUMMON = 0x3629, + CMSG_BATTLE_PET_SUMMON = 0x3628, CMSG_BATTLE_PET_UPDATE_NOTIFY = 0x31CA, CMSG_BEGIN_TRADE = 0x3157, - CMSG_BINDER_ACTIVATE = 0x34AB, - CMSG_BLACK_MARKET_BID_ON_ITEM = 0x3515, - CMSG_BLACK_MARKET_OPEN = 0x3513, - CMSG_BLACK_MARKET_REQUEST_ITEMS = 0x3514, + CMSG_BINDER_ACTIVATE = 0x34AD, + CMSG_BLACK_MARKET_BID_ON_ITEM = 0x3519, + CMSG_BLACK_MARKET_OPEN = 0x3517, + CMSG_BLACK_MARKET_REQUEST_ITEMS = 0x3518, CMSG_BUG_REPORT = 0x368C, CMSG_BUSY_TRADE = 0x3158, - CMSG_BUY_BACK_ITEM = 0x349D, - CMSG_BUY_BANK_SLOT = 0x34AD, - CMSG_BUY_ITEM = 0x349C, - CMSG_BUY_REAGENT_BANK = 0x34AE, + CMSG_BUY_BACK_ITEM = 0x349F, + CMSG_BUY_BANK_SLOT = 0x34AF, + CMSG_BUY_ITEM = 0x349E, + CMSG_BUY_REAGENT_BANK = 0x34B0, CMSG_BUY_WOW_TOKEN_CONFIRM = 0x36F1, CMSG_BUY_WOW_TOKEN_START = 0x36F0, CMSG_CAGE_BATTLE_PET = 0x31DA, @@ -139,22 +142,22 @@ enum OpcodeClient : uint32 CMSG_CALENDAR_REMOVE_INVITE = 0x3679, CMSG_CALENDAR_UPDATE_EVENT = 0x3684, CMSG_CANCEL_AURA = 0x31A9, - CMSG_CANCEL_AUTO_REPEAT_SPELL = 0x34D4, - CMSG_CANCEL_CAST = 0x3275, - CMSG_CANCEL_CHANNELLING = 0x3244, - CMSG_CANCEL_GROWTH_AURA = 0x3249, - CMSG_CANCEL_MASTER_LOOT_ROLL = 0x31F6, + CMSG_CANCEL_AUTO_REPEAT_SPELL = 0x34D6, + CMSG_CANCEL_CAST = 0x3279, + CMSG_CANCEL_CHANNELLING = 0x3247, + CMSG_CANCEL_GROWTH_AURA = 0x324C, + CMSG_CANCEL_MASTER_LOOT_ROLL = 0x31F8, CMSG_CANCEL_MOD_SPEED_NO_CONTROL_AURAS = 0x31A8, - CMSG_CANCEL_MOUNT_AURA = 0x3259, + CMSG_CANCEL_MOUNT_AURA = 0x325D, CMSG_CANCEL_QUEUED_SPELL = 0x317D, CMSG_CANCEL_TEMP_ENCHANTMENT = 0x34E1, CMSG_CANCEL_TRADE = 0x315C, CMSG_CAN_DUEL = 0x3668, - CMSG_CAST_SPELL = 0x3273, + CMSG_CAST_SPELL = 0x3277, CMSG_CHALLENGE_MODE_REQUEST_LEADERS = 0x308F, CMSG_CHALLENGE_MODE_REQUEST_MAP_STATS = 0x308E, - CMSG_CHANGE_BAG_SLOT_FLAG = 0x32EE, - CMSG_CHANGE_MONUMENT_APPEARANCE = 0x32D0, + CMSG_CHANGE_BAG_SLOT_FLAG = 0x32FD, + CMSG_CHANGE_MONUMENT_APPEARANCE = 0x32DD, CMSG_CHANGE_SUB_GROUP = 0x364D, CMSG_CHARACTER_RENAME_REQUEST = 0x36C5, CMSG_CHAR_CUSTOMIZE = 0x3694, @@ -208,13 +211,13 @@ enum OpcodeClient : uint32 CMSG_CHAT_REPORT_FILTERED = 0x37CC, CMSG_CHAT_REPORT_IGNORED = 0x37CB, CMSG_CHAT_UNREGISTER_ALL_ADDON_PREFIXES = 0x37CE, - CMSG_CHECK_RAF_EMAIL_ENABLED = 0x36CF, + CMSG_CHECK_RAF_EMAIL_ENABLED = 0x36D0, CMSG_CHECK_WOW_TOKEN_VETERAN_ELIGIBILITY = 0x36EF, - CMSG_CHOICE_RESPONSE = 0x3277, + CMSG_CHOICE_RESPONSE = 0x327B, CMSG_CLEAR_RAID_MARKER = 0x319F, CMSG_CLEAR_TRADE_ITEM = 0x315E, - CMSG_CLIENT_PORT_GRAVEYARD = 0x3510, - CMSG_CLOSE_INTERACTION = 0x348A, + CMSG_CLIENT_PORT_GRAVEYARD = 0x3514, + CMSG_CLOSE_INTERACTION = 0x348B, CMSG_COMMENTATOR_ENABLE = 0x35EF, CMSG_COMMENTATOR_ENTER_INSTANCE = 0x35F2, CMSG_COMMENTATOR_EXIT_INSTANCE = 0x35F3, @@ -222,95 +225,99 @@ enum OpcodeClient : uint32 CMSG_COMMENTATOR_GET_PLAYER_INFO = 0x35F1, CMSG_COMMENTATOR_START_WARGAME = 0x35EE, CMSG_COMPLAINT = 0x3672, - CMSG_COMPLETE_CINEMATIC = 0x352D, - CMSG_COMPLETE_MOVIE = 0x34CB, - CMSG_CONFIRM_RESPEC_WIPE = 0x31F0, + CMSG_COMPLETE_CINEMATIC = 0x3531, + CMSG_COMPLETE_MOVIE = 0x34CD, + CMSG_CONFIRM_ARTIFACT_RESPEC = 0x31A6, + CMSG_CONFIRM_RESPEC_WIPE = 0x31F2, CMSG_CONNECT_TO_FAILED = 0x35D4, CMSG_CONVERT_RAID = 0x364F, CMSG_CREATE_CHARACTER = 0x3644, - CMSG_CREATE_SHIPMENT = 0x32BF, + CMSG_CREATE_SHIPMENT = 0x32C9, CMSG_DB_QUERY_BULK = 0x35E5, - CMSG_DECLINE_GUILD_INVITES = 0x3509, - CMSG_DECLINE_PETITION = 0x351C, - CMSG_DELETE_EQUIPMENT_SET = 0x34FA, - CMSG_DEL_FRIEND = 0x36D5, - CMSG_DEL_IGNORE = 0x36D9, - CMSG_DEPOSIT_REAGENT_BANK = 0x32F7, - CMSG_DESTROY_ITEM = 0x326A, - CMSG_DF_BOOT_PLAYER_VOTE = 0x3616, - CMSG_DF_GET_JOIN_STATUS = 0x3614, - CMSG_DF_GET_SYSTEM_INFO = 0x3613, - CMSG_DF_JOIN = 0x3607, - CMSG_DF_LEAVE = 0x3612, - CMSG_DF_PROPOSAL_RESPONSE = 0x3606, - CMSG_DF_READY_CHECK_RESPONSE = 0x3619, - CMSG_DF_SET_ROLES = 0x3615, - CMSG_DF_TELEPORT = 0x3617, + CMSG_DECLINE_GUILD_INVITES = 0x350D, + CMSG_DECLINE_PETITION = 0x3520, + CMSG_DELETE_EQUIPMENT_SET = 0x34FB, + CMSG_DEL_FRIEND = 0x36D6, + CMSG_DEL_IGNORE = 0x36DA, + CMSG_DEPOSIT_REAGENT_BANK = 0x3306, + CMSG_DESTROY_ITEM = 0x326E, + CMSG_DF_BOOT_PLAYER_VOTE = 0x3615, + CMSG_DF_GET_JOIN_STATUS = 0x3613, + CMSG_DF_GET_SYSTEM_INFO = 0x3612, + CMSG_DF_JOIN = 0x3606, + CMSG_DF_LEAVE = 0x3611, + CMSG_DF_PROPOSAL_RESPONSE = 0x3605, + CMSG_DF_READY_CHECK_RESPONSE = 0x3618, + CMSG_DF_SET_ROLES = 0x3614, + CMSG_DF_TELEPORT = 0x3616, CMSG_DISCARDED_TIME_SYNC_ACKS = 0x3A3C, CMSG_DISMISS_CRITTER = 0x34EA, - CMSG_DO_MASTER_LOOT_ROLL = 0x31F5, + CMSG_DO_MASTER_LOOT_ROLL = 0x31F7, CMSG_DO_READY_CHECK = 0x3634, - CMSG_DUEL_RESPONSE = 0x34D0, - CMSG_EJECT_PASSENGER = 0x321D, - CMSG_EMOTE = 0x3529, + CMSG_DUEL_RESPONSE = 0x34D2, + CMSG_EJECT_PASSENGER = 0x3220, + CMSG_EMOTE = 0x352D, CMSG_ENABLE_NAGLE = 0x376A, - CMSG_ENABLE_TAXI_NODE = 0x34A2, + CMSG_ENABLE_TAXI_NODE = 0x34A4, CMSG_ENGINE_SURVEY = 0x36E9, CMSG_ENUM_CHARACTERS = 0x35E7, CMSG_ENUM_CHARACTERS_DELETED_BY_CLIENT = 0x36E3, - CMSG_FAR_SIGHT = 0x34D5, + CMSG_FAR_SIGHT = 0x34D7, CMSG_GAME_OBJ_REPORT_USE = 0x34DE, CMSG_GAME_OBJ_USE = 0x34DD, - CMSG_GARRISON_ASSIGN_FOLLOWER_TO_BUILDING = 0x32B0, - CMSG_GARRISON_CANCEL_CONSTRUCTION = 0x32A2, - CMSG_GARRISON_CHECK_UPGRADEABLE = 0x32EA, - CMSG_GARRISON_COMPLETE_MISSION = 0x32DD, - CMSG_GARRISON_GENERATE_RECRUITS = 0x32B3, - CMSG_GARRISON_GET_BUILDING_LANDMARKS = 0x32BB, - CMSG_GARRISON_MISSION_BONUS_ROLL = 0x32DF, - CMSG_GARRISON_PURCHASE_BUILDING = 0x329E, - CMSG_GARRISON_RECRUIT_FOLLOWER = 0x32B5, - CMSG_GARRISON_REMOVE_FOLLOWER = 0x32D4, - CMSG_GARRISON_REMOVE_FOLLOWER_FROM_BUILDING = 0x32B1, - CMSG_GARRISON_RENAME_FOLLOWER = 0x32B2, - CMSG_GARRISON_REQUEST_BLUEPRINT_AND_SPECIALIZATION_DATA = 0x329D, - CMSG_GARRISON_REQUEST_LANDING_PAGE_SHIPMENT_INFO = 0x32BE, - CMSG_GARRISON_REQUEST_SHIPMENT_INFO = 0x32BD, - CMSG_GARRISON_SET_BUILDING_ACTIVE = 0x329F, - CMSG_GARRISON_SET_FOLLOWER_FAVORITE = 0x32AF, - CMSG_GARRISON_SET_FOLLOWER_INACTIVE = 0x32AB, - CMSG_GARRISON_SET_RECRUITMENT_PREFERENCES = 0x32B4, - CMSG_GARRISON_START_MISSION = 0x32DC, - CMSG_GARRISON_SWAP_BUILDINGS = 0x32A3, + CMSG_GARRISON_ASSIGN_FOLLOWER_TO_BUILDING = 0x32B5, + CMSG_GARRISON_CANCEL_CONSTRUCTION = 0x32A6, + CMSG_GARRISON_CHANGE_ZONE_SUPPORT_SPELL_FOR_FOLLOWER = 0x32B4, + CMSG_GARRISON_CHECK_UPGRADEABLE = 0x32F9, + CMSG_GARRISON_COMPLETE_MISSION = 0x32EA, + CMSG_GARRISON_GENERATE_RECRUITS = 0x32B8, + CMSG_GARRISON_GET_BUILDING_LANDMARKS = 0x32C5, + CMSG_GARRISON_MISSION_BONUS_ROLL = 0x32EC, + CMSG_GARRISON_PURCHASE_BUILDING = 0x32A2, + CMSG_GARRISON_RECRUIT_FOLLOWER = 0x32BA, + CMSG_GARRISON_REMOVE_FOLLOWER = 0x32E1, + CMSG_GARRISON_REMOVE_FOLLOWER_FROM_BUILDING = 0x32B6, + CMSG_GARRISON_RENAME_FOLLOWER = 0x32B7, + CMSG_GARRISON_REQUEST_BLUEPRINT_AND_SPECIALIZATION_DATA = 0x32A1, + CMSG_GARRISON_REQUEST_CLASS_SPEC_CATEGORY_INFO = 0x32BE, + CMSG_GARRISON_REQUEST_LANDING_PAGE_SHIPMENT_INFO = 0x32C8, + CMSG_GARRISON_REQUEST_SHIPMENT_INFO = 0x32C7, + CMSG_GARRISON_RESEARCH_TALENT = 0x32BB, + CMSG_GARRISON_SET_BUILDING_ACTIVE = 0x32A3, + CMSG_GARRISON_SET_FOLLOWER_FAVORITE = 0x32B3, + CMSG_GARRISON_SET_FOLLOWER_INACTIVE = 0x32AF, + CMSG_GARRISON_SET_RECRUITMENT_PREFERENCES = 0x32B9, + CMSG_GARRISON_START_MISSION = 0x32E9, + CMSG_GARRISON_SWAP_BUILDINGS = 0x32A7, CMSG_GENERATE_RANDOM_CHARACTER_NAME = 0x35E6, CMSG_GET_CHALLENGE_MODE_REWARDS = 0x3091, - CMSG_GET_GARRISON_INFO = 0x3298, - CMSG_GET_ITEM_PURCHASE_DATA = 0x3517, - CMSG_GET_MIRROR_IMAGE_DATA = 0x326E, + CMSG_GET_GARRISON_INFO = 0x329C, + CMSG_GET_ITEM_PURCHASE_DATA = 0x351B, + CMSG_GET_MIRROR_IMAGE_DATA = 0x3272, CMSG_GET_PVP_OPTIONS_ENABLED = 0x35ED, CMSG_GET_REMAINING_GAME_TIME = 0x36F2, - CMSG_GET_TROPHY_LIST = 0x32CD, + CMSG_GET_TROPHY_LIST = 0x32DA, CMSG_GET_UNDELETE_CHARACTER_COOLDOWN_STATUS = 0x36E5, CMSG_GM_TICKET_ACKNOWLEDGE_SURVEY = 0x3698, CMSG_GM_TICKET_GET_CASE_STATUS = 0x3697, CMSG_GM_TICKET_GET_SYSTEM_STATUS = 0x3696, - CMSG_GOSSIP_SELECT_OPTION = 0x348B, + CMSG_GOSSIP_SELECT_OPTION = 0x348C, CMSG_GRANT_LEVEL = 0x34E6, CMSG_GUILD_ADD_BATTLENET_FRIEND = 0x308D, CMSG_GUILD_ADD_RANK = 0x3064, CMSG_GUILD_ASSIGN_MEMBER_RANK = 0x305F, CMSG_GUILD_AUTO_DECLINE_INVITATION = 0x3061, - CMSG_GUILD_BANK_ACTIVATE = 0x34AF, - CMSG_GUILD_BANK_BUY_TAB = 0x34B2, - CMSG_GUILD_BANK_DEPOSIT_MONEY = 0x34B4, + CMSG_GUILD_BANK_ACTIVATE = 0x34B1, + CMSG_GUILD_BANK_BUY_TAB = 0x34B4, + CMSG_GUILD_BANK_DEPOSIT_MONEY = 0x34B6, CMSG_GUILD_BANK_LOG_QUERY = 0x3082, - CMSG_GUILD_BANK_QUERY_TAB = 0x34B1, + CMSG_GUILD_BANK_QUERY_TAB = 0x34B3, CMSG_GUILD_BANK_REMAINING_WITHDRAW_MONEY_QUERY = 0x3083, CMSG_GUILD_BANK_SET_TAB_TEXT = 0x3086, - CMSG_GUILD_BANK_SWAP_ITEMS = 0x34B0, + CMSG_GUILD_BANK_SWAP_ITEMS = 0x34B2, CMSG_GUILD_BANK_TEXT_QUERY = 0x3087, - CMSG_GUILD_BANK_UPDATE_TAB = 0x34B3, - CMSG_GUILD_BANK_WITHDRAW_MONEY = 0x34B5, + CMSG_GUILD_BANK_UPDATE_TAB = 0x34B5, + CMSG_GUILD_BANK_WITHDRAW_MONEY = 0x34B7, CMSG_GUILD_CHALLENGE_UPDATE_REQUEST = 0x307B, CMSG_GUILD_CHANGE_NAME_REQUEST = 0x307E, CMSG_GUILD_DECLINE_INVITATION = 0x3060, @@ -321,7 +328,7 @@ enum OpcodeClient : uint32 CMSG_GUILD_GET_ACHIEVEMENT_MEMBERS = 0x3071, CMSG_GUILD_GET_RANKS = 0x306D, CMSG_GUILD_GET_ROSTER = 0x3073, - CMSG_GUILD_INVITE_BY_NAME = 0x3605, + CMSG_GUILD_INVITE_BY_NAME = 0x3604, CMSG_GUILD_LEAVE = 0x3062, CMSG_GUILD_MEMBER_SEND_SOR_REQUEST = 0x308C, CMSG_GUILD_NEWS_UPDATE_STICKY = 0x306E, @@ -335,77 +342,78 @@ enum OpcodeClient : uint32 CMSG_GUILD_REPLACE_GUILD_MASTER = 0x3088, CMSG_GUILD_SET_ACHIEVEMENT_TRACKING = 0x306F, CMSG_GUILD_SET_FOCUSED_ACHIEVEMENT = 0x3070, - CMSG_GUILD_SET_GUILD_MASTER = 0x36C9, + CMSG_GUILD_SET_GUILD_MASTER = 0x36CA, CMSG_GUILD_SET_MEMBER_NOTE = 0x3072, CMSG_GUILD_SET_RANK_PERMISSIONS = 0x3067, CMSG_GUILD_SHIFT_RANK = 0x3066, CMSG_GUILD_UPDATE_INFO_TEXT = 0x3075, CMSG_GUILD_UPDATE_MOTD_TEXT = 0x3074, - CMSG_HEARTH_AND_RESURRECT = 0x34F6, + CMSG_HEARTH_AND_RESURRECT = 0x34F7, CMSG_IGNORE_TRADE = 0x3159, CMSG_INITIATE_ROLE_POLL = 0x35D9, CMSG_INITIATE_TRADE = 0x3156, - CMSG_INSPECT = 0x3512, + CMSG_INSPECT = 0x3516, CMSG_INSPECT_PVP = 0x36A7, - CMSG_INSTANCE_LOCK_RESPONSE = 0x34FB, - CMSG_ITEM_PURCHASE_REFUND = 0x3518, - CMSG_ITEM_TEXT_QUERY = 0x32EB, + CMSG_INSTANCE_LOCK_RESPONSE = 0x34FC, + CMSG_ITEM_PURCHASE_REFUND = 0x351C, + CMSG_ITEM_TEXT_QUERY = 0x32FA, CMSG_JOIN_PET_BATTLE_QUEUE = 0x31C8, CMSG_JOIN_RATED_BATTLEGROUND = 0x3175, CMSG_KEEP_ALIVE = 0x3685, - CMSG_KEYBOUND_OVERRIDE = 0x3207, + CMSG_KEYBOUND_OVERRIDE = 0x3209, CMSG_LEARN_PVP_TALENTS = 0x31A4, CMSG_LEARN_TALENTS = 0x31A3, CMSG_LEAVE_GROUP = 0x364A, CMSG_LEAVE_PET_BATTLE_QUEUE = 0x31C9, - CMSG_LFG_LIST_APPLY_TO_GROUP = 0x360D, - CMSG_LFG_LIST_CANCEL_APPLICATION = 0x360E, - CMSG_LFG_LIST_DECLINE_APPLICANT = 0x360F, - CMSG_LFG_LIST_GET_STATUS = 0x360B, - CMSG_LFG_LIST_INVITE_APPLICANT = 0x3610, - CMSG_LFG_LIST_INVITE_RESPONSE = 0x3611, - CMSG_LFG_LIST_JOIN = 0x3608, - CMSG_LFG_LIST_LEAVE = 0x360A, - CMSG_LFG_LIST_SEARCH = 0x360C, - CMSG_LFG_LIST_UPDATE_REQUEST = 0x3609, - CMSG_LF_GUILD_ADD_RECRUIT = 0x361C, - CMSG_LF_GUILD_BROWSE = 0x361E, + CMSG_LFG_LIST_APPLY_TO_GROUP = 0x360C, + CMSG_LFG_LIST_CANCEL_APPLICATION = 0x360D, + CMSG_LFG_LIST_DECLINE_APPLICANT = 0x360E, + CMSG_LFG_LIST_GET_STATUS = 0x360A, + CMSG_LFG_LIST_INVITE_APPLICANT = 0x360F, + CMSG_LFG_LIST_INVITE_RESPONSE = 0x3610, + CMSG_LFG_LIST_JOIN = 0x3607, + CMSG_LFG_LIST_LEAVE = 0x3609, + CMSG_LFG_LIST_SEARCH = 0x360B, + CMSG_LFG_LIST_UPDATE_REQUEST = 0x3608, + CMSG_LF_GUILD_ADD_RECRUIT = 0x361B, + CMSG_LF_GUILD_BROWSE = 0x361D, CMSG_LF_GUILD_DECLINE_RECRUIT = 0x3078, CMSG_LF_GUILD_GET_APPLICATIONS = 0x3079, CMSG_LF_GUILD_GET_GUILD_POST = 0x3076, CMSG_LF_GUILD_GET_RECRUITS = 0x3077, CMSG_LF_GUILD_REMOVE_RECRUIT = 0x307A, - CMSG_LF_GUILD_SET_GUILD_POST = 0x361D, - CMSG_LIST_INVENTORY = 0x349A, + CMSG_LF_GUILD_SET_GUILD_POST = 0x361C, + CMSG_LIST_INVENTORY = 0x349C, CMSG_LIVE_REGION_ACCOUNT_RESTORE = 0x36C1, CMSG_LIVE_REGION_CHARACTER_COPY = 0x36C0, CMSG_LIVE_REGION_GET_ACCOUNT_CHARACTER_LIST = 0x36BF, CMSG_LOADING_SCREEN_NOTIFY = 0x35F6, - CMSG_LOAD_SELECTED_TROPHY = 0x32CE, - CMSG_LOGOUT_CANCEL = 0x34C6, - CMSG_LOGOUT_INSTANT = 0x34C7, - CMSG_LOGOUT_REQUEST = 0x34C5, + CMSG_LOAD_SELECTED_TROPHY = 0x32DB, + CMSG_LOGOUT_CANCEL = 0x34C8, + CMSG_LOGOUT_INSTANT = 0x34C9, + CMSG_LOGOUT_REQUEST = 0x34C7, CMSG_LOG_DISCONNECT = 0x3768, CMSG_LOG_STREAMING_ERROR = 0x376C, - CMSG_LOOT_ITEM = 0x31F3, - CMSG_LOOT_MONEY = 0x31F2, - CMSG_LOOT_RELEASE = 0x31F7, - CMSG_LOOT_ROLL = 0x31F8, - CMSG_LOOT_UNIT = 0x31F1, + CMSG_LOOT_ITEM = 0x31F5, + CMSG_LOOT_MONEY = 0x31F4, + CMSG_LOOT_RELEASE = 0x31F9, + CMSG_LOOT_ROLL = 0x31FA, + CMSG_LOOT_UNIT = 0x31F3, CMSG_LOW_LEVEL_RAID1 = 0x36A5, - CMSG_LOW_LEVEL_RAID2 = 0x3501, - CMSG_MAIL_CREATE_TEXT_ITEM = 0x3523, - CMSG_MAIL_DELETE = 0x3209, - CMSG_MAIL_GET_LIST = 0x351E, - CMSG_MAIL_MARK_AS_READ = 0x3522, + CMSG_LOW_LEVEL_RAID2 = 0x3502, + CMSG_MAIL_CREATE_TEXT_ITEM = 0x3527, + CMSG_MAIL_DELETE = 0x320B, + CMSG_MAIL_GET_LIST = 0x3522, + CMSG_MAIL_MARK_AS_READ = 0x3526, CMSG_MAIL_RETURN_TO_SENDER = 0x3659, - CMSG_MAIL_TAKE_ITEM = 0x3520, - CMSG_MAIL_TAKE_MONEY = 0x351F, - CMSG_MASTER_LOOT_ITEM = 0x31F4, + CMSG_MAIL_TAKE_ITEM = 0x3524, + CMSG_MAIL_TAKE_MONEY = 0x3523, + CMSG_MASTER_LOOT_ITEM = 0x31F6, CMSG_MINIMAP_PING = 0x364C, CMSG_MISSILE_TRAJECTORY_COLLISION = 0x3188, + CMSG_MOUNT_CLEAR_FANFARE = 0x312D, CMSG_MOUNT_SET_FAVORITE = 0x3631, - CMSG_MOUNT_SPECIAL_ANIM = 0x325A, + CMSG_MOUNT_SPECIAL_ANIM = 0x325E, CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK = 0x3A12, CMSG_MOVE_CHANGE_TRANSPORT = 0x3A2C, CMSG_MOVE_CHANGE_VEHICLE_SEATS = 0x3A31, @@ -469,28 +477,28 @@ enum OpcodeClient : uint32 CMSG_MOVE_TOGGLE_COLLISION_CHEAT = 0x3A05, CMSG_MOVE_WATER_WALK_ACK = 0x3A1A, CMSG_NEUTRAL_PLAYER_SELECT_FACTION = 0x31BE, - CMSG_NEXT_CINEMATIC_CAMERA = 0x352C, + CMSG_NEXT_CINEMATIC_CAMERA = 0x3530, CMSG_OBJECT_UPDATE_FAILED = 0x317E, CMSG_OBJECT_UPDATE_RESCUED = 0x317F, CMSG_OFFER_PETITION = 0x36B6, - CMSG_OPENING_CINEMATIC = 0x352B, - CMSG_OPEN_ITEM = 0x32EC, - CMSG_OPEN_MISSION_NPC = 0x32B7, - CMSG_OPEN_SHIPMENT_NPC = 0x32BC, - CMSG_OPEN_TRADESKILL_NPC = 0x32C4, + CMSG_OPENING_CINEMATIC = 0x352F, + CMSG_OPEN_ITEM = 0x32FB, + CMSG_OPEN_MISSION_NPC = 0x32C0, + CMSG_OPEN_SHIPMENT_NPC = 0x32C6, + CMSG_OPEN_TRADESKILL_NPC = 0x32D1, CMSG_OPT_OUT_OF_LOOT = 0x34E5, CMSG_PARTY_INVITE = 0x3600, CMSG_PARTY_INVITE_RESPONSE = 0x3601, CMSG_PARTY_UNINVITE = 0x3648, - CMSG_PETITION_BUY = 0x34B7, - CMSG_PETITION_RENAME_GUILD = 0x36CA, - CMSG_PETITION_SHOW_LIST = 0x34B6, - CMSG_PETITION_SHOW_SIGNATURES = 0x34B8, - CMSG_PET_ABANDON = 0x3484, - CMSG_PET_ACTION = 0x3482, + CMSG_PETITION_BUY = 0x34B9, + CMSG_PETITION_RENAME_GUILD = 0x36CB, + CMSG_PETITION_SHOW_LIST = 0x34B8, + CMSG_PETITION_SHOW_SIGNATURES = 0x34BA, + CMSG_PET_ABANDON = 0x3485, + CMSG_PET_ACTION = 0x3483, CMSG_PET_BATTLE_FINAL_NOTIFY = 0x31CC, CMSG_PET_BATTLE_INPUT = 0x3641, - CMSG_PET_BATTLE_QUEUE_PROPOSE_MATCH_RESULT = 0x3208, + CMSG_PET_BATTLE_QUEUE_PROPOSE_MATCH_RESULT = 0x320A, CMSG_PET_BATTLE_QUIT_NOTIFY = 0x31CB, CMSG_PET_BATTLE_REPLACE_FRONT_PET = 0x3642, CMSG_PET_BATTLE_REQUEST_PVP = 0x31C6, @@ -498,163 +506,163 @@ enum OpcodeClient : uint32 CMSG_PET_BATTLE_REQUEST_WILD = 0x31C4, CMSG_PET_BATTLE_SCRIPT_ERROR_NOTIFY = 0x31CD, CMSG_PET_BATTLE_WILD_LOCATION_FAIL = 0x31C5, - CMSG_PET_CANCEL_AURA = 0x3485, - CMSG_PET_CAST_SPELL = 0x3272, + CMSG_PET_CANCEL_AURA = 0x3486, + CMSG_PET_CAST_SPELL = 0x3276, CMSG_PET_RENAME = 0x368B, - CMSG_PET_SET_ACTION = 0x3481, - CMSG_PET_SPELL_AUTOCAST = 0x3486, - CMSG_PET_STOP_ATTACK = 0x3483, + CMSG_PET_SET_ACTION = 0x3482, + CMSG_PET_SPELL_AUTOCAST = 0x3487, + CMSG_PET_STOP_ATTACK = 0x3484, CMSG_PING = 0x3767, CMSG_PLAYER_LOGIN = 0x35E9, CMSG_PROTOCOL_MISMATCH = 0x376D, - CMSG_PUSH_QUEST_TO_PARTY = 0x3498, + CMSG_PUSH_QUEST_TO_PARTY = 0x349A, CMSG_PVP_LOG_DATA = 0x3179, - CMSG_PVP_PRESTIGE_RANK_UP = 0x330C, - CMSG_QUERY_BATTLE_PET_NAME = 0x3250, + CMSG_PVP_PRESTIGE_RANK_UP = 0x331F, + CMSG_QUERY_BATTLE_PET_NAME = 0x3253, CMSG_QUERY_CORPSE_LOCATION_FROM_CLIENT = 0x3666, CMSG_QUERY_CORPSE_TRANSPORT = 0x3667, CMSG_QUERY_COUNTDOWN_TIMER = 0x31A2, - CMSG_QUERY_CREATURE = 0x324A, - CMSG_QUERY_GAME_OBJECT = 0x324B, - CMSG_QUERY_GARRISON_CREATURE_NAME = 0x3251, + CMSG_QUERY_CREATURE = 0x324D, + CMSG_QUERY_GAME_OBJECT = 0x324E, + CMSG_QUERY_GARRISON_CREATURE_NAME = 0x3254, CMSG_QUERY_GUILD_INFO = 0x3693, CMSG_QUERY_INSPECT_ACHIEVEMENTS = 0x34F1, - CMSG_QUERY_NEXT_MAIL_TIME = 0x3521, - CMSG_QUERY_NPC_TEXT = 0x324C, - CMSG_QUERY_PAGE_TEXT = 0x324E, - CMSG_QUERY_PETITION = 0x3252, - CMSG_QUERY_PET_NAME = 0x324F, + CMSG_QUERY_NEXT_MAIL_TIME = 0x3525, + CMSG_QUERY_NPC_TEXT = 0x324F, + CMSG_QUERY_PAGE_TEXT = 0x3251, + CMSG_QUERY_PETITION = 0x3255, + CMSG_QUERY_PET_NAME = 0x3252, CMSG_QUERY_PLAYER_NAME = 0x3691, CMSG_QUERY_QUEST_COMPLETION_NPCS = 0x3172, - CMSG_QUERY_QUEST_INFO = 0x324D, + CMSG_QUERY_QUEST_INFO = 0x3250, + CMSG_QUERY_QUEST_REWARDS = 0x3322, CMSG_QUERY_REALM_NAME = 0x3692, CMSG_QUERY_SCENARIO_POI = 0x365A, - CMSG_QUERY_TIME = 0x34C4, + CMSG_QUERY_TIME = 0x34C6, CMSG_QUERY_VOID_STORAGE = 0x319B, - CMSG_QUEST_CONFIRM_ACCEPT = 0x3497, - CMSG_QUEST_GIVER_ACCEPT_QUEST = 0x3490, - CMSG_QUEST_GIVER_CHOOSE_REWARD = 0x3493, - CMSG_QUEST_GIVER_COMPLETE_QUEST = 0x3491, - CMSG_QUEST_GIVER_HELLO = 0x348D, - CMSG_QUEST_GIVER_QUERY_QUEST = 0x348E, - CMSG_QUEST_GIVER_REQUEST_REWARD = 0x3494, - CMSG_QUEST_GIVER_STATUS_MULTIPLE_QUERY = 0x3496, - CMSG_QUEST_GIVER_STATUS_QUERY = 0x3495, - CMSG_QUEST_LOG_REMOVE_QUEST = 0x3516, + CMSG_QUEST_CONFIRM_ACCEPT = 0x3499, + CMSG_QUEST_GIVER_ACCEPT_QUEST = 0x3491, + CMSG_QUEST_GIVER_CHOOSE_REWARD = 0x3495, + CMSG_QUEST_GIVER_COMPLETE_QUEST = 0x3493, + CMSG_QUEST_GIVER_HELLO = 0x348E, + CMSG_QUEST_GIVER_INGORE_QUEST = 0x3492, + CMSG_QUEST_GIVER_QUERY_QUEST = 0x348F, + CMSG_QUEST_GIVER_REQUEST_REWARD = 0x3496, + CMSG_QUEST_GIVER_STATUS_MULTIPLE_QUERY = 0x3498, + CMSG_QUEST_GIVER_STATUS_QUERY = 0x3497, + CMSG_QUEST_LOG_REMOVE_QUEST = 0x351A, CMSG_QUEST_POI_QUERY = 0x36B7, - CMSG_QUEST_PUSH_RESULT = 0x3499, + CMSG_QUEST_PUSH_RESULT = 0x349B, CMSG_QUEUED_MESSAGES_END = 0x376B, CMSG_RAID_OR_BATTLEGROUND_ENGINE_SURVEY = 0x36EA, CMSG_RANDOM_ROLL = 0x3655, CMSG_READY_CHECK_RESPONSE = 0x3635, - CMSG_READ_ITEM = 0x32ED, - CMSG_RECLAIM_CORPSE = 0x34C9, - CMSG_RECRUIT_A_FRIEND = 0x36D0, + CMSG_READ_ITEM = 0x32FC, + CMSG_RECLAIM_CORPSE = 0x34CB, + CMSG_RECRUIT_A_FRIEND = 0x36D1, CMSG_REDEEM_WOW_TOKEN_CONFIRM = 0x36F4, CMSG_REDEEM_WOW_TOKEN_START = 0x36F3, CMSG_REORDER_CHARACTERS = 0x35E8, - CMSG_REPAIR_ITEM = 0x34D9, - CMSG_REPLACE_TROPHY = 0x32CF, - CMSG_REPOP_REQUEST = 0x350F, + CMSG_REPAIR_ITEM = 0x34DB, + CMSG_REPLACE_TROPHY = 0x32DC, + CMSG_REPOP_REQUEST = 0x3513, CMSG_REPORT_PVP_PLAYER_AFK = 0x34E3, CMSG_REQUEST_ACCOUNT_DATA = 0x369B, CMSG_REQUEST_BATTLEFIELD_STATUS = 0x35DB, CMSG_REQUEST_CATEGORY_COOLDOWNS = 0x317B, CMSG_REQUEST_CEMETERY_LIST = 0x3173, - CMSG_REQUEST_CONQUEST_FORMULA_CONSTANTS = 0x3288, - CMSG_REQUEST_FORCED_REACTIONS = 0x31EE, + CMSG_REQUEST_CONQUEST_FORMULA_CONSTANTS = 0x328C, + CMSG_REQUEST_FORCED_REACTIONS = 0x31EF, CMSG_REQUEST_GUILD_PARTY_STATE = 0x31A1, CMSG_REQUEST_GUILD_REWARDS_LIST = 0x31A0, CMSG_REQUEST_HONOR_STATS = 0x3178, - CMSG_REQUEST_LFG_LIST_BLACKLIST = 0x3279, + CMSG_REQUEST_LFG_LIST_BLACKLIST = 0x327D, CMSG_REQUEST_PARTY_JOIN_UPDATES = 0x35F5, CMSG_REQUEST_PARTY_MEMBER_STATS = 0x3654, - CMSG_REQUEST_PET_INFO = 0x3487, - CMSG_REQUEST_PLAYED_TIME = 0x3255, + CMSG_REQUEST_PET_INFO = 0x3488, + CMSG_REQUEST_PLAYED_TIME = 0x3258, CMSG_REQUEST_PVP_REWARDS = 0x318F, - CMSG_REQUEST_RAID_INFO = 0x36CB, + CMSG_REQUEST_RAID_INFO = 0x36CC, CMSG_REQUEST_RATED_BATTLEFIELD_INFO = 0x35E3, CMSG_REQUEST_RESEARCH_HISTORY = 0x3167, - CMSG_REQUEST_STABLED_PETS = 0x3488, - CMSG_REQUEST_VEHICLE_EXIT = 0x3218, - CMSG_REQUEST_VEHICLE_NEXT_SEAT = 0x321A, - CMSG_REQUEST_VEHICLE_PREV_SEAT = 0x3219, - CMSG_REQUEST_VEHICLE_SWITCH_SEAT = 0x321B, + CMSG_REQUEST_STABLED_PETS = 0x3489, + CMSG_REQUEST_VEHICLE_EXIT = 0x321B, + CMSG_REQUEST_VEHICLE_NEXT_SEAT = 0x321D, + CMSG_REQUEST_VEHICLE_PREV_SEAT = 0x321C, + CMSG_REQUEST_VEHICLE_SWITCH_SEAT = 0x321E, CMSG_REQUEST_WOW_TOKEN_MARKET_PRICE = 0x36EC, CMSG_RESET_CHALLENGE_MODE = 0x31EC, CMSG_RESET_INSTANCES = 0x366E, CMSG_RESURRECT_RESPONSE = 0x368A, - CMSG_REVERT_MONUMENT_APPEARANCE = 0x32D1, - CMSG_RIDE_VEHICLE_INTERACT = 0x321C, + CMSG_REVERT_MONUMENT_APPEARANCE = 0x32DE, + CMSG_RIDE_VEHICLE_INTERACT = 0x321F, CMSG_SAVE_CUF_PROFILES = 0x3189, - CMSG_SAVE_EQUIPMENT_SET = 0x34F9, - CMSG_SAVE_GUILD_EMBLEM = 0x327D, - CMSG_SCENE_PLAYBACK_CANCELED = 0x3204, - CMSG_SCENE_PLAYBACK_COMPLETE = 0x3203, - CMSG_SCENE_TRIGGER_EVENT = 0x3205, - CMSG_SELF_RES = 0x3519, - CMSG_SELL_ITEM = 0x349B, + CMSG_SAVE_EQUIPMENT_SET = 0x34FA, + CMSG_SAVE_GUILD_EMBLEM = 0x3281, + CMSG_SCENE_PLAYBACK_CANCELED = 0x3206, + CMSG_SCENE_PLAYBACK_COMPLETE = 0x3205, + CMSG_SCENE_TRIGGER_EVENT = 0x3207, + CMSG_SELF_RES = 0x351D, + CMSG_SELL_ITEM = 0x349D, CMSG_SELL_WOW_TOKEN_CONFIRM = 0x36EE, CMSG_SELL_WOW_TOKEN_START = 0x36ED, - CMSG_SEND_CONTACT_LIST = 0x36D3, + CMSG_SEND_CONTACT_LIST = 0x36D4, CMSG_SEND_MAIL = 0x35F8, - CMSG_SEND_SOR_REQUEST_VIA_ADDRESS = 0x3621, - CMSG_SEND_SOR_REQUEST_VIA_BNET_ACCOUNT_ID = 0x3622, - CMSG_SEND_TEXT_EMOTE = 0x347E, - CMSG_SET_ACHIEVEMENTS_HIDDEN = 0x320A, - CMSG_SET_ACTION_BAR_TOGGLES = 0x351A, + CMSG_SEND_SOR_REQUEST_VIA_ADDRESS = 0x3620, + CMSG_SEND_TEXT_EMOTE = 0x347F, + CMSG_SET_ACHIEVEMENTS_HIDDEN = 0x320C, + CMSG_SET_ACTION_BAR_TOGGLES = 0x351E, CMSG_SET_ACTION_BUTTON = 0x3636, CMSG_SET_ACTIVE_MOVER = 0x3A37, CMSG_SET_ACTIVE_VOICE_CHANNEL = 0x3656, - CMSG_SET_ADVANCED_COMBAT_LOGGING = 0x3289, + CMSG_SET_ADVANCED_COMBAT_LOGGING = 0x328D, CMSG_SET_ASSISTANT_LEADER = 0x3650, - CMSG_SET_BACKPACK_AUTOSORT_DISABLED = 0x32F0, - CMSG_SET_BANK_AUTOSORT_DISABLED = 0x32F1, - CMSG_SET_BANK_BAG_SLOT_FLAG = 0x32EF, - CMSG_SET_CONTACT_NOTES = 0x36D6, + CMSG_SET_BACKPACK_AUTOSORT_DISABLED = 0x32FF, + CMSG_SET_BANK_AUTOSORT_DISABLED = 0x3300, + CMSG_SET_BANK_BAG_SLOT_FLAG = 0x32FE, + CMSG_SET_CONTACT_NOTES = 0x36D7, CMSG_SET_CURRENCY_FLAGS = 0x3169, - CMSG_SET_DIFFICULTY_ID = 0x3206, + CMSG_SET_DIFFICULTY_ID = 0x3208, CMSG_SET_DUNGEON_DIFFICULTY = 0x3688, - CMSG_SET_EVERYONE_IS_ASSISTANT = 0x3618, - CMSG_SET_FACTION_AT_WAR = 0x34CC, - CMSG_SET_FACTION_INACTIVE = 0x34CE, - CMSG_SET_FACTION_NOT_AT_WAR = 0x34CD, - CMSG_SET_INSERT_ITEMS_LEFT_TO_RIGHT = 0x32F3, - CMSG_SET_LFG_BONUS_FACTION_ID = 0x3278, + CMSG_SET_EVERYONE_IS_ASSISTANT = 0x3617, + CMSG_SET_FACTION_AT_WAR = 0x34CE, + CMSG_SET_FACTION_INACTIVE = 0x34D0, + CMSG_SET_FACTION_NOT_AT_WAR = 0x34CF, + CMSG_SET_INSERT_ITEMS_LEFT_TO_RIGHT = 0x3302, + CMSG_SET_LFG_BONUS_FACTION_ID = 0x327C, CMSG_SET_LOOT_METHOD = 0x3649, - CMSG_SET_LOOT_SPECIALIZATION = 0x3527, + CMSG_SET_LOOT_SPECIALIZATION = 0x352B, CMSG_SET_PARTY_ASSIGNMENT = 0x3652, CMSG_SET_PARTY_LEADER = 0x364B, CMSG_SET_PET_SLOT = 0x3168, CMSG_SET_PLAYER_DECLINED_NAMES = 0x3690, CMSG_SET_PREFERRED_CEMETERY = 0x3174, - CMSG_SET_PVP = 0x3281, + CMSG_SET_PVP = 0x3285, CMSG_SET_RAID_DIFFICULTY = 0x36E1, CMSG_SET_ROLE = 0x35D8, CMSG_SET_SAVED_INSTANCE_EXTEND = 0x368E, - CMSG_SET_SELECTION = 0x3511, - CMSG_SET_SHEATHED = 0x347F, - CMSG_SET_SORT_BAGS_RIGHT_TO_LEFT = 0x32F2, + CMSG_SET_SELECTION = 0x3515, + CMSG_SET_SHEATHED = 0x3480, + CMSG_SET_SORT_BAGS_RIGHT_TO_LEFT = 0x3301, CMSG_SET_TAXI_BENCHMARK_MODE = 0x34E2, - CMSG_SET_TITLE = 0x3258, + CMSG_SET_TITLE = 0x325C, CMSG_SET_TRADE_CURRENCY = 0x3160, CMSG_SET_TRADE_GOLD = 0x315F, CMSG_SET_TRADE_ITEM = 0x315D, - CMSG_SET_USING_PARTY_GARRISON = 0x32B8, - CMSG_SET_WATCHED_FACTION = 0x34CF, - CMSG_SHOWING_CLOAK = 0x34DB, - CMSG_SHOWING_HELM = 0x34DA, + CMSG_SET_USING_PARTY_GARRISON = 0x32C2, + CMSG_SET_WATCHED_FACTION = 0x34D1, CMSG_SHOW_TRADE_SKILL = 0x36C6, - CMSG_SIGN_PETITION = 0x351B, + CMSG_SIGN_PETITION = 0x351F, CMSG_SILENCE_PARTY_TALKER = 0x3653, - CMSG_SOCKET_GEMS = 0x34D8, - CMSG_SORT_BAGS = 0x32F4, - CMSG_SORT_BANK_BAGS = 0x32F5, - CMSG_SORT_REAGENT_BANK_BAGS = 0x32F6, - CMSG_SPELL_CLICK = 0x348C, - CMSG_SPIRIT_HEALER_ACTIVATE = 0x34A8, + CMSG_SOCKET_GEMS = 0x34DA, + CMSG_SORT_BAGS = 0x3303, + CMSG_SORT_BANK_BAGS = 0x3304, + CMSG_SORT_REAGENT_BANK_BAGS = 0x3305, + CMSG_SPELL_CLICK = 0x348D, + CMSG_SPIRIT_HEALER_ACTIVATE = 0x34AA, CMSG_SPLIT_ITEM = 0x399E, CMSG_STAND_STATE_CHANGE = 0x3187, + CMSG_START_CHALLENGE_MODE = 0x3536, CMSG_START_SPECTATOR_WAR_GAME = 0x35DE, CMSG_START_WAR_GAME = 0x35DD, CMSG_SUMMON_RESPONSE = 0x3670, @@ -667,11 +675,11 @@ enum OpcodeClient : uint32 CMSG_SWAP_ITEM = 0x399C, CMSG_SWAP_SUB_GROUPS = 0x364E, CMSG_SWAP_VOID_ITEM = 0x319D, - CMSG_TABARD_VENDOR_ACTIVATE = 0x327E, - CMSG_TALK_TO_GOSSIP = 0x3489, - CMSG_TAXI_NODE_STATUS_QUERY = 0x34A1, - CMSG_TAXI_QUERY_AVAILABLE_NODES = 0x34A3, - CMSG_TAXI_REQUEST_EARLY_LANDING = 0x34A5, + CMSG_TABARD_VENDOR_ACTIVATE = 0x3282, + CMSG_TALK_TO_GOSSIP = 0x348A, + CMSG_TAXI_NODE_STATUS_QUERY = 0x34A3, + CMSG_TAXI_QUERY_AVAILABLE_NODES = 0x34A5, + CMSG_TAXI_REQUEST_EARLY_LANDING = 0x34A7, CMSG_TELEPORT_TO_GUID = 0x39F5, CMSG_TELEPORT_TO_UNIT = 0x3669, CMSG_TIME_ADJUSTMENT_RESPONSE = 0x3A3B, @@ -679,40 +687,40 @@ enum OpcodeClient : uint32 CMSG_TIME_SYNC_RESPONSE_DROPPED = 0x3A3A, CMSG_TIME_SYNC_RESPONSE_FAILED = 0x3A39, CMSG_TOGGLE_DIFFICULTY = 0x365B, - CMSG_TOGGLE_PVP = 0x3280, + CMSG_TOGGLE_PVP = 0x3284, CMSG_TOTEM_DESTROYED = 0x34E9, CMSG_TOY_SET_FAVORITE = 0x3632, - CMSG_TRADE_SKILL_SET_FAVORITE = 0x330E, - CMSG_TRAINER_BUY_SPELL = 0x34A7, - CMSG_TRAINER_LIST = 0x34A6, + CMSG_TRADE_SKILL_SET_FAVORITE = 0x3321, + CMSG_TRAINER_BUY_SPELL = 0x34A9, + CMSG_TRAINER_LIST = 0x34A8, CMSG_TRANSMOGRIFY_ITEMS = 0x3190, CMSG_TRANSMOG_APPEARANCE_SET_FAVORITE = 0x3633, - CMSG_TURN_IN_PETITION = 0x351D, + CMSG_TURN_IN_PETITION = 0x3521, CMSG_TUTORIAL = 0x36E2, CMSG_TWITTER_CHECK_STATUS = 0x312A, CMSG_TWITTER_CONNECT = 0x3127, CMSG_TWITTER_DISCONNECT = 0x312B, - CMSG_TWITTER_POST = 0x32F8, + CMSG_TWITTER_POST = 0x3307, CMSG_UI_TIME_REQUEST = 0x36A0, CMSG_UNACCEPT_TRADE = 0x315B, CMSG_UNDELETE_CHARACTER = 0x36E4, - CMSG_UNLEARN_SKILL = 0x34D2, + CMSG_UNLEARN_SKILL = 0x34D4, CMSG_UNLEARN_SPECIALIZATION = 0x319E, CMSG_UNLOCK_VOID_STORAGE = 0x319A, CMSG_UPDATE_ACCOUNT_DATA = 0x369C, CMSG_UPDATE_CLIENT_SETTINGS = 0x366A, CMSG_UPDATE_MISSILE_TRAJECTORY = 0x3A3E, CMSG_UPDATE_RAID_TARGET = 0x3651, - CMSG_UPDATE_VAS_PURCHASE_STATES = 0x36F9, + CMSG_UPDATE_VAS_PURCHASE_STATES = 0x36FA, CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST = 0x36F5, CMSG_UPDATE_WOW_TOKEN_COUNT = 0x36EB, - CMSG_UPGRADE_GARRISON = 0x3291, - CMSG_UPGRADE_ITEM = 0x320B, + CMSG_UPGRADE_GARRISON = 0x3295, + CMSG_UPGRADE_ITEM = 0x320D, CMSG_USED_FOLLOW = 0x3184, - CMSG_USE_CRITTER_ITEM = 0x3223, + CMSG_USE_CRITTER_ITEM = 0x3226, CMSG_USE_EQUIPMENT_SET = 0x3995, - CMSG_USE_ITEM = 0x326F, - CMSG_USE_TOY = 0x3271, + CMSG_USE_ITEM = 0x3273, + CMSG_USE_TOY = 0x3275, CMSG_VIOLENCE_LEVEL = 0x3182, CMSG_VOICE_ADD_IGNORE = 0x3657, CMSG_VOICE_DEL_IGNORE = 0x3658, @@ -733,93 +741,96 @@ enum OpcodeClient : uint32 enum OpcodeServer : uint32 { - SMSG_ABORT_NEW_WORLD = 0x25AC, + SMSG_ABORT_NEW_WORLD = 0x25AB, SMSG_ACCOUNT_CRITERIA_UPDATE = 0x264F, - SMSG_ACCOUNT_DATA_TIMES = 0x2746, - SMSG_ACCOUNT_MOUNT_UPDATE = 0x25C2, - SMSG_ACCOUNT_TOYS_UPDATE = 0x25C3, - SMSG_ACHIEVEMENT_DELETED = 0x271C, + SMSG_ACCOUNT_DATA_TIMES = 0x2745, + SMSG_ACCOUNT_MOUNT_UPDATE = 0x25C1, + SMSG_ACCOUNT_TOYS_UPDATE = 0x25C2, + SMSG_ACHIEVEMENT_DELETED = 0x271B, SMSG_ACHIEVEMENT_EARNED = 0x265D, SMSG_ACTIVATE_TAXI_REPLY = 0x26A3, - SMSG_ADDON_INFO = 0x277A, SMSG_ADD_BATTLENET_FRIEND_RESPONSE = 0x2657, - SMSG_ADD_ITEM_PASSIVE = 0x25BE, + SMSG_ADD_ITEM_PASSIVE = 0x25BD, SMSG_ADD_LOSS_OF_CONTROL = 0x2693, SMSG_ADD_RUNE_POWER = 0x26E0, - SMSG_ADJUST_SPLINE_DURATION = 0x25E6, + SMSG_ADJUST_SPLINE_DURATION = 0x25E5, SMSG_AE_LOOT_TARGETS = 0x262A, SMSG_AE_LOOT_TARGET_ACK = 0x262B, SMSG_AI_REACTION = 0x26DD, - SMSG_ALL_ACCOUNT_CRITERIA = 0x2571, - SMSG_ALL_ACHIEVEMENT_DATA = 0x2570, + SMSG_ALL_ACCOUNT_CRITERIA = 0x2570, + SMSG_ALL_ACHIEVEMENT_DATA = 0x256F, SMSG_ALL_GUILD_ACHIEVEMENTS = 0x29B8, - SMSG_ARCHAEOLOGY_SURVERY_CAST = 0x2587, + SMSG_ARCHAEOLOGY_SURVERY_CAST = 0x2586, SMSG_AREA_SPIRIT_HEALER_TIME = 0x277F, SMSG_AREA_TRIGGER_DENIED = 0x269A, - SMSG_AREA_TRIGGER_NO_CORPSE = 0x2752, + SMSG_AREA_TRIGGER_NO_CORPSE = 0x2751, SMSG_AREA_TRIGGER_RE_PATH = 0x263D, SMSG_AREA_TRIGGER_RE_SHAPE = 0x263B, - SMSG_ARENA_ERROR = 0x270F, + SMSG_ARENA_ERROR = 0x270E, SMSG_ARENA_PREP_OPPONENT_SPECIALIZATIONS = 0x2662, - SMSG_ARTIFACT_APPEARANCE_CHANGED = 0x27DC, - SMSG_ARTIFACT_FORGE_OPENED = 0x27DA, - SMSG_ARTIFACT_POWERS_UPDATED = 0x27DB, - SMSG_ARTIFACT_XP_GAIN = 0x2819, - SMSG_ATTACKER_STATE_UPDATE = 0x27C7, + SMSG_ARTIFACT_APPEARANCE_CHANGED = 0x27DF, + SMSG_ARTIFACT_FORGE_OPENED = 0x27DD, + SMSG_ARTIFACT_POWERS_UPDATED = 0x27DE, + SMSG_ARTIFACT_XP_GAIN = 0x281D, + SMSG_ATTACKER_STATE_UPDATE = 0x27CA, SMSG_ATTACK_START = 0x266A, SMSG_ATTACK_STOP = 0x266B, - SMSG_ATTACK_SWING_ERROR = 0x2731, - SMSG_ATTACK_SWING_LANDED_LOG = 0x2732, - SMSG_AUCTION_CLOSED_NOTIFICATION = 0x2726, - SMSG_AUCTION_COMMAND_RESULT = 0x2723, - SMSG_AUCTION_HELLO_RESPONSE = 0x2721, - SMSG_AUCTION_LIST_BIDDER_ITEMS_RESULT = 0x272A, - SMSG_AUCTION_LIST_ITEMS_RESULT = 0x2728, - SMSG_AUCTION_LIST_OWNER_ITEMS_RESULT = 0x2729, - SMSG_AUCTION_LIST_PENDING_SALES_RESULT = 0x272B, - SMSG_AUCTION_OUTBID_NOTIFICATION = 0x2725, - SMSG_AUCTION_OWNER_BID_NOTIFICATION = 0x2727, - SMSG_AUCTION_REPLICATE_RESPONSE = 0x2722, - SMSG_AUCTION_WON_NOTIFICATION = 0x2724, + SMSG_ATTACK_SWING_ERROR = 0x2730, + SMSG_ATTACK_SWING_LANDED_LOG = 0x2731, + SMSG_AUCTION_CLOSED_NOTIFICATION = 0x2725, + SMSG_AUCTION_COMMAND_RESULT = 0x2722, + SMSG_AUCTION_HELLO_RESPONSE = 0x2720, + SMSG_AUCTION_LIST_BIDDER_ITEMS_RESULT = 0x2729, + SMSG_AUCTION_LIST_ITEMS_RESULT = 0x2727, + SMSG_AUCTION_LIST_OWNER_ITEMS_RESULT = 0x2728, + SMSG_AUCTION_LIST_PENDING_SALES_RESULT = 0x272A, + SMSG_AUCTION_OUTBID_NOTIFICATION = 0x2724, + SMSG_AUCTION_OWNER_BID_NOTIFICATION = 0x2726, + SMSG_AUCTION_REPLICATE_RESPONSE = 0x2721, + SMSG_AUCTION_WON_NOTIFICATION = 0x2723, SMSG_AURA_POINTS_DEPLETED = 0x2C22, SMSG_AURA_UPDATE = 0x2C21, SMSG_AUTH_CHALLENGE = 0x3048, - SMSG_AUTH_RESPONSE = 0x256D, + SMSG_AUTH_RESPONSE = 0x256C, SMSG_AVAILABLE_VOICE_CHANNEL = 0x2BB2, - SMSG_BAN_REASON = 0x281C, - SMSG_BARBER_SHOP_RESULT = 0x26E7, - SMSG_BATTLEFIELD_LIST = 0x2595, - SMSG_BATTLEFIELD_PORT_DENIED = 0x259B, - SMSG_BATTLEFIELD_STATUS_ACTIVE = 0x2591, - SMSG_BATTLEFIELD_STATUS_FAILED = 0x2594, - SMSG_BATTLEFIELD_STATUS_NEED_CONFIRMATION = 0x2590, - SMSG_BATTLEFIELD_STATUS_NONE = 0x2593, - SMSG_BATTLEFIELD_STATUS_QUEUED = 0x2592, - SMSG_BATTLEFIELD_STATUS_WAIT_FOR_GROUPS = 0x25A4, - SMSG_BATTLEGROUND_INFO_THROTTLED = 0x259C, - SMSG_BATTLEGROUND_INIT = 0x279C, - SMSG_BATTLEGROUND_PLAYER_JOINED = 0x2599, - SMSG_BATTLEGROUND_PLAYER_LEFT = 0x259A, - SMSG_BATTLEGROUND_PLAYER_POSITIONS = 0x2596, - SMSG_BATTLEGROUND_POINTS = 0x279B, - SMSG_BATTLENET_CHALLENGE_ABORT = 0x27C6, - SMSG_BATTLENET_CHALLENGE_START = 0x27C5, - SMSG_BATTLE_PAY_ACK_FAILED = 0x27BE, - SMSG_BATTLE_PAY_CONFIRM_PURCHASE = 0x27BD, - SMSG_BATTLE_PAY_DELIVERY_ENDED = 0x27B4, - SMSG_BATTLE_PAY_DELIVERY_STARTED = 0x27B3, - SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE = 0x27B2, - SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE = 0x27B0, - SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE = 0x27AE, - SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE = 0x27AF, - SMSG_BATTLE_PAY_PURCHASE_UPDATE = 0x27BC, - SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE = 0x27BA, - SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE = 0x27B9, - SMSG_BATTLE_PAY_VAS_BOOST_CONSUMED = 0x27B1, - SMSG_BATTLE_PAY_VAS_CHARACTER_LIST = 0x281D, - SMSG_BATTLE_PAY_VAS_PURCHASE_COMPLETE = 0x281F, - SMSG_BATTLE_PAY_VAS_PURCHASE_LIST = 0x2820, - SMSG_BATTLE_PAY_VAS_PURCHASE_STARTED = 0x281E, + SMSG_BAN_REASON = 0x26AF, + SMSG_BARBER_SHOP_RESULT = 0x26E6, + SMSG_BATTLEFIELD_LIST = 0x2594, + SMSG_BATTLEFIELD_PORT_DENIED = 0x259A, + SMSG_BATTLEFIELD_STATUS_ACTIVE = 0x2590, + SMSG_BATTLEFIELD_STATUS_FAILED = 0x2593, + SMSG_BATTLEFIELD_STATUS_NEED_CONFIRMATION = 0x258F, + SMSG_BATTLEFIELD_STATUS_NONE = 0x2592, + SMSG_BATTLEFIELD_STATUS_QUEUED = 0x2591, + SMSG_BATTLEFIELD_STATUS_WAIT_FOR_GROUPS = 0x25A3, + SMSG_BATTLEGROUND_INFO_THROTTLED = 0x259B, + SMSG_BATTLEGROUND_INIT = 0x279D, + SMSG_BATTLEGROUND_PLAYER_JOINED = 0x2598, + SMSG_BATTLEGROUND_PLAYER_LEFT = 0x2599, + SMSG_BATTLEGROUND_PLAYER_POSITIONS = 0x2595, + SMSG_BATTLEGROUND_POINTS = 0x279C, + SMSG_BATTLENET_CHALLENGE_ABORT = 0x27C9, + SMSG_BATTLENET_CHALLENGE_START = 0x27C8, + SMSG_BATTLENET_NOTIFICATION = 0x2831, + SMSG_BATTLENET_REALM_LIST_TICKET = 0x2833, + SMSG_BATTLENET_RESPONSE = 0x2830, + SMSG_BATTLENET_SET_SESSION_STATE = 0x2832, + SMSG_BATTLE_PAY_ACK_FAILED = 0x27C1, + SMSG_BATTLE_PAY_CONFIRM_PURCHASE = 0x27C0, + SMSG_BATTLE_PAY_DELIVERY_ENDED = 0x27B7, + SMSG_BATTLE_PAY_DELIVERY_STARTED = 0x27B6, + SMSG_BATTLE_PAY_DISTRIBUTION_UPDATE = 0x27B5, + SMSG_BATTLE_PAY_GET_DISTRIBUTION_LIST_RESPONSE = 0x27B3, + SMSG_BATTLE_PAY_GET_PRODUCT_LIST_RESPONSE = 0x27B1, + SMSG_BATTLE_PAY_GET_PURCHASE_LIST_RESPONSE = 0x27B2, + SMSG_BATTLE_PAY_PURCHASE_UPDATE = 0x27BF, + SMSG_BATTLE_PAY_START_DISTRIBUTION_ASSIGN_TO_TARGET_RESPONSE = 0x27BD, + SMSG_BATTLE_PAY_START_PURCHASE_RESPONSE = 0x27BC, + SMSG_BATTLE_PAY_VAS_BOOST_CONSUMED = 0x27B4, + SMSG_BATTLE_PAY_VAS_CHARACTER_LIST = 0x2821, + SMSG_BATTLE_PAY_VAS_PURCHASE_COMPLETE = 0x2824, + SMSG_BATTLE_PAY_VAS_PURCHASE_LIST = 0x2825, + SMSG_BATTLE_PAY_VAS_PURCHASE_STARTED = 0x2823, SMSG_BATTLE_PETS_HEALED = 0x2608, SMSG_BATTLE_PET_CAGE_DATE_ERROR = 0x269D, SMSG_BATTLE_PET_DELETED = 0x2605, @@ -828,23 +839,24 @@ enum OpcodeServer : uint32 SMSG_BATTLE_PET_JOURNAL_LOCK_ACQUIRED = 0x2602, SMSG_BATTLE_PET_JOURNAL_LOCK_DENIED = 0x2603, SMSG_BATTLE_PET_LICENSE_CHANGED = 0x2609, + SMSG_BATTLE_PET_MAX_COUNT_CHANGED = 0x2600, SMSG_BATTLE_PET_RESTORED = 0x2607, SMSG_BATTLE_PET_REVOKED = 0x2606, - SMSG_BATTLE_PET_TRAP_LEVEL = 0x2600, - SMSG_BATTLE_PET_UPDATES = 0x25FF, - SMSG_BINDER_CONFIRM = 0x2737, - SMSG_BIND_POINT_UPDATE = 0x257D, + SMSG_BATTLE_PET_TRAP_LEVEL = 0x25FF, + SMSG_BATTLE_PET_UPDATES = 0x25FE, + SMSG_BINDER_CONFIRM = 0x2736, + SMSG_BIND_POINT_UPDATE = 0x257C, SMSG_BLACK_MARKET_BID_ON_ITEM_RESULT = 0x2642, SMSG_BLACK_MARKET_OPEN_RESULT = 0x2640, SMSG_BLACK_MARKET_OUTBID = 0x2643, SMSG_BLACK_MARKET_REQUEST_ITEMS_RESULT = 0x2641, SMSG_BLACK_MARKET_WON = 0x2644, SMSG_BONUS_ROLL_EMPTY = 0x265F, - SMSG_BOSS_KILL_CREDIT = 0x27B8, + SMSG_BOSS_KILL_CREDIT = 0x27BB, SMSG_BREAK_TARGET = 0x2669, - SMSG_BUY_FAILED = 0x26F0, - SMSG_BUY_SUCCEEDED = 0x26EF, - SMSG_CACHE_VERSION = 0x2740, + SMSG_BUY_FAILED = 0x26EF, + SMSG_BUY_SUCCEEDED = 0x26EE, + SMSG_CACHE_VERSION = 0x273F, SMSG_CALENDAR_CLEAR_PENDING_ACTION = 0x26C3, SMSG_CALENDAR_COMMAND_RESULT = 0x26C4, SMSG_CALENDAR_EVENT_INITIAL_INVITES = 0x26B3, @@ -867,8 +879,8 @@ enum OpcodeServer : uint32 SMSG_CALENDAR_SEND_NUM_PENDING = 0x26C2, SMSG_CAMERA_EFFECT = 0x2763, SMSG_CAMERA_SHAKE = 0x2764, - SMSG_CANCEL_AUTO_REPEAT = 0x2710, - SMSG_CANCEL_COMBAT = 0x272F, + SMSG_CANCEL_AUTO_REPEAT = 0x270F, + SMSG_CANCEL_COMBAT = 0x272E, SMSG_CANCEL_ORPHAN_SPELL_VISUAL = 0x2C45, SMSG_CANCEL_SCENE = 0x2651, SMSG_CANCEL_SPELL_VISUAL = 0x2C43, @@ -884,21 +896,21 @@ enum OpcodeServer : uint32 SMSG_CHALLENGE_MODE_REQUEST_LEADERS_RESULT = 0x2622, SMSG_CHALLENGE_MODE_RESET = 0x261D, SMSG_CHALLENGE_MODE_START = 0x261C, - SMSG_CHANGE_PLAYER_DIFFICULTY_RESULT = 0x2733, + SMSG_CHANGE_PLAYER_DIFFICULTY_RESULT = 0x2732, SMSG_CHANNEL_LIST = 0x2BC8, SMSG_CHANNEL_NOTIFY = 0x2BC5, SMSG_CHANNEL_NOTIFY_JOINED = 0x2BC6, SMSG_CHANNEL_NOTIFY_LEFT = 0x2BC7, - SMSG_CHARACTER_LOGIN_FAILED = 0x2741, - SMSG_CHARACTER_OBJECT_TEST_RESPONSE = 0x27C4, - SMSG_CHARACTER_RENAME_RESULT = 0x27A2, - SMSG_CHARACTER_UPGRADE_COMPLETE = 0x27F3, - SMSG_CHARACTER_UPGRADE_QUEUED = 0x27F2, - SMSG_CHARACTER_UPGRADE_SPELL_TIER_SET = 0x25F4, - SMSG_CHARACTER_UPGRADE_STARTED = 0x27F1, - SMSG_CHAR_CUSTOMIZE = 0x2717, - SMSG_CHAR_CUSTOMIZE_FAILED = 0x2716, - SMSG_CHAR_FACTION_CHANGE_RESULT = 0x27E0, + SMSG_CHARACTER_LOGIN_FAILED = 0x2740, + SMSG_CHARACTER_OBJECT_TEST_RESPONSE = 0x27C7, + SMSG_CHARACTER_RENAME_RESULT = 0x27A3, + SMSG_CHARACTER_UPGRADE_COMPLETE = 0x27F7, + SMSG_CHARACTER_UPGRADE_QUEUED = 0x27F6, + SMSG_CHARACTER_UPGRADE_SPELL_TIER_SET = 0x25F3, + SMSG_CHARACTER_UPGRADE_STARTED = 0x27F5, + SMSG_CHAR_CUSTOMIZE = 0x2716, + SMSG_CHAR_CUSTOMIZE_FAILED = 0x2715, + SMSG_CHAR_FACTION_CHANGE_RESULT = 0x27E4, SMSG_CHAT = 0x2BAD, SMSG_CHAT_AUTO_RESPONDED = 0x2BBD, SMSG_CHAT_DOWN = 0x2BC2, @@ -911,57 +923,57 @@ enum OpcodeServer : uint32 SMSG_CHAT_RESTRICTED = 0x2BB8, SMSG_CHAT_SERVER_MESSAGE = 0x2BC9, SMSG_CHEAT_IGNORE_DIMISHING_RETURNS = 0x2C12, - SMSG_CHECK_WARGAME_ENTRY = 0x259F, + SMSG_CHECK_WARGAME_ENTRY = 0x259E, SMSG_CLEAR_ALL_SPELL_CHARGES = 0x2C26, - SMSG_CLEAR_BOSS_EMOTES = 0x25CC, - SMSG_CLEAR_COOLDOWN = 0x26E3, + SMSG_CLEAR_BOSS_EMOTES = 0x25CA, + SMSG_CLEAR_COOLDOWN = 0x26E2, SMSG_CLEAR_COOLDOWNS = 0x2C25, SMSG_CLEAR_LOSS_OF_CONTROL = 0x2695, SMSG_CLEAR_SPELL_CHARGES = 0x2C27, SMSG_CLEAR_TARGET = 0x26D9, SMSG_COIN_REMOVED = 0x2629, SMSG_COMBAT_EVENT_FAILED = 0x266C, - SMSG_COMMENTATOR_MAP_INFO = 0x2743, - SMSG_COMMENTATOR_PLAYER_INFO = 0x2744, - SMSG_COMMENTATOR_STATE_CHANGED = 0x2742, + SMSG_COMMENTATOR_MAP_INFO = 0x2742, + SMSG_COMMENTATOR_PLAYER_INFO = 0x2743, + SMSG_COMMENTATOR_STATE_CHANGED = 0x2741, SMSG_COMPLAINT_RESULT = 0x26D1, - SMSG_COMPLETE_SHIPMENT_RESPONSE = 0x27D6, + SMSG_COMPLETE_SHIPMENT_RESPONSE = 0x27D9, SMSG_CONNECT_TO = 0x304C, - SMSG_CONQUEST_FORMULA_CONSTANTS = 0x27BF, + SMSG_CONQUEST_FORMULA_CONSTANTS = 0x27C2, SMSG_CONSOLE_WRITE = 0x264E, - SMSG_CONTACT_LIST = 0x27C2, + SMSG_CONTACT_LIST = 0x27C5, SMSG_CONTROL_UPDATE = 0x2661, - SMSG_COOLDOWN_CHEAT = 0x2777, - SMSG_COOLDOWN_EVENT = 0x26E2, + SMSG_COOLDOWN_CHEAT = 0x2778, + SMSG_COOLDOWN_EVENT = 0x26E1, SMSG_CORPSE_LOCATION = 0x2668, - SMSG_CORPSE_RECLAIM_DELAY = 0x278A, - SMSG_CORPSE_TRANSPORT_QUERY = 0x274E, - SMSG_CREATE_CHAR = 0x273C, - SMSG_CREATE_SHIPMENT_RESPONSE = 0x27D5, - SMSG_CRITERIA_DELETED = 0x271B, - SMSG_CRITERIA_UPDATE = 0x2715, - SMSG_CROSSED_INEBRIATION_THRESHOLD = 0x26EB, - SMSG_CUSTOM_LOAD_SCREEN = 0x25E2, + SMSG_CORPSE_RECLAIM_DELAY = 0x278B, + SMSG_CORPSE_TRANSPORT_QUERY = 0x274D, + SMSG_CREATE_CHAR = 0x273B, + SMSG_CREATE_SHIPMENT_RESPONSE = 0x27D8, + SMSG_CRITERIA_DELETED = 0x271A, + SMSG_CRITERIA_UPDATE = 0x2714, + SMSG_CROSSED_INEBRIATION_THRESHOLD = 0x26EA, + SMSG_CUSTOM_LOAD_SCREEN = 0x25E0, SMSG_DAILY_QUESTS_RESET = 0x2A80, - SMSG_DAMAGE_CALC_LOG = 0x27FA, - SMSG_DANCE_STUDIO_CREATE_RESULT = 0x279F, - SMSG_DB_REPLY = 0x25A1, - SMSG_DEATH_RELEASE_LOC = 0x2703, + SMSG_DAMAGE_CALC_LOG = 0x27FE, + SMSG_DANCE_STUDIO_CREATE_RESULT = 0x27A0, + SMSG_DB_REPLY = 0x25A0, + SMSG_DEATH_RELEASE_LOC = 0x2702, SMSG_DEFENSE_MESSAGE = 0x2BBB, - SMSG_DELETE_CHAR = 0x273D, + SMSG_DELETE_CHAR = 0x273C, SMSG_DESTROY_ARENA_UNIT = 0x2781, - SMSG_DESTRUCTIBLE_BUILDING_DAMAGE = 0x2730, - SMSG_DIFFERENT_INSTANCE_FROM_PARTY = 0x258B, - SMSG_DISENCHANT_CREDIT = 0x25BB, + SMSG_DESTRUCTIBLE_BUILDING_DAMAGE = 0x272F, + SMSG_DIFFERENT_INSTANCE_FROM_PARTY = 0x258A, + SMSG_DISENCHANT_CREDIT = 0x25BA, SMSG_DISMOUNT = 0x26D8, - SMSG_DISMOUNT_RESULT = 0x257C, + SMSG_DISMOUNT_RESULT = 0x257B, SMSG_DISPEL_FAILED = 0x2C2F, - SMSG_DISPLAY_GAME_ERROR = 0x25B4, + SMSG_DISPLAY_GAME_ERROR = 0x25B3, SMSG_DISPLAY_PLAYER_CHOICE = 0x269E, SMSG_DISPLAY_PROMOTION = 0x2665, SMSG_DISPLAY_QUEST_POPUP = 0x2A9B, SMSG_DISPLAY_TOAST = 0x2637, - SMSG_DONT_AUTO_PUSH_SPELLS_TO_ACTION_BAR = 0x25F6, + SMSG_DONT_AUTO_PUSH_SPELLS_TO_ACTION_BAR = 0x25F5, SMSG_DROP_NEW_CONNECTION = 0x304B, SMSG_DUEL_COMPLETE = 0x2671, SMSG_DUEL_COUNTDOWN = 0x2670, @@ -969,238 +981,242 @@ enum OpcodeServer : uint32 SMSG_DUEL_OUT_OF_BOUNDS = 0x266E, SMSG_DUEL_REQUESTED = 0x266D, SMSG_DUEL_WINNER = 0x2672, - SMSG_DURABILITY_DAMAGE_DEATH = 0x2786, - SMSG_EMOTE = 0x27FB, - SMSG_ENABLE_BARBER_SHOP = 0x26E6, - SMSG_ENCHANTMENT_LOG = 0x274F, - SMSG_ENCOUNTER_END = 0x27B7, - SMSG_ENCOUNTER_START = 0x27B6, - SMSG_ENUM_CHARACTERS_RESULT = 0x2583, + SMSG_DURABILITY_DAMAGE_DEATH = 0x2787, + SMSG_EMOTE = 0x27FF, + SMSG_ENABLE_BARBER_SHOP = 0x26E5, + SMSG_ENCHANTMENT_LOG = 0x274E, + SMSG_ENCOUNTER_END = 0x27BA, + SMSG_ENCOUNTER_START = 0x27B9, + SMSG_ENUM_CHARACTERS_RESULT = 0x2582, SMSG_ENVIRONMENTAL_DAMAGE_LOG = 0x2C20, SMSG_EQUIPMENT_SET_ID = 0x26DA, SMSG_EXPECTED_SPAM_RECORDS = 0x2BB1, - SMSG_EXPLORATION_EXPERIENCE = 0x279E, + SMSG_EXPLORATION_EXPERIENCE = 0x279F, SMSG_FACTION_BONUS_INFO = 0x2762, - SMSG_FAILED_PLAYER_CONDITION = 0x25E1, - SMSG_FEATURE_SYSTEM_STATUS = 0x25D1, - SMSG_FEATURE_SYSTEM_STATUS_GLUE_SCREEN = 0x25D2, - SMSG_FEIGN_DEATH_RESISTED = 0x2783, - SMSG_FISH_ESCAPED = 0x26F8, - SMSG_FISH_NOT_HOOKED = 0x26F7, + SMSG_FAILED_PLAYER_CONDITION = 0x25DF, + SMSG_FEATURE_SYSTEM_STATUS = 0x25CF, + SMSG_FEATURE_SYSTEM_STATUS_GLUE_SCREEN = 0x25D0, + SMSG_FEIGN_DEATH_RESISTED = 0x2784, + SMSG_FISH_ESCAPED = 0x26F7, + SMSG_FISH_NOT_HOOKED = 0x26F6, SMSG_FLIGHT_SPLINE_SYNC = 0x2DF7, - SMSG_FORCED_DEATH_UPDATE = 0x2704, - SMSG_FORCE_ANIM = 0x2790, + SMSG_FORCED_DEATH_UPDATE = 0x2703, + SMSG_FORCE_ANIM = 0x2791, SMSG_FORCE_OBJECT_RELINK = 0x2664, - SMSG_FRIEND_STATUS = 0x27C3, - SMSG_GAME_OBJECT_ACTIVATE_ANIM_KIT = 0x25D5, - SMSG_GAME_OBJECT_CUSTOM_ANIM = 0x25D6, - SMSG_GAME_OBJECT_DESPAWN = 0x25D7, + SMSG_FRIEND_STATUS = 0x27C6, + SMSG_GAME_OBJECT_ACTIVATE_ANIM_KIT = 0x25D3, + SMSG_GAME_OBJECT_CUSTOM_ANIM = 0x25D4, + SMSG_GAME_OBJECT_DESPAWN = 0x25D5, SMSG_GAME_OBJECT_PLAY_SPELL_VISUAL = 0x2C4A, SMSG_GAME_OBJECT_PLAY_SPELL_VISUAL_KIT = 0x2C49, SMSG_GAME_OBJECT_RESET_STATE = 0x2759, + SMSG_GAME_OBJECT_SET_STATE = 0x282F, SMSG_GAME_OBJECT_UI_ACTION = 0x2756, SMSG_GAME_SPEED_SET = 0x26A7, - SMSG_GAME_TIME_SET = 0x2748, - SMSG_GAME_TIME_UPDATE = 0x2747, - SMSG_GARRISON_ADD_FOLLOWER_RESULT = 0x28FE, - SMSG_GARRISON_ADD_MISSION_RESULT = 0x2901, - SMSG_GARRISON_ASSIGN_FOLLOWER_TO_BUILDING_RESULT = 0x2912, + SMSG_GAME_TIME_SET = 0x2747, + SMSG_GAME_TIME_UPDATE = 0x2746, + SMSG_GARRISON_ADD_FOLLOWER_RESULT = 0x2902, + SMSG_GARRISON_ADD_MISSION_RESULT = 0x2906, + SMSG_GARRISON_ASSIGN_FOLLOWER_TO_BUILDING_RESULT = 0x2918, SMSG_GARRISON_BUILDING_ACTIVATED = 0x28FB, - SMSG_GARRISON_BUILDING_LANDMARKS = 0x2925, + SMSG_GARRISON_BUILDING_LANDMARKS = 0x292C, SMSG_GARRISON_BUILDING_REMOVED = 0x28F4, SMSG_GARRISON_BUILDING_SET_ACTIVE_SPECIALIZATION_RESULT = 0x28F6, - SMSG_GARRISON_CLEAR_ALL_FOLLOWERS_EXHAUSTION = 0x2910, - SMSG_GARRISON_COMPLETE_MISSION_RESULT = 0x2903, + SMSG_GARRISON_CLEAR_ALL_FOLLOWERS_EXHAUSTION = 0x2916, + SMSG_GARRISON_COMPLETE_MISSION_RESULT = 0x2909, SMSG_GARRISON_CREATE_RESULT = 0x28FC, - SMSG_GARRISON_DELETE_RESULT = 0x2919, - SMSG_GARRISON_FOLLOWER_CHANGED_ABILITIES = 0x290E, - SMSG_GARRISON_FOLLOWER_CHANGED_ITEM_LEVEL = 0x290D, - SMSG_GARRISON_FOLLOWER_CHANGED_STATUS = 0x290F, - SMSG_GARRISON_FOLLOWER_CHANGED_XP = 0x290C, - SMSG_GARRISON_IS_UPGRADEABLE_RESULT = 0x2922, - SMSG_GARRISON_LANDING_PAGE_SHIPMENT_INFO = 0x27D8, + SMSG_GARRISON_DELETE_RESULT = 0x2920, + SMSG_GARRISON_FOLLOWER_CHANGED_ABILITIES = 0x2914, + SMSG_GARRISON_FOLLOWER_CHANGED_ITEM_LEVEL = 0x2913, + SMSG_GARRISON_FOLLOWER_CHANGED_STATUS = 0x2915, + SMSG_GARRISON_FOLLOWER_CHANGED_XP = 0x2912, + SMSG_GARRISON_FOLLOWER_DURABILITY_CHANGED = 0x2904, + SMSG_GARRISON_IS_UPGRADEABLE_RESULT = 0x2929, + SMSG_GARRISON_LANDING_PAGE_SHIPMENT_INFO = 0x27DB, SMSG_GARRISON_LEARN_BLUEPRINT_RESULT = 0x28F7, SMSG_GARRISON_LEARN_SPECIALIZATION_RESULT = 0x28F5, - SMSG_GARRISON_LIST_FOLLOWERS_CHEAT_RESULT = 0x2900, - SMSG_GARRISON_LIST_MISSIONS_CHEAT_RESULT = 0x2923, - SMSG_GARRISON_MISSION_AREA_BONUS_ADDED = 0x290A, - SMSG_GARRISON_MISSION_BONUS_ROLL_RESULT = 0x2907, - SMSG_GARRISON_MISSION_UPDATE_CAN_START = 0x290B, - SMSG_GARRISON_NUM_FOLLOWER_ACTIVATIONS_REMAINING = 0x2911, - SMSG_GARRISON_OPEN_ARCHITECT = 0x291A, - SMSG_GARRISON_OPEN_MISSION_NPC = 0x291C, - SMSG_GARRISON_OPEN_RECRUITMENT_NPC = 0x2916, - SMSG_GARRISON_OPEN_TRADESKILL_NPC = 0x291B, + SMSG_GARRISON_LIST_FOLLOWERS_CHEAT_RESULT = 0x2905, + SMSG_GARRISON_LIST_MISSIONS_CHEAT_RESULT = 0x292A, + SMSG_GARRISON_MISSION_AREA_BONUS_ADDED = 0x2910, + SMSG_GARRISON_MISSION_BONUS_ROLL_RESULT = 0x290C, + SMSG_GARRISON_MISSION_UPDATE_CAN_START = 0x2911, + SMSG_GARRISON_NUM_FOLLOWER_ACTIVATIONS_REMAINING = 0x2917, + SMSG_GARRISON_OPEN_ARCHITECT = 0x2921, + SMSG_GARRISON_OPEN_MISSION_NPC = 0x2923, + SMSG_GARRISON_OPEN_RECRUITMENT_NPC = 0x291C, + SMSG_GARRISON_OPEN_TRADESKILL_NPC = 0x2922, SMSG_GARRISON_PLACE_BUILDING_RESULT = 0x28F3, SMSG_GARRISON_PLOT_PLACED = 0x28F1, SMSG_GARRISON_PLOT_REMOVED = 0x28F2, - SMSG_GARRISON_RECALL_PORTAL_LAST_USED_TIME = 0x2905, - SMSG_GARRISON_RECALL_PORTAL_USED = 0x2906, - SMSG_GARRISON_RECRUITMENT_FOLLOWERS_GENERATED = 0x2917, - SMSG_GARRISON_RECRUIT_FOLLOWER_RESULT = 0x2918, + SMSG_GARRISON_RECALL_PORTAL_LAST_USED_TIME = 0x290A, + SMSG_GARRISON_RECALL_PORTAL_USED = 0x290B, + SMSG_GARRISON_RECRUITMENT_FOLLOWERS_GENERATED = 0x291E, + SMSG_GARRISON_RECRUIT_FOLLOWER_RESULT = 0x291F, SMSG_GARRISON_REMOTE_INFO = 0x28FA, - SMSG_GARRISON_REMOVE_FOLLOWER_FROM_BUILDING_RESULT = 0x2913, - SMSG_GARRISON_REMOVE_FOLLOWER_RESULT = 0x28FF, + SMSG_GARRISON_REMOVE_FOLLOWER_FROM_BUILDING_RESULT = 0x2919, + SMSG_GARRISON_REMOVE_FOLLOWER_RESULT = 0x2903, SMSG_GARRISON_REQUEST_BLUEPRINT_AND_SPECIALIZATION_DATA_RESULT = 0x28F9, - SMSG_GARRISON_START_MISSION_RESULT = 0x2902, + SMSG_GARRISON_START_MISSION_RESULT = 0x2907, SMSG_GARRISON_UNLEARN_BLUEPRINT_RESULT = 0x28F8, SMSG_GARRISON_UPGRADE_RESULT = 0x28FD, - SMSG_GENERATE_RANDOM_CHARACTER_NAME_RESULT = 0x2584, - SMSG_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A0, - SMSG_GET_DISPLAYED_TROPHY_LIST_RESPONSE = 0x2921, + SMSG_GENERATE_RANDOM_CHARACTER_NAME_RESULT = 0x2583, + SMSG_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A1, + SMSG_GET_DISPLAYED_TROPHY_LIST_RESPONSE = 0x2928, SMSG_GET_GARRISON_INFO_RESULT = 0x28F0, - SMSG_GET_SHIPMENTS_OF_TYPE_RESPONSE = 0x27D7, - SMSG_GET_SHIPMENT_INFO_RESPONSE = 0x27D3, - SMSG_GET_TROPHY_LIST_RESPONSE = 0x27F6, - SMSG_GM_PLAYER_INFO = 0x2776, - SMSG_GM_REQUEST_PLAYER_INFO = 0x25EB, + SMSG_GET_SHIPMENTS_OF_TYPE_RESPONSE = 0x27DA, + SMSG_GET_SHIPMENT_INFO_RESPONSE = 0x27D6, + SMSG_GET_TROPHY_LIST_RESPONSE = 0x27FA, + SMSG_GM_PLAYER_INFO = 0x2777, + SMSG_GM_REQUEST_PLAYER_INFO = 0x25EA, SMSG_GM_TICKET_CASE_STATUS = 0x26CA, SMSG_GM_TICKET_SYSTEM_STATUS = 0x26C9, - SMSG_GOD_MODE = 0x2736, + SMSG_GOD_MODE = 0x2735, SMSG_GOSSIP_COMPLETE = 0x2A95, SMSG_GOSSIP_MESSAGE = 0x2A96, - SMSG_GOSSIP_POI = 0x27D0, - SMSG_GROUP_ACTION_THROTTLED = 0x259D, - SMSG_GROUP_DECLINE = 0x27CB, - SMSG_GROUP_DESTROYED = 0x27CD, + SMSG_GOSSIP_POI = 0x27D3, + SMSG_GROUP_ACTION_THROTTLED = 0x259C, + SMSG_GROUP_DECLINE = 0x27CE, + SMSG_GROUP_DESTROYED = 0x27D0, SMSG_GROUP_NEW_LEADER = 0x2647, - SMSG_GROUP_UNINVITE = 0x27CC, + SMSG_GROUP_UNINVITE = 0x27CF, SMSG_GUILD_ACHIEVEMENT_DELETED = 0x29C5, SMSG_GUILD_ACHIEVEMENT_EARNED = 0x29C4, SMSG_GUILD_ACHIEVEMENT_MEMBERS = 0x29C7, - SMSG_GUILD_BANK_LOG_QUERY_RESULTS = 0x29DE, - SMSG_GUILD_BANK_QUERY_RESULTS = 0x29DD, - SMSG_GUILD_BANK_REMAINING_WITHDRAW_MONEY = 0x29DF, - SMSG_GUILD_BANK_TEXT_QUERY_RESULT = 0x29E2, + SMSG_GUILD_BANK_LOG_QUERY_RESULTS = 0x29DF, + SMSG_GUILD_BANK_QUERY_RESULTS = 0x29DE, + SMSG_GUILD_BANK_REMAINING_WITHDRAW_MONEY = 0x29E0, + SMSG_GUILD_BANK_TEXT_QUERY_RESULT = 0x29E3, SMSG_GUILD_CHALLENGE_COMPLETED = 0x29D3, SMSG_GUILD_CHALLENGE_UPDATE = 0x29D2, - SMSG_GUILD_CHANGE_NAME_RESULT = 0x29DC, + SMSG_GUILD_CHANGE_NAME_RESULT = 0x29DD, SMSG_GUILD_COMMAND_RESULT = 0x29BA, SMSG_GUILD_CRITERIA_DELETED = 0x29C6, SMSG_GUILD_CRITERIA_UPDATE = 0x29C3, - SMSG_GUILD_EVENT_BANK_CONTENTS_CHANGED = 0x29F4, - SMSG_GUILD_EVENT_BANK_MONEY_CHANGED = 0x29F3, - SMSG_GUILD_EVENT_DISBANDED = 0x29EA, - SMSG_GUILD_EVENT_LOG_QUERY_RESULTS = 0x29E1, - SMSG_GUILD_EVENT_MOTD = 0x29EB, - SMSG_GUILD_EVENT_NEW_LEADER = 0x29E9, - SMSG_GUILD_EVENT_PLAYER_JOINED = 0x29E7, - SMSG_GUILD_EVENT_PLAYER_LEFT = 0x29E8, - SMSG_GUILD_EVENT_PRESENCE_CHANGE = 0x29EC, - SMSG_GUILD_EVENT_RANKS_UPDATED = 0x29ED, - SMSG_GUILD_EVENT_RANK_CHANGED = 0x29EE, - SMSG_GUILD_EVENT_TAB_ADDED = 0x29EF, - SMSG_GUILD_EVENT_TAB_DELETED = 0x29F0, - SMSG_GUILD_EVENT_TAB_MODIFIED = 0x29F1, - SMSG_GUILD_EVENT_TAB_TEXT_CHANGED = 0x29F2, - SMSG_GUILD_FLAGGED_FOR_RENAME = 0x29DB, + SMSG_GUILD_EVENT_BANK_CONTENTS_CHANGED = 0x29F5, + SMSG_GUILD_EVENT_BANK_MONEY_CHANGED = 0x29F4, + SMSG_GUILD_EVENT_DISBANDED = 0x29EB, + SMSG_GUILD_EVENT_LOG_QUERY_RESULTS = 0x29E2, + SMSG_GUILD_EVENT_MOTD = 0x29EC, + SMSG_GUILD_EVENT_NEW_LEADER = 0x29EA, + SMSG_GUILD_EVENT_PLAYER_JOINED = 0x29E8, + SMSG_GUILD_EVENT_PLAYER_LEFT = 0x29E9, + SMSG_GUILD_EVENT_PRESENCE_CHANGE = 0x29ED, + SMSG_GUILD_EVENT_RANKS_UPDATED = 0x29EE, + SMSG_GUILD_EVENT_RANK_CHANGED = 0x29EF, + SMSG_GUILD_EVENT_TAB_ADDED = 0x29F0, + SMSG_GUILD_EVENT_TAB_DELETED = 0x29F1, + SMSG_GUILD_EVENT_TAB_MODIFIED = 0x29F2, + SMSG_GUILD_EVENT_TAB_TEXT_CHANGED = 0x29F3, + SMSG_GUILD_FLAGGED_FOR_RENAME = 0x29DC, SMSG_GUILD_INVITE = 0x29CA, - SMSG_GUILD_INVITE_DECLINED = 0x29E5, - SMSG_GUILD_INVITE_EXPIRED = 0x29E6, + SMSG_GUILD_INVITE_DECLINED = 0x29E6, + SMSG_GUILD_INVITE_EXPIRED = 0x29E7, + SMSG_GUILD_ITEM_LOOTED = 0x29D4, SMSG_GUILD_KNOWN_RECIPES = 0x29BE, SMSG_GUILD_MEMBERS_WITH_RECIPE = 0x29BF, - SMSG_GUILD_MEMBER_DAILY_RESET = 0x29E3, + SMSG_GUILD_MEMBER_DAILY_RESET = 0x29E4, SMSG_GUILD_MEMBER_RECIPES = 0x29BD, SMSG_GUILD_MEMBER_UPDATE_NOTE = 0x29C9, - SMSG_GUILD_MOVED = 0x29D9, - SMSG_GUILD_MOVE_STARTING = 0x29D8, - SMSG_GUILD_NAME_CHANGED = 0x29DA, + SMSG_GUILD_MOVED = 0x29DA, + SMSG_GUILD_MOVE_STARTING = 0x29D9, + SMSG_GUILD_NAME_CHANGED = 0x29DB, SMSG_GUILD_NEWS = 0x29C1, SMSG_GUILD_NEWS_DELETED = 0x29C2, SMSG_GUILD_PARTY_STATE = 0x29CB, - SMSG_GUILD_PERMISSIONS_QUERY_RESULTS = 0x29E0, + SMSG_GUILD_PERMISSIONS_QUERY_RESULTS = 0x29E1, SMSG_GUILD_RANKS = 0x29C8, SMSG_GUILD_REPUTATION_REACTION_CHANGED = 0x29CC, - SMSG_GUILD_RESET = 0x29D7, + SMSG_GUILD_RESET = 0x29D8, SMSG_GUILD_REWARD_LIST = 0x29C0, SMSG_GUILD_ROSTER = 0x29BB, SMSG_GUILD_ROSTER_UPDATE = 0x29BC, SMSG_GUILD_SEND_RANK_CHANGE = 0x29B9, - SMSG_HEALTH_UPDATE = 0x26FB, - SMSG_HIGHEST_THREAT_UPDATE = 0x270A, - SMSG_HOTFIX_NOTIFY = 0x25A2, - SMSG_HOTFIX_NOTIFY_BLOB = 0x25A3, + SMSG_HEALTH_UPDATE = 0x26FA, + SMSG_HIGHEST_THREAT_UPDATE = 0x2709, + SMSG_HOTFIX_NOTIFY = 0x25A1, + SMSG_HOTFIX_NOTIFY_BLOB = 0x25A2, SMSG_INITIALIZE_FACTIONS = 0x2761, - SMSG_INITIAL_SETUP = 0x2580, - SMSG_INIT_WORLD_STATES = 0x2787, - SMSG_INSPECT_HONOR_STATS = 0x25B1, + SMSG_INITIAL_SETUP = 0x257F, + SMSG_INIT_WORLD_STATES = 0x2788, + SMSG_INSPECT_HONOR_STATS = 0x25B0, SMSG_INSPECT_PVP = 0x275D, SMSG_INSPECT_RESULT = 0x264B, - SMSG_INSTANCE_ENCOUNTER_CHANGE_PRIORITY = 0x27E6, - SMSG_INSTANCE_ENCOUNTER_DISENGAGE_UNIT = 0x27E5, - SMSG_INSTANCE_ENCOUNTER_END = 0x27EC, - SMSG_INSTANCE_ENCOUNTER_ENGAGE_UNIT = 0x27E4, - SMSG_INSTANCE_ENCOUNTER_GAIN_COMBAT_RESURRECTION_CHARGE = 0x27EE, - SMSG_INSTANCE_ENCOUNTER_IN_COMBAT_RESURRECTION = 0x27ED, - SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE = 0x27E9, - SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_START = 0x27E8, - SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE = 0x27EB, - SMSG_INSTANCE_ENCOUNTER_PHASE_SHIFT_CHANGED = 0x27EF, - SMSG_INSTANCE_ENCOUNTER_START = 0x27EA, - SMSG_INSTANCE_ENCOUNTER_TIMER_START = 0x27E7, - SMSG_INSTANCE_GROUP_SIZE_CHANGED = 0x2734, + SMSG_INSTANCE_ENCOUNTER_CHANGE_PRIORITY = 0x27EA, + SMSG_INSTANCE_ENCOUNTER_DISENGAGE_UNIT = 0x27E9, + SMSG_INSTANCE_ENCOUNTER_END = 0x27F0, + SMSG_INSTANCE_ENCOUNTER_ENGAGE_UNIT = 0x27E8, + SMSG_INSTANCE_ENCOUNTER_GAIN_COMBAT_RESURRECTION_CHARGE = 0x27F2, + SMSG_INSTANCE_ENCOUNTER_IN_COMBAT_RESURRECTION = 0x27F1, + SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE = 0x27ED, + SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_START = 0x27EC, + SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE = 0x27EF, + SMSG_INSTANCE_ENCOUNTER_PHASE_SHIFT_CHANGED = 0x27F3, + SMSG_INSTANCE_ENCOUNTER_START = 0x27EE, + SMSG_INSTANCE_ENCOUNTER_TIMER_START = 0x27EB, + SMSG_INSTANCE_GROUP_SIZE_CHANGED = 0x2733, SMSG_INSTANCE_INFO = 0x264D, SMSG_INSTANCE_RESET = 0x26AC, SMSG_INSTANCE_RESET_FAILED = 0x26AD, - SMSG_INSTANCE_SAVE_CREATED = 0x27B5, + SMSG_INSTANCE_SAVE_CREATED = 0x27B8, SMSG_INVALIDATE_PLAYER = 0x26D0, - SMSG_INVALID_PROMOTION_CODE = 0x2791, + SMSG_INVALID_PROMOTION_CODE = 0x2792, SMSG_INVENTORY_CHANGE_FAILURE = 0x275F, SMSG_IS_QUEST_COMPLETE_RESPONSE = 0x2A83, - SMSG_ITEM_CHANGED = 0x271E, - SMSG_ITEM_COOLDOWN = 0x27F9, - SMSG_ITEM_ENCHANT_TIME_UPDATE = 0x2793, - SMSG_ITEM_EXPIRE_PURCHASE_REFUND = 0x25B0, - SMSG_ITEM_PURCHASE_REFUND_RESULT = 0x25AE, + SMSG_ITEM_CHANGED = 0x271D, + SMSG_ITEM_COOLDOWN = 0x27FD, + SMSG_ITEM_ENCHANT_TIME_UPDATE = 0x2794, + SMSG_ITEM_EXPIRE_PURCHASE_REFUND = 0x25AF, + SMSG_ITEM_PURCHASE_REFUND_RESULT = 0x25AD, SMSG_ITEM_PUSH_RESULT = 0x2636, - SMSG_ITEM_TIME_UPDATE = 0x2792, - SMSG_KICK_REASON = 0x26AF, + SMSG_ITEM_TIME_UPDATE = 0x2793, + SMSG_KICK_REASON = 0x2820, SMSG_LEARNED_SPELLS = 0x2C4C, - SMSG_LEARN_PVP_TALENT_FAILED = 0x25E8, - SMSG_LEARN_TALENT_FAILED = 0x25E7, - SMSG_LEVEL_UPDATE = 0x2588, - SMSG_LEVEL_UP_INFO = 0x271D, - SMSG_LFG_BOOT_PLAYER = 0x2A35, - SMSG_LFG_DISABLED = 0x2A33, + SMSG_LEARN_PVP_TALENT_FAILED = 0x25E7, + SMSG_LEARN_TALENT_FAILED = 0x25E6, + SMSG_LEVEL_UPDATE = 0x2587, + SMSG_LEVEL_UP_INFO = 0x271C, + SMSG_LFG_BOOT_PLAYER = 0x2A36, + SMSG_LFG_DISABLED = 0x2A34, + SMSG_LFG_INSTANCE_SHUTDOWN_COUNTDOWN = 0x2A25, SMSG_LFG_JOIN_RESULT = 0x2A1C, SMSG_LFG_LIST_JOIN_RESULT = 0x2A1D, SMSG_LFG_LIST_SEARCH_RESULTS = 0x2A1E, SMSG_LFG_LIST_SEARCH_STATUS = 0x2A1F, - SMSG_LFG_LIST_UPDATE_BLACKLIST = 0x2A29, - SMSG_LFG_LIST_UPDATE_STATUS = 0x2A25, - SMSG_LFG_OFFER_CONTINUE = 0x2A34, - SMSG_LFG_PARTY_INFO = 0x2A36, - SMSG_LFG_PLAYER_INFO = 0x2A37, - SMSG_LFG_PLAYER_REWARD = 0x2A38, - SMSG_LFG_PROPOSAL_UPDATE = 0x2A2C, + SMSG_LFG_LIST_UPDATE_BLACKLIST = 0x2A2A, + SMSG_LFG_LIST_UPDATE_STATUS = 0x2A26, + SMSG_LFG_OFFER_CONTINUE = 0x2A35, + SMSG_LFG_PARTY_INFO = 0x2A37, + SMSG_LFG_PLAYER_INFO = 0x2A38, + SMSG_LFG_PLAYER_REWARD = 0x2A39, + SMSG_LFG_PROPOSAL_UPDATE = 0x2A2D, SMSG_LFG_QUEUE_STATUS = 0x2A20, - SMSG_LFG_READY_CHECK_RESULT = 0x2A3A, + SMSG_LFG_READY_CHECK_RESULT = 0x2A3B, SMSG_LFG_READY_CHECK_UPDATE = 0x2A22, SMSG_LFG_ROLE_CHECK_UPDATE = 0x2A21, - SMSG_LFG_SLOT_INVALID = 0x2A2F, - SMSG_LFG_TELEPORT_DENIED = 0x2A32, + SMSG_LFG_SLOT_INVALID = 0x2A30, + SMSG_LFG_TELEPORT_DENIED = 0x2A33, SMSG_LFG_UPDATE_STATUS = 0x2A24, - SMSG_LF_GUILD_APPLICANT_LIST_CHANGED = 0x29D4, + SMSG_LF_GUILD_APPLICANT_LIST_CHANGED = 0x29D5, SMSG_LF_GUILD_APPLICATIONS = 0x29D1, - SMSG_LF_GUILD_APPLICATIONS_LIST_CHANGED = 0x29D5, + SMSG_LF_GUILD_APPLICATIONS_LIST_CHANGED = 0x29D6, SMSG_LF_GUILD_BROWSE = 0x29CE, SMSG_LF_GUILD_COMMAND_RESULT = 0x29D0, SMSG_LF_GUILD_POST = 0x29CD, SMSG_LF_GUILD_RECRUITS = 0x29CF, - SMSG_LIVE_REGION_ACCOUNT_RESTORE_RESULT = 0x27AC, - SMSG_LIVE_REGION_CHARACTER_COPY_RESULT = 0x27AA, - SMSG_LIVE_REGION_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A1, - SMSG_LOAD_CUF_PROFILES = 0x25CD, - SMSG_LOAD_EQUIPMENT_SET = 0x274A, - SMSG_LOAD_SELECTED_TROPHY_RESULT = 0x27F7, - SMSG_LOGIN_SET_TIME_SPEED = 0x2749, - SMSG_LOGIN_VERIFY_WORLD = 0x25AB, + SMSG_LIVE_REGION_ACCOUNT_RESTORE_RESULT = 0x27AF, + SMSG_LIVE_REGION_CHARACTER_COPY_RESULT = 0x27AD, + SMSG_LIVE_REGION_GET_ACCOUNT_CHARACTER_LIST_RESULT = 0x27A2, + SMSG_LOAD_CUF_PROFILES = 0x25CB, + SMSG_LOAD_EQUIPMENT_SET = 0x2749, + SMSG_LOAD_SELECTED_TROPHY_RESULT = 0x27FB, + SMSG_LOGIN_SET_TIME_SPEED = 0x2748, + SMSG_LOGIN_VERIFY_WORLD = 0x25AA, SMSG_LOGOUT_CANCEL_ACK = 0x26AB, SMSG_LOGOUT_COMPLETE = 0x26AA, SMSG_LOGOUT_RESPONSE = 0x26A9, - SMSG_LOG_XP_GAIN = 0x2719, + SMSG_LOG_XP_GAIN = 0x2718, SMSG_LOOT_ALL_PASSED = 0x2634, - SMSG_LOOT_CONTENTS = 0x25EF, + SMSG_LOOT_CONTENTS = 0x25EE, SMSG_LOOT_ITEM_LIST = 0x2632, SMSG_LOOT_LIST = 0x2780, SMSG_LOOT_MONEY_NOTIFY = 0x262E, @@ -1213,19 +1229,19 @@ enum OpcodeServer : uint32 SMSG_LOOT_ROLL_WON = 0x2635, SMSG_LOSS_OF_CONTROL_AURA_UPDATE = 0x2692, SMSG_MAIL_COMMAND_RESULT = 0x2655, - SMSG_MAIL_LIST_RESULT = 0x2794, - SMSG_MAIL_QUERY_NEXT_TIME_RESULT = 0x2795, - SMSG_MAP_OBJECTIVES_INIT = 0x279D, - SMSG_MAP_OBJ_EVENTS = 0x25D8, + SMSG_MAIL_LIST_RESULT = 0x2795, + SMSG_MAIL_QUERY_NEXT_TIME_RESULT = 0x2796, + SMSG_MAP_OBJECTIVES_INIT = 0x279E, + SMSG_MAP_OBJ_EVENTS = 0x25D6, SMSG_MASTER_LOOT_CANDIDATE_LIST = 0x2631, - SMSG_MESSAGE_BOX = 0x2576, - SMSG_MINIMAP_PING = 0x26F6, + SMSG_MESSAGE_BOX = 0x2575, + SMSG_MINIMAP_PING = 0x26F5, SMSG_MIRROR_IMAGE_COMPONENTED_DATA = 0x2C14, SMSG_MIRROR_IMAGE_CREATURE_DATA = 0x2C13, - SMSG_MISSILE_CANCEL = 0x25D9, - SMSG_MODIFY_COOLDOWN = 0x27A3, + SMSG_MISSILE_CANCEL = 0x25D7, + SMSG_MODIFY_COOLDOWN = 0x27A4, SMSG_MOTD = 0x2BAF, - SMSG_MOUNT_RESULT = 0x257B, + SMSG_MOUNT_RESULT = 0x257A, SMSG_MOVE_APPLY_MOVEMENT_FORCE = 0x2DE1, SMSG_MOVE_DISABLE_COLLISION = 0x2DDD, SMSG_MOVE_DISABLE_GRAVITY = 0x2DDB, @@ -1306,37 +1322,37 @@ enum OpcodeServer : uint32 SMSG_MOVE_UPDATE_TELEPORT = 0x2DAF, SMSG_MOVE_UPDATE_TURN_RATE = 0x2DAB, SMSG_MOVE_UPDATE_WALK_SPEED = 0x2DA6, - SMSG_NEUTRAL_PLAYER_FACTION_SELECT_RESULT = 0x25F1, + SMSG_NEUTRAL_PLAYER_FACTION_SELECT_RESULT = 0x25F0, SMSG_NEW_TAXI_PATH = 0x26A4, - SMSG_NEW_WORLD = 0x25AA, + SMSG_NEW_WORLD = 0x25A9, SMSG_NOTIFY_DEST_LOC_SPELL_CAST = 0x2C42, SMSG_NOTIFY_MISSILE_TRAJECTORY_COLLISION = 0x26CF, - SMSG_NOTIFY_MONEY = 0x25AD, + SMSG_NOTIFY_MONEY = 0x25AC, SMSG_NOTIFY_RECEIVED_MAIL = 0x2656, SMSG_OFFER_PETITION_ERROR = 0x26DE, - SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA = 0x271A, + SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA = 0x2719, SMSG_ON_MONSTER_MOVE = 0x2DA2, SMSG_OPEN_CONTAINER = 0x2760, - SMSG_OPEN_LFG_DUNGEON_FINDER = 0x2A31, - SMSG_OPEN_SHIPMENT_NPC_FROM_GOSSIP = 0x27D2, - SMSG_OPEN_SHIPMENT_NPC_RESULT = 0x27D4, - SMSG_OVERRIDE_LIGHT = 0x26E5, + SMSG_OPEN_LFG_DUNGEON_FINDER = 0x2A32, + SMSG_OPEN_SHIPMENT_NPC_FROM_GOSSIP = 0x27D5, + SMSG_OPEN_SHIPMENT_NPC_RESULT = 0x27D7, + SMSG_OVERRIDE_LIGHT = 0x26E4, SMSG_PAGE_TEXT = 0x2755, - SMSG_PARTY_COMMAND_RESULT = 0x27CF, - SMSG_PARTY_INVITE = 0x25CF, - SMSG_PARTY_KILL_LOG = 0x2799, - SMSG_PARTY_MEMBER_STATE = 0x2797, + SMSG_PARTY_COMMAND_RESULT = 0x27D2, + SMSG_PARTY_INVITE = 0x25CD, + SMSG_PARTY_KILL_LOG = 0x279A, + SMSG_PARTY_MEMBER_STATE = 0x2798, SMSG_PARTY_UPDATE = 0x260A, - SMSG_PAUSE_MIRROR_TIMER = 0x274C, - SMSG_PENDING_RAID_LOCK = 0x272E, - SMSG_PETITION_ALREADY_SIGNED = 0x25B7, - SMSG_PETITION_RENAME_GUILD_RESPONSE = 0x29F6, - SMSG_PETITION_SHOW_LIST = 0x26E8, - SMSG_PETITION_SHOW_SIGNATURES = 0x26E9, - SMSG_PETITION_SIGN_RESULTS = 0x278B, - SMSG_PET_ACTION_FEEDBACK = 0x2789, + SMSG_PAUSE_MIRROR_TIMER = 0x274B, + SMSG_PENDING_RAID_LOCK = 0x272D, + SMSG_PETITION_ALREADY_SIGNED = 0x25B6, + SMSG_PETITION_RENAME_GUILD_RESPONSE = 0x29F7, + SMSG_PETITION_SHOW_LIST = 0x26E7, + SMSG_PETITION_SHOW_SIGNATURES = 0x26E8, + SMSG_PETITION_SIGN_RESULTS = 0x278C, + SMSG_PET_ACTION_FEEDBACK = 0x278A, SMSG_PET_ACTION_SOUND = 0x26C6, - SMSG_PET_ADDED = 0x25A7, + SMSG_PET_ADDED = 0x25A6, SMSG_PET_BATTLE_CHAT_RESTRICTED = 0x2617, SMSG_PET_BATTLE_DEBUG_QUEUE_DUMP_RESPONSE = 0x2699, SMSG_PET_BATTLE_FINALIZE_LOCATION = 0x2610, @@ -1356,55 +1372,57 @@ enum OpcodeServer : uint32 SMSG_PET_CLEAR_SPELLS = 0x2C23, SMSG_PET_DISMISS_SOUND = 0x26C7, SMSG_PET_GOD_MODE = 0x26A1, - SMSG_PET_GUIDS = 0x273F, + SMSG_PET_GUIDS = 0x273E, SMSG_PET_LEARNED_SPELLS = 0x2C4E, - SMSG_PET_MODE = 0x258A, - SMSG_PET_NAME_INVALID = 0x26ED, - SMSG_PET_SLOT_UPDATED = 0x2589, + SMSG_PET_MODE = 0x2589, + SMSG_PET_NAME_INVALID = 0x26EC, + SMSG_PET_SLOT_UPDATED = 0x2588, SMSG_PET_SPELLS_MESSAGE = 0x2C24, - SMSG_PET_STABLE_LIST = 0x25A8, - SMSG_PET_STABLE_RESULT = 0x25A9, + SMSG_PET_STABLE_LIST = 0x25A7, + SMSG_PET_STABLE_RESULT = 0x25A8, SMSG_PET_TAME_FAILURE = 0x26DB, SMSG_PET_UNLEARNED_SPELLS = 0x2C4F, - SMSG_PHASE_SHIFT_CHANGE = 0x2578, - SMSG_PLAYED_TIME = 0x2706, - SMSG_PLAYER_BOUND = 0x257E, - SMSG_PLAYER_SAVE_GUILD_EMBLEM = 0x29F5, - SMSG_PLAYER_SKINNED = 0x2784, - SMSG_PLAYER_TABARD_VENDOR_ACTIVATE = 0x2798, - SMSG_PLAY_MUSIC = 0x27A6, - SMSG_PLAY_OBJECT_SOUND = 0x27A7, - SMSG_PLAY_ONE_SHOT_ANIM_KIT = 0x276E, + SMSG_PHASE_SHIFT_CHANGE = 0x2577, + SMSG_PLAYED_TIME = 0x2705, + SMSG_PLAYER_BOUND = 0x257D, + SMSG_PLAYER_SAVE_GUILD_EMBLEM = 0x29F6, + SMSG_PLAYER_SKINNED = 0x2785, + SMSG_PLAYER_TABARD_VENDOR_ACTIVATE = 0x2799, + SMSG_PLAY_MUSIC = 0x27A9, + SMSG_PLAY_OBJECT_SOUND = 0x27AA, + SMSG_PLAY_ONE_SHOT_ANIM_KIT = 0x276F, SMSG_PLAY_ORPHAN_SPELL_VISUAL = 0x2C46, SMSG_PLAY_SCENE = 0x2650, - SMSG_PLAY_SOUND = 0x27A5, - SMSG_PLAY_SPEAKERBOT_SOUND = 0x27A8, + SMSG_PLAY_SOUND = 0x27A8, + SMSG_PLAY_SPEAKERBOT_SOUND = 0x27AB, SMSG_PLAY_SPELL_VISUAL = 0x2C44, SMSG_PLAY_SPELL_VISUAL_KIT = 0x2C48, - SMSG_PLAY_TIME_WARNING = 0x2738, + SMSG_PLAY_TIME_WARNING = 0x2737, SMSG_PONG = 0x304D, - SMSG_POWER_UPDATE = 0x26FC, - SMSG_PRE_RESSURECT = 0x27A4, - SMSG_PRINT_NOTIFICATION = 0x25E0, - SMSG_PROC_RESIST = 0x279A, - SMSG_PROPOSE_LEVEL_GRANT = 0x270E, - SMSG_PVP_CREDIT = 0x2714, - SMSG_PVP_LOG_DATA = 0x25B2, - SMSG_PVP_OPTIONS_ENABLED = 0x25B5, - SMSG_PVP_SEASON = 0x25D3, - SMSG_QUERY_BATTLE_PET_NAME_RESPONSE = 0x2701, - SMSG_QUERY_CREATURE_RESPONSE = 0x26F9, - SMSG_QUERY_GAME_OBJECT_RESPONSE = 0x26FA, - SMSG_QUERY_GARRISON_CREATURE_NAME_RESPONSE = 0x2924, - SMSG_QUERY_GUILD_INFO_RESPONSE = 0x29E4, - SMSG_QUERY_ITEM_TEXT_RESPONSE = 0x27F8, - SMSG_QUERY_NPC_TEXT_RESPONSE = 0x26FD, - SMSG_QUERY_PAGE_TEXT_RESPONSE = 0x26FF, - SMSG_QUERY_PETITION_RESPONSE = 0x2702, - SMSG_QUERY_PET_NAME_RESPONSE = 0x2700, - SMSG_QUERY_PLAYER_NAME_RESPONSE = 0x26FE, + SMSG_POWER_UPDATE = 0x26FB, + SMSG_PRESTIGE_AND_HONOR_INVOLUNTARILY_CHANGED = 0x2754, + SMSG_PRE_RESSURECT = 0x27A7, + SMSG_PRINT_NOTIFICATION = 0x25DE, + SMSG_PROC_RESIST = 0x279B, + SMSG_PROPOSE_LEVEL_GRANT = 0x270D, + SMSG_PVP_CREDIT = 0x2713, + SMSG_PVP_LOG_DATA = 0x25B1, + SMSG_PVP_OPTIONS_ENABLED = 0x25B4, + SMSG_PVP_SEASON = 0x25D1, + SMSG_QUERY_BATTLE_PET_NAME_RESPONSE = 0x2700, + SMSG_QUERY_CREATURE_RESPONSE = 0x26F8, + SMSG_QUERY_GAME_OBJECT_RESPONSE = 0x26F9, + SMSG_QUERY_GARRISON_CREATURE_NAME_RESPONSE = 0x292B, + SMSG_QUERY_GUILD_INFO_RESPONSE = 0x29E5, + SMSG_QUERY_ITEM_TEXT_RESPONSE = 0x27FC, + SMSG_QUERY_NPC_TEXT_RESPONSE = 0x26FC, + SMSG_QUERY_PAGE_TEXT_RESPONSE = 0x26FE, + SMSG_QUERY_PETITION_RESPONSE = 0x2701, + SMSG_QUERY_PET_NAME_RESPONSE = 0x26FF, + SMSG_QUERY_PLAYER_NAME_RESPONSE = 0x26FD, SMSG_QUERY_QUEST_INFO_RESPONSE = 0x2A94, - SMSG_QUERY_TIME_RESPONSE = 0x2718, + SMSG_QUERY_QUEST_REWARD_RESPONSE = 0x2834, + SMSG_QUERY_TIME_RESPONSE = 0x2717, SMSG_QUEST_COMPLETION_NPC_RESPONSE = 0x2A81, SMSG_QUEST_CONFIRM_ACCEPT = 0x2A8D, SMSG_QUEST_FORCE_REMOVED = 0x2A99, @@ -1427,65 +1445,64 @@ enum OpcodeServer : uint32 SMSG_QUEST_UPDATE_COMPLETE = 0x2A87, SMSG_QUEST_UPDATE_FAILED = 0x2A88, SMSG_QUEST_UPDATE_FAILED_TIMER = 0x2A89, - SMSG_RAF_EMAIL_ENABLED_RESPONSE = 0x27C0, - SMSG_RAID_DIFFICULTY_SET = 0x27E1, - SMSG_RAID_GROUP_ONLY = 0x27E3, + SMSG_RAF_EMAIL_ENABLED_RESPONSE = 0x27C3, + SMSG_RAID_DIFFICULTY_SET = 0x27E5, + SMSG_RAID_GROUP_ONLY = 0x27E7, SMSG_RAID_INSTANCE_MESSAGE = 0x2BB9, - SMSG_RAID_MARKERS_CHANGED = 0x25B8, + SMSG_RAID_MARKERS_CHANGED = 0x25B7, SMSG_RANDOM_ROLL = 0x264A, - SMSG_RATED_BATTLEFIELD_INFO = 0x25A5, + SMSG_RATED_BATTLEFIELD_INFO = 0x25A4, SMSG_READY_CHECK_COMPLETED = 0x260D, SMSG_READY_CHECK_RESPONSE = 0x260C, SMSG_READY_CHECK_STARTED = 0x260B, - SMSG_READ_ITEM_RESULT_FAILED = 0x27DD, - SMSG_READ_ITEM_RESULT_OK = 0x27D9, - SMSG_REALM_QUERY_RESPONSE = 0x26E4, - SMSG_REALM_SPLIT = 0x26E1, - SMSG_RECRUIT_A_FRIEND_RESPONSE = 0x27C1, + SMSG_READ_ITEM_RESULT_FAILED = 0x27E1, + SMSG_READ_ITEM_RESULT_OK = 0x27DC, + SMSG_REALM_QUERY_RESPONSE = 0x26E3, + SMSG_RECRUIT_A_FRIEND_RESPONSE = 0x27C4, SMSG_REFER_A_FRIEND_EXPIRED = 0x275E, - SMSG_REFER_A_FRIEND_FAILURE = 0x26EA, + SMSG_REFER_A_FRIEND_FAILURE = 0x26E9, SMSG_REFRESH_COMPONENT = 0x2675, SMSG_REFRESH_SPELL_HISTORY = 0x2C2B, - SMSG_REMOVE_ITEM_PASSIVE = 0x25BF, + SMSG_REMOVE_ITEM_PASSIVE = 0x25BE, SMSG_REMOVE_LOSS_OF_CONTROL = 0x2694, - SMSG_REPLACE_TROPHY_RESPONSE = 0x27F5, + SMSG_REPLACE_TROPHY_RESPONSE = 0x27F9, SMSG_REPORT_PVP_PLAYER_AFK_RESULT = 0x26D7, SMSG_REQUEST_ADDON_LIST = 0x265C, - SMSG_REQUEST_CEMETERY_LIST_RESPONSE = 0x259E, - SMSG_REQUEST_PVP_REWARDS_RESPONSE = 0x25D4, - SMSG_RESEARCH_COMPLETE = 0x2586, + SMSG_REQUEST_CEMETERY_LIST_RESPONSE = 0x259D, + SMSG_REQUEST_PVP_REWARDS_RESPONSE = 0x25D2, + SMSG_RESEARCH_COMPLETE = 0x2585, SMSG_RESET_AREA_TRIGGER = 0x263E, SMSG_RESET_COMPRESSION_CONTEXT = 0x304E, SMSG_RESET_FAILED_NOTIFY = 0x26DF, - SMSG_RESET_RANGED_COMBAT_TIMER = 0x2711, - SMSG_RESET_WEEKLY_CURRENCY = 0x2575, + SMSG_RESET_RANGED_COMBAT_TIMER = 0x2710, + SMSG_RESET_WEEKLY_CURRENCY = 0x2574, SMSG_RESPEC_WIPE_CONFIRM = 0x2624, - SMSG_RESPOND_INSPECT_ACHIEVEMENTS = 0x2572, + SMSG_RESPOND_INSPECT_ACHIEVEMENTS = 0x2571, SMSG_RESUME_CAST_BAR = 0x2C3D, SMSG_RESUME_COMMS = 0x304A, - SMSG_RESUME_TOKEN = 0x25BD, - SMSG_RESURRECT_REQUEST = 0x257F, - SMSG_RESYNC_RUNES = 0x273B, - SMSG_ROLE_CHANGED_INFORM = 0x258D, - SMSG_ROLE_CHOSEN = 0x2A39, - SMSG_ROLE_POLL_INFORM = 0x258E, - SMSG_RUNE_REGEN_DEBUG = 0x25C7, - SMSG_SCENARIO_BOOT = 0x27DE, - SMSG_SCENARIO_COMPLETED = 0x2818, + SMSG_RESUME_TOKEN = 0x25BC, + SMSG_RESURRECT_REQUEST = 0x257E, + SMSG_RESYNC_RUNES = 0x273A, + SMSG_ROLE_CHANGED_INFORM = 0x258C, + SMSG_ROLE_CHOSEN = 0x2A3A, + SMSG_ROLE_POLL_INFORM = 0x258D, + SMSG_RUNE_REGEN_DEBUG = 0x25C5, + SMSG_SCENARIO_BOOT = 0x27E2, + SMSG_SCENARIO_COMPLETED = 0x281C, SMSG_SCENARIO_POIS = 0x264C, SMSG_SCENARIO_PROGRESS_UPDATE = 0x2646, - SMSG_SCENARIO_SPELL_UPDATE = 0x2823, + SMSG_SCENARIO_SPELL_UPDATE = 0x2828, SMSG_SCENARIO_STATE = 0x2645, - SMSG_SCENE_OBJECT_EVENT = 0x25F7, - SMSG_SCENE_OBJECT_PET_BATTLE_FINAL_ROUND = 0x25FC, - SMSG_SCENE_OBJECT_PET_BATTLE_FINISHED = 0x25FD, - SMSG_SCENE_OBJECT_PET_BATTLE_FIRST_ROUND = 0x25F9, - SMSG_SCENE_OBJECT_PET_BATTLE_INITIAL_UPDATE = 0x25F8, - SMSG_SCENE_OBJECT_PET_BATTLE_REPLACEMENTS_MADE = 0x25FB, - SMSG_SCENE_OBJECT_PET_BATTLE_ROUND_RESULT = 0x25FA, + SMSG_SCENE_OBJECT_EVENT = 0x25F6, + SMSG_SCENE_OBJECT_PET_BATTLE_FINAL_ROUND = 0x25FB, + SMSG_SCENE_OBJECT_PET_BATTLE_FINISHED = 0x25FC, + SMSG_SCENE_OBJECT_PET_BATTLE_FIRST_ROUND = 0x25F8, + SMSG_SCENE_OBJECT_PET_BATTLE_INITIAL_UPDATE = 0x25F7, + SMSG_SCENE_OBJECT_PET_BATTLE_REPLACEMENTS_MADE = 0x25FA, + SMSG_SCENE_OBJECT_PET_BATTLE_ROUND_RESULT = 0x25F9, SMSG_SCRIPT_CAST = 0x2C53, - SMSG_SELL_RESPONSE = 0x26EE, - SMSG_SEND_ITEM_PASSIVES = 0x25C0, + SMSG_SELL_RESPONSE = 0x26ED, + SMSG_SEND_ITEM_PASSIVES = 0x25BF, SMSG_SEND_KNOWN_SPELLS = 0x2C29, SMSG_SEND_RAID_TARGET_UPDATE_ALL = 0x2648, SMSG_SEND_RAID_TARGET_UPDATE_SINGLE = 0x2649, @@ -1495,45 +1512,46 @@ enum OpcodeServer : uint32 SMSG_SERVER_FIRST_ACHIEVEMENT = 0x2BC1, SMSG_SERVER_FIRST_ACHIEVEMENTS = 0x2667, SMSG_SERVER_TIME = 0x26A8, - SMSG_SETUP_CURRENCY = 0x2573, - SMSG_SETUP_RESEARCH_HISTORY = 0x2585, - SMSG_SET_ACTIVE_SPEC_ID = 0x263F, - SMSG_SET_AI_ANIM_KIT = 0x276D, - SMSG_SET_ALL_TASK_PROGRESS = 0x27C9, - SMSG_SET_ANIM_TIER = 0x2771, - SMSG_SET_CURRENCY = 0x2574, - SMSG_SET_DF_FAST_LAUNCH_RESULT = 0x2A2D, + SMSG_SETUP_CURRENCY = 0x2572, + SMSG_SETUP_RESEARCH_HISTORY = 0x2584, + SMSG_SET_AI_ANIM_KIT = 0x276E, + SMSG_SET_ALL_TASK_PROGRESS = 0x27CC, + SMSG_SET_ANIM_TIER = 0x2772, + SMSG_SET_CURRENCY = 0x2573, + SMSG_SET_DF_FAST_LAUNCH_RESULT = 0x2A2E, SMSG_SET_DUNGEON_DIFFICULTY = 0x26CB, - SMSG_SET_FACTION_AT_WAR = 0x273A, - SMSG_SET_FACTION_NOT_VISIBLE = 0x2768, - SMSG_SET_FACTION_STANDING = 0x2769, - SMSG_SET_FACTION_VISIBLE = 0x2767, + SMSG_SET_FACTION_AT_WAR = 0x2739, + SMSG_SET_FACTION_NOT_VISIBLE = 0x2769, + SMSG_SET_FACTION_STANDING = 0x276A, + SMSG_SET_FACTION_VISIBLE = 0x2768, SMSG_SET_FLAT_SPELL_MODIFIER = 0x2C36, SMSG_SET_FORCED_REACTIONS = 0x2758, - SMSG_SET_ITEM_PURCHASE_DATA = 0x25AF, - SMSG_SET_LOOT_METHOD_FAILED = 0x2804, - SMSG_SET_MAX_WEEKLY_QUANTITY = 0x25B6, - SMSG_SET_MELEE_ANIM_KIT = 0x2770, - SMSG_SET_MOVEMENT_ANIM_KIT = 0x276F, + SMSG_SET_ITEM_PURCHASE_DATA = 0x25AE, + SMSG_SET_LOOT_METHOD_FAILED = 0x2808, + SMSG_SET_MAX_WEEKLY_QUANTITY = 0x25B5, + SMSG_SET_MELEE_ANIM_KIT = 0x2771, + SMSG_SET_MOVEMENT_ANIM_KIT = 0x2770, SMSG_SET_PCT_SPELL_MODIFIER = 0x2C37, - SMSG_SET_PET_SPECIALIZATION = 0x25EA, - SMSG_SET_PLAYER_DECLINED_NAMES_RESULT = 0x2705, - SMSG_SET_PLAY_HOVER_ANIM = 0x25CB, - SMSG_SET_PROFICIENCY = 0x2772, + SMSG_SET_PET_SPECIALIZATION = 0x263F, + SMSG_SET_PLAYER_DECLINED_NAMES_RESULT = 0x2704, + SMSG_SET_PLAY_HOVER_ANIM = 0x25C9, + SMSG_SET_PROFICIENCY = 0x2773, SMSG_SET_SPELL_CHARGES = 0x2C28, - SMSG_SET_TASK_COMPLETE = 0x27CA, + SMSG_SET_TASK_COMPLETE = 0x27CD, SMSG_SET_TIME_ZONE_INFORMATION = 0x269C, - SMSG_SET_VEHICLE_REC_ID = 0x272D, - SMSG_SHOW_ADVENTURE_MAP = 0x2821, + SMSG_SET_VEHICLE_REC_ID = 0x272C, + SMSG_SHOW_ADVENTURE_MAP = 0x2826, SMSG_SHOW_BANK = 0x26A5, - SMSG_SHOW_MAILBOX = 0x27DF, - SMSG_SHOW_NEUTRAL_PLAYER_FACTION_SELECT_UI = 0x25F0, - SMSG_SHOW_TAXI_NODES = 0x26F5, - SMSG_SHOW_TRADE_SKILL_RESPONSE = 0x27AD, + SMSG_SHOW_MAILBOX = 0x27E3, + SMSG_SHOW_NEUTRAL_PLAYER_FACTION_SELECT_UI = 0x25EF, + SMSG_SHOW_TAXI_NODES = 0x26F4, + SMSG_SHOW_TRADE_SKILL_RESPONSE = 0x27B0, SMSG_SOCKET_GEMS = 0x2765, - SMSG_SOR_START_EXPERIENCE_INCOMPLETE = 0x25F2, + SMSG_SOCKET_GEMS_FAILURE = 0x2766, + SMSG_SOR_START_EXPERIENCE_INCOMPLETE = 0x25F1, + SMSG_SPECIALIZATION_CHANGED = 0x25E9, SMSG_SPECIAL_MOUNT_ANIM = 0x26C5, - SMSG_SPEC_INVOLUNTARILY_CHANGED = 0x2754, + SMSG_SPEC_INVOLUNTARILY_CHANGED = 0x2753, SMSG_SPELL_ABSORB_LOG = 0x2C1E, SMSG_SPELL_CHANNEL_START = 0x2C34, SMSG_SPELL_CHANNEL_UPDATE = 0x2C35, @@ -1555,103 +1573,106 @@ enum OpcodeServer : uint32 SMSG_SPELL_PERIODIC_AURA_LOG = 0x2C1B, SMSG_SPELL_START = 0x2C3A, SMSG_SPELL_UPDATE_CHAIN_TARGETS = 0x2C33, - SMSG_SPIRIT_HEALER_CONFIRM = 0x2751, + SMSG_SPIRIT_HEALER_CONFIRM = 0x2750, SMSG_STAND_STATE_UPDATE = 0x2757, SMSG_START_ELAPSED_TIMER = 0x2619, SMSG_START_ELAPSED_TIMERS = 0x261B, SMSG_START_LOOT_ROLL = 0x262F, - SMSG_START_MIRROR_TIMER = 0x274B, - SMSG_START_TIMER = 0x25BA, + SMSG_START_MIRROR_TIMER = 0x274A, + SMSG_START_TIMER = 0x25B9, SMSG_STOP_ELAPSED_TIMER = 0x261A, - SMSG_STOP_MIRROR_TIMER = 0x274D, - SMSG_STOP_SPEAKERBOT_SOUND = 0x27A9, - SMSG_STREAMING_MOVIES = 0x25B9, + SMSG_STOP_MIRROR_TIMER = 0x274C, + SMSG_STOP_SPEAKERBOT_SOUND = 0x27AC, + SMSG_STREAMING_MOVIES = 0x25B8, SMSG_SUMMON_CANCEL = 0x26D6, - SMSG_SUMMON_RAID_MEMBER_VALIDATE_FAILED = 0x258F, + SMSG_SUMMON_RAID_MEMBER_VALIDATE_FAILED = 0x258E, SMSG_SUMMON_REQUEST = 0x275C, SMSG_SUPERCEDED_SPELLS = 0x2C4B, - SMSG_SUPPRESS_NPC_GREETINGS = 0x25CE, + SMSG_SUPPRESS_NPC_GREETINGS = 0x25CC, SMSG_SUSPEND_COMMS = 0x3049, - SMSG_SUSPEND_TOKEN = 0x25BC, - SMSG_TALENTS_INVOLUNTARILY_RESET = 0x2753, + SMSG_SUSPEND_TOKEN = 0x25BB, + SMSG_TALENTS_INVOLUNTARILY_RESET = 0x2752, SMSG_TAXI_NODE_STATUS = 0x26A2, SMSG_TEXT_EMOTE = 0x26A0, - SMSG_THREAT_CLEAR = 0x270D, - SMSG_THREAT_REMOVE = 0x270C, - SMSG_THREAT_UPDATE = 0x270B, + SMSG_THREAT_CLEAR = 0x270C, + SMSG_THREAT_REMOVE = 0x270B, + SMSG_THREAT_UPDATE = 0x270A, SMSG_TIME_ADJUSTMENT = 0x2DA1, SMSG_TIME_SYNC_REQUEST = 0x2DA0, - SMSG_TITLE_EARNED = 0x2708, - SMSG_TITLE_LOST = 0x2709, - SMSG_TOTEM_CREATED = 0x26F1, - SMSG_TOTEM_MOVED = 0x26F2, - SMSG_TRADE_STATUS = 0x2582, - SMSG_TRADE_UPDATED = 0x2581, - SMSG_TRAINER_BUY_FAILED = 0x2713, - SMSG_TRAINER_LIST = 0x2712, - SMSG_TRANSFER_ABORTED = 0x273E, - SMSG_TRANSFER_PENDING = 0x25E3, - SMSG_TRIGGER_CINEMATIC = 0x27FC, - SMSG_TRIGGER_MOVIE = 0x26F3, - SMSG_TURN_IN_PETITION_RESULT = 0x278D, - SMSG_TUTORIAL_FLAGS = 0x27F0, + SMSG_TITLE_EARNED = 0x2707, + SMSG_TITLE_LOST = 0x2708, + SMSG_TOTEM_CREATED = 0x26F0, + SMSG_TOTEM_MOVED = 0x26F1, + SMSG_TRADE_STATUS = 0x2581, + SMSG_TRADE_UPDATED = 0x2580, + SMSG_TRAINER_BUY_FAILED = 0x2712, + SMSG_TRAINER_LIST = 0x2711, + SMSG_TRANSFER_ABORTED = 0x273D, + SMSG_TRANSFER_PENDING = 0x25E2, + SMSG_TRANSMOG_COLLECTION_UPDATE = 0x25C4, + SMSG_TRIGGER_CINEMATIC = 0x2800, + SMSG_TRIGGER_MOVIE = 0x26F2, + SMSG_TURN_IN_PETITION_RESULT = 0x278E, + SMSG_TUTORIAL_FLAGS = 0x27F4, + SMSG_TUTORIAL_HIGHLIGHT_SPELL = 0x282E, + SMSG_TUTORIAL_UNHIGHLIGHT_SPELL = 0x282D, SMSG_TWITTER_STATUS = 0x2FFD, - SMSG_UI_TIME = 0x2750, - SMSG_UNDELETE_CHARACTER_RESPONSE = 0x27FF, - SMSG_UNDELETE_COOLDOWN_STATUS_RESPONSE = 0x2800, + SMSG_UI_TIME = 0x274F, + SMSG_UNDELETE_CHARACTER_RESPONSE = 0x2803, + SMSG_UNDELETE_COOLDOWN_STATUS_RESPONSE = 0x2804, SMSG_UNLEARNED_SPELLS = 0x2C4D, - SMSG_UPDATE_ACCOUNT_DATA = 0x2745, - SMSG_UPDATE_ACTION_BUTTONS = 0x25F5, - SMSG_UPDATE_CHARACTER_FLAGS = 0x27F4, - SMSG_UPDATE_DUNGEON_ENCOUNTER_FOR_LOOT = 0x2A30, + SMSG_UPDATE_ACCOUNT_DATA = 0x2744, + SMSG_UPDATE_ACTION_BUTTONS = 0x25F4, + SMSG_UPDATE_CHARACTER_FLAGS = 0x27F8, + SMSG_UPDATE_DUNGEON_ENCOUNTER_FOR_LOOT = 0x2A31, SMSG_UPDATE_EXPANSION_LEVEL = 0x2660, SMSG_UPDATE_INSTANCE_OWNERSHIP = 0x26CE, SMSG_UPDATE_LAST_INSTANCE = 0x26AE, - SMSG_UPDATE_OBJECT = 0x27FD, - SMSG_UPDATE_TALENT_DATA = 0x25E9, - SMSG_UPDATE_TASK_PROGRESS = 0x27C8, + SMSG_UPDATE_OBJECT = 0x2801, + SMSG_UPDATE_TALENT_DATA = 0x25E8, + SMSG_UPDATE_TASK_PROGRESS = 0x27CB, SMSG_UPDATE_WEEKLY_SPELL_USAGE = 0x2C19, - SMSG_UPDATE_WORLD_STATE = 0x2788, + SMSG_UPDATE_WORLD_STATE = 0x2789, SMSG_USERLIST_ADD = 0x2BBE, SMSG_USERLIST_REMOVE = 0x2BBF, SMSG_USERLIST_UPDATE = 0x2BC0, - SMSG_USE_EQUIPMENT_SET_RESULT = 0x278E, - SMSG_VENDOR_INVENTORY = 0x25C9, - SMSG_VIGNETTE_UPDATE = 0x27AB, + SMSG_USE_EQUIPMENT_SET_RESULT = 0x278F, + SMSG_VENDOR_INVENTORY = 0x25C7, + SMSG_VIGNETTE_UPDATE = 0x27AE, SMSG_VOICE_CHAT_STATUS = 0x2BB3, SMSG_VOICE_PARENTAL_CONTROLS = 0x2BB4, SMSG_VOICE_SESSION_LEAVE = 0x2BB6, SMSG_VOICE_SESSION_ROSTER_UPDATE = 0x2BB5, - SMSG_VOID_ITEM_SWAP_RESPONSE = 0x25DE, - SMSG_VOID_STORAGE_CONTENTS = 0x25DB, - SMSG_VOID_STORAGE_FAILED = 0x25DA, - SMSG_VOID_STORAGE_TRANSFER_CHANGES = 0x25DC, - SMSG_VOID_TRANSFER_RESULT = 0x25DD, - SMSG_WAIT_QUEUE_FINISH = 0x256F, - SMSG_WAIT_QUEUE_UPDATE = 0x256E, - SMSG_WARDEN_DATA = 0x2577, - SMSG_WARGAME_REQUEST_SUCCESSFULLY_SENT_TO_OPPONENT = 0x25B3, + SMSG_VOID_ITEM_SWAP_RESPONSE = 0x25DC, + SMSG_VOID_STORAGE_CONTENTS = 0x25D9, + SMSG_VOID_STORAGE_FAILED = 0x25D8, + SMSG_VOID_STORAGE_TRANSFER_CHANGES = 0x25DA, + SMSG_VOID_TRANSFER_RESULT = 0x25DB, + SMSG_WAIT_QUEUE_FINISH = 0x256E, + SMSG_WAIT_QUEUE_UPDATE = 0x256D, + SMSG_WARDEN_DATA = 0x2576, + SMSG_WARGAME_REQUEST_SUCCESSFULLY_SENT_TO_OPPONENT = 0x25B2, SMSG_WEATHER = 0x26CD, SMSG_WEEKLY_SPELL_USAGE = 0x2C18, SMSG_WHO = 0x2BAE, SMSG_WHO_IS = 0x26CC, - SMSG_WORLD_SERVER_INFO = 0x25C1, - SMSG_WORLD_TEXT = 0x281A, - SMSG_WOW_TOKEN_AUCTION_SOLD = 0x280A, - SMSG_WOW_TOKEN_BUY_REQUEST_CONFIRMATION = 0x280C, - SMSG_WOW_TOKEN_BUY_RESULT_CONFIRMATION = 0x280D, - SMSG_WOW_TOKEN_CAN_VETERAN_BUY_RESULT = 0x280B, - SMSG_WOW_TOKEN_DISTRIBUTION_GLUE_UPDATE = 0x2805, - SMSG_WOW_TOKEN_DISTRIBUTION_UPDATE = 0x2806, - SMSG_WOW_TOKEN_MARKET_PRICE_RESPONSE = 0x2807, - SMSG_WOW_TOKEN_REDEEM_GAME_TIME_UPDATED = 0x280E, - SMSG_WOW_TOKEN_REDEEM_REQUEST_CONFIRMATION = 0x280F, - SMSG_WOW_TOKEN_REDEEM_RESULT = 0x2810, - SMSG_WOW_TOKEN_SELL_REQUEST_CONFIRMATION = 0x2808, - SMSG_WOW_TOKEN_SELL_RESULT_CONFIRMATION = 0x2809, - SMSG_WOW_TOKEN_UPDATE_AUCTIONABLE_LIST_RESPONSE = 0x2811, - SMSG_XP_GAIN_ABORTED = 0x25DF, - SMSG_XP_GAIN_ENABLED = 0x27E2, + SMSG_WORLD_SERVER_INFO = 0x25C0, + SMSG_WORLD_TEXT = 0x281E, + SMSG_WOW_TOKEN_AUCTION_SOLD = 0x280E, + SMSG_WOW_TOKEN_BUY_REQUEST_CONFIRMATION = 0x2810, + SMSG_WOW_TOKEN_BUY_RESULT_CONFIRMATION = 0x2811, + SMSG_WOW_TOKEN_CAN_VETERAN_BUY_RESULT = 0x280F, + SMSG_WOW_TOKEN_DISTRIBUTION_GLUE_UPDATE = 0x2809, + SMSG_WOW_TOKEN_DISTRIBUTION_UPDATE = 0x280A, + SMSG_WOW_TOKEN_MARKET_PRICE_RESPONSE = 0x280B, + SMSG_WOW_TOKEN_REDEEM_GAME_TIME_UPDATED = 0x2812, + SMSG_WOW_TOKEN_REDEEM_REQUEST_CONFIRMATION = 0x2813, + SMSG_WOW_TOKEN_REDEEM_RESULT = 0x2814, + SMSG_WOW_TOKEN_SELL_REQUEST_CONFIRMATION = 0x280C, + SMSG_WOW_TOKEN_SELL_RESULT_CONFIRMATION = 0x280D, + SMSG_WOW_TOKEN_UPDATE_AUCTIONABLE_LIST_RESPONSE = 0x2815, + SMSG_XP_GAIN_ABORTED = 0x25DD, + SMSG_XP_GAIN_ENABLED = 0x27E6, SMSG_ZONE_UNDER_ATTACK = 0x2BBA, SMSG_ZZZ_GLYPH_RELATED_LEGION = 0x2C51, @@ -1661,6 +1682,7 @@ enum OpcodeServer : uint32 SMSG_MULTIPLE_PACKETS = 0x3050, // Deleted opcodes, here only to allow compile + SMSG_ADDON_INFO = 0xBADD, SMSG_ARENA_TEAM_STATS = 0xBADD, SMSG_BUY_BANK_SLOT_RESULT = 0xBADD, SMSG_BF_MGR_EJECTED = 0xBADD, diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 3d661e1a8ff..5becf594568 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -201,8 +201,6 @@ namespace WorldPackets class LoadingScreenNotify; class SetActionBarToggles; class RequestPlayedTime; - class ShowingCloak; - class ShowingHelm; class SetTitle; class SetFactionAtWar; class SetFactionNotAtWar; @@ -1162,10 +1160,6 @@ class TC_GAME_API WorldSession void HandleMountSpecialAnimOpcode(WorldPackets::Misc::MountSpecial& mountSpecial); - // character view - void HandleShowingHelmOpcode(WorldPackets::Character::ShowingHelm& packet); - void HandleShowingCloakOpcode(WorldPackets::Character::ShowingCloak& packet); - // repair void HandleRepairItemOpcode(WorldPackets::Item::RepairItem& packet); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 31e0b126be6..d22b6df71e4 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5291,7 +5291,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/) FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry(); FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION)); // Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons) - if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction))) + if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(targetFaction))) gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id); } diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 031ab5bdbdf..ec1c63076aa 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -20,8 +20,8 @@ #include "SpellAuraEffects.h" #include "SpellMgr.h" #include "Spell.h" -#include "DBCStores.h" #include "ConditionMgr.h" +#include "GameTables.h" #include "Player.h" #include "Battleground.h" #include "Vehicle.h" @@ -468,6 +468,9 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster /*= nullptr*/, int32 const* if (!_spellInfo->HasAttribute(SPELL_ATTR11_SCALES_WITH_ITEM_LEVEL) && _spellInfo->HasAttribute(SPELL_ATTR10_USE_SPELL_BASE_LEVEL_FOR_SCALING)) level = _spellInfo->BaseLevel; + if (_spellInfo->Scaling.MinScalingLevel && _spellInfo->Scaling.MinScalingLevel > level) + level = _spellInfo->Scaling.MinScalingLevel; + if (_spellInfo->Scaling.MaxScalingLevel && _spellInfo->Scaling.MaxScalingLevel < level) level = _spellInfo->Scaling.MaxScalingLevel; @@ -481,8 +484,11 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster /*= nullptr*/, int32 const* { if (!_spellInfo->HasAttribute(SPELL_ATTR11_SCALES_WITH_ITEM_LEVEL)) { - if (GtSpellScalingEntry const* gtScaling = sGtSpellScalingStore.EvaluateTable(level - 1, (_spellInfo->Scaling.Class > 0 ? _spellInfo->Scaling.Class : ((MAX_CLASSES - 1 /*last class*/) - _spellInfo->Scaling.Class)) - 1)) - value = gtScaling->value; + GtSpellScalingEntry const* gtScaling = sSpellScalingGameTable.GetRow(level); + if (_spellInfo->Scaling.Class > 0) + value = GetGameTableColumnForClass(gtScaling, _spellInfo->Scaling.Class); + else + value = gtScaling->Item; } else value = GetRandomPropertyPoints(itemLevel != -1 ? uint32(itemLevel) : 1u, ITEM_QUALITY_RARE, INVTYPE_CHEST, 0); @@ -600,10 +606,10 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster /*= nullptr*/, int32 const* if (canEffectScale) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.EvaluateTable(_spellInfo->SpellLevel - 1, 0); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.EvaluateTable(caster->getLevel() - 1, 0); + GtNpcManaCostScalerEntry const* spellScaler = sNpcManaCostScalerGameTable.GetRow(_spellInfo->SpellLevel); + GtNpcManaCostScalerEntry const* casterScaler = sNpcManaCostScalerGameTable.GetRow(caster->getLevel()); if (spellScaler && casterScaler) - value *= casterScaler->ratio / spellScaler->ratio; + value *= casterScaler->Scaler / spellScaler->Scaler; } } } @@ -1729,7 +1735,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a // continent limitation (virtual continent) if (AttributesEx4 & SPELL_ATTR4_CAST_ONLY_IN_OUTLAND) { - uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id); + uint32 v_map = sDB2Manager.GetVirtualMapForMapAndZone(map_id, zone_id); MapEntry const* mapEntry = sMapStore.LookupEntry(v_map); if (!mapEntry || mapEntry->ExpansionID < 1 || !mapEntry->IsContinent()) return SPELL_FAILED_INCORRECT_AREA; @@ -2676,10 +2682,10 @@ std::vector SpellInfo::CalcPowerCost(Unit const* caster, Sp { if (Attributes & SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.EvaluateTable(SpellLevel - 1, 0); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.EvaluateTable(caster->getLevel() - 1, 0); + GtNpcManaCostScalerEntry const* spellScaler = sNpcManaCostScalerGameTable.GetRow(SpellLevel); + GtNpcManaCostScalerEntry const* casterScaler = sNpcManaCostScalerGameTable.GetRow(caster->getLevel()); if (spellScaler && casterScaler) - powerCost *= casterScaler->ratio / spellScaler->ratio; + powerCost *= casterScaler->Scaler / spellScaler->Scaler; } } diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 764760ddffa..a5d620571a3 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -20,8 +20,6 @@ #include "SharedDefines.h" #include "Util.h" -#include "DBCStructure.h" -#include "DB2Structure.h" #include "Object.h" #include "SpellAuraDefines.h" @@ -409,6 +407,7 @@ public: struct ScalingInfo { int32 Class; + uint32 MinScalingLevel; uint32 MaxScalingLevel; uint32 ScalesFromItemLevel; } Scaling; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ebf82122e00..a7ad0e55d5b 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -21,7 +21,6 @@ #include "ObjectMgr.h" #include "SpellAuraDefines.h" #include "SharedDefines.h" -#include "DBCStores.h" #include "Chat.h" #include "BattlegroundMgr.h" #include "BattlefieldWG.h" diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index e9488d8ecbb..4d15043a220 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -22,7 +22,6 @@ // For static or at-server-startup loaded spell data #include "Define.h" -#include "DBCStructure.h" #include "SharedDefines.h" #include "Util.h" diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 255900b5414..04614d65ded 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -23,7 +23,6 @@ #include "Database/DatabaseEnv.h" #include "SpellMgr.h" #include "SpellInfo.h" -#include "DBCStores.h" void CharacterDatabaseCleaner::CleanDatabase() { diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 61e1755b4e4..28dabaefeb6 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -41,6 +41,7 @@ #include "DatabaseEnv.h" #include "DisableMgr.h" #include "GameEventMgr.h" +#include "GameTables.h" #include "GarrisonMgr.h" #include "GridNotifiersImpl.h" #include "GroupMgr.h" @@ -1468,7 +1469,7 @@ void World::SetInitialWorldSettings() ///- Initialize VMapManager function pointers (to untangle game/collision circular deps) if (VMAP::VMapManager2* vmmgr2 = dynamic_cast(VMAP::VMapFactory::createOrGetVMapManager())) { - vmmgr2->GetLiquidFlagsPtr = &GetLiquidFlags; + vmmgr2->GetLiquidFlagsPtr = &DB2Manager::GetLiquidFlags; vmmgr2->IsVMAPDisabledForPtr = &DisableMgr::IsVMAPDisabledFor; } @@ -1518,8 +1519,6 @@ void World::SetInitialWorldSettings() LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realm.Id.Realm); // One-time query TC_LOG_INFO("server.loading", "Initialize data stores..."); - ///- Load DBCs - LoadDBCStores(m_dataPath, m_defaultDbcLocale); ///- Load DB2s sDB2Manager.LoadStores(m_dataPath, m_defaultDbcLocale); TC_LOG_INFO("misc", "Loading hotfix info..."); @@ -1527,7 +1526,7 @@ void World::SetInitialWorldSettings() ///- Close hotfix database - it is only used during DB2 loading HotfixDatabase.Close(); ///- Load GameTables - LoadGameTables(m_dataPath, m_defaultDbcLocale); + LoadGameTables(m_dataPath); //Load weighted graph on taxi nodes path sTaxiPathGraph.Initialize(); diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index f9aca4b607b..b482716e059 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -559,7 +559,7 @@ public: { FactionState const& faction = itr->second; FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID); - char const* factionName = factionEntry ? factionEntry->Name_lang : "#Not found#"; + char const* factionName = factionEntry ? factionEntry->Name->Str[loc] : "#Not found#"; ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]); std::ostringstream ss; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 59eb97d1476..245aa60b846 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1540,11 +1540,11 @@ public: if (difficulty == -1) for (uint8 diff = 0; diff < MAX_DIFFICULTY; ++diff) { - if (GetMapDifficultyData(mEntry->ID, Difficulty(diff))) - sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(diff)); + if (sDB2Manager.GetMapDifficultyData(map, Difficulty(diff))) + sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(diff)); } else - sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(difficulty)); + sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(difficulty)); return true; } }; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index dd048ce3c57..05b6a5c9713 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -509,7 +509,7 @@ public: return false; } - Zone2MapCoordinates(x, y, areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId); + sDB2Manager.Zone2MapCoordinates(areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId, x, y); if (!MapManager::IsValidMapCoord(zoneEntry->MapID, x, y)) { diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 2b3752c00be..01844aa937e 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -309,58 +309,77 @@ public: for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id) { - if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(id)) + FactionEntry const* factionEntry = sFactionStore.LookupEntry(id); + if (factionEntry) { FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL; - std::string name = factionEntry->Name_lang; + int locale = handler->GetSessionDbcLocale(); + std::string name = factionEntry->Name->Str[locale]; if (name.empty()) continue; if (!Utf8FitTo(name, wNamePart)) - continue; - - if (maxResults && count++ == maxResults) { - handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); - return true; - } + locale = 0; + for (; locale < TOTAL_LOCALES; ++locale) + { + if (locale == handler->GetSessionDbcLocale()) + continue; - // send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format - // or "id - [faction] [no reputation]" format - std::ostringstream ss; - if (handler->GetSession()) - ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << "]|h|r"; - else - ss << id << " - " << name; + name = factionEntry->Name->Str[locale]; + if (name.empty()) + continue; - if (factionState) // and then target != NULL also - { - uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry); - std::string rankName = handler->GetTrinityString(index); - - ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')'; - - if (factionState->Flags & FACTION_FLAG_VISIBLE) - ss << handler->GetTrinityString(LANG_FACTION_VISIBLE); - if (factionState->Flags & FACTION_FLAG_AT_WAR) - ss << handler->GetTrinityString(LANG_FACTION_ATWAR); - if (factionState->Flags & FACTION_FLAG_PEACE_FORCED) - ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED); - if (factionState->Flags & FACTION_FLAG_HIDDEN) - ss << handler->GetTrinityString(LANG_FACTION_HIDDEN); - if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED) - ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED); - if (factionState->Flags & FACTION_FLAG_INACTIVE) - ss << handler->GetTrinityString(LANG_FACTION_INACTIVE); + if (Utf8FitTo(name, wNamePart)) + break; + } } - else - ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION); - handler->SendSysMessage(ss.str().c_str()); + if (locale < TOTAL_LOCALES) + { + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } - if (!found) - found = true; + // send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format + // or "id - [faction] [no reputation]" format + std::ostringstream ss; + if (handler->GetSession()) + ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << ' ' << localeNames[locale] << "]|h|r"; + else + ss << id << " - " << name << ' ' << localeNames[locale]; + + if (factionState) // and then target != NULL also + { + uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry); + std::string rankName = handler->GetTrinityString(index); + + ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')'; + + if (factionState->Flags & FACTION_FLAG_VISIBLE) + ss << handler->GetTrinityString(LANG_FACTION_VISIBLE); + if (factionState->Flags & FACTION_FLAG_AT_WAR) + ss << handler->GetTrinityString(LANG_FACTION_ATWAR); + if (factionState->Flags & FACTION_FLAG_PEACE_FORCED) + ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED); + if (factionState->Flags & FACTION_FLAG_HIDDEN) + ss << handler->GetTrinityString(LANG_FACTION_HIDDEN); + if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED) + ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED); + if (factionState->Flags & FACTION_FLAG_INACTIVE) + ss << handler->GetTrinityString(LANG_FACTION_INACTIVE); + } + else + ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION); + + handler->SendSysMessage(ss.str().c_str()); + + if (!found) + found = true; + } } } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index d66a6d24cc2..236197b84c9 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -207,7 +207,7 @@ public: float zoneX = object->GetPositionX(); float zoneY = object->GetPositionY(); - Map2ZoneCoordinates(zoneX, zoneY, zoneId); + sDB2Manager.Map2ZoneCoordinates(zoneId, zoneX, zoneY); Map const* map = object->GetMap(); float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT); @@ -1168,10 +1168,10 @@ public: if (itemNameStr && itemNameStr[0]) { std::string itemName = itemNameStr+1; - auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](std::pair kv) + auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* sparse) { for (uint32 i = 0; i < MAX_LOCALES; ++i) - if (itemName == kv.second->Name->Str[i]) + if (itemName == sparse->Name->Str[i]) return true; return false; }); @@ -1183,7 +1183,7 @@ public: return false; } - itemId = itr->first; + itemId = itr->ID; } else return false; @@ -1795,7 +1795,7 @@ public: // Output XI. LANG_PINFO_CHR_RACE raceStr = DB2Manager::GetChrRaceName(raceid, locale); - classStr = GetClassName(classid, locale); + classStr = DB2Manager::GetClassName(classid, locale); handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetTrinityString(LANG_CHARACTER_GENDER_MALE) : handler->GetTrinityString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str()); // Output XII. LANG_PINFO_CHR_ALIVE diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 47f1212f80a..435c3c74231 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1008,14 +1008,14 @@ public: if (factionEntry->ReputationIndex < 0) { - handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name_lang, factionId); + handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name->Str[handler->GetSessionDbcLocale()], factionId); handler->SetSentErrorMessage(true); return false; } target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false); target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry)); - handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name_lang, factionId, + handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name->Str[handler->GetSessionDbcLocale()], factionId, handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry)); return true; } diff --git a/src/server/scripts/ScriptPCH.h b/src/server/scripts/ScriptPCH.h index 1cd25309055..cf31742f830 100644 --- a/src/server/scripts/ScriptPCH.h +++ b/src/server/scripts/ScriptPCH.h @@ -19,8 +19,7 @@ #include "CombatAI.h" #include "PassiveAI.h" #include "Chat.h" -#include "DBCStructure.h" -#include "DBCStores.h" +#include "DB2Stores.h" #include "ObjectMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 7dcd3a4fbb9..6619a108009 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -29,7 +29,6 @@ #include "SpellHistory.h" #include "SkillDiscovery.h" #include "Battleground.h" -#include "DBCStores.h" // Generic script for handling item dummy effects which trigger another spell. class spell_item_trigger_spell : public SpellScriptLoader diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index a13d6da8fae..31c20ccece9 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -745,6 +745,8 @@ class spell_mage_living_bomb : public SpellScriptLoader bool Validate(SpellInfo const* spellInfo) override { + if (!spellInfo->GetEffect(EFFECT_1)) + return false; if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->GetEffect(EFFECT_1)->CalcValue()))) return false; return true; diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index 7852043a796..a56001cfe6a 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -107,9 +107,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader if (Player* owner = GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritSpell = 0.0f; - // Crit from Intellect - CritSpell += owner->GetSpellCritFromIntellect(); + float CritSpell = 5.0f; // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -126,9 +124,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader if (Player* owner = GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritMelee = 0.0f; - // Crit from Agility - CritMelee += owner->GetMeleeCritFromAgility(); + float CritMelee = 5.0f; // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -676,9 +672,7 @@ public: if (Player* owner = GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritSpell = 0.0f; - // Crit from Intellect - CritSpell += owner->GetSpellCritFromIntellect(); + float CritSpell = 5.0f; // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -698,9 +692,7 @@ public: if (Player* owner = GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritMelee = 0.0f; - // Crit from Agility - CritMelee += owner->GetMeleeCritFromAgility(); + float CritMelee = 5.0f; // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -1266,9 +1258,7 @@ public: if (GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritSpell = 0.0f; - // Crit from Intellect - // CritSpell += owner->GetSpellCritFromIntellect(); + float CritSpell = 5.0f; // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE // CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE); // Increase crit from SPELL_AURA_MOD_CRIT_PCT @@ -1287,9 +1277,7 @@ public: if (GetCaster()->GetOwner()->ToPlayer()) { // For others recalculate it from: - float CritMelee = 0.0f; - // Crit from Agility - // CritMelee += owner->GetMeleeCritFromAgility(); + float CritMelee = 5.0f; // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT // CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT); // Increase crit from SPELL_AURA_MOD_CRIT_PCT diff --git a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp index 42914b4da17..2d5c11b9d5d 100644 --- a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp +++ b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp @@ -17,7 +17,7 @@ #include "Common.h" #include "DB2SparseStorageLoader.h" -#include "Database/DatabaseEnv.h" +#include "DatabaseEnv.h" #include "Log.h" DB2SparseFileLoader::DB2SparseFileLoader() @@ -201,6 +201,7 @@ uint32 DB2SparseFileLoader::GetFormatRecordSize(const char * format) { case FT_FLOAT: case FT_INT: + case FT_SORT: recordsize += 4; break; case FT_STRING: @@ -247,7 +248,7 @@ static char const* const nullStr = ""; char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& indexTable, uint32 locale, std::vector& stringPool) { typedef char* ptr; - if (strlen(format) != fieldCount) + if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) return NULL; //get struct size and index pos @@ -283,8 +284,8 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& for (std::size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i) ((char const**)stringHoldersPool)[i] = nullStr; - char* stringTable = new char[expandedDataSize - records * (recordsize - stringFields * sizeof(char*))]; - memset(stringTable, 0, expandedDataSize - records * (recordsize - stringFields * sizeof(char*))); + char* stringTable = new char[expandedDataSize - records * ((recordsize - (format[0] == FT_SORT ? 4 : 0)) - stringFields * sizeof(char*))]; + memset(stringTable, 0, expandedDataSize - records * ((recordsize - (format[0] == FT_SORT ? 4 : 0)) - stringFields * sizeof(char*))); stringPool.push_back(stringTable); char* stringPtr = stringTable; @@ -298,7 +299,7 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& indexTable.Insert(y + minIndex, &dataTable[offset]); uint32 fieldOffset = 0; uint32 stringFieldOffset = 0; - for (uint32 x = 0; x < fieldCount; x++) + for (uint32 x = 0; x < (fieldCount + (format[0] == FT_SORT ? 1 : 0)); x++) { switch (format[x]) { @@ -352,6 +353,10 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& offset += sizeof(char*); break; } + case FT_SORT: + *((uint32*)(&dataTable[offset])) = y + minIndex; + offset += 4; + break; } } @@ -363,7 +368,7 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTable, uint32 locale) { - if (strlen(format) != fieldCount) + if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) return nullptr; if (!(localeMask & (1 << locale))) @@ -513,6 +518,7 @@ char* DB2SparseDatabaseLoader::Load(const char* format, HotfixDatabaseStatements break; case FT_IND: case FT_INT: + case FT_SORT: *((int32*)(&dataValue[offset])) = fields[f].GetInt32(); offset += 4; break; @@ -617,6 +623,7 @@ void DB2SparseDatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStat case FT_FLOAT: case FT_IND: case FT_INT: + case FT_SORT: offset += 4; break; case FT_BYTE: diff --git a/src/server/shared/DataStores/DB2StorageLoader.cpp b/src/server/shared/DataStores/DB2StorageLoader.cpp index d101d12a52e..56a8dbbed65 100644 --- a/src/server/shared/DataStores/DB2StorageLoader.cpp +++ b/src/server/shared/DataStores/DB2StorageLoader.cpp @@ -253,8 +253,6 @@ uint32 DB2FileLoader::GetFormatRecordSize(const char * format, int32* index_pos) recordsize += sizeof(char*); break; case FT_SORT: - i = x; - break; case FT_IND: i = x; recordsize += 4; @@ -322,7 +320,6 @@ char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char** } else { - ASSERT(indexField == 0); for (uint32 y = 0; y < recordCount; ++y) { uint32 ind = ((uint32*)idTable)[y]; @@ -353,48 +350,51 @@ char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char** uint32 offset = 0; - if (idTableSize) - { - ASSERT(format[0] == 'd'); - ++format; - } - for (uint32 y = 0; y < recordCount; y++) { + uint32 indexVal; if (indexField >= 0) - indexTable[!idTableSize ? getRecord(y).getUInt(indexField) : ((uint32*)idTable)[y]] = &dataTable[offset]; + indexVal = !idTableSize ? getRecord(y).getUInt(indexField) : ((uint32*)idTable)[y]; else - indexTable[y] = &dataTable[offset]; + indexVal = y; - for (uint32 x = 0; x < fieldCount; x++) + indexTable[indexVal] = &dataTable[offset]; + + uint32 x = 0; + for (char const* fmt = format; *fmt != '\0'; ++fmt) { - switch (format[x]) + switch (*fmt) { case FT_FLOAT: - *((float*)(&dataTable[offset])) = getRecord(y).getFloat(x); + *((float*)(&dataTable[offset])) = getRecord(y).getFloat(x++); offset += 4; break; case FT_IND: case FT_INT: - *((uint32*)(&dataTable[offset])) = getRecord(y).getUInt(x); + *((uint32*)(&dataTable[offset])) = getRecord(y).getUInt(x++); offset += 4; break; case FT_BYTE: - *((uint8*)(&dataTable[offset])) = getRecord(y).getUInt8(x); + *((uint8*)(&dataTable[offset])) = getRecord(y).getUInt8(x++); offset += 1; break; case FT_LONG: - *((uint64*)(&dataTable[offset])) = getRecord(y).getUInt64(x); + *((uint64*)(&dataTable[offset])) = getRecord(y).getUInt64(x++); offset += 8; break; case FT_SHORT: - *((uint16*)(&dataTable[offset])) = getRecord(y).getUInt16(x); + *((uint16*)(&dataTable[offset])) = getRecord(y).getUInt16(x++); offset += 2; break; case FT_STRING: case FT_STRING_NOT_LOCALIZED: *((char**)(&dataTable[offset])) = nullptr; // will be replaces non-empty or "" strings in AutoProduceStrings offset += sizeof(char*); + ++x; + break; + case FT_SORT: + *((uint32*)(&dataTable[offset])) = indexVal; + offset += 4; break; } } @@ -444,21 +444,19 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da uint32 offset = 0; - if (idTableSize) - ++format; - // assign string holders to string field slots for (uint32 y = 0; y < recordCount; y++) { uint32 stringFieldOffset = 0; - for (uint32 x = 0; x < fieldCount; x++) + for (char const* fmt = format; *fmt != '\0'; ++fmt) { - switch (format[x]) + switch (*fmt) { case FT_FLOAT: case FT_IND: case FT_INT: + case FT_SORT: offset += 4; break; case FT_BYTE: @@ -476,7 +474,7 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da // init db2 string field slots by pointers to string holders char const*** slot = (char const***)(&dataTable[offset]); *slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * y + stringFieldOffset]); - if (format[x] == FT_STRING) + if (*fmt == FT_STRING) stringFieldOffset += stringHolderSize; else ++stringFieldOffset; @@ -485,7 +483,7 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da break; } default: - ASSERT(false, "unknown format character %c", format[x]); + ASSERT(false, "unknown format character %c", *fmt); } } } @@ -521,18 +519,17 @@ char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable, uin uint32 offset = 0; - if (idTableSize) - ++format; - for (uint32 y = 0; y < recordCount; y++) { - for (uint32 x = 0; x < fieldCount; x++) + uint32 x = 0; + for (char const* fmt = format; *fmt != '\0'; ++fmt) { - switch (format[x]) + switch (*fmt) { case FT_FLOAT: case FT_IND: case FT_INT: + case FT_SORT: offset += 4; break; case FT_BYTE: @@ -566,6 +563,9 @@ char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable, uin break; } } + + if (*fmt != FT_SORT) + ++x; } } @@ -705,6 +705,10 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa offset += sizeof(char*); break; } + case FT_SORT: + *((int32*)(&dataValue[offset])) = indexValue; + offset += 4; + break; } } @@ -769,6 +773,7 @@ void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements case FT_FLOAT: case FT_IND: case FT_INT: + case FT_SORT: offset += 4; break; case FT_BYTE: diff --git a/src/server/shared/DataStores/DB2Store.h b/src/server/shared/DataStores/DB2Store.h index d1542faa194..e1c05cfbbe7 100644 --- a/src/server/shared/DataStores/DB2Store.h +++ b/src/server/shared/DataStores/DB2Store.h @@ -245,8 +245,8 @@ public: iterator_wrapper(iterator_wrapper const& right) = default; iterator_wrapper(Base const& baseItr) : Base(baseItr) { } - uint32 ID() const { return (*this)->first; } - T const* Data() const { return (*this)->second; } + T const* operator->() const { return Base::operator->()->second; } + T const* operator*() const { return Base::operator*().second; } } iterator; DB2SparseStorage(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp deleted file mode 100644 index ace59bb9ebb..00000000000 --- a/src/server/shared/DataStores/DBCFileLoader.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include -#include -#include - -#include "DBCFileLoader.h" -#include "Errors.h" - -DBCFileLoader::DBCFileLoader() : recordSize(0), recordCount(0), fieldCount(0), stringSize(0), fieldsOffset(NULL), data(NULL), stringTable(NULL) { } - -bool DBCFileLoader::Load(const char* filename, const char* fmt) -{ - uint32 header; - if (data) - { - delete [] data; - data = NULL; - } - - FILE* f = fopen(filename, "rb"); - if (!f) - return false; - - if (fread(&header, 4, 1, f) != 1) // Number of records - { - fclose(f); - return false; - } - - - EndianConvert(header); - - if (header != 0x43424457) //'WDBC' - { - fclose(f); - return false; - } - - if (fread(&recordCount, 4, 1, f) != 1) // Number of records - { - fclose(f); - return false; - } - - EndianConvert(recordCount); - - if (fread(&fieldCount, 4, 1, f) != 1) // Number of fields - { - fclose(f); - return false; - } - - EndianConvert(fieldCount); - - if (fread(&recordSize, 4, 1, f) != 1) // Size of a record - { - fclose(f); - return false; - } - - EndianConvert(recordSize); - - if (fread(&stringSize, 4, 1, f) != 1) // String size - { - fclose(f); - return false; - } - - EndianConvert(stringSize); - - fieldsOffset = new uint32[fieldCount]; - fieldsOffset[0] = 0; - for (uint32 i = 1; i < fieldCount; ++i) - { - fieldsOffset[i] = fieldsOffset[i - 1]; - if (fmt[i - 1] == FT_BYTE || fmt[i - 1] == FT_NA_BYTE) // byte fields - fieldsOffset[i] += sizeof(uint8); - else if (fmt[i - 1] == FT_LONG) - fieldsOffset[i] += sizeof(uint64); - else // 4 byte fields (int32/float/strings) - fieldsOffset[i] += sizeof(uint32); - } - - data = new unsigned char[recordSize * recordCount + stringSize]; - stringTable = data + recordSize*recordCount; - - if (fread(data, recordSize * recordCount + stringSize, 1, f) != 1) - { - fclose(f); - return false; - } - - fclose(f); - - return true; -} - -DBCFileLoader::~DBCFileLoader() -{ - delete[] data; - - delete[] fieldsOffset; -} - -DBCFileLoader::Record DBCFileLoader::getRecord(size_t id) -{ - assert(data); - return Record(*this, data + id * recordSize); -} - -uint32 DBCFileLoader::GetFormatRecordSize(const char* format, int32* index_pos) -{ - uint32 recordsize = 0; - int32 i = -1; - for (uint32 x = 0; format[x]; ++x) - { - switch (format[x]) - { - case FT_FLOAT: - recordsize += sizeof(float); - break; - case FT_INT: - recordsize += sizeof(uint32); - break; - case FT_STRING: - recordsize += sizeof(char*); - break; - case FT_SORT: - i = x; - break; - case FT_IND: - i = x; - recordsize += sizeof(uint32); - break; - case FT_BYTE: - recordsize += sizeof(uint8); - break; - case FT_LONG: - recordsize += sizeof(uint64); - break; - case FT_NA: - case FT_NA_BYTE: - break; - default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); - break; - } - } - - if (index_pos) - *index_pos = i; - - return recordsize; -} - -char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**& indexTable, uint32 sqlRecordCount, uint32 sqlHighestIndex, char*& sqlDataTable) -{ - typedef char* ptr; - if (strlen(format) != fieldCount) - return NULL; - - //get struct size and index pos - int32 i; - uint32 recordsize = GetFormatRecordSize(format, &i); - - if (i >= 0) - { - uint32 maxi = 0; - //find max index - for (uint32 y = 0; y < recordCount; ++y) - { - uint32 ind = getRecord(y).getUInt(i); - if (ind > maxi) - maxi = ind; - } - - // If higher index avalible from sql - use it instead of dbcs - if (sqlHighestIndex > maxi) - maxi = sqlHighestIndex; - - ++maxi; - records = maxi; - indexTable = new ptr[maxi]; - memset(indexTable, 0, maxi * sizeof(ptr)); - } - else - { - records = recordCount + sqlRecordCount; - indexTable = new ptr[recordCount + sqlRecordCount]; - } - - char* dataTable = new char[(recordCount + sqlRecordCount) * recordsize]; - - uint32 offset = 0; - - for (uint32 y = 0; y < recordCount; ++y) - { - if (i >= 0) - indexTable[getRecord(y).getUInt(i)] = &dataTable[offset]; - else - indexTable[y] = &dataTable[offset]; - - for (uint32 x=0; x < fieldCount; ++x) - { - switch (format[x]) - { - case FT_FLOAT: - *((float*)(&dataTable[offset])) = getRecord(y).getFloat(x); - offset += sizeof(float); - break; - case FT_IND: - case FT_INT: - *((uint32*)(&dataTable[offset])) = getRecord(y).getUInt(x); - offset += sizeof(uint32); - break; - case FT_BYTE: - *((uint8*)(&dataTable[offset])) = getRecord(y).getUInt8(x); - offset += sizeof(uint8); - break; - case FT_LONG: - *((uint64*)(&dataTable[offset])) = getRecord(y).getUInt64(x); - offset += sizeof(uint64); - break; - case FT_STRING: - *((char**)(&dataTable[offset])) = NULL; // will replace non-empty or "" strings in AutoProduceStrings - offset += sizeof(char*); - break; - case FT_NA: - case FT_NA_BYTE: - case FT_SORT: - break; - default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); - break; - } - } - } - - sqlDataTable = dataTable + offset; - - return dataTable; -} - -char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable) -{ - if (strlen(format) != fieldCount) - return NULL; - - char* stringPool = new char[stringSize]; - memcpy(stringPool, stringTable, stringSize); - - uint32 offset = 0; - - for (uint32 y = 0; y < recordCount; ++y) - { - for (uint32 x = 0; x < fieldCount; ++x) - { - switch (format[x]) - { - case FT_FLOAT: - offset += sizeof(float); - break; - case FT_IND: - case FT_INT: - offset += sizeof(uint32); - break; - case FT_BYTE: - offset += sizeof(uint8); - break; - case FT_LONG: - offset += sizeof(uint64); - break; - case FT_STRING: - { - // fill only not filled entries - char** slot = (char**)(&dataTable[offset]); - if (!*slot || !**slot) - { - const char * st = getRecord(y).getString(x); - *slot=stringPool+(st-(const char*)stringTable); - } - offset += sizeof(char*); - break; - } - case FT_NA: - case FT_NA_BYTE: - case FT_SORT: - break; - default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); - break; - } - } - } - - return stringPool; -} diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h deleted file mode 100644 index e58031e6ccc..00000000000 --- a/src/server/shared/DataStores/DBCFileLoader.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef DBC_FILE_LOADER_H -#define DBC_FILE_LOADER_H - -#include "Define.h" -#include "Utilities/ByteConverter.h" -#include - -class TC_SHARED_API DBCFileLoader -{ - public: - DBCFileLoader(); - ~DBCFileLoader(); - - bool Load(const char *filename, const char *fmt); - - class Record - { - public: - float getFloat(size_t field) const - { - assert(field < file.fieldCount); - float val = *reinterpret_cast(offset + file.GetOffset(field)); - EndianConvert(val); - return val; - } - uint32 getUInt(size_t field) const - { - assert(field < file.fieldCount); - uint32 val = *reinterpret_cast(offset + file.GetOffset(field)); - EndianConvert(val); - return val; - } - uint8 getUInt8(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset + file.GetOffset(field)); - } - uint64 getUInt64(size_t field) const - { - assert(field < file.fieldCount); - uint64 val = *reinterpret_cast(offset + file.GetOffset(field)); - EndianConvert(val); - return val; - } - const char *getString(size_t field) const - { - assert(field < file.fieldCount); - size_t stringOffset = getUInt(field); - assert(stringOffset < file.stringSize); - return reinterpret_cast(file.stringTable + stringOffset); - } - - private: - Record(DBCFileLoader &file_, unsigned char *offset_): offset(offset_), file(file_) { } - unsigned char* offset; - DBCFileLoader& file; - - friend class DBCFileLoader; - - }; - - // Get record by id - Record getRecord(size_t id); - /// Get begin iterator over records - - uint32 GetNumRows() const { return recordCount; } - uint32 GetRowSize() const { return recordSize; } - uint32 GetCols() const { return fieldCount; } - uint32 GetOffset(size_t id) const { return (fieldsOffset != NULL && id < fieldCount) ? fieldsOffset[id] : 0; } - bool IsLoaded() const { return data != NULL; } - char* AutoProduceData(const char* fmt, uint32& count, char**& indexTable, uint32 sqlRecordCount, uint32 sqlHighestIndex, char *& sqlDataTable); - char* AutoProduceStrings(const char* fmt, char* dataTable); - static uint32 GetFormatRecordSize(const char * format, int32 * index_pos = NULL); - private: - - uint32 recordSize; - uint32 recordCount; - uint32 fieldCount; - uint32 stringSize; - uint32 *fieldsOffset; - unsigned char *data; - unsigned char *stringTable; - - DBCFileLoader(DBCFileLoader const& right) = delete; - DBCFileLoader& operator=(DBCFileLoader const& right) = delete; -}; -#endif diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h deleted file mode 100644 index c53d2a563fe..00000000000 --- a/src/server/shared/DataStores/DBCStore.h +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef DBCSTORE_H -#define DBCSTORE_H - -#include "DBCFileLoader.h" -#include "DBStorageIterator.h" -#include "Log.h" -#include "Field.h" -#include "DatabaseWorkerPool.h" -#include "Implementation/WorldDatabase.h" -#include "DatabaseEnv.h" - -struct SqlDbc -{ - std::string const* formatString; - std::string const* indexName; - std::string sqlTableName; - int32 indexPos; - int32 sqlIndexPos; - SqlDbc(std::string const* _filename, std::string const* _format, std::string const* _idname, char const* fmt) - : formatString(_format), indexName (_idname), sqlIndexPos(0) - { - // Convert dbc file name to sql table name - sqlTableName = *_filename; - for (uint32 i = 0; i< sqlTableName.size(); ++i) - { - if (isalpha(sqlTableName[i])) - sqlTableName[i] = char(tolower(sqlTableName[i])); - else if (sqlTableName[i] == '.') - sqlTableName[i] = '_'; - } - - // Get sql index position - DBCFileLoader::GetFormatRecordSize(fmt, &indexPos); - if (indexPos >= 0) - { - uint32 uindexPos = uint32(indexPos); - for (uint32 x = 0; x < formatString->size(); ++x) - { - // Count only fields present in sql - if ((*formatString)[x] == FT_SQL_PRESENT) - { - if (x == uindexPos) - break; - ++sqlIndexPos; - } - } - } - } - -private: - SqlDbc(SqlDbc const& right) = delete; - SqlDbc& operator=(SqlDbc const& right) = delete; -}; - -template -class DBCStorage -{ - typedef std::list StringPoolList; - - public: - typedef DBStorageIterator iterator; - - explicit DBCStorage(char const* f) - : fmt(f), nCount(0), fieldCount(0), dataTable(NULL) - { - indexTable.asT = NULL; - } - - ~DBCStorage() { Clear(); } - - T const* LookupEntry(uint32 id) const - { - return (id >= nCount) ? NULL : indexTable.asT[id]; - } - - T const* AssertEntry(uint32 id) const - { - T const* entry = LookupEntry(id); - ASSERT(entry); - return entry; - } - - uint32 GetNumRows() const { return nCount; } - char const* GetFormat() const { return fmt; } - uint32 GetFieldCount() const { return fieldCount; } - - bool Load(char const* fn, SqlDbc* sql) - { - DBCFileLoader dbc; - // Check if load was successful, only then continue - if (!dbc.Load(fn, fmt)) - return false; - - uint32 sqlRecordCount = 0; - uint32 sqlHighestIndex = 0; - Field* fields = NULL; - QueryResult result = QueryResult(NULL); - // Load data from sql - if (sql) - { - std::string query = "SELECT * FROM " + sql->sqlTableName; - if (sql->indexPos >= 0) - query +=" ORDER BY " + *sql->indexName + " DESC"; - query += ';'; - - - result = WorldDatabase.Query(query.c_str()); - if (result) - { - sqlRecordCount = uint32(result->GetRowCount()); - if (sql->indexPos >= 0) - { - fields = result->Fetch(); - sqlHighestIndex = fields[sql->sqlIndexPos].GetUInt32(); - } - - // Check if sql index pos is valid - if (int32(result->GetFieldCount() - 1) < sql->sqlIndexPos) - { - TC_LOG_ERROR("server.loading", "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str()); - return false; - } - } - } - - char* sqlDataTable = NULL; - fieldCount = dbc.GetCols(); - - dataTable = reinterpret_cast(dbc.AutoProduceData(fmt, nCount, indexTable.asChar, - sqlRecordCount, sqlHighestIndex, sqlDataTable)); - - stringPoolList.push_back(dbc.AutoProduceStrings(fmt, reinterpret_cast(dataTable))); - - // Insert sql data into arrays - if (result) - { - if (indexTable.asT) - { - uint32 offset = 0; - uint32 rowIndex = dbc.GetNumRows(); - do - { - if (!fields) - fields = result->Fetch(); - - if (sql->indexPos >= 0) - { - uint32 id = fields[sql->sqlIndexPos].GetUInt32(); - if (indexTable.asT[id]) - { - TC_LOG_ERROR("server.loading", "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str()); - return false; - } - - indexTable.asT[id] = reinterpret_cast(&sqlDataTable[offset]); - } - else - indexTable.asT[rowIndex]= reinterpret_cast(&sqlDataTable[offset]); - - uint32 columnNumber = 0; - uint32 sqlColumnNumber = 0; - - for (; columnNumber < sql->formatString->size(); ++columnNumber) - { - if ((*sql->formatString)[columnNumber] == FT_SQL_ABSENT) - { - switch (fmt[columnNumber]) - { - case FT_FLOAT: - *reinterpret_cast(&sqlDataTable[offset]) = 0.0f; - offset += 4; - break; - case FT_IND: - case FT_INT: - *reinterpret_cast(&sqlDataTable[offset]) = uint32(0); - offset += 4; - break; - case FT_BYTE: - *reinterpret_cast(&sqlDataTable[offset]) = uint8(0); - offset += 1; - break; - case FT_LONG: - *reinterpret_cast(&sqlDataTable[offset]) = uint64(0); - offset += 8; - break; - case FT_STRING: - // Beginning of the pool - empty string - *reinterpret_cast(&sqlDataTable[offset]) = stringPoolList.back(); - offset += sizeof(char*); - break; - } - } - else if ((*sql->formatString)[columnNumber] == FT_SQL_PRESENT) - { - bool validSqlColumn = true; - switch (fmt[columnNumber]) - { - case FT_FLOAT: - *reinterpret_cast(&sqlDataTable[offset]) = fields[sqlColumnNumber].GetFloat(); - offset += 4; - break; - case FT_IND: - case FT_INT: - *reinterpret_cast(&sqlDataTable[offset]) = fields[sqlColumnNumber].GetUInt32(); - offset += 4; - break; - case FT_BYTE: - *reinterpret_cast(&sqlDataTable[offset]) = fields[sqlColumnNumber].GetUInt8(); - offset += 1; - break; - case FT_LONG: - *reinterpret_cast(&sqlDataTable[offset]) = fields[sqlColumnNumber].GetUInt64(); - offset += 8; - break; - case FT_STRING: - TC_LOG_ERROR("server.loading", "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); - return false; - case FT_SORT: - break; - default: - validSqlColumn = false; - break; - } - if (validSqlColumn && (columnNumber != (sql->formatString->size()-1))) - sqlColumnNumber++; - } - else - { - TC_LOG_ERROR("server.loading", "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); - return false; - } - } - - if (sqlColumnNumber != (result->GetFieldCount() - 1)) - { - TC_LOG_ERROR("server.loading", "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); - return false; - } - - fields = NULL; - ++rowIndex; - } while (result->NextRow()); - } - } - - // error in dbc file at loading if NULL - return indexTable.asT != NULL; - } - - bool LoadStringsFrom(char const* fn) - { - // DBC must be already loaded using Load - if (!indexTable.asT) - return false; - - DBCFileLoader dbc; - // Check if load was successful, only then continue - if (!dbc.Load(fn, fmt)) - return false; - - stringPoolList.push_back(dbc.AutoProduceStrings(fmt, reinterpret_cast(dataTable))); - - return true; - } - - void Clear() - { - if (!indexTable.asT) - return; - - delete[] reinterpret_cast(indexTable.asT); - indexTable.asT = NULL; - delete[] reinterpret_cast(dataTable); - dataTable = NULL; - - while (!stringPoolList.empty()) - { - delete[] stringPoolList.front(); - stringPoolList.pop_front(); - } - - nCount = 0; - } - - iterator begin() { return iterator(indexTable.asT, nCount); } - iterator end() { return iterator(indexTable.asT, nCount, nCount); } - - private: - char const* fmt; - uint32 nCount; - uint32 fieldCount; - - union - { - T** asT; - char** asChar; - } - indexTable; - - T* dataTable; - StringPoolList stringPoolList; - - DBCStorage(DBCStorage const& right) = delete; - DBCStorage& operator=(DBCStorage const& right) = delete; -}; - -#endif diff --git a/src/server/shared/DataStores/DBStorageIterator.h b/src/server/shared/DataStores/DBStorageIterator.h index 3f9fa6eed24..5568397b245 100644 --- a/src/server/shared/DataStores/DBStorageIterator.h +++ b/src/server/shared/DataStores/DBStorageIterator.h @@ -35,9 +35,6 @@ public: } } - uint32 ID() const { return _pos; } - T const* Data() const { return _index[_pos]; } - T const* operator->() { return _index[_pos]; } T const* operator*() { return _index[_pos]; } -- cgit v1.2.3 From b82332487afd7233850e7eed996615b3fdd7248c Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 27 May 2016 23:13:47 +0200 Subject: Core/DataStores: Updated db2 to 7.0.3.21737 --- .../2016_xx_xx_xx_characters_legion_04.sql | 1 + .../hotfixes/2016_xx_xx_xx_hotfixes_legion_05.sql | 854 +++ .../world/2016_xx_xx_xx_world_legion_01.sql | 1 - src/common/Define.h | 5 +- .../Database/Implementation/CharacterDatabase.cpp | 3 - .../Database/Implementation/CharacterDatabase.h | 3 - .../Database/Implementation/HotfixDatabase.cpp | 283 +- .../Database/Implementation/HotfixDatabase.h | 6 +- src/server/game/DataStores/DB2Metadata.h | 6283 ++++++++++++++++++++ src/server/game/DataStores/DB2Stores.cpp | 401 +- src/server/game/DataStores/DB2Stores.h | 7 +- src/server/game/DataStores/DB2Structure.h | 315 +- src/server/game/DataStores/DB2fmt.h | 207 - src/server/game/DataStores/DBCEnums.h | 5 + src/server/game/DataStores/DBCfmt.h | 26 - src/server/game/Entities/Item/Item.cpp | 3 + src/server/game/Entities/Player/Player.cpp | 124 - src/server/game/Entities/Player/Player.h | 17 - src/server/game/Handlers/CharacterHandler.cpp | 26 - src/server/game/Handlers/InspectHandler.cpp | 3 - src/server/game/Miscellaneous/SharedDefines.h | 1 - src/server/game/Server/Packets/TalentPackets.cpp | 4 +- src/server/game/Server/Packets/TalentPackets.h | 2 +- src/server/game/Server/WorldSession.h | 1 - src/server/game/Spells/Auras/SpellAuraEffects.cpp | 17 - src/server/game/Spells/SpellEffects.cpp | 63 - src/server/scripts/Commands/cs_reset.cpp | 2 - src/server/scripts/Spells/spell_shaman.cpp | 2 +- src/server/shared/DataStores/DB2Meta.cpp | 101 + src/server/shared/DataStores/DB2Meta.h | 46 + .../shared/DataStores/DB2SparseStorageLoader.cpp | 529 +- .../shared/DataStores/DB2SparseStorageLoader.h | 39 +- src/server/shared/DataStores/DB2StorageLoader.cpp | 658 +- src/server/shared/DataStores/DB2StorageLoader.h | 142 +- src/server/shared/DataStores/DB2Store.h | 150 +- src/tools/connection_patcher/Patterns/Windows.hpp | 4 +- 36 files changed, 8555 insertions(+), 1779 deletions(-) create mode 100644 sql/updates/characters/2016_xx_xx_xx_characters_legion_04.sql create mode 100644 sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_05.sql delete mode 100644 sql/updates/world/2016_xx_xx_xx_world_legion_01.sql create mode 100644 src/server/game/DataStores/DB2Metadata.h delete mode 100644 src/server/game/DataStores/DB2fmt.h delete mode 100644 src/server/game/DataStores/DBCfmt.h create mode 100644 src/server/shared/DataStores/DB2Meta.cpp create mode 100644 src/server/shared/DataStores/DB2Meta.h (limited to 'src/server/scripts') diff --git a/sql/updates/characters/2016_xx_xx_xx_characters_legion_04.sql b/sql/updates/characters/2016_xx_xx_xx_characters_legion_04.sql new file mode 100644 index 00000000000..c231fcff007 --- /dev/null +++ b/sql/updates/characters/2016_xx_xx_xx_characters_legion_04.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS `character_glyphs`; diff --git a/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_05.sql b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_05.sql new file mode 100644 index 00000000000..f165d7f8ae2 --- /dev/null +++ b/sql/updates/hotfixes/2016_xx_xx_xx_hotfixes_legion_05.sql @@ -0,0 +1,854 @@ +ALTER TABLE `achievement` + MODIFY `Title` text NULL FIRST, + MODIFY `Description` text NULL AFTER `Title`, + MODIFY `Flags` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `Reward` text NULL AFTER `Flags`, + MODIFY `MapID` smallint(6) NOT NULL DEFAULT '0' AFTER `Reward`, + MODIFY `Supercedes` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `Category` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Supercedes`, + MODIFY `UIOrder` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Category`, + MODIFY `IconID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UIOrder`, + MODIFY `SharesCriteria` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `IconID`, + MODIFY `CriteriaTree` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SharesCriteria`, + MODIFY `Faction` tinyint(4) NOT NULL DEFAULT '0' AFTER `CriteriaTree`, + MODIFY `Points` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Faction`, + MODIFY `MinimumCriteria` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Points`; + +ALTER TABLE `area_table` + CHANGE `PvPCombastWorldStateID` `PvPCombatWorldStateID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UWAmbience`, + CHANGE `UWIntroMusic` `UWIntroSound` int(10) unsigned NOT NULL DEFAULT '0' AFTER `WindSettingsID`; + +ALTER TABLE `area_trigger` + MODIFY `PosX` float NOT NULL DEFAULT '0' FIRST, + MODIFY `PosY` float NOT NULL DEFAULT '0' AFTER `PosX`, + MODIFY `PosZ` float NOT NULL DEFAULT '0' AFTER `PosY`, + MODIFY `Radius` float NOT NULL DEFAULT '0' AFTER `PosZ`, + MODIFY `BoxLength` float NOT NULL DEFAULT '0' AFTER `Radius`, + MODIFY `BoxWidth` float NOT NULL DEFAULT '0' AFTER `BoxLength`, + MODIFY `BoxHeight` float NOT NULL DEFAULT '0' AFTER `BoxWidth`, + MODIFY `BoxYaw` float NOT NULL DEFAULT '0' AFTER `BoxHeight`, + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `BoxYaw`, + MODIFY `PhaseID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `PhaseGroupID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PhaseID`, + MODIFY `ShapeID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PhaseGroupID`, + MODIFY `AreaTriggerActionSetID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ShapeID`, + MODIFY `PhaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AreaTriggerActionSetID`, + MODIFY `ShapeType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PhaseUseFlags`, + MODIFY `Flag` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ShapeType`; + +ALTER TABLE `barber_shop_style` + MODIFY `DisplayName` text NULL FIRST, + MODIFY `Description` text NULL AFTER `DisplayName`, + MODIFY `CostModifier` float NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `Type` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CostModifier`, + MODIFY `Race` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Type`, + MODIFY `Sex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Race`, + MODIFY `Data` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Sex`; + +ALTER TABLE `battle_pet_species` + MODIFY `CreatureID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `IconFileID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CreatureID`, + MODIFY `SummonSpellID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `IconFileID`, + MODIFY `SourceText` text NULL AFTER `SummonSpellID`, + MODIFY `Description` text NULL AFTER `SourceText`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `PetType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `Source` tinyint(4) NOT NULL DEFAULT '0' AFTER `PetType`; + +ALTER TABLE `broadcast_text` + CHANGE `SoundID` `SoundID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Type`, + ADD `SoundID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SoundID1`, + ADD `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SoundID2`; + +ALTER TABLE `chr_classes` + MODIFY `PetNameToken` text NULL FIRST, + MODIFY `Name` text NULL AFTER `PetNameToken`, + MODIFY `NameFemale` text NULL AFTER `Name`, + MODIFY `NameMale` text NULL AFTER `NameFemale`, + MODIFY `Filename` text NULL AFTER `NameMale`, + MODIFY `CreateScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Filename`, + MODIFY `SelectScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CreateScreenFileDataID`, + MODIFY `LowResScreenFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SelectScreenFileDataID`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `LowResScreenFileDataID`, + MODIFY `CinematicSequenceID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `DefaultSpec` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CinematicSequenceID`, + MODIFY `PowerType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DefaultSpec`, + MODIFY `SpellClassSet` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PowerType`, + MODIFY `AttackPowerPerStrength` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellClassSet`, + MODIFY `AttackPowerPerAgility` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AttackPowerPerStrength`, + MODIFY `RangedAttackPowerPerAgility` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AttackPowerPerAgility`, + MODIFY `IconFileDataID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RangedAttackPowerPerAgility`, + MODIFY `Unk1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `IconFileDataID`; + +ALTER TABLE `chr_races` + MODIFY `Unk` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UAFemaleCreatureSoundDataID`, + MODIFY `BaseLanguage` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Unk`, + MODIFY `CreatureType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `BaseLanguage`, + MODIFY `TeamID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CreatureType`, + MODIFY `RaceRelated` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `TeamID`, + MODIFY `UnalteredVisualRaceID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RaceRelated`, + MODIFY `CharComponentTextureLayoutID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `UnalteredVisualRaceID`, + MODIFY `DefaultClassID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CharComponentTextureLayoutID`, + MODIFY `NeutralRaceID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DefaultClassID`, + MODIFY `ItemAppearanceFrameRaceID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `NeutralRaceID`, + MODIFY `CharComponentTexLayoutHiResID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ItemAppearanceFrameRaceID`, + MODIFY `HighResMaleDisplayID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CharComponentTexLayoutHiResID`, + MODIFY `HighResFemaleDisplayID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HighResMaleDisplayID`; + +ALTER TABLE `chr_specialization` + MODIFY `MasterySpellID1` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `MasterySpellID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MasterySpellID1`, + MODIFY `Name` text NULL AFTER `MasterySpellID2`, + MODIFY `Name2` text NULL AFTER `Name`, + MODIFY `Description` text NULL AFTER `Name2`, + MODIFY `BackgroundFile` text NULL AFTER `Description`, + MODIFY `SpellIconID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `BackgroundFile`, + MODIFY `ClassID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellIconID`, + MODIFY `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ClassID`, + MODIFY `PetTalentType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `OrderIndex`, + MODIFY `Role` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PetTalentType`, + MODIFY `PrimaryStatOrder` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Role`; + +ALTER TABLE `creature_model_data` + MODIFY `ModelScale` float NOT NULL DEFAULT '0' AFTER `ID`, + MODIFY `FootprintTextureLength` float NOT NULL DEFAULT '0' AFTER `ModelScale`, + MODIFY `FootprintTextureWidth` float NOT NULL DEFAULT '0' AFTER `FootprintTextureLength`, + MODIFY `FootprintParticleScale` float NOT NULL DEFAULT '0' AFTER `FootprintTextureWidth`, + MODIFY `CollisionWidth` float NOT NULL DEFAULT '0' AFTER `FootprintParticleScale`, + MODIFY `CollisionHeight` float NOT NULL DEFAULT '0' AFTER `CollisionWidth`, + MODIFY `MountHeight` float NOT NULL DEFAULT '0' AFTER `CollisionHeight`, + MODIFY `GeoBoxMin1` float NOT NULL DEFAULT '0' AFTER `MountHeight`, + MODIFY `GeoBoxMin2` float NOT NULL DEFAULT '0' AFTER `GeoBoxMin1`, + MODIFY `GeoBoxMin3` float NOT NULL DEFAULT '0' AFTER `GeoBoxMin2`, + MODIFY `GeoBoxMax1` float NOT NULL DEFAULT '0' AFTER `GeoBoxMin3`, + MODIFY `GeoBoxMax2` float NOT NULL DEFAULT '0' AFTER `GeoBoxMax1`, + MODIFY `GeoBoxMax3` float NOT NULL DEFAULT '0' AFTER `GeoBoxMax2`, + MODIFY `WorldEffectScale` float NOT NULL DEFAULT '0' AFTER `GeoBoxMax3`, + MODIFY `AttachedEffectScale` float NOT NULL DEFAULT '0' AFTER `WorldEffectScale`, + MODIFY `MissileCollisionRadius` float NOT NULL DEFAULT '0' AFTER `AttachedEffectScale`, + MODIFY `MissileCollisionPush` float NOT NULL DEFAULT '0' AFTER `MissileCollisionRadius`, + MODIFY `MissileCollisionRaise` float NOT NULL DEFAULT '0' AFTER `MissileCollisionPush`, + MODIFY `OverrideLootEffectScale` float NOT NULL DEFAULT '0' AFTER `MissileCollisionRaise`, + MODIFY `OverrideNameScale` float NOT NULL DEFAULT '0' AFTER `OverrideLootEffectScale`, + MODIFY `OverrideSelectionRadius` float NOT NULL DEFAULT '0' AFTER `OverrideNameScale`, + MODIFY `TamedPetBaseScale` float NOT NULL DEFAULT '0' AFTER `OverrideSelectionRadius`, + MODIFY `HoverHeight` float NOT NULL DEFAULT '0' AFTER `TamedPetBaseScale`, + MODIFY `SizeClass` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID`, + MODIFY `BloodID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SizeClass`, + MODIFY `FootprintTextureID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `BloodID`, + MODIFY `FoleyMaterialID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FootprintTextureID`, + CHANGE `Unk700_1` `FootstepEffectID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FoleyMaterialID`, + CHANGE `Unk700_2` `DeathThudEffectID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FootstepEffectID`, + MODIFY `FootstepShakeSize` int(10) unsigned NOT NULL DEFAULT '0' AFTER `DeathThudEffectID`, + MODIFY `DeathThudShakeSize` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FootstepShakeSize`, + MODIFY `SoundID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `DeathThudShakeSize`, + MODIFY `CreatureGeosetDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SoundID`; + +ALTER TABLE `criteria_tree` + MODIFY `CriteriaID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`, + MODIFY `Operator` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Operator`; + +ALTER TABLE `currency_types` + MODIFY `SpellCategory` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CategoryID`, + MODIFY `Quality` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellCategory`, + MODIFY `SpellWeight` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Quality`; + +ALTER TABLE `dungeon_encounter` + MODIFY `SpellIconID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellIconID`, + MODIFY `Bit` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Bit`, + MODIFY `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Flags`; + +ALTER TABLE `emotes` + MODIFY `EmoteSpecProc` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AnimID`, + MODIFY `EmoteSpecProcParam` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EmoteSpecProc`, + MODIFY `EmoteSoundID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EmoteSpecProcParam`, + CHANGE `Unk703_1` `ClassMask` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EmoteSoundID`, + CHANGE `Unk703_2` `RaceMask` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ClassMask`; + +ALTER TABLE `emotes_text_sound` + MODIFY `RaceId` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `EmotesTextId`, + MODIFY `SexId` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RaceId`, + MODIFY `ClassId` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SexId`, + MODIFY `SoundId` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ClassId`; + +ALTER TABLE `faction` + ADD `ReputationMax1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + ADD `ReputationMax2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ReputationMax1`, + ADD `ReputationMax3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ReputationMax2`, + ADD `ReputationMax4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ReputationMax3`; + +ALTER TABLE `gameobjects` + MODIFY `PositionX` float NOT NULL DEFAULT '0' FIRST, + MODIFY `PositionY` float NOT NULL DEFAULT '0' AFTER `PositionX`, + MODIFY `PositionZ` float NOT NULL DEFAULT '0' AFTER `PositionY`, + MODIFY `RotationX` float NOT NULL DEFAULT '0' AFTER `PositionZ`, + MODIFY `RotationY` float NOT NULL DEFAULT '0' AFTER `RotationX`, + MODIFY `RotationZ` float NOT NULL DEFAULT '0' AFTER `RotationY`, + MODIFY `RotationW` float NOT NULL DEFAULT '0' AFTER `RotationZ`, + MODIFY `Size` float NOT NULL DEFAULT '0' AFTER `RotationW`, + MODIFY `Data1` int(11) NOT NULL DEFAULT '0' AFTER `Size`, + MODIFY `Data2` int(11) NOT NULL DEFAULT '0' AFTER `Data1`, + MODIFY `Data3` int(11) NOT NULL DEFAULT '0' AFTER `Data2`, + MODIFY `Data4` int(11) NOT NULL DEFAULT '0' AFTER `Data3`, + MODIFY `Data5` int(11) NOT NULL DEFAULT '0' AFTER `Data4`, + MODIFY `Data6` int(11) NOT NULL DEFAULT '0' AFTER `Data5`, + MODIFY `Data7` int(11) NOT NULL DEFAULT '0' AFTER `Data6`, + MODIFY `Data8` int(11) NOT NULL DEFAULT '0' AFTER `Data7`, + MODIFY `Name` text NULL AFTER `Data8`, + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Name`, + MODIFY `DisplayID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `PhaseID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `DisplayID`, + MODIFY `PhaseGroupID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PhaseID`, + MODIFY `PhaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PhaseGroupID`, + MODIFY `Type` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PhaseUseFlags`; + +ALTER TABLE `garr_ability` + MODIFY `Name` text NULL FIRST, + MODIFY `Description` text NULL AFTER `Name`, + MODIFY `IconFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `IconFileDataID`, + MODIFY `OtherFactionGarrAbilityID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `GarrAbilityCategoryID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `OtherFactionGarrAbilityID`, + MODIFY `FollowerTypeID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrAbilityCategoryID`; + +ALTER TABLE `garr_building` + MODIFY `CostCurrencyID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `IconFileDataID`, + MODIFY `HordeTexPrefixKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CostCurrencyID`, + MODIFY `AllianceTexPrefixKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `HordeTexPrefixKitID`, + MODIFY `AllianceActivationScenePackageID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AllianceTexPrefixKitID`, + MODIFY `HordeActivationScenePackageID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AllianceActivationScenePackageID`, + MODIFY `FollowerRequiredGarrAbilityID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `HordeActivationScenePackageID`, + MODIFY `FollowerGarrAbilityEffectID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `FollowerRequiredGarrAbilityID`, + MODIFY `CostMoney` smallint(6) NOT NULL DEFAULT '0' AFTER `FollowerGarrAbilityEffectID`, + MODIFY `Unknown` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CostMoney`, + MODIFY `Type` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Unknown`, + MODIFY `Level` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Type`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Level`, + MODIFY `MaxShipments` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `GarrTypeID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxShipments`, + MODIFY `BuildDuration` int(10) unsigned NOT NULL DEFAULT '0' AFTER `GarrTypeID`, + MODIFY `CostCurrencyAmount` int(11) NOT NULL DEFAULT '0' AFTER `BuildDuration`, + MODIFY `BonusAmount` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CostCurrencyAmount`; + +ALTER TABLE `garr_building_plot_inst` + MODIFY `LandmarkOffsetX` float NOT NULL DEFAULT '0' FIRST, + MODIFY `LandmarkOffsetY` float NOT NULL DEFAULT '0' AFTER `LandmarkOffsetX`, + MODIFY `UiTextureAtlasMemberID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `LandmarkOffsetY`, + MODIFY `GarrSiteLevelPlotInstID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UiTextureAtlasMemberID`, + MODIFY `GarrBuildingID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrSiteLevelPlotInstID`; + +ALTER TABLE `garr_class_spec` + MODIFY `NameMale` text NULL FIRST, + MODIFY `NameFemale` text NULL AFTER `NameMale`, + MODIFY `NameGenderless` text NULL AFTER `NameFemale`, + MODIFY `ClassAtlasID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `NameGenderless`, + MODIFY `GarrFollItemSetID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ClassAtlasID`, + MODIFY `Limit` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrFollItemSetID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Limit`; + +ALTER TABLE `garr_follower` + MODIFY `HordeCreatureID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `AllianceCreatureID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HordeCreatureID`, + MODIFY `HordeSourceText` text NULL AFTER `AllianceCreatureID`, + MODIFY `AllianceSourceText` text NULL AFTER `HordeSourceText`, + MODIFY `HordePortraitIconID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AllianceSourceText`, + MODIFY `AlliancePortraitIconID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HordePortraitIconID`, + ADD `HordeAddedBroadcastTextID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AlliancePortraitIconID`, + ADD `AllianceAddedBroadcastTextID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HordeAddedBroadcastTextID`, + MODIFY `HordeGarrFollItemSetID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AllianceAddedBroadcastTextID`, + MODIFY `AllianceGarrFollItemSetID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `HordeGarrFollItemSetID`, + MODIFY `ItemLevelWeapon` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AllianceGarrFollItemSetID`, + MODIFY `ItemLevelArmor` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ItemLevelWeapon`, + MODIFY `HordeListPortraitTextureKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ItemLevelArmor`, + MODIFY `AllianceListPortraitTextureKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `HordeListPortraitTextureKitID`, + MODIFY `FollowerTypeID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AllianceListPortraitTextureKitID`, + MODIFY `HordeUiAnimRaceInfoID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `FollowerTypeID`, + MODIFY `AllianceUiAnimRaceInfoID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HordeUiAnimRaceInfoID`, + MODIFY `Quality` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AllianceUiAnimRaceInfoID`, + MODIFY `HordeGarrClassSpecID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Quality`, + MODIFY `AllianceGarrClassSpecID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HordeGarrClassSpecID`, + MODIFY `Level` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AllianceGarrClassSpecID`, + MODIFY `Unknown1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Level`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Unknown1`, + MODIFY `Unknown2` tinyint(4) NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `Unknown3` tinyint(4) NOT NULL DEFAULT '0' AFTER `Unknown2`, + MODIFY `GarrTypeID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Unknown3`, + MODIFY `MaxDurability` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrTypeID`, + MODIFY `Class` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxDurability`, + ADD `HordeFlavorTextGarrStringID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Class`, + ADD `AllianceFlavorTextGarrStringID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HordeFlavorTextGarrStringID`; + +ALTER TABLE `garr_plot` + MODIFY `GarrPlotUICategoryID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HordeConstructionGameObjectID`, + MODIFY `PlotType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GarrPlotUICategoryID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PlotType`, + MODIFY `MinCount` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `MaxCount` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MinCount`; + +ALTER TABLE `garr_site_level` MODIFY `SiteID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`; + +ALTER TABLE `heirloom` + MODIFY `ItemID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `SourceText` text NULL AFTER `ItemID`, + MODIFY `OldItem1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SourceText`, + MODIFY `OldItem2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `OldItem1`, + MODIFY `NextDifficultyItemID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `OldItem2`, + MODIFY `UpgradeItemID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `NextDifficultyItemID`, + MODIFY `UpgradeItemID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `UpgradeItemID1`, + MODIFY `ItemBonusListID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UpgradeItemID2`, + MODIFY `ItemBonusListID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ItemBonusListID1`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ItemBonusListID2`, + MODIFY `Source` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`; + +ALTER TABLE `item_extended_cost` DROP `RequiredMoney`; + +ALTER TABLE `item_modified_appearance` + MODIFY `ItemID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `AppearanceID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ItemID`, + MODIFY `AppearanceModID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AppearanceID`, + MODIFY `Index` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AppearanceModID`, + MODIFY `SourceType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Index`; + +ALTER TABLE `item_set` + MODIFY `RequiredSkill` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RequiredSkillRank`, + CHANGE `Unknown703` `Flags` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RequiredSkill`; + +ALTER TABLE `lfg_dungeons` + MODIFY `Name` text NULL FIRST, + MODIFY `Flags` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Name`, + MODIFY `TextureFilename` text NULL AFTER `Flags`, + MODIFY `Description` text NULL AFTER `TextureFilename`, + MODIFY `MaxLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `TargetLevelMax` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MaxLevel`, + MODIFY `MapID` smallint(6) NOT NULL DEFAULT '0' AFTER `TargetLevelMax`, + MODIFY `RandomID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `ScenarioID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RandomID`, + MODIFY `LastBossJournalEncounterID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ScenarioID`, + MODIFY `BonusReputationAmount` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `LastBossJournalEncounterID`, + MODIFY `MentorItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `BonusReputationAmount`, + MODIFY `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MentorItemLevel`, + MODIFY `TargetLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinLevel`, + MODIFY `TargetLevelMin` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `TargetLevel`, + MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `TargetLevelMin`, + MODIFY `Type` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`, + MODIFY `Faction` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Type`, + MODIFY `Expansion` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Faction`, + MODIFY `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Expansion`, + MODIFY `GroupID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `OrderIndex`, + MODIFY `CountTank` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `GroupID`, + MODIFY `CountHealer` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CountTank`, + MODIFY `CountDamage` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CountHealer`, + MODIFY `MinCountTank` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CountDamage`, + MODIFY `MinCountHealer` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinCountTank`, + MODIFY `MinCountDamage` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinCountHealer`, + MODIFY `SubType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinCountDamage`, + MODIFY `MentorCharLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SubType`; + +ALTER TABLE `liquid_type` + MODIFY `LightID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `Type` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LightID`, + MODIFY `ParticleMovement` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Type`, + MODIFY `ParticleTexSlots` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ParticleMovement`, + MODIFY `MaterialID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ParticleTexSlots`, + MODIFY `DepthTexCount1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaterialID`, + MODIFY `DepthTexCount2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount1`, + MODIFY `DepthTexCount3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount2`, + MODIFY `DepthTexCount4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount3`, + MODIFY `DepthTexCount5` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount4`, + MODIFY `DepthTexCount6` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount5`, + MODIFY `SoundID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `DepthTexCount6`; + +ALTER TABLE `map_difficulty` + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Message`, + MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `RaidDurationType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`, + MODIFY `MaxPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RaidDurationType`, + MODIFY `LockID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxPlayers`, + MODIFY `ItemBonusTreeModID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LockID`; + +ALTER TABLE `mount` + MODIFY `SpellId` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `DisplayId` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellId`, + MODIFY `Name` text NULL AFTER `DisplayId`, + MODIFY `Description` text NULL AFTER `Name`, + MODIFY `SourceDescription` text NULL AFTER `Description`, + ADD `CameraPivotMultiplier` float NOT NULL DEFAULT '0' AFTER `SourceDescription`, + MODIFY `MountTypeId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CameraPivotMultiplier`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MountTypeId`, + MODIFY `PlayerConditionId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `Source` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PlayerConditionId`; + +ALTER TABLE `mount_capability` + MODIFY `RequiredSpell` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `SpeedModSpell` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RequiredSpell`, + MODIFY `RequiredRidingSkill` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SpeedModSpell`, + MODIFY `RequiredArea` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RequiredRidingSkill`, + MODIFY `RequiredMap` smallint(6) NOT NULL DEFAULT '0' AFTER `RequiredArea`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RequiredMap`; + +ALTER TABLE `player_condition` + MODIFY `ItemLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellLogic`, + MODIFY `Time1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemLogic`, + MODIFY `Time2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Time1`, + MODIFY `AuraSpellLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Time2`, + MODIFY `AuraSpellID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraSpellLogic`, + MODIFY `AuraSpellID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraSpellID1`, + MODIFY `AuraSpellID3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraSpellID2`, + MODIFY `AuraSpellID4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraSpellID3`, + MODIFY `AchievementLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraSpellID4`, + MODIFY `AreaLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AchievementLogic`, + MODIFY `QuestKillLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AreaLogic`, + MODIFY `FailureDescription` text NULL AFTER `QuestKillLogic`, + MODIFY `MinLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `FailureDescription`, + MODIFY `MaxLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MinLevel`, + MODIFY `SkillID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MaxLevel`, + MODIFY `SkillID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SkillID1`, + MODIFY `SkillID3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SkillID2`, + MODIFY `SkillID4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SkillID3`, + MODIFY `MinSkill1` smallint(6) NOT NULL DEFAULT '0' AFTER `SkillID4`, + MODIFY `MinSkill2` smallint(6) NOT NULL DEFAULT '0' AFTER `MinSkill1`, + MODIFY `MinSkill3` smallint(6) NOT NULL DEFAULT '0' AFTER `MinSkill2`, + MODIFY `MinSkill4` smallint(6) NOT NULL DEFAULT '0' AFTER `MinSkill3`, + MODIFY `MaxSkill1` smallint(6) NOT NULL DEFAULT '0' AFTER `MinSkill4`, + MODIFY `MaxSkill2` smallint(6) NOT NULL DEFAULT '0' AFTER `MaxSkill1`, + MODIFY `MaxSkill3` smallint(6) NOT NULL DEFAULT '0' AFTER `MaxSkill2`, + MODIFY `MaxSkill4` smallint(6) NOT NULL DEFAULT '0' AFTER `MaxSkill3`, + MODIFY `MaxFactionID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MaxSkill4`, + MODIFY `PrevQuestID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MaxFactionID`, + MODIFY `PrevQuestID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PrevQuestID1`, + MODIFY `PrevQuestID3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PrevQuestID2`, + MODIFY `PrevQuestID4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PrevQuestID3`, + MODIFY `CurrQuestID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PrevQuestID4`, + MODIFY `CurrQuestID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrQuestID1`, + MODIFY `CurrQuestID3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrQuestID2`, + MODIFY `CurrQuestID4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrQuestID3`, + MODIFY `CurrentCompletedQuestID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrQuestID4`, + MODIFY `CurrentCompletedQuestID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrentCompletedQuestID1`, + MODIFY `CurrentCompletedQuestID3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrentCompletedQuestID2`, + MODIFY `CurrentCompletedQuestID4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrentCompletedQuestID3`, + MODIFY `Explored1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `CurrentCompletedQuestID4`, + MODIFY `Explored2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Explored1`, + MODIFY `WorldStateExpressionID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Explored2`, + MODIFY `Achievement1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `WorldStateExpressionID`, + MODIFY `Achievement2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Achievement1`, + MODIFY `Achievement3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Achievement2`, + MODIFY `Achievement4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Achievement3`, + MODIFY `AreaID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Achievement4`, + MODIFY `AreaID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AreaID1`, + MODIFY `AreaID3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AreaID2`, + MODIFY `AreaID4` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AreaID3`, + MODIFY `QuestKillID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AreaID4`, + MODIFY `PhaseID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `QuestKillID`, + MODIFY `MinAvgEquippedItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PhaseID`, + MODIFY `MaxAvgEquippedItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MinAvgEquippedItemLevel`, + MODIFY `ModifierTreeID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MaxAvgEquippedItemLevel`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ModifierTreeID`, + MODIFY `Gender` tinyint(4) NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `NativeGender` tinyint(4) NOT NULL DEFAULT '0' AFTER `Gender`, + MODIFY `MinLanguage` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `NativeGender`, + MODIFY `MaxLanguage` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinLanguage`, + MODIFY `MinReputation1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxLanguage`, + MODIFY `MinReputation2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinReputation1`, + MODIFY `MinReputation3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinReputation2`, + MODIFY `MaxReputation` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinReputation3`, + MODIFY `Unknown1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxReputation`, + MODIFY `MinPVPRank` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Unknown1`, + MODIFY `MaxPVPRank` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinPVPRank`, + MODIFY `PvpMedal` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxPVPRank`, + MODIFY `ItemFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PvpMedal`, + MODIFY `AuraCount1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ItemFlags`, + MODIFY `AuraCount2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AuraCount1`, + MODIFY `AuraCount3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AuraCount2`, + MODIFY `AuraCount4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AuraCount3`, + MODIFY `WeatherID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AuraCount4`, + MODIFY `PartyStatus` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `WeatherID`, + MODIFY `LifetimeMaxPVPRank` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PartyStatus`, + MODIFY `LfgStatus1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LifetimeMaxPVPRank`, + MODIFY `LfgStatus2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgStatus1`, + MODIFY `LfgStatus3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgStatus2`, + MODIFY `LfgStatus4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgStatus3`, + MODIFY `LfgCompare1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgStatus4`, + MODIFY `LfgCompare2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgCompare1`, + MODIFY `LfgCompare3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgCompare2`, + MODIFY `LfgCompare4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgCompare3`, + MODIFY `CurrencyCount1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LfgCompare4`, + MODIFY `CurrencyCount2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyCount1`, + MODIFY `CurrencyCount3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyCount2`, + MODIFY `CurrencyCount4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyCount3`, + MODIFY `MinExpansionLevel` tinyint(4) NOT NULL DEFAULT '0' AFTER `CurrencyCount4`, + MODIFY `MaxExpansionLevel` tinyint(4) NOT NULL DEFAULT '0' AFTER `MinExpansionLevel`, + MODIFY `MinExpansionTier` tinyint(4) NOT NULL DEFAULT '0' AFTER `MaxExpansionLevel`, + MODIFY `MaxExpansionTier` tinyint(4) NOT NULL DEFAULT '0' AFTER `MinExpansionTier`, + MODIFY `MinGuildLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxExpansionTier`, + MODIFY `MaxGuildLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinGuildLevel`, + MODIFY `PhaseUseFlags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MaxGuildLevel`, + MODIFY `ChrSpecializationIndex` tinyint(4) NOT NULL DEFAULT '0' AFTER `PhaseUseFlags`, + MODIFY `ChrSpecializationRole` tinyint(4) NOT NULL DEFAULT '0' AFTER `ChrSpecializationIndex`, + MODIFY `PowerType` tinyint(4) NOT NULL DEFAULT '0' AFTER `ChrSpecializationRole`, + MODIFY `PowerTypeComp` tinyint(4) NOT NULL DEFAULT '0' AFTER `PowerType`, + MODIFY `PowerTypeValue` tinyint(4) NOT NULL DEFAULT '0' AFTER `PowerTypeComp`, + MODIFY `ClassMask` int(10) unsigned NOT NULL DEFAULT '0' AFTER `PowerTypeValue`, + MODIFY `LanguageID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ClassMask`, + MODIFY `MinFactionID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LanguageID`, + MODIFY `MinFactionID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MinFactionID1`, + MODIFY `MinFactionID3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MinFactionID2`, + MODIFY `ItemCount1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemID4`, + MODIFY `ItemCount2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemCount1`, + MODIFY `ItemCount3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemCount2`, + MODIFY `ItemCount4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemCount3`, + MODIFY `LfgLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemCount4`, + MODIFY `LfgValue1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LfgLogic`, + MODIFY `LfgValue2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LfgValue1`, + MODIFY `LfgValue3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LfgValue2`, + MODIFY `LfgValue4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LfgValue3`, + MODIFY `CurrencyLogic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LfgValue4`, + MODIFY `CurrencyID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyLogic`, + MODIFY `CurrencyID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyID1`, + MODIFY `CurrencyID3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyID2`, + MODIFY `CurrencyID4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CurrencyID3`, + MODIFY `PhaseGroupID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `QuestKillMonster6`, + MODIFY `MinAvgItemLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `PhaseGroupID`, + MODIFY `MaxAvgItemLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MinAvgItemLevel`, + MODIFY `Unknown700_1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MaxAvgItemLevel`, + MODIFY `Unknown700_2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Unknown700_1`; + +ALTER TABLE `scaling_stat_distribution` + MODIFY `MinLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ItemLevelCurveID`, + MODIFY `MaxLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MinLevel`; + +ALTER TABLE `skill_line` MODIFY `ParentSkillLineID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CanLink`; + +ALTER TABLE `skill_line_ability` + MODIFY `SupercedesSpell` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RaceMask`, + ADD `Unknown703` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SupercedesSpell`, + MODIFY `SkillLine` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Unknown703`, + MODIFY `MinSkillLineRank` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SkillLine`, + MODIFY `TrivialSkillLineRankHigh` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MinSkillLineRank`, + MODIFY `TrivialSkillLineRankLow` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `TrivialSkillLineRankHigh`, + MODIFY `UniqueBit` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `TrivialSkillLineRankLow`, + MODIFY `TradeSkillCategoryID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UniqueBit`, + MODIFY `AquireMethod` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `TradeSkillCategoryID`, + MODIFY `NumSkillUps` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `AquireMethod`; + +ALTER TABLE `skill_race_class_info` + MODIFY `SkillID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RaceMask`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SkillID`, + MODIFY `SkillTierID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `Availability` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SkillTierID`, + MODIFY `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Availability`; + +ALTER TABLE `sound_kit` + MODIFY `Name` text NULL FIRST, + MODIFY `VolumeFloat` float NOT NULL DEFAULT '0' AFTER `Name`, + MODIFY `MinDistance` float NOT NULL DEFAULT '0' AFTER `VolumeFloat`, + MODIFY `DistanceCutoff` float NOT NULL DEFAULT '0' AFTER `MinDistance`, + MODIFY `VolumeVariationPlus` float NOT NULL DEFAULT '0' AFTER `DistanceCutoff`, + MODIFY `VolumeVariationMinus` float NOT NULL DEFAULT '0' AFTER `VolumeVariationPlus`, + MODIFY `PitchVariationPlus` float NOT NULL DEFAULT '0' AFTER `VolumeVariationMinus`, + MODIFY `PitchVariationMinus` float NOT NULL DEFAULT '0' AFTER `PitchVariationPlus`, + MODIFY `PitchAdjust` float NOT NULL DEFAULT '0' AFTER `PitchVariationMinus`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PitchAdjust`, + MODIFY `SoundEntriesAdvancedID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `BusOverwriteID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SoundEntriesAdvancedID`, + MODIFY `SoundType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `BusOverwriteID`, + MODIFY `EAXDef` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SoundType`, + MODIFY `DialogType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `EAXDef`, + MODIFY `Unk700` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DialogType`; + +ALTER TABLE `specialization_spells` + MODIFY `SpellID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `OverridesSpellID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellID`, + MODIFY `Description` text NULL AFTER `OverridesSpellID`, + MODIFY `SpecID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `OrderIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpecID`; + +ALTER TABLE `spell` + MODIFY `Name` text NULL FIRST, + MODIFY `NameSubtext` text NULL AFTER `Name`, + MODIFY `Description` text NULL AFTER `NameSubtext`, + MODIFY `AuraDescription` text NULL AFTER `Description`, + MODIFY `MiscID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AuraDescription`, + MODIFY `DescriptionVariablesID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +ALTER TABLE `spell_category` + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ChargeRecoveryTime`, + MODIFY `UsesPerWeek` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `MaxCharges` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `UsesPerWeek`; + +ALTER TABLE `spell_class_options` + MODIFY `SpellClassSet` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SpellClassMask4`, + MODIFY `ModalNextSpell` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellClassSet`; + +ALTER TABLE `spell_effect` + MODIFY `EffectAmplitude` float NOT NULL DEFAULT '0' FIRST, + MODIFY `EffectBonusCoefficient` float NOT NULL DEFAULT '0' AFTER `EffectAmplitude`, + MODIFY `EffectChainAmplitude` float NOT NULL DEFAULT '0' AFTER `EffectBonusCoefficient`, + MODIFY `EffectPointsPerResource` float NOT NULL DEFAULT '0' AFTER `EffectChainAmplitude`, + MODIFY `EffectRealPointsPerLevel` float NOT NULL DEFAULT '0' AFTER `EffectPointsPerResource`, + MODIFY `EffectSpellClassMask1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectRealPointsPerLevel`, + MODIFY `EffectSpellClassMask2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectSpellClassMask1`, + MODIFY `EffectSpellClassMask3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectSpellClassMask2`, + MODIFY `EffectSpellClassMask4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectSpellClassMask3`, + MODIFY `EffectPosFacing` float NOT NULL DEFAULT '0' AFTER `EffectSpellClassMask4`, + MODIFY `BonusCoefficientFromAP` float NOT NULL DEFAULT '0' AFTER `EffectPosFacing`, + MODIFY `DifficultyID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`, + MODIFY `Effect` int(10) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`, + MODIFY `EffectAura` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Effect`, + MODIFY `EffectChainTargets` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectBasePoints`, + MODIFY `EffectMechanic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectItemType`, + MODIFY `EffectRadiusIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectMiscValueB`, + MODIFY `EffectRadiusMaxIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectRadiusIndex`, + MODIFY `ImplicitTarget1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectTriggerSpell`, + MODIFY `ImplicitTarget2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ImplicitTarget1`, + MODIFY `EffectIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellID`; + +ALTER TABLE `spell_item_enchantment` + MODIFY `TransmogCost` int(10) unsigned NOT NULL DEFAULT '0' AFTER `EffectScalingPoints3`, + MODIFY `TextureFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `TransmogCost`, + MODIFY `EffectPointsMin1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `TextureFileDataID`, + MODIFY `EffectPointsMin2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `EffectPointsMin1`, + MODIFY `EffectPointsMin3` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `EffectPointsMin2`, + MODIFY `ItemVisual` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `EffectPointsMin3`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ItemVisual`, + MODIFY `RequiredSkillID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RequiredSkillID`, + MODIFY `ItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RequiredSkillRank`, + MODIFY `Charges` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ItemLevel`, + MODIFY `Effect1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Charges`, + MODIFY `Effect2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Effect1`, + MODIFY `Effect3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Effect2`, + MODIFY `ConditionID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Effect3`, + MODIFY `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ConditionID`, + MODIFY `MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinLevel`, + MODIFY `ScalingClass` tinyint(4) NOT NULL DEFAULT '0' AFTER `MaxLevel`, + MODIFY `ScalingClassRestricted` tinyint(4) NOT NULL DEFAULT '0' AFTER `ScalingClass`; + +ALTER TABLE `spell_item_enchantment_condition` + MODIFY `Operator1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LTOperandType5`, + MODIFY `Operator2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Operator1`, + MODIFY `Operator3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Operator2`, + MODIFY `Operator4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Operator3`, + MODIFY `Operator5` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Operator4`, + MODIFY `RTOperandType1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Operator5`, + MODIFY `RTOperandType2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperandType1`, + MODIFY `RTOperandType3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperandType2`, + MODIFY `RTOperandType4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperandType3`, + MODIFY `RTOperandType5` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperandType4`, + MODIFY `RTOperand1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperandType5`, + MODIFY `RTOperand2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperand1`, + MODIFY `RTOperand3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperand2`, + MODIFY `RTOperand4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperand3`, + MODIFY `RTOperand5` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperand4`, + MODIFY `Logic1` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `RTOperand5`, + MODIFY `Logic2` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Logic1`, + MODIFY `Logic3` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Logic2`, + MODIFY `Logic4` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Logic3`, + MODIFY `Logic5` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Logic4`, + MODIFY `LTOperand1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Logic5`, + MODIFY `LTOperand2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LTOperand1`, + MODIFY `LTOperand3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LTOperand2`, + MODIFY `LTOperand4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LTOperand3`, + MODIFY `LTOperand5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LTOperand4`; + +ALTER TABLE `spell_power` + MODIFY `SpellID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `ManaCost` int(10) unsigned NOT NULL DEFAULT '0' AFTER `SpellID`, + MODIFY `ManaCostPercentage` float NOT NULL DEFAULT '0' AFTER `ManaCost`, + MODIFY `ManaCostPercentagePerSecond` float NOT NULL DEFAULT '0' AFTER `ManaCostPercentage`, + MODIFY `RequiredAura` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ManaCostPercentagePerSecond`, + MODIFY `HealthCostPercentage` float NOT NULL DEFAULT '0' AFTER `RequiredAura`, + MODIFY `PowerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HealthCostPercentage`, + MODIFY `PowerType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PowerIndex`, + MODIFY `ManaCostPerLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`, + MODIFY `ManaCostPerSecond` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ManaCostPerLevel`, + MODIFY `ManaCostAdditional` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ManaCostPerSecond`, + MODIFY `PowerDisplayID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ManaCostAdditional`, + MODIFY `UnitPowerBarID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `PowerDisplayID`; + +ALTER TABLE `spell_power_difficulty` CHANGE `SpellPowerID` `ID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `PowerIndex`; + +ALTER TABLE `spell_scaling` + MODIFY `MinScalingLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ScalesFromItemLevel`, + MODIFY `MaxScalingLevel` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `MinScalingLevel`, + MODIFY `ScalingClass` int(11) NOT NULL DEFAULT '0' AFTER `MaxScalingLevel`; + +ALTER TABLE `spell_shapeshift_form` MODIFY `MountTypeID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PresetSpellID8`; + +ALTER TABLE `spell_target_restrictions` + MODIFY `TargetCreatureType` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Targets`, + MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `TargetCreatureType`, + MODIFY `MaxAffectedTargets` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`, + MODIFY `MaxTargetLevel` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MaxAffectedTargets`; + +ALTER TABLE `spell_totems` + MODIFY `RequiredTotemCategoryID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Totem2`, + MODIFY `RequiredTotemCategoryID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RequiredTotemCategoryID1`; + +ALTER TABLE `spell_x_spell_visual` + MODIFY `SpellID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `Unk620` float NOT NULL DEFAULT '0' AFTER `SpellID`, + MODIFY `SpellVisualID1` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Unk620`, + MODIFY `SpellVisualID2` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SpellVisualID1`, + MODIFY `PlayerConditionID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `SpellVisualID2`, + MODIFY `DifficultyID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `PlayerConditionID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DifficultyID`; + +ALTER TABLE `taxi_nodes` + MODIFY `PosX` float NOT NULL DEFAULT '0' FIRST, + MODIFY `PosY` float NOT NULL DEFAULT '0' AFTER `PosX`, + MODIFY `PosZ` float NOT NULL DEFAULT '0' AFTER `PosY`, + MODIFY `Name` text NULL AFTER `PosZ`, + MODIFY `MountCreatureID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Name`, + MODIFY `MountCreatureID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MountCreatureID1`, + MODIFY `MapOffsetX` float NOT NULL DEFAULT '0' AFTER `MountCreatureID2`, + MODIFY `MapOffsetY` float NOT NULL DEFAULT '0' AFTER `MapOffsetX`, + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapOffsetY`, + MODIFY `ConditionID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `LearnableIndex` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ConditionID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LearnableIndex`; + +ALTER TABLE `taxi_path` + MODIFY `From` smallint(5) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `To` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `From`, + MODIFY `Cost` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +ALTER TABLE `taxi_path_node` + MODIFY `LocX` float NOT NULL DEFAULT '0' FIRST, + MODIFY `LocY` float NOT NULL DEFAULT '0' AFTER `LocX`, + MODIFY `LocZ` float NOT NULL DEFAULT '0' AFTER `LocY`, + MODIFY `Delay` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LocZ`, + MODIFY `PathID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `Delay`, + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `PathID`, + MODIFY `ArrivalEventID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `DepartureEventID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ArrivalEventID`, + MODIFY `NodeIndex` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `DepartureEventID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `NodeIndex`; + +ALTER TABLE `toy` + MODIFY `ItemID` int(10) unsigned NOT NULL DEFAULT '0' FIRST, + MODIFY `Description` text NULL AFTER `ItemID`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Description`, + MODIFY `CategoryFilter` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`; + +ALTER TABLE `unit_power_bar` + MODIFY `RegenerationPeace` float NOT NULL DEFAULT '0' AFTER `ID`, + MODIFY `RegenerationCombat` float NOT NULL DEFAULT '0' AFTER `RegenerationPeace`, + MODIFY `FileDataID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RegenerationCombat`, + MODIFY `FileDataID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID1`, + MODIFY `FileDataID3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID2`, + MODIFY `FileDataID4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID3`, + MODIFY `FileDataID5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID4`, + MODIFY `FileDataID6` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID5`, + MODIFY `Color1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FileDataID6`, + MODIFY `Color2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Color1`, + MODIFY `Color3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Color2`, + MODIFY `Color4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Color3`, + MODIFY `Color5` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Color4`, + MODIFY `Color6` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Color5`, + MODIFY `Name` text NULL AFTER `Color6`, + MODIFY `Cost` text NULL AFTER `Name`, + MODIFY `OutOfError` text NULL AFTER `Cost`, + MODIFY `ToolTip` text NULL AFTER `OutOfError`, + MODIFY `StartInset` float NOT NULL DEFAULT '0' AFTER `ToolTip`, + MODIFY `EndInset` float NOT NULL DEFAULT '0' AFTER `StartInset`, + MODIFY `StartPower` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `EndInset`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `StartPower`, + MODIFY `CenterPower` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `BarType` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `CenterPower`, + MODIFY `MinPower` int(10) unsigned NOT NULL DEFAULT '0' AFTER `BarType`; + +ALTER TABLE `vehicle_seat` + MODIFY `CameraEnteringDelay` float NOT NULL DEFAULT '0' AFTER `VehicleExitAnimDelay`, + MODIFY `CameraEnteringDuration` float NOT NULL DEFAULT '0' AFTER `CameraEnteringDelay`, + MODIFY `CameraExitingDelay` float NOT NULL DEFAULT '0' AFTER `CameraEnteringDuration`, + MODIFY `CameraExitingDuration` float NOT NULL DEFAULT '0' AFTER `CameraExitingDelay`, + MODIFY `CameraOffsetX` float NOT NULL DEFAULT '0' AFTER `CameraExitingDuration`, + MODIFY `CameraOffsetY` float NOT NULL DEFAULT '0' AFTER `CameraOffsetX`, + MODIFY `CameraOffsetZ` float NOT NULL DEFAULT '0' AFTER `CameraOffsetY`, + MODIFY `CameraPosChaseRate` float NOT NULL DEFAULT '0' AFTER `CameraOffsetZ`, + MODIFY `CameraFacingChaseRate` float NOT NULL DEFAULT '0' AFTER `CameraPosChaseRate`, + MODIFY `CameraEnteringZoom` float NOT NULL DEFAULT '0' AFTER `CameraFacingChaseRate`, + MODIFY `CameraSeatZoomMin` float NOT NULL DEFAULT '0' AFTER `CameraEnteringZoom`, + MODIFY `CameraSeatZoomMax` float NOT NULL DEFAULT '0' AFTER `CameraSeatZoomMin`, + MODIFY `UISkinFileDataID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CameraSeatZoomMax`, + MODIFY `EnterAnimStart` smallint(6) NOT NULL DEFAULT '0' AFTER `UISkinFileDataID`, + MODIFY `EnterAnimLoop` smallint(6) NOT NULL DEFAULT '0' AFTER `EnterAnimStart`, + MODIFY `RideAnimStart` smallint(6) NOT NULL DEFAULT '0' AFTER `EnterAnimLoop`, + MODIFY `RideAnimLoop` smallint(6) NOT NULL DEFAULT '0' AFTER `RideAnimStart`, + MODIFY `RideUpperAnimStart` smallint(6) NOT NULL DEFAULT '0' AFTER `RideAnimLoop`, + MODIFY `RideUpperAnimLoop` smallint(6) NOT NULL DEFAULT '0' AFTER `RideUpperAnimStart`, + MODIFY `ExitAnimStart` smallint(6) NOT NULL DEFAULT '0' AFTER `RideUpperAnimLoop`, + MODIFY `ExitAnimLoop` smallint(6) NOT NULL DEFAULT '0' AFTER `ExitAnimStart`, + MODIFY `ExitAnimEnd` smallint(6) NOT NULL DEFAULT '0' AFTER `ExitAnimLoop`, + MODIFY `VehicleEnterAnim` smallint(6) NOT NULL DEFAULT '0' AFTER `ExitAnimEnd`, + MODIFY `VehicleExitAnim` smallint(6) NOT NULL DEFAULT '0' AFTER `VehicleEnterAnim`, + MODIFY `VehicleRideAnimLoop` smallint(6) NOT NULL DEFAULT '0' AFTER `VehicleExitAnim`, + MODIFY `EnterAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `VehicleRideAnimLoop`, + MODIFY `RideAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `EnterAnimKitID`, + MODIFY `ExitAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `RideAnimKitID`, + MODIFY `VehicleEnterAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ExitAnimKitID`, + MODIFY `VehicleRideAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `VehicleEnterAnimKitID`, + MODIFY `VehicleExitAnimKitID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `VehicleRideAnimKitID`, + MODIFY `CameraModeID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `VehicleExitAnimKitID`, + MODIFY `AttachmentID` tinyint(4) NOT NULL DEFAULT '0' AFTER `CameraModeID`, + MODIFY `PassengerAttachmentID` tinyint(4) NOT NULL DEFAULT '0' AFTER `AttachmentID`, + MODIFY `VehicleEnterAnimBone` tinyint(4) NOT NULL DEFAULT '0' AFTER `PassengerAttachmentID`, + MODIFY `VehicleExitAnimBone` tinyint(4) NOT NULL DEFAULT '0' AFTER `VehicleEnterAnimBone`, + MODIFY `VehicleRideAnimLoopBone` tinyint(4) NOT NULL DEFAULT '0' AFTER `VehicleExitAnimBone`, + MODIFY `VehicleAbilityDisplay` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `VehicleRideAnimLoopBone`; + +ALTER TABLE `wmo_area_table` + MODIFY `WMOGroupID` int(11) NOT NULL DEFAULT '0' FIRST, + MODIFY `AreaName` text NULL AFTER `WMOGroupID`, + MODIFY `WMOID` smallint(6) NOT NULL DEFAULT '0' AFTER `AreaName`, + MODIFY `AmbienceID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `WMOID`, + MODIFY `ZoneMusic` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AmbienceID`, + MODIFY `IntroSound` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ZoneMusic`, + MODIFY `AreaTableID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `IntroSound`, + MODIFY `UWIntroSound` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `AreaTableID`, + MODIFY `UWAmbience` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `UWIntroSound`, + MODIFY `NameSet` tinyint(4) NOT NULL DEFAULT '0' AFTER `UWAmbience`, + MODIFY `SoundProviderPref` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `NameSet`, + MODIFY `SoundProviderPrefUnderwater` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SoundProviderPref`, + MODIFY `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `SoundProviderPrefUnderwater`, + MODIFY `UWZoneMusic` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +ALTER TABLE `world_map_area` + MODIFY `AreaName` text NULL FIRST, + MODIFY `LocLeft` float NOT NULL DEFAULT '0' AFTER `AreaName`, + MODIFY `LocRight` float NOT NULL DEFAULT '0' AFTER `LocLeft`, + MODIFY `LocTop` float NOT NULL DEFAULT '0' AFTER `LocRight`, + MODIFY `LocBottom` float NOT NULL DEFAULT '0' AFTER `LocTop`, + MODIFY `MapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `LocBottom`, + MODIFY `AreaID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `MapID`, + MODIFY `DisplayMapID` smallint(6) NOT NULL DEFAULT '0' AFTER `AreaID`, + MODIFY `DefaultDungeonFloor` smallint(6) NOT NULL DEFAULT '0' AFTER `DisplayMapID`, + MODIFY `ParentWorldMapID` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `DefaultDungeonFloor`, + MODIFY `Flags` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `ParentWorldMapID`, + MODIFY `LevelRangeMin` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Flags`, + MODIFY `LevelRangeMax` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LevelRangeMin`, + MODIFY `BountySetID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `LevelRangeMax`, + MODIFY `BountyBoardLocation` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `BountySetID`, + MODIFY `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`; + +ALTER TABLE `world_map_overlay` + MODIFY `TextureWidth` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `TextureName`, + MODIFY `TextureHeight` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `TextureWidth`, + MODIFY `MapAreaID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `TextureHeight`, + MODIFY `AreaID1` int(10) unsigned NOT NULL DEFAULT '0' AFTER `MapAreaID`, + MODIFY `AreaID2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AreaID1`, + MODIFY `AreaID3` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AreaID2`, + MODIFY `AreaID4` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AreaID3`, + MODIFY `OffsetX` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AreaID4`, + MODIFY `OffsetY` int(10) unsigned NOT NULL DEFAULT '0' AFTER `OffsetX`, + MODIFY `HitRectTop` int(10) unsigned NOT NULL DEFAULT '0' AFTER `OffsetY`, + MODIFY `HitRectLeft` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HitRectTop`, + MODIFY `HitRectBottom` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HitRectLeft`, + MODIFY `HitRectRight` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HitRectBottom`, + MODIFY `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HitRectRight`, + MODIFY `Flags` int(10) unsigned NOT NULL DEFAULT '0' AFTER `PlayerConditionID`; + +DROP TABLE `glyph_slot`; diff --git a/sql/updates/world/2016_xx_xx_xx_world_legion_01.sql b/sql/updates/world/2016_xx_xx_xx_world_legion_01.sql deleted file mode 100644 index 44e87058b38..00000000000 --- a/sql/updates/world/2016_xx_xx_xx_world_legion_01.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_mana_tide_totem'; diff --git a/src/common/Define.h b/src/common/Define.h index 5bbb77916f5..784bb4dd8ca 100644 --- a/src/common/Define.h +++ b/src/common/Define.h @@ -164,10 +164,7 @@ enum DBCFormer FT_FLOAT = 'f', // float FT_INT = 'i', // uint32 FT_BYTE = 'b', // uint8 - FT_LONG = 'l', // uint64 - FT_SHORT = 'h', // uint16 - FT_SORT = 'd', // sorted by this field but not present in DB2 data block (calculated) - FT_IND = 'n' // sorted by this field + FT_SHORT = 'h' // uint16 }; #endif //TRINITY_DEFINE_H diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 6055abdd08d..8dbfbb150a7 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -127,7 +127,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, ignore_mask, item0, item1, item2, item3, item4, item5, item6, item7, item8, " "item9, item10, item11, item12, item13, item14, item15, item16, item17, item18 FROM character_equipmentsets WHERE guid = ? ORDER BY setindex", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_GLYPHS, "SELECT talentGroup, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_TALENTS, "SELECT spell, talentGroup FROM character_talent WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC); @@ -554,7 +553,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_CHAR_EQUIPMENTSETS, "DELETE FROM character_equipmentsets WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GUILD_EVENTLOG_BY_PLAYER, "DELETE FROM guild_eventlog WHERE PlayerGuid1 = ? OR PlayerGuid2 = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GUILD_BANK_EVENTLOG_BY_PLAYER, "DELETE FROM guild_bank_eventlog WHERE PlayerGuid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_GLYPHS, "DELETE FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_TALENT, "DELETE FROM character_talent WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_SKILLS, "DELETE FROM character_skills WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_MONEY, "UPDATE characters SET money = ? WHERE guid = ?", CONNECTION_ASYNC); @@ -583,7 +581,6 @@ void CharacterDatabaseConnection::DoPrepareStatements() "spellPower, resilience) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PETITION_BY_OWNER, "DELETE FROM petition WHERE ownerguid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PETITION_SIGNATURE_BY_OWNER, "DELETE FROM petition_sign WHERE ownerguid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_CHAR_GLYPHS, "INSERT INTO character_glyphs (guid, talentGroup, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6) VALUES(?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_TALENT_BY_SPELL_SPEC, "DELETE FROM character_talent WHERE guid = ? and spell = ? and talentGroup = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_TALENT, "INSERT INTO character_talent (guid, spell, talentGroup) VALUES (?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC, "DELETE FROM character_action WHERE spec<>? AND guid = ?", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h index e35bedfd587..81847f12c58 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.h +++ b/src/server/database/Database/Implementation/CharacterDatabase.h @@ -110,7 +110,6 @@ enum CharacterDatabaseStatements CHAR_SEL_CHARACTER_CRITERIAPROGRESS, CHAR_SEL_CHARACTER_EQUIPMENTSETS, CHAR_SEL_CHARACTER_BGDATA, - CHAR_SEL_CHARACTER_GLYPHS, CHAR_SEL_CHARACTER_TALENTS, CHAR_SEL_CHARACTER_SKILLS, CHAR_SEL_CHARACTER_RANDOMBG, @@ -470,7 +469,6 @@ enum CharacterDatabaseStatements CHAR_DEL_CHAR_EQUIPMENTSETS, CHAR_DEL_GUILD_EVENTLOG_BY_PLAYER, CHAR_DEL_GUILD_BANK_EVENTLOG_BY_PLAYER, - CHAR_DEL_CHAR_GLYPHS, CHAR_DEL_CHAR_TALENT, CHAR_DEL_CHAR_SKILLS, CHAR_UPD_CHAR_MONEY, @@ -497,7 +495,6 @@ enum CharacterDatabaseStatements CHAR_INS_CHAR_STATS, CHAR_DEL_PETITION_BY_OWNER, CHAR_DEL_PETITION_SIGNATURE_BY_OWNER, - CHAR_INS_CHAR_GLYPHS, CHAR_DEL_CHAR_TALENT_BY_SPELL_SPEC, CHAR_INS_CHAR_TALENT, CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC, diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 31db228b20a..6a7badda678 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ - // DO NOT EDIT! - // Autogenerated from DB2Structure.h +// DO NOT EDIT! +// Autogenerated from DB2Structure.h #include "HotfixDatabase.h" @@ -31,8 +31,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS); // Achievement.db2 - PrepareStatement(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Title, Description, Flags, Reward, MapID, Supercedes, Category, UIOrder, IconID, " - "SharesCriteria, CriteriaTree, Faction, Points, MinimumCriteria FROM achievement ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ACHIEVEMENT, "SELECT Title, Description, Flags, Reward, MapID, Supercedes, Category, UIOrder, IconID, SharesCriteria, " + "CriteriaTree, Faction, Points, MinimumCriteria, ID FROM achievement ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Title_lang, Description_lang, Reward_lang FROM achievement_locale WHERE locale = ?", CONNECTION_SYNCH); // AnimKit.db2 @@ -43,14 +43,14 @@ void HotfixDatabaseConnection::DoPrepareStatements() // AreaTable.db2 PrepareStatement(HOTFIX_SEL_AREA_TABLE, "SELECT ID, Flags1, Flags2, ZoneName, AmbientMultiplier, AreaName, MapID, ParentAreaID, AreaBit, " - "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWIntroMusic, UWZoneMusic, UWAmbience, " - "PvPCombastWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, " - "WildBattlePetLevelMin, WildBattlePetLevelMax, WindSettingsID FROM area_table ORDER BY ID DESC", CONNECTION_SYNCH); + "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWZoneMusic, UWAmbience, " + "PvPCombatWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, " + "WildBattlePetLevelMin, WildBattlePetLevelMax, WindSettingsID, UWIntroSound FROM area_table ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_AREA_TABLE, "SELECT ID, AreaName_lang FROM area_table_locale WHERE locale = ?", CONNECTION_SYNCH); // AreaTrigger.db2 - PrepareStatement(HOTFIX_SEL_AREA_TRIGGER, "SELECT ID, PosX, PosY, PosZ, Radius, BoxLength, BoxWidth, BoxHeight, BoxYaw, MapID, PhaseID, " - "PhaseGroupID, ShapeID, AreaTriggerActionSetID, PhaseUseFlags, ShapeType, Flag FROM area_trigger ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_AREA_TRIGGER, "SELECT PosX, PosY, PosZ, Radius, BoxLength, BoxWidth, BoxHeight, BoxYaw, MapID, PhaseID, PhaseGroupID, " + "ShapeID, AreaTriggerActionSetID, PhaseUseFlags, ShapeType, Flag, ID FROM area_trigger ORDER BY ID DESC", CONNECTION_SYNCH); // ArmorLocation.db2 PrepareStatement(HOTFIX_SEL_ARMOR_LOCATION, "SELECT ID, Modifier1, Modifier2, Modifier3, Modifier4, Modifier5 FROM armor_location ORDER BY ID DESC", CONNECTION_SYNCH); @@ -66,7 +66,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_BANNED_ADDONS, "SELECT ID, Name, Version, Flags FROM banned_addons ORDER BY ID DESC", CONNECTION_SYNCH); // BarberShopStyle.db2 - PrepareStatement(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT ID, DisplayName, Description, CostModifier, Type, Race, Sex, Data FROM barber_shop_style" + PrepareStatement(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT DisplayName, Description, CostModifier, Type, Race, Sex, Data, ID FROM barber_shop_style" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT ID, DisplayName_lang, Description_lang FROM barber_shop_style_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -77,8 +77,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_BATTLE_PET_BREED_STATE, "SELECT ID, Value, BreedID, State FROM battle_pet_breed_state ORDER BY ID DESC", CONNECTION_SYNCH); // BattlePetSpecies.db2 - PrepareStatement(HOTFIX_SEL_BATTLE_PET_SPECIES, "SELECT ID, CreatureID, IconFileID, SummonSpellID, SourceText, Description, Flags, PetType, " - "Source FROM battle_pet_species ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_BATTLE_PET_SPECIES, "SELECT CreatureID, IconFileID, SummonSpellID, SourceText, Description, Flags, PetType, Source, " + "ID FROM battle_pet_species ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_BATTLE_PET_SPECIES, "SELECT ID, SourceText_lang, Description_lang FROM battle_pet_species_locale WHERE locale = ?", CONNECTION_SYNCH); // BattlePetSpeciesState.db2 @@ -92,12 +92,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() // BroadcastText.db2 PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, " - "EmoteDelay3, SoundID, UnkEmoteID, Language, Type FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH); + "EmoteDelay3, UnkEmoteID, Language, Type, SoundID1, SoundID2, PlayerConditionID FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_locale WHERE locale = ?", CONNECTION_SYNCH); // CharSections.db2 PrepareStatement(HOTFIX_SEL_CHAR_SECTIONS, "SELECT Id, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, Race, Gender, GenType, " - "Type, Color FROM char_sections ORDER BY Id DESC", CONNECTION_SYNCH); + "Type, Color FROM char_sections ORDER BY ID DESC", CONNECTION_SYNCH); // CharStartOutfit.db2 PrepareStatement(HOTFIX_SEL_CHAR_START_OUTFIT, "SELECT ID, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " @@ -113,9 +113,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_CHAT_CHANNELS, "SELECT ID, Name_lang, Shortcut_lang FROM chat_channels_locale WHERE locale = ?", CONNECTION_SYNCH); // ChrClasses.db2 - PrepareStatement(HOTFIX_SEL_CHR_CLASSES, "SELECT ID, PowerType, PetNameToken, Name, NameFemale, NameMale, Filename, CreateScreenFileDataID, " - "SelectScreenFileDataID, LowResScreenFileDataID, Flags, CinematicSequenceID, DefaultSpec, SpellClassSet, AttackPowerPerStrength, " - "AttackPowerPerAgility, RangedAttackPowerPerAgility, IconFileDataID, Unk1 FROM chr_classes ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_CHR_CLASSES, "SELECT PetNameToken, Name, NameFemale, NameMale, Filename, CreateScreenFileDataID, " + "SelectScreenFileDataID, LowResScreenFileDataID, Flags, CinematicSequenceID, DefaultSpec, PowerType, SpellClassSet, AttackPowerPerStrength, " + "AttackPowerPerAgility, RangedAttackPowerPerAgility, IconFileDataID, Unk1, ID FROM chr_classes ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_CLASSES, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_classes_locale WHERE locale = ?", CONNECTION_SYNCH); // ChrClassesXPowerTypes.db2 @@ -126,14 +126,14 @@ void HotfixDatabaseConnection::DoPrepareStatements() "FacialHairCustomization2, HairCustomization, CreateScreenFileDataID, SelectScreenFileDataID, MaleCustomizeOffset1, MaleCustomizeOffset2, " "MaleCustomizeOffset3, FemaleCustomizeOffset1, FemaleCustomizeOffset2, FemaleCustomizeOffset3, LowResScreenFileDataID, FactionID, " "ExplorationSoundID, MaleDisplayID, FemaleDisplayID, ResSicknessSpellID, SplashSoundID, CinematicSequenceID, UAMaleCreatureSoundDataID, " - "UAFemaleCreatureSoundDataID, HighResMaleDisplayID, HighResFemaleDisplayID, Unk, BaseLanguage, CreatureType, TeamID, RaceRelated, " - "UnalteredVisualRaceID, CharComponentTextureLayoutID, DefaultClassID, NeutralRaceID, ItemAppearanceFrameRaceID, " - "CharComponentTexLayoutHiResID FROM chr_races ORDER BY ID DESC", CONNECTION_SYNCH); + "UAFemaleCreatureSoundDataID, Unk, BaseLanguage, CreatureType, TeamID, RaceRelated, UnalteredVisualRaceID, CharComponentTextureLayoutID, " + "DefaultClassID, NeutralRaceID, ItemAppearanceFrameRaceID, CharComponentTexLayoutHiResID, HighResMaleDisplayID, HighResFemaleDisplayID" + " FROM chr_races ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_RACES, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_races_locale WHERE locale = ?", CONNECTION_SYNCH); // ChrSpecialization.db2 - PrepareStatement(HOTFIX_SEL_CHR_SPECIALIZATION, "SELECT ID, MasterySpellID1, MasterySpellID2, Flags, AnimReplacementSetID, Name, Name2, " - "Description, BackgroundFile, SpellIconID, ClassID, OrderIndex, PetTalentType, Role, PrimaryStatOrder FROM chr_specialization ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_CHR_SPECIALIZATION, "SELECT MasterySpellID1, MasterySpellID2, Name, Name2, Description, BackgroundFile, SpellIconID, " + "ClassID, OrderIndex, PetTalentType, Role, PrimaryStatOrder, ID, Flags, AnimReplacementSetID FROM chr_specialization ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_SPECIALIZATION, "SELECT ID, Name_lang, Name2_lang, Description_lang FROM chr_specialization_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -158,11 +158,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_FAMILY, "SELECT ID, Name_lang FROM creature_family_locale WHERE locale = ?", CONNECTION_SYNCH); // CreatureModelData.db2 - PrepareStatement(HOTFIX_SEL_CREATURE_MODEL_DATA, "SELECT ID, Flags, FileDataID, ModelScale, FootprintTextureLength, FootprintTextureWidth, " - "FootprintParticleScale, CollisionWidth, CollisionHeight, MountHeight, GeoBoxMin1, GeoBoxMin2, GeoBoxMin3, GeoBoxMax1, GeoBoxMax2, " - "GeoBoxMax3, WorldEffectScale, AttachedEffectScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, " - "OverrideLootEffectScale, OverrideNameScale, OverrideSelectionRadius, TamedPetBaseScale, HoverHeight, SoundID, CreatureGeosetDataID, " - "SizeClass, BloodID, FootprintTextureID, FoleyMaterialID, Unk700_1, Unk700_2, FootstepShakeSize, DeathThudShakeSize FROM creature_model_data" + PrepareStatement(HOTFIX_SEL_CREATURE_MODEL_DATA, "SELECT ID, ModelScale, FootprintTextureLength, FootprintTextureWidth, FootprintParticleScale, " + "CollisionWidth, CollisionHeight, MountHeight, GeoBoxMin1, GeoBoxMin2, GeoBoxMin3, GeoBoxMax1, GeoBoxMax2, GeoBoxMax3, WorldEffectScale, " + "AttachedEffectScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, OverrideLootEffectScale, OverrideNameScale, " + "OverrideSelectionRadius, TamedPetBaseScale, HoverHeight, Flags, FileDataID, SizeClass, BloodID, FootprintTextureID, FoleyMaterialID, " + "FootstepEffectID, DeathThudEffectID, FootstepShakeSize, DeathThudShakeSize, SoundID, CreatureGeosetDataID FROM creature_model_data" " ORDER BY ID DESC", CONNECTION_SYNCH); // CreatureType.db2 @@ -170,17 +170,17 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH); // Criteria.db2 - PrepareStatement(HOTFIX_SEL_CRITERIA, "SELECT ID, Asset, StartAsset, FailAsset, StartTimer, ModifierTreeId, EligibilityWorldStateID, Type, " - "StartEvent, FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_CRITERIA, "SELECT ID, StartAsset, FailAsset, StartTimer, ModifierTreeId, EligibilityWorldStateID, Type, StartEvent, " + "FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC", CONNECTION_SYNCH); // CriteriaTree.db2 - PrepareStatement(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, Amount, Description, CriteriaID, Parent, Flags, OrderIndex, Operator FROM criteria_tree" + PrepareStatement(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, CriteriaID, Amount, Description, Parent, Flags, Operator, OrderIndex FROM criteria_tree" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, Description_lang FROM criteria_tree_locale WHERE locale = ?", CONNECTION_SYNCH); // CurrencyTypes.db2 PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name, InventoryIcon1, InventoryIcon2, MaxQty, MaxEarnablePerWeek, Flags, Description, " - "CategoryID, SpellWeight, SpellCategory, Quality FROM currency_types ORDER BY ID DESC", CONNECTION_SYNCH); + "CategoryID, SpellCategory, Quality, SpellWeight FROM currency_types ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, Description_lang FROM currency_types_locale WHERE locale = ?", CONNECTION_SYNCH); // CurvePoint.db2 @@ -201,7 +201,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_DIFFICULTY, "SELECT ID, Name_lang FROM difficulty_locale WHERE locale = ?", CONNECTION_SYNCH); // DungeonEncounter.db2 - PrepareStatement(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name, CreatureDisplayID, MapID, OrderIndex, SpellIconID, DifficultyID, Bit, Flags" + PrepareStatement(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name, CreatureDisplayID, MapID, SpellIconID, DifficultyID, Bit, Flags, OrderIndex" " FROM dungeon_encounter ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name_lang FROM dungeon_encounter_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -217,22 +217,22 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_DURABILITY_QUALITY, "SELECT ID, QualityMod FROM durability_quality ORDER BY ID DESC", CONNECTION_SYNCH); // Emotes.db2 - PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, Unk703_1, Unk703_2, AnimID, EmoteSpecProcParam, " - "EmoteSoundID, EmoteSpecProc FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, AnimID, EmoteSpecProc, EmoteSpecProcParam, " + "EmoteSoundID, ClassMask, RaceMask FROM emotes ORDER BY ID DESC", CONNECTION_SYNCH); // EmotesText.db2 PrepareStatement(HOTFIX_SEL_EMOTES_TEXT, "SELECT ID, Name, EmoteID FROM emotes_text ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_EMOTES_TEXT, "SELECT ID, Name_lang FROM emotes_text_locale WHERE locale = ?", CONNECTION_SYNCH); // EmotesTextSound.db2 - PrepareStatement(HOTFIX_SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, SoundId, RaceId, SexId, ClassId FROM emotes_text_sound ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, RaceId, SexId, ClassId, SoundId FROM emotes_text_sound ORDER BY ID DESC", CONNECTION_SYNCH); // Faction.db2 PrepareStatement(HOTFIX_SEL_FACTION, "SELECT ID, ReputationRaceMask1, ReputationRaceMask2, ReputationRaceMask3, ReputationRaceMask4, " "ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ParentFactionModIn, ParentFactionModOut, Name, Description, " - "ReputationIndex, ReputationClassMask1, ReputationClassMask2, ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, " - "ReputationFlags3, ReputationFlags4, ParentFactionID, ParentFactionCapIn, ParentFactionCapOut, Expansion, Flags, FriendshipRepID FROM faction" - " ORDER BY ID DESC", CONNECTION_SYNCH); + "ReputationMax1, ReputationMax2, ReputationMax3, ReputationMax4, ReputationIndex, ReputationClassMask1, ReputationClassMask2, " + "ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, ReputationFlags3, ReputationFlags4, ParentFactionID, " + "ParentFactionCapIn, ParentFactionCapOut, Expansion, Flags, FriendshipRepID FROM faction ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_FACTION, "SELECT ID, Name_lang, Description_lang FROM faction_locale WHERE locale = ?", CONNECTION_SYNCH); // FactionTemplate.db2 @@ -240,8 +240,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Friends4, Mask, FriendMask, EnemyMask FROM faction_template ORDER BY ID DESC", CONNECTION_SYNCH); // Gameobjects.db2 - PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, Data1, " - "Data2, Data3, Data4, Data5, Data6, Data7, Data8, Name, MapID, DisplayID, PhaseID, PhaseGroupID, PhaseUseFlags, Type FROM gameobjects" + PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, Data1, Data2, " + "Data3, Data4, Data5, Data6, Data7, Data8, Name, MapID, DisplayID, PhaseID, PhaseGroupID, PhaseUseFlags, Type, ID FROM gameobjects" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, Name_lang FROM gameobjects_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -250,34 +250,34 @@ void HotfixDatabaseConnection::DoPrepareStatements() "GeoBoxMaxZ, OverrideLootEffectScale, OverrideNameScale, ObjectEffectPackageID FROM gameobject_display_info ORDER BY ID DESC", CONNECTION_SYNCH); // GarrAbility.db2 - PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name, Description, IconFileDataID, Flags, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " - "FollowerTypeID FROM garr_ability ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT Name, Description, IconFileDataID, Flags, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " + "FollowerTypeID, ID FROM garr_ability ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name_lang, Description_lang FROM garr_ability_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrBuilding.db2 PrepareStatement(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, HordeGameObjectID, AllianceGameObjectID, NameAlliance, NameHorde, Description, Tooltip, " - "IconFileDataID, BuildDuration, CostCurrencyID, CostCurrencyAmount, AllianceActivationScenePackageID, HordeActivationScenePackageID, " - "CostMoney, Unknown, Type, Level, HordeTexPrefixKitID, AllianceTexPrefixKitID, BonusAmount, Flags, MaxShipments, " - "FollowerRequiredGarrAbilityID, FollowerGarrAbilityEffectID, GarrTypeID FROM garr_building ORDER BY ID DESC", CONNECTION_SYNCH); + "IconFileDataID, CostCurrencyID, HordeTexPrefixKitID, AllianceTexPrefixKitID, AllianceActivationScenePackageID, " + "HordeActivationScenePackageID, FollowerRequiredGarrAbilityID, FollowerGarrAbilityEffectID, CostMoney, Unknown, Type, Level, Flags, " + "MaxShipments, GarrTypeID, BuildDuration, CostCurrencyAmount, BonusAmount FROM garr_building ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, NameAlliance_lang, NameHorde_lang, Description_lang, Tooltip_lang" " FROM garr_building_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrBuildingPlotInst.db2 - PrepareStatement(HOTFIX_SEL_GARR_BUILDING_PLOT_INST, "SELECT ID, LandmarkOffsetX, LandmarkOffsetY, UiTextureAtlasMemberID, " - "GarrSiteLevelPlotInstID, GarrBuildingID FROM garr_building_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_BUILDING_PLOT_INST, "SELECT LandmarkOffsetX, LandmarkOffsetY, UiTextureAtlasMemberID, GarrSiteLevelPlotInstID, " + "GarrBuildingID, ID FROM garr_building_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); // GarrClassSpec.db2 - PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, `Limit`, Flags" + PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, `Limit`, Flags, ID" " FROM garr_class_spec ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" " WHERE locale = ?", CONNECTION_SYNCH); // GarrFollower.db2 - PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeCreatureID, AllianceCreatureID, HordeSourceText, AllianceSourceText, " - "HordePortraitIconID, AlliancePortraitIconID, ItemLevelWeapon, ItemLevelArmor, FollowerTypeID, HordeUiAnimRaceInfoID, " - "AllianceUiAnimRaceInfoID, Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, Level, " - "Unknown1, Flags, Unknown2, Unknown3, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, GarrTypeID, MaxDurability, Class" - " FROM garr_follower ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER, "SELECT HordeCreatureID, AllianceCreatureID, HordeSourceText, AllianceSourceText, HordePortraitIconID, " + "AlliancePortraitIconID, HordeAddedBroadcastTextID, AllianceAddedBroadcastTextID, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, " + "ItemLevelWeapon, ItemLevelArmor, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, FollowerTypeID, HordeUiAnimRaceInfoID, " + "AllianceUiAnimRaceInfoID, Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, Level, Unknown1, Flags, Unknown2, Unknown3, GarrTypeID, " + "MaxDurability, Class, HordeFlavorTextGarrStringID, AllianceFlavorTextGarrStringID, ID FROM garr_follower ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeSourceText_lang, AllianceSourceText_lang FROM garr_follower_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrFollowerXAbility.db2 @@ -285,8 +285,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // GarrPlot.db2 - PrepareStatement(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, MinCount, MaxCount, " - "GarrPlotUICategoryID, PlotType, Flags FROM garr_plot ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, GarrPlotUICategoryID, " + "PlotType, Flags, MinCount, MaxCount FROM garr_plot ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_PLOT, "SELECT ID, Name_lang FROM garr_plot_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrPlotBuilding.db2 @@ -297,7 +297,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_PLOT_INSTANCE, "SELECT ID, Name_lang FROM garr_plot_instance_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrSiteLevel.db2 - PrepareStatement(HOTFIX_SEL_GARR_SITE_LEVEL, "SELECT ID, TownHallX, TownHallY, MapID, UpgradeResourceCost, UpgradeMoneyCost, Level, SiteID, " + PrepareStatement(HOTFIX_SEL_GARR_SITE_LEVEL, "SELECT ID, TownHallX, TownHallY, MapID, SiteID, UpgradeResourceCost, UpgradeMoneyCost, Level, " "UITextureKitID, MovieID, Level2 FROM garr_site_level ORDER BY ID DESC", CONNECTION_SYNCH); // GarrSiteLevelPlotInst.db2 @@ -311,9 +311,6 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, SpellIconID, Type, GlyphExclusiveCategoryID FROM glyph_properties" " ORDER BY ID DESC", CONNECTION_SYNCH); - // GlyphSlot.db2 - PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Tooltip, Type FROM glyph_slot ORDER BY ID DESC", CONNECTION_SYNCH); - // GuildColorBackground.db2 PrepareStatement(HOTFIX_SEL_GUILD_COLOR_BACKGROUND, "SELECT ID, Red, Green, Blue FROM guild_color_background ORDER BY ID DESC", CONNECTION_SYNCH); @@ -327,8 +324,8 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GUILD_PERK_SPELLS, "SELECT ID, SpellID FROM guild_perk_spells ORDER BY ID DESC", CONNECTION_SYNCH); // Heirloom.db2 - PrepareStatement(HOTFIX_SEL_HEIRLOOM, "SELECT ID, ItemID, SourceText, OldItem1, OldItem2, NextDifficultyItemID, UpgradeItemID1, UpgradeItemID2, " - "ItemBonusListID1, ItemBonusListID2, Flags, Source FROM heirloom ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_HEIRLOOM, "SELECT ItemID, SourceText, OldItem1, OldItem2, NextDifficultyItemID, UpgradeItemID1, UpgradeItemID2, " + "ItemBonusListID1, ItemBonusListID2, Flags, Source, ID FROM heirloom ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_HEIRLOOM, "SELECT ID, SourceText_lang FROM heirloom_locale WHERE locale = ?", CONNECTION_SYNCH); // Holidays.db2 @@ -418,17 +415,17 @@ void HotfixDatabaseConnection::DoPrepareStatements() // ItemExtendedCost.db2 PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, " - "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, RequiredMoney, " - "RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, " - "RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, RequiredArenaSlot, RequiredFactionId, " - "RequiredFactionStanding, RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH); + "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, RequiredItemCount1, " + "RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, RequiredCurrency1, " + "RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, RequiredArenaSlot, RequiredFactionId, RequiredFactionStanding, " + "RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH); // ItemLimitCategory.db2 PrepareStatement(HOTFIX_SEL_ITEM_LIMIT_CATEGORY, "SELECT ID, Name, Quantity, Flags FROM item_limit_category ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_LIMIT_CATEGORY, "SELECT ID, Name_lang FROM item_limit_category_locale WHERE locale = ?", CONNECTION_SYNCH); // ItemModifiedAppearance.db2 - PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceID, AppearanceModID, `Index`, SourceType" + PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ItemID, AppearanceID, AppearanceModID, `Index`, SourceType, ID" " FROM item_modified_appearance ORDER BY ID DESC", CONNECTION_SYNCH); // ItemPriceBase.db2 @@ -446,7 +443,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() // ItemSet.db2 PrepareStatement(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " - "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, Unknown703, RequiredSkillRank, RequiredSkill FROM item_set" + "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, RequiredSkillRank, RequiredSkill, Flags FROM item_set" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SET, "SELECT ID, Name_lang FROM item_set_locale WHERE locale = ?", CONNECTION_SYNCH); @@ -487,10 +484,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // LfgDungeons.db2 - PrepareStatement(HOTFIX_SEL_LFG_DUNGEONS, "SELECT ID, Name, Flags, TextureFilename, Description, MaxLevel, TargetLevelMax, MapID, RandomID, " + PrepareStatement(HOTFIX_SEL_LFG_DUNGEONS, "SELECT Name, Flags, TextureFilename, Description, MaxLevel, TargetLevelMax, MapID, RandomID, " "ScenarioID, LastBossJournalEncounterID, BonusReputationAmount, MentorItemLevel, MinLevel, TargetLevel, TargetLevelMin, DifficultyID, Type, " "Faction, Expansion, OrderIndex, GroupID, CountTank, CountHealer, CountDamage, MinCountTank, MinCountHealer, MinCountDamage, SubType, " - "MentorCharLevel FROM lfg_dungeons ORDER BY ID DESC", CONNECTION_SYNCH); + "MentorCharLevel, ID FROM lfg_dungeons ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_LFG_DUNGEONS, "SELECT ID, Name_lang, Description_lang FROM lfg_dungeons_locale WHERE locale = ?", CONNECTION_SYNCH); // Light.db2 @@ -500,9 +497,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() // LiquidType.db2 PrepareStatement(HOTFIX_SEL_LIQUID_TYPE, "SELECT ID, Name, SpellID, MaxDarkenDepth, FogDarkenIntensity, AmbDarkenIntensity, DirDarkenIntensity, " "ParticleScale, Texture1, Texture2, Texture3, Texture4, Texture5, Texture6, Color1, Color2, Float1, Float2, Float3, `Float4`, Float5, Float6, " - "Float7, `Float8`, Float9, Float10, Float11, Float12, Float13, Float14, Float15, Float16, Float17, Float18, `Int1`, `Int2`, `Int3`, `Int4`, Flags, " - "SoundID, Type, LightID, ParticleMovement, ParticleTexSlots, MaterialID, DepthTexCount1, DepthTexCount2, DepthTexCount3, DepthTexCount4, " - "DepthTexCount5, DepthTexCount6 FROM liquid_type ORDER BY ID DESC", CONNECTION_SYNCH); + "Float7, `Float8`, Float9, Float10, Float11, Float12, Float13, Float14, Float15, Float16, Float17, Float18, `Int1`, `Int2`, `Int3`, `Int4`, " + "Flags, LightID, Type, ParticleMovement, ParticleTexSlots, MaterialID, DepthTexCount1, DepthTexCount2, DepthTexCount3, DepthTexCount4, " + "DepthTexCount5, DepthTexCount6, SoundID FROM liquid_type ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_LIQUID_TYPE, "SELECT ID, Name_lang FROM liquid_type_locale WHERE locale = ?", CONNECTION_SYNCH); // Lock.db2 @@ -521,21 +518,21 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang FROM map_locale WHERE locale = ?", CONNECTION_SYNCH); // MapDifficulty.db2 - PrepareStatement(HOTFIX_SEL_MAP_DIFFICULTY, "SELECT ID, Message, Context, MapID, DifficultyID, RaidDurationType, MaxPlayers, LockID, " - "ItemBonusTreeModID FROM map_difficulty ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MAP_DIFFICULTY, "SELECT ID, Message, MapID, DifficultyID, RaidDurationType, MaxPlayers, LockID, ItemBonusTreeModID, " + "Context FROM map_difficulty ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP_DIFFICULTY, "SELECT ID, Message_lang FROM map_difficulty_locale WHERE locale = ?", CONNECTION_SYNCH); // ModifierTree.db2 PrepareStatement(HOTFIX_SEL_MODIFIER_TREE, "SELECT ID, Asset1, Asset2, Parent, Type, Unk700, Operator, Amount FROM modifier_tree ORDER BY ID DESC", CONNECTION_SYNCH); // Mount.db2 - PrepareStatement(HOTFIX_SEL_MOUNT, "SELECT ID, SpellId, DisplayId, Name, Description, SourceDescription, MountTypeId, Flags, PlayerConditionId, " - "Source FROM mount ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MOUNT, "SELECT SpellId, DisplayId, Name, Description, SourceDescription, CameraPivotMultiplier, MountTypeId, Flags, " + "PlayerConditionId, Source, ID FROM mount ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_MOUNT, "SELECT ID, Name_lang, Description_lang, SourceDescription_lang FROM mount_locale WHERE locale = ?", CONNECTION_SYNCH); // MountCapability.db2 - PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, RequiredAura, RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, " - "RequiredMap, Flags FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, RequiredMap, Flags, ID, " + "RequiredAura FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH); // MountTypeXCapability.db2 PrepareStatement(HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, MountCapabilityID, OrderIndex FROM mount_type_x_capability" @@ -569,21 +566,21 @@ void HotfixDatabaseConnection::DoPrepareStatements() // PlayerCondition.db2 PrepareStatement(HOTFIX_SEL_PLAYER_CONDITION, "SELECT ID, RaceMask, SkillLogic, ReputationLogic, PrevQuestLogic, CurrQuestLogic, " - "CurrentCompletedQuestLogic, SpellLogic, SpellID1, SpellID2, SpellID3, SpellID4, ItemLogic, ItemID1, ItemID2, ItemID3, ItemID4, Time1, Time2, " - "AuraSpellLogic, AuraSpellID1, AuraSpellID2, AuraSpellID3, AuraSpellID4, AchievementLogic, AreaLogic, QuestKillLogic, QuestKillMonster1, " - "QuestKillMonster2, QuestKillMonster3, QuestKillMonster4, QuestKillMonster5, QuestKillMonster6, FailureDescription, Unknown700_1, " - "Unknown700_2, MinLevel, MaxLevel, ClassMask, SkillID1, SkillID2, SkillID3, SkillID4, MinSkill1, MinSkill2, MinSkill3, MinSkill4, MaxSkill1, " - "MaxSkill2, MaxSkill3, MaxSkill4, MinFactionID1, MinFactionID2, MinFactionID3, MaxFactionID, PrevQuestID1, PrevQuestID2, PrevQuestID3, " + "CurrentCompletedQuestLogic, SpellLogic, ItemLogic, Time1, Time2, AuraSpellLogic, AuraSpellID1, AuraSpellID2, AuraSpellID3, AuraSpellID4, " + "AchievementLogic, AreaLogic, QuestKillLogic, FailureDescription, MinLevel, MaxLevel, SkillID1, SkillID2, SkillID3, SkillID4, MinSkill1, " + "MinSkill2, MinSkill3, MinSkill4, MaxSkill1, MaxSkill2, MaxSkill3, MaxSkill4, MaxFactionID, PrevQuestID1, PrevQuestID2, PrevQuestID3, " "PrevQuestID4, CurrQuestID1, CurrQuestID2, CurrQuestID3, CurrQuestID4, CurrentCompletedQuestID1, CurrentCompletedQuestID2, " "CurrentCompletedQuestID3, CurrentCompletedQuestID4, Explored1, Explored2, WorldStateExpressionID, Achievement1, Achievement2, Achievement3, " - "Achievement4, AreaID1, AreaID2, AreaID3, AreaID4, QuestKillID, PhaseID, MinAvgItemLevel, MaxAvgItemLevel, MinAvgEquippedItemLevel, " - "MaxAvgEquippedItemLevel, ModifierTreeID, Flags, Gender, NativeGender, LanguageID, MinLanguage, MaxLanguage, MinReputation1, MinReputation2, " - "MinReputation3, MaxReputation, Unknown1, MinPVPRank, MaxPVPRank, PvpMedal, ItemCount1, ItemCount2, ItemCount3, ItemCount4, ItemFlags, " - "AuraCount1, AuraCount2, AuraCount3, AuraCount4, WeatherID, PartyStatus, LifetimeMaxPVPRank, LfgLogic, LfgStatus1, LfgStatus2, LfgStatus3, " - "LfgStatus4, LfgCompare1, LfgCompare2, LfgCompare3, LfgCompare4, LfgValue1, LfgValue2, LfgValue3, LfgValue4, CurrencyLogic, CurrencyID1, " - "CurrencyID2, CurrencyID3, CurrencyID4, CurrencyCount1, CurrencyCount2, CurrencyCount3, CurrencyCount4, MinExpansionLevel, MaxExpansionLevel, " - "MinExpansionTier, MaxExpansionTier, MinGuildLevel, MaxGuildLevel, PhaseUseFlags, PhaseGroupID, ChrSpecializationIndex, " - "ChrSpecializationRole, PowerType, PowerTypeComp, PowerTypeValue FROM player_condition ORDER BY ID DESC", CONNECTION_SYNCH); + "Achievement4, AreaID1, AreaID2, AreaID3, AreaID4, QuestKillID, PhaseID, MinAvgEquippedItemLevel, MaxAvgEquippedItemLevel, ModifierTreeID, " + "Flags, Gender, NativeGender, MinLanguage, MaxLanguage, MinReputation1, MinReputation2, MinReputation3, MaxReputation, Unknown1, MinPVPRank, " + "MaxPVPRank, PvpMedal, ItemFlags, AuraCount1, AuraCount2, AuraCount3, AuraCount4, WeatherID, PartyStatus, LifetimeMaxPVPRank, LfgStatus1, " + "LfgStatus2, LfgStatus3, LfgStatus4, LfgCompare1, LfgCompare2, LfgCompare3, LfgCompare4, CurrencyCount1, CurrencyCount2, CurrencyCount3, " + "CurrencyCount4, MinExpansionLevel, MaxExpansionLevel, MinExpansionTier, MaxExpansionTier, MinGuildLevel, MaxGuildLevel, PhaseUseFlags, " + "ChrSpecializationIndex, ChrSpecializationRole, PowerType, PowerTypeComp, PowerTypeValue, ClassMask, LanguageID, MinFactionID1, " + "MinFactionID2, MinFactionID3, SpellID1, SpellID2, SpellID3, SpellID4, ItemID1, ItemID2, ItemID3, ItemID4, ItemCount1, ItemCount2, " + "ItemCount3, ItemCount4, LfgLogic, LfgValue1, LfgValue2, LfgValue3, LfgValue4, CurrencyLogic, CurrencyID1, CurrencyID2, CurrencyID3, " + "CurrencyID4, QuestKillMonster1, QuestKillMonster2, QuestKillMonster3, QuestKillMonster4, QuestKillMonster5, QuestKillMonster6, PhaseGroupID, " + "MinAvgItemLevel, MaxAvgItemLevel, Unknown700_1, Unknown700_2 FROM player_condition ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_PLAYER_CONDITION, "SELECT ID, FailureDescription_lang FROM player_condition_locale WHERE locale = ?", CONNECTION_SYNCH); // PowerDisplay.db2 @@ -631,27 +628,27 @@ void HotfixDatabaseConnection::DoPrepareStatements() " WHERE locale = ?", CONNECTION_SYNCH); // SkillLineAbility.db2 - PrepareStatement(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT ID, SpellID, RaceMask, ClassMask, SupercedesSpell, SkillLine, MinSkillLineRank, " - "TrivialSkillLineRankHigh, TrivialSkillLineRankLow, UniqueBit, TradeSkillCategoryID, AquireMethod, NumSkillUps FROM skill_line_ability" - " ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT ID, SpellID, RaceMask, SupercedesSpell, Unknown703, SkillLine, MinSkillLineRank, " + "TrivialSkillLineRankHigh, TrivialSkillLineRankLow, UniqueBit, TradeSkillCategoryID, AquireMethod, NumSkillUps, ClassMask" + " FROM skill_line_ability ORDER BY ID DESC", CONNECTION_SYNCH); // SkillRaceClassInfo.db2 - PrepareStatement(HOTFIX_SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, ClassMask, SkillID, Flags, SkillTierID, Availability, MinLevel" + PrepareStatement(HOTFIX_SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, Flags, SkillTierID, Availability, MinLevel, ClassMask" " FROM skill_race_class_info ORDER BY ID DESC", CONNECTION_SYNCH); // SoundKit.db2 - PrepareStatement(HOTFIX_SEL_SOUND_KIT, "SELECT ID, Name, VolumeFloat, MinDistance, DistanceCutoff, VolumeVariationPlus, VolumeVariationMinus, " - "PitchVariationPlus, PitchVariationMinus, PitchAdjust, Flags, SoundEntriesAdvancedID, BusOverwriteID, SoundType, EAXDef, DialogType, Unk700" - " FROM sound_kit ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SOUND_KIT, "SELECT Name, VolumeFloat, MinDistance, DistanceCutoff, VolumeVariationPlus, VolumeVariationMinus, " + "PitchVariationPlus, PitchVariationMinus, PitchAdjust, Flags, SoundEntriesAdvancedID, BusOverwriteID, SoundType, EAXDef, DialogType, Unk700, " + "ID FROM sound_kit ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SOUND_KIT, "SELECT ID, Name_lang FROM sound_kit_locale WHERE locale = ?", CONNECTION_SYNCH); // SpecializationSpells.db2 - PrepareStatement(HOTFIX_SEL_SPECIALIZATION_SPELLS, "SELECT ID, SpellID, OverridesSpellID, Description, SpecID, OrderIndex" + PrepareStatement(HOTFIX_SEL_SPECIALIZATION_SPELLS, "SELECT SpellID, OverridesSpellID, Description, SpecID, OrderIndex, ID" " FROM specialization_spells ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPECIALIZATION_SPELLS, "SELECT ID, Description_lang FROM specialization_spells_locale WHERE locale = ?", CONNECTION_SYNCH); // Spell.db2 - PrepareStatement(HOTFIX_SEL_SPELL, "SELECT ID, Name, NameSubtext, Description, AuraDescription, MiscID, DescriptionVariablesID FROM spell" + PrepareStatement(HOTFIX_SEL_SPELL, "SELECT Name, NameSubtext, Description, AuraDescription, MiscID, ID, DescriptionVariablesID FROM spell" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL, "SELECT ID, Name_lang, NameSubtext_lang, Description_lang, AuraDescription_lang FROM spell_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -677,13 +674,13 @@ void HotfixDatabaseConnection::DoPrepareStatements() "DispelType, Mechanic, PreventionType FROM spell_categories ORDER BY ID DESC", CONNECTION_SYNCH); // SpellCategory.db2 - PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Unk703, Flags, UsesPerWeek, MaxCharges FROM spell_category" + PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges, Unk703 FROM spell_category" " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name_lang FROM spell_category_locale WHERE locale = ?", CONNECTION_SYNCH); // SpellClassOptions.db2 PrepareStatement(HOTFIX_SEL_SPELL_CLASS_OPTIONS, "SELECT ID, SpellID, SpellClassMask1, SpellClassMask2, SpellClassMask3, SpellClassMask4, " - "ModalNextSpell, SpellClassSet FROM spell_class_options ORDER BY ID DESC", CONNECTION_SYNCH); + "SpellClassSet, ModalNextSpell FROM spell_class_options ORDER BY ID DESC", CONNECTION_SYNCH); // SpellCooldowns.db2 PrepareStatement(HOTFIX_SEL_SPELL_COOLDOWNS, "SELECT ID, SpellID, CategoryRecoveryTime, RecoveryTime, StartRecoveryTime, DifficultyID" @@ -693,11 +690,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_SPELL_DURATION, "SELECT ID, Duration, MaxDuration, DurationPerLevel FROM spell_duration ORDER BY ID DESC", CONNECTION_SYNCH); // SpellEffect.db2 - PrepareStatement(HOTFIX_SEL_SPELL_EFFECT, "SELECT ID, EffectAmplitude, EffectAuraPeriod, EffectBasePoints, EffectBonusCoefficient, " - "EffectChainAmplitude, EffectDieSides, EffectItemType, EffectMiscValue, EffectMiscValueB, EffectPointsPerResource, EffectRealPointsPerLevel, " - "EffectSpellClassMask1, EffectSpellClassMask2, EffectSpellClassMask3, EffectSpellClassMask4, EffectTriggerSpell, EffectPosFacing, SpellID, " - "EffectAttributes, BonusCoefficientFromAP, EffectAura, EffectChainTargets, DifficultyID, Effect, EffectMechanic, EffectRadiusIndex, " - "EffectRadiusMaxIndex, ImplicitTarget1, ImplicitTarget2, EffectIndex FROM spell_effect ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_EFFECT, "SELECT EffectAmplitude, EffectBonusCoefficient, EffectChainAmplitude, EffectPointsPerResource, " + "EffectRealPointsPerLevel, EffectSpellClassMask1, EffectSpellClassMask2, EffectSpellClassMask3, EffectSpellClassMask4, EffectPosFacing, " + "BonusCoefficientFromAP, ID, DifficultyID, Effect, EffectAura, EffectAuraPeriod, EffectBasePoints, EffectChainTargets, EffectDieSides, " + "EffectItemType, EffectMechanic, EffectMiscValue, EffectMiscValueB, EffectRadiusIndex, EffectRadiusMaxIndex, EffectTriggerSpell, " + "ImplicitTarget1, ImplicitTarget2, SpellID, EffectIndex, EffectAttributes FROM spell_effect ORDER BY ID DESC", CONNECTION_SYNCH); // SpellEffectScaling.db2 PrepareStatement(HOTFIX_SEL_SPELL_EFFECT_SCALING, "SELECT ID, Coefficient, Variance, ResourceCoefficient, SpellEffectID FROM spell_effect_scaling" @@ -717,16 +714,16 @@ void HotfixDatabaseConnection::DoPrepareStatements() // SpellItemEnchantment.db2 PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, EffectSpellID1, EffectSpellID2, EffectSpellID3, Name, EffectScalingPoints1, " - "EffectScalingPoints2, EffectScalingPoints3, PlayerConditionID, TransmogCost, TextureFileDataID, EffectPointsMin1, EffectPointsMin2, " - "EffectPointsMin3, ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ConditionID, " - "MinLevel, MaxLevel, ScalingClass, ScalingClassRestricted FROM spell_item_enchantment ORDER BY ID DESC", CONNECTION_SYNCH); + "EffectScalingPoints2, EffectScalingPoints3, TransmogCost, TextureFileDataID, EffectPointsMin1, EffectPointsMin2, EffectPointsMin3, " + "ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ConditionID, MinLevel, MaxLevel, " + "ScalingClass, ScalingClassRestricted, PlayerConditionID FROM spell_item_enchantment ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name_lang FROM spell_item_enchantment_locale WHERE locale = ?", CONNECTION_SYNCH); // SpellItemEnchantmentCondition.db2 PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT ID, LTOperandType1, LTOperandType2, LTOperandType3, LTOperandType4, " - "LTOperandType5, LTOperand1, LTOperand2, LTOperand3, LTOperand4, LTOperand5, Operator1, Operator2, Operator3, Operator4, Operator5, " - "RTOperandType1, RTOperandType2, RTOperandType3, RTOperandType4, RTOperandType5, RTOperand1, RTOperand2, RTOperand3, RTOperand4, RTOperand5, " - "Logic1, Logic2, Logic3, Logic4, Logic5 FROM spell_item_enchantment_condition ORDER BY ID DESC", CONNECTION_SYNCH); + "LTOperandType5, Operator1, Operator2, Operator3, Operator4, Operator5, RTOperandType1, RTOperandType2, RTOperandType3, RTOperandType4, " + "RTOperandType5, RTOperand1, RTOperand2, RTOperand3, RTOperand4, RTOperand5, Logic1, Logic2, Logic3, Logic4, Logic5, LTOperand1, LTOperand2, " + "LTOperand3, LTOperand4, LTOperand5 FROM spell_item_enchantment_condition ORDER BY ID DESC", CONNECTION_SYNCH); // SpellLearnSpell.db2 PrepareStatement(HOTFIX_SEL_SPELL_LEARN_SPELL, "SELECT ID, LearnSpellID, SpellID, OverridesSpellID FROM spell_learn_spell ORDER BY ID DESC", CONNECTION_SYNCH); @@ -741,13 +738,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() "MultistrikeSpeedMod, CastingTimeIndex, DurationIndex, RangeIndex, SpellIconID, ActiveIconID, SchoolMask FROM spell_misc ORDER BY ID DESC", CONNECTION_SYNCH); // SpellPower.db2 - PrepareStatement(HOTFIX_SEL_SPELL_POWER, "SELECT ID, SpellID, ManaCost, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, " - "HealthCostPercentage, ManaCostPerSecond, ManaCostAdditional, PowerDisplayID, UnitPowerBarID, PowerIndex, PowerType, ManaCostPerLevel" + PrepareStatement(HOTFIX_SEL_SPELL_POWER, "SELECT SpellID, ManaCost, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, " + "HealthCostPercentage, PowerIndex, PowerType, ID, ManaCostPerLevel, ManaCostPerSecond, ManaCostAdditional, PowerDisplayID, UnitPowerBarID" " FROM spell_power ORDER BY ID DESC", CONNECTION_SYNCH); // SpellPowerDifficulty.db2 - PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT SpellPowerID, DifficultyID, PowerIndex FROM spell_power_difficulty" - " ORDER BY SpellPowerID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT DifficultyID, PowerIndex, ID FROM spell_power_difficulty ORDER BY ID DESC", CONNECTION_SYNCH); // SpellProcsPerMinute.db2 PrepareStatement(HOTFIX_SEL_SPELL_PROCS_PER_MINUTE, "SELECT ID, BaseProcRate, Flags FROM spell_procs_per_minute ORDER BY ID DESC", CONNECTION_SYNCH); @@ -770,7 +766,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellScaling.db2 - PrepareStatement(HOTFIX_SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, ScalingClass, MinScalingLevel, MaxScalingLevel" + PrepareStatement(HOTFIX_SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, MinScalingLevel, MaxScalingLevel, ScalingClass" " FROM spell_scaling ORDER BY ID DESC", CONNECTION_SYNCH); // SpellShapeshift.db2 @@ -780,21 +776,21 @@ void HotfixDatabaseConnection::DoPrepareStatements() // SpellShapeshiftForm.db2 PrepareStatement(HOTFIX_SEL_SPELL_SHAPESHIFT_FORM, "SELECT ID, Name, WeaponDamageVariance, Flags, AttackIconID, CombatRoundTime, " "CreatureDisplayID1, CreatureDisplayID2, CreatureDisplayID3, CreatureDisplayID4, PresetSpellID1, PresetSpellID2, PresetSpellID3, " - "PresetSpellID4, PresetSpellID5, PresetSpellID6, PresetSpellID7, PresetSpellID8, CreatureType, MountTypeID, BonusActionBar" + "PresetSpellID4, PresetSpellID5, PresetSpellID6, PresetSpellID7, PresetSpellID8, MountTypeID, CreatureType, BonusActionBar" " FROM spell_shapeshift_form ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_SHAPESHIFT_FORM, "SELECT ID, Name_lang FROM spell_shapeshift_form_locale WHERE locale = ?", CONNECTION_SYNCH); // SpellTargetRestrictions.db2 - PrepareStatement(HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS, "SELECT ID, SpellID, ConeAngle, Width, Targets, MaxTargetLevel, TargetCreatureType, " - "DifficultyID, MaxAffectedTargets FROM spell_target_restrictions ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS, "SELECT ID, SpellID, ConeAngle, Width, Targets, TargetCreatureType, DifficultyID, " + "MaxAffectedTargets, MaxTargetLevel FROM spell_target_restrictions ORDER BY ID DESC", CONNECTION_SYNCH); // SpellTotems.db2 PrepareStatement(HOTFIX_SEL_SPELL_TOTEMS, "SELECT ID, SpellID, Totem1, Totem2, RequiredTotemCategoryID1, RequiredTotemCategoryID2" " FROM spell_totems ORDER BY ID DESC", CONNECTION_SYNCH); // SpellXSpellVisual.db2 - PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT ID, SpellID, Unk620, SpellVisualID1, SpellVisualID2, PlayerConditionID, DifficultyID, " - "Flags FROM spell_x_spell_visual ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT SpellID, Unk620, SpellVisualID1, SpellVisualID2, PlayerConditionID, DifficultyID, " + "Flags, ID FROM spell_x_spell_visual ORDER BY ID DESC", CONNECTION_SYNCH); // SummonProperties.db2 PrepareStatement(HOTFIX_SEL_SUMMON_PROPERTIES, "SELECT ID, Category, Faction, Type, Slot, Flags FROM summon_properties ORDER BY ID DESC", CONNECTION_SYNCH); @@ -805,23 +801,23 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_TALENT, "SELECT ID, Description_lang FROM talent_locale WHERE locale = ?", CONNECTION_SYNCH); // TaxiNodes.db2 - PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, MapID, " - "ConditionID, LearnableIndex, Flags FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, MapID, " + "ConditionID, LearnableIndex, Flags, ID FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_TAXI_NODES, "SELECT ID, Name_lang FROM taxi_nodes_locale WHERE locale = ?", CONNECTION_SYNCH); // TaxiPath.db2 - PrepareStatement(HOTFIX_SEL_TAXI_PATH, "SELECT ID, `From`, `To`, Cost FROM taxi_path ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_TAXI_PATH, "SELECT `From`, `To`, ID, Cost FROM taxi_path ORDER BY ID DESC", CONNECTION_SYNCH); // TaxiPathNode.db2 - PrepareStatement(HOTFIX_SEL_TAXI_PATH_NODE, "SELECT ID, LocX, LocY, LocZ, Delay, PathID, MapID, ArrivalEventID, DepartureEventID, NodeIndex, " - "Flags FROM taxi_path_node ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_TAXI_PATH_NODE, "SELECT LocX, LocY, LocZ, Delay, PathID, MapID, ArrivalEventID, DepartureEventID, NodeIndex, Flags, " + "ID FROM taxi_path_node ORDER BY ID DESC", CONNECTION_SYNCH); // TotemCategory.db2 PrepareStatement(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name, CategoryMask, CategoryType FROM totem_category ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name_lang FROM totem_category_locale WHERE locale = ?", CONNECTION_SYNCH); // Toy.db2 - PrepareStatement(HOTFIX_SEL_TOY, "SELECT ID, ItemID, Description, Flags, CategoryFilter FROM toy ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_TOY, "SELECT ItemID, Description, Flags, CategoryFilter, ID FROM toy ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_TOY, "SELECT ID, Description_lang FROM toy_locale WHERE locale = ?", CONNECTION_SYNCH); // TransportAnimation.db2 @@ -832,9 +828,9 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_TRANSPORT_ROTATION, "SELECT ID, TransportID, TimeIndex, X, Y, Z, W FROM transport_rotation ORDER BY ID DESC", CONNECTION_SYNCH); // UnitPowerBar.db2 - PrepareStatement(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, MaxPower, RegenerationPeace, RegenerationCombat, FileDataID1, FileDataID2, FileDataID3, " + PrepareStatement(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, RegenerationPeace, RegenerationCombat, FileDataID1, FileDataID2, FileDataID3, " "FileDataID4, FileDataID5, FileDataID6, Color1, Color2, Color3, Color4, Color5, Color6, Name, Cost, OutOfError, ToolTip, StartInset, " - "EndInset, StartPower, Flags, MinPower, CenterPower, BarType FROM unit_power_bar ORDER BY ID DESC", CONNECTION_SYNCH); + "EndInset, StartPower, Flags, CenterPower, BarType, MinPower, MaxPower FROM unit_power_bar ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" " WHERE locale = ?", CONNECTION_SYNCH); @@ -850,26 +846,27 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_VEHICLE_SEAT, "SELECT ID, Flags1, Flags2, Flags3, AttachmentOffsetX, AttachmentOffsetY, AttachmentOffsetZ, " "EnterPreDelay, EnterSpeed, EnterGravity, EnterMinDuration, EnterMaxDuration, EnterMinArcHeight, EnterMaxArcHeight, ExitPreDelay, ExitSpeed, " "ExitGravity, ExitMinDuration, ExitMaxDuration, ExitMinArcHeight, ExitMaxArcHeight, PassengerYaw, PassengerPitch, PassengerRoll, " - "VehicleEnterAnimDelay, VehicleExitAnimDelay, EnterUISoundID, ExitUISoundID, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, " - "CameraExitingDuration, CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, " - "CameraSeatZoomMin, CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, " - "RideUpperAnimLoop, ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterAnimKitID, " - "RideAnimKitID, ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, " - "PassengerAttachmentID, VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay FROM vehicle_seat" + "VehicleEnterAnimDelay, VehicleExitAnimDelay, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, CameraExitingDuration, " + "CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, CameraSeatZoomMin, " + "CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, RideUpperAnimLoop, " + "ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterAnimKitID, RideAnimKitID, " + "ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, PassengerAttachmentID, " + "VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay, EnterUISoundID, ExitUISoundID FROM vehicle_seat" " ORDER BY ID DESC", CONNECTION_SYNCH); // WmoAreaTable.db2 - PrepareStatement(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT ID, WMOGroupID, AreaName, WMOID, AmbienceID, ZoneMusic, IntroSound, AreaTableID, " - "UWIntroSound, UWAmbience, NameSet, SoundProviderPref, SoundProviderPrefUnderwater, Flags, UWZoneMusic FROM wmo_area_table ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT WMOGroupID, AreaName, WMOID, AmbienceID, ZoneMusic, IntroSound, AreaTableID, UWIntroSound, " + "UWAmbience, NameSet, SoundProviderPref, SoundProviderPrefUnderwater, Flags, ID, UWZoneMusic FROM wmo_area_table ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT ID, AreaName_lang FROM wmo_area_table_locale WHERE locale = ?", CONNECTION_SYNCH); // WorldMapArea.db2 - PrepareStatement(HOTFIX_SEL_WORLD_MAP_AREA, "SELECT ID, AreaName, LocLeft, LocRight, LocTop, LocBottom, MapID, AreaID, DisplayMapID, " - "DefaultDungeonFloor, ParentWorldMapID, Flags, PlayerConditionID, LevelRangeMin, LevelRangeMax FROM world_map_area ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_WORLD_MAP_AREA, "SELECT AreaName, LocLeft, LocRight, LocTop, LocBottom, MapID, AreaID, DisplayMapID, " + "DefaultDungeonFloor, ParentWorldMapID, Flags, LevelRangeMin, LevelRangeMax, BountySetID, BountyBoardLocation, ID, PlayerConditionID" + " FROM world_map_area ORDER BY ID DESC", CONNECTION_SYNCH); // WorldMapOverlay.db2 - PrepareStatement(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName, MapAreaID, AreaID1, AreaID2, AreaID3, AreaID4, TextureWidth, " - "TextureHeight, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID, Flags FROM world_map_overlay" + PrepareStatement(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName, TextureWidth, TextureHeight, MapAreaID, AreaID1, AreaID2, AreaID3, " + "AreaID4, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID, Flags FROM world_map_overlay" " ORDER BY ID DESC", CONNECTION_SYNCH); // WorldMapTransforms.db2 diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index f9ef5610ca3..5c3b0ddb196 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ - // DO NOT EDIT! - // Autogenerated from DB2Structure.h +// DO NOT EDIT! +// Autogenerated from DB2Structure.h #ifndef _HOTFIXDATABASE_H #define _HOTFIXDATABASE_H @@ -177,8 +177,6 @@ enum HotfixDatabaseStatements HOTFIX_SEL_GLYPH_PROPERTIES, - HOTFIX_SEL_GLYPH_SLOT, - HOTFIX_SEL_GUILD_COLOR_BACKGROUND, HOTFIX_SEL_GUILD_COLOR_BORDER, diff --git a/src/server/game/DataStores/DB2Metadata.h b/src/server/game/DataStores/DB2Metadata.h new file mode 100644 index 00000000000..51dc273e2bc --- /dev/null +++ b/src/server/game/DataStores/DB2Metadata.h @@ -0,0 +1,6283 @@ +/* + * Copyright (C) 2008-2016 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef DB2Metadata_h__ +#define DB2Metadata_h__ + +#include "DB2Meta.h" + +struct AchievementMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssishhhhhhhbbbi"; + static uint8 const arraySizes[15] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(14, 15, types, arraySizes); + return &instance; + } +}; + +struct Achievement_CategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct AdventureJournalMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sssiisshhhhhhbbbbbbbbb"; + static uint8 const arraySizes[22] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1 }; + static DB2Meta instance(-1, 22, types, arraySizes); + return &instance; + } +}; + +struct AdventureMapPOIMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fissbiiiiiiii"; + static uint8 const arraySizes[13] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct AnimKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct AnimKitBoneSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct AnimKitBoneSetAliasMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct AnimKitConfigMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct AnimKitConfigBoneSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct AnimKitPriorityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct AnimKitSegmentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiifihhhbbbbbbbi"; + static uint8 const arraySizes[16] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 16, types, arraySizes); + return &instance; + } +}; + +struct AnimReplacementMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhh"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct AnimReplacementSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct AnimationDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sihhb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct AreaGroupMemberMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct AreaPOIMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fsshhhhhhbbbi"; + static uint8 const arraySizes[13] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct AreaPOIStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbbi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct AreaTableMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iSfshhhhhhhhhhbbbbbbbbi"; + static uint8 const arraySizes[23] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 23, types, arraySizes); + return &instance; + } +}; + +struct AreaTriggerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffhhhhhbbbi"; + static uint8 const arraySizes[15] = { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(14, 15, types, arraySizes); + return &instance; + } +}; + +struct AreaTriggerActionSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct AreaTriggerBoxMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 3 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct AreaTriggerCylinderMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fff"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct AreaTriggerSphereMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ArmorLocationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffff"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ArtifactMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siiihhbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct ArtifactAppearanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siffihhhbbbbiii"; + static uint8 const arraySizes[15] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(12, 15, types, arraySizes); + return &instance; + } +}; + +struct ArtifactAppearanceSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhbbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct ArtifactCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ArtifactPowerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbbbii"; + static uint8 const arraySizes[6] = { 2, 1, 1, 1, 1, 1 }; + static DB2Meta instance(4, 6, types, arraySizes); + return &instance; + } +}; + +struct ArtifactPowerLinkMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ArtifactPowerRankMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifhhb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ArtifactQuestXPMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 10 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ArtifactUnlockMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbbi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct AuctionHouseMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct BankBagSlotPricesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct BannedAddOnsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "SSb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BarberShopStyleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssfbbbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct BattlePetAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isshbbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct BattlePetAbilityEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 6, 1, 1 }; + static DB2Meta instance(6, 7, types, arraySizes); + return &instance; + } +}; + +struct BattlePetAbilityStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BattlePetAbilityTurnMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbbbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(5, 6, types, arraySizes); + return &instance; + } +}; + +struct BattlePetBreedQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct BattlePetBreedStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BattlePetEffectPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shb"; + static uint8 const arraySizes[3] = { 6, 1, 6 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BattlePetNPCTeamMemberMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct BattlePetSpeciesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiisshbbi"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(8, 9, types, arraySizes); + return &instance; + } +}; + +struct BattlePetSpeciesStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BattlePetSpeciesXAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct BattlePetStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct BattlePetVisualMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhhhbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct BattlemasterListMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sishhhbbbbbbbbb"; + static uint8 const arraySizes[15] = { 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 15, types, arraySizes); + return &instance; + } +}; + +struct BoneWindModifierModelMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct BoneWindModifiersMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ff"; + static uint8 const arraySizes[2] = { 3, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct BountyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct BountySetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct BroadcastTextMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhhbbii"; + static uint8 const arraySizes[9] = { 1, 1, 3, 3, 1, 1, 1, 2, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct CameraEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct CameraEffectEntryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffffhhbbbbbb"; + static uint8 const arraySizes[16] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 16, types, arraySizes); + return &instance; + } +}; + +struct CameraModeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffhbbbbb"; + static uint8 const arraySizes[11] = { 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct CameraShakesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffbbbbi"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct CastableRaidBuffsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct Cfg_CategoriesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct Cfg_ConfigsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct Cfg_RegionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sib"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct CharBaseInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CharBaseSectionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct CharComponentTextureLayoutsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CharComponentTextureSectionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct CharHairGeosetsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbbbbbbbi"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct CharSectionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbbbb"; + static uint8 const arraySizes[7] = { 3, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct CharShipmentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiihbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct CharShipmentContainerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhhhhhbbbbbbbi"; + static uint8 const arraySizes[16] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 16, types, arraySizes); + return &instance; + } +}; + +struct CharStartOutfitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibbbbb"; + static uint8 const arraySizes[7] = { 24, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct CharTitlesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct CharacterFaceBoneSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct CharacterFacialHairStylesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbb"; + static uint8 const arraySizes[4] = { 5, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct CharacterLoadoutMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct CharacterLoadoutItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ChatChannelsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "issb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ChatProfanityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ChrClassRaceSexMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbiii"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct ChrClassTitleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ChrClassUIDisplayMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ChrClassVillainMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ChrClassesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "SsssSiiihhhbbbbbbbi"; + static uint8 const arraySizes[19] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(18, 19, types, arraySizes); + return &instance; + } +}; + +struct ChrClassesXPowerTypesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ChrRacesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iSSsssSSiiffihhhhhhhhhhbbbbbbbbbbii"; + static uint8 const arraySizes[35] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 35, types, arraySizes); + return &instance; + } +}; + +struct ChrSpecializationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isssshbbbbbiii"; + static uint8 const arraySizes[14] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(11, 14, types, arraySizes); + return &instance; + } +}; + +struct ChrUpgradeBucketMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct ChrUpgradeBucketSpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ChrUpgradeTierMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct CinematicCameraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sffh"; + static uint8 const arraySizes[4] = { 1, 3, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct CinematicSequencesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 8 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CloakDampeningMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffff"; + static uint8 const arraySizes[5] = { 5, 5, 2, 2, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct CombatConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhbbbbbb"; + static uint8 const arraySizes[11] = { 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct ComponentModelFileDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ComponentTextureFileDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ConversationLineMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiihhbbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct CreatureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiifssssbbbb"; + static uint8 const arraySizes[12] = { 3, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 12, types, arraySizes); + return &instance; + } +}; + +struct CreatureDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihbbb"; + static uint8 const arraySizes[6] = { 1, 7, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct CreatureDispXUiCameraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CreatureDisplayInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffiSiiifhhhhhhbbbbbb"; + static uint8 const arraySizes[21] = { 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 21, types, arraySizes); + return &instance; + } +}; + +struct CreatureDisplayInfoCondMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiibbiiiiiiiii"; + static uint8 const arraySizes[15] = { 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 }; + static DB2Meta instance(-1, 15, types, arraySizes); + return &instance; + } +}; + +struct CreatureDisplayInfoExtraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibbbbbbbbbb"; + static uint8 const arraySizes[12] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1 }; + static DB2Meta instance(-1, 12, types, arraySizes); + return &instance; + } +}; + +struct CreatureDisplayInfoTrnMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iifh"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct CreatureFamilyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffsShhbbbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 2, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct CreatureImmunitiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbbbbiii"; + static uint8 const arraySizes[9] = { 2, 1, 1, 1, 1, 1, 1, 8, 16 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct CreatureModelDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffffffffffffffiiiiiiiiiiii"; + static uint8 const arraySizes[30] = { 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 30, types, arraySizes); + return &instance; + } +}; + +struct CreatureMovementInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct CreatureSoundDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffbbiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"; + static uint8 const arraySizes[37] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 37, types, arraySizes); + return &instance; + } +}; + +struct CreatureTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CriteriaMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiihhhbbbbb"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct CriteriaTreeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iishhbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct CriteriaTreeXEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CurrencyCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct CurrencyTypesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sSiiisbbbi"; + static uint8 const arraySizes[10] = { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct CurveMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct CurvePointMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhb"; + static uint8 const arraySizes[3] = { 2, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct DeathThudLookupsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct DecalPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffffffffbbiii"; + static uint8 const arraySizes[14] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 14, types, arraySizes); + return &instance; + } +}; + +struct DeclinedWordMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "si"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(1, 2, types, arraySizes); + return &instance; + } +}; + +struct DeclinedWordCasesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct DestructibleModelDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhbbbbbbbbbbbbbbbbb"; + static uint8 const arraySizes[22] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 22, types, arraySizes); + return &instance; + } +}; + +struct DeviceBlacklistMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct DeviceDefaultSettingsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct DifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbbbbbbbbbbbb"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct DissolveEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffffbbii"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct DriverBlacklistMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihbbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct DungeonEncounterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sihhbbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct DungeonMapMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhhbbi"; + static uint8 const arraySizes[7] = { 2, 2, 1, 1, 1, 1, 1 }; + static DB2Meta instance(6, 7, types, arraySizes); + return &instance; + } +}; + +struct DungeonMapChunkMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fihhh"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct DurabilityCostsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 21, 8 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct DurabilityQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct EdgeGlowEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffffffb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct EmotesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Siihbiiii"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct EmotesTextMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct EmotesTextDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct EmotesTextSoundMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbbi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct EnvironmentalDamageMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ExhaustionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffsfsi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct FactionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iifssihhhhbbbb"; + static uint8 const arraySizes[14] = { 4, 4, 2, 1, 1, 4, 1, 4, 4, 1, 2, 1, 1, 1 }; + static DB2Meta instance(-1, 14, types, arraySizes); + return &instance; + } +}; + +struct FactionGroupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct FactionTemplateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhbbb"; + static uint8 const arraySizes[7] = { 1, 1, 4, 4, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct FootprintTexturesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "si"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(1, 2, types, arraySizes); + return &instance; + } +}; + +struct FootstepTerrainLookupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct FriendshipRepReactionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct FriendshipReputationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ishi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct FullScreenEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffffffffffffffffiiffffffffffffffbiii"; + static uint8 const arraySizes[39] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 39, types, arraySizes); + return &instance; + } +}; + +struct GMSurveyAnswersMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GMSurveyCurrentSurveyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GMSurveyQuestionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GMSurveySurveysMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 15 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GameObjectArtKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ss"; + static uint8 const arraySizes[2] = { 3, 4 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GameObjectDiffAnimMapMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GameObjectDisplayInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffh"; + static uint8 const arraySizes[5] = { 1, 6, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct GameObjectDisplayInfoXSoundKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GameObjectsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffishhhhbbi"; + static uint8 const arraySizes[12] = { 3, 4, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(11, 12, types, arraySizes); + return &instance; + } +}; + +struct GameTipsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssihhbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct GarrAbilityCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GarrAbilityEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffihbbbbbbi"; + static uint8 const arraySizes[12] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(11, 12, types, arraySizes); + return &instance; + } +}; + +struct GarrBuildingMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iissssihhhhhhhhbbbbbbiii"; + static uint8 const arraySizes[24] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 24, types, arraySizes); + return &instance; + } +}; + +struct GarrBuildingDoodadSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrBuildingPlotInstMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhhbi"; + static uint8 const arraySizes[5] = { 2, 1, 1, 1, 1 }; + static DB2Meta instance(4, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrClassSpecMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssshbbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct GarrClassSpecPlayerCondMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isbiii"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct GarrEncounterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isffihi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(6, 7, types, arraySizes); + return &instance; + } +}; + +struct GarrEncounterSetXEncounterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrEncounterXMechanicMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrFollItemSetMemberMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrFollSupportSpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iissiiiihhhhhhbbbbbbbbbbbbbbbbi"; + static uint8 const arraySizes[31] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(30, 31, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerLevelXPMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbbbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerSetXFollowerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbbbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerUICreatureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifhbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrFollowerXAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrMechanicMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrMechanicSetXMechanicMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrMechanicTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssibi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(4, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrMissionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iisssiiffhhhhhhbbbbbbbbbiiiii"; + static uint8 const arraySizes[29] = { 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(24, 29, types, arraySizes); + return &instance; + } +}; + +struct GarrMissionTextureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 2, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrMissionTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrMissionXEncounterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "biiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(1, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrMissionXFollowerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GarrMssnBonusAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fihbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrPlotMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siibbbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 2 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct GarrPlotBuildingMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrPlotInstanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrPlotUICategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GarrSiteLevelMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhhhhbbbb"; + static uint8 const arraySizes[9] = { 2, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct GarrSiteLevelPlotInstMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhbb"; + static uint8 const arraySizes[4] = { 2, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrSpecializationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifssbbb"; + static uint8 const arraySizes[7] = { 1, 2, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct GarrStringMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GarrTalentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "issibbbiiiiiiiiiiiii"; + static uint8 const arraySizes[20] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 20, types, arraySizes); + return &instance; + } +}; + +struct GarrTalentTreeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct GarrUiAnimClassInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GarrUiAnimRaceInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffffffffb"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct GemPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GlobalStringsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GlyphBindableSpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GlyphExclusiveCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct GlyphPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GlyphRequiredSpecMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GroundEffectDoodadMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sffb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GroundEffectTextureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbi"; + static uint8 const arraySizes[4] = { 4, 4, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct GroupFinderActivityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhhbbbbbbbbb"; + static uint8 const arraySizes[14] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 14, types, arraySizes); + return &instance; + } +}; + +struct GroupFinderActivityGrpMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct GroupFinderCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GuildColorBackgroundMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GuildColorBorderMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GuildColorEmblemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct GuildPerkSpellsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct HeirloomMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isiiiihbbi"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 2, 2, 1, 1, 1 }; + static DB2Meta instance(9, 10, types, arraySizes); + return &instance; + } +}; + +struct HelmetAnimScalingMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct HelmetGeosetVisDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 9 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct HighlightColorMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiibb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct HolidayDescriptionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct HolidayNamesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct HolidaysMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iShhbbbbbbb"; + static uint8 const arraySizes[11] = { 16, 1, 10, 1, 1, 10, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct ImportPriceArmorMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffff"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ImportPriceQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ImportPriceShieldMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ImportPriceWeaponMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "f"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct InvasionClientDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sfiiiiiii"; + static uint8 const arraySizes[9] = { 1, 2, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(2, 9, types, arraySizes); + return &instance; + } +}; + +struct ItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbbbbbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct ItemAppearanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiib"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemAppearanceXUiCameraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemArmorQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemArmorShieldMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemArmorTotalMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffh"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ItemBagFamilyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemBonusMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbb"; + static uint8 const arraySizes[4] = { 2, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemBonusListLevelDeltaMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hi"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemBonusTreeNodeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemChildEquipmentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iib"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemClassMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fsb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemContextPickerEntryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ItemCurrencyCostMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemDamageAmmoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemDamageOneHandMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemDamageOneHandCasterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemDamageTwoHandMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemDamageTwoHandCasterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 7, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemDisenchantLootMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhbbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct ItemDisplayInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiiiiiiiiiiii"; + static uint8 const arraySizes[15] = { 2, 2, 3, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 15, types, arraySizes); + return &instance; + } +}; + +struct ItemDisplayInfoMaterialResMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iib"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemDisplayXUiCameraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiihhhbb"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct ItemExtendedCostMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihhhbbbbb"; + static uint8 const arraySizes[10] = { 5, 5, 5, 1, 5, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct ItemGroupSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 4 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemLimitCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemLimitCategoryConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemModifiedAppearanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(5, 6, types, arraySizes); + return &instance; + } +}; + +struct ItemModifiedAppearanceExtraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ItemNameDescriptionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "si"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemPetFoodMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemPriceBaseMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemRandomPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sh"; + static uint8 const arraySizes[2] = { 1, 5 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemRandomSuffixMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshh"; + static uint8 const arraySizes[4] = { 1, 1, 5, 5 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemRangedDisplayInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemSearchNameMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siiihhhhbbbbi"; + static uint8 const arraySizes[13] = { 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct ItemSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sihii"; + static uint8 const arraySizes[5] = { 1, 17, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ItemSetSpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ItemSparseMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffiiiiiiiiffsssssififhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbb"; + static uint8 const arraySizes[63] = { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 63, types, arraySizes); + return &instance; + } +}; + +struct ItemSpecMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbbbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct ItemSpecOverrideMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ItemSubClassMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshbbbbbbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct ItemSubClassMaskMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ItemUpgradeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ItemVisualEffectsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemVisualsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 5 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ItemXBonusTreeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct JournalEncounterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fsshhhhbbi"; + static uint8 const arraySizes[10] = { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct JournalEncounterCreatureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iisshbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(6, 7, types, arraySizes); + return &instance; + } +}; + +struct JournalEncounterItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(5, 6, types, arraySizes); + return &instance; + } +}; + +struct JournalEncounterSectionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssiiihhhhhhbbb"; + static uint8 const arraySizes[14] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 14, types, arraySizes); + return &instance; + } +}; + +struct JournalEncounterXDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct JournalInstanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiisshhbbi"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(10, 11, types, arraySizes); + return &instance; + } +}; + +struct JournalItemXDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct JournalSectionXDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct JournalTierMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct JournalTierXInstanceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct KeyChainMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 32 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct KeystoneAffixMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct LanguageWordsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct LanguagesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "si"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(1, 2, types, arraySizes); + return &instance; + } +}; + +struct LfgDungeonExpansionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbbbii"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct LfgDungeonGroupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct LfgDungeonsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siSshhhhhhhhbbbbbbbbbbbbbbbbbi"; + static uint8 const arraySizes[30] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(29, 30, types, arraySizes); + return &instance; + } +}; + +struct LfgDungeonsGroupingMapMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct LfgRoleRequirementMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct LightMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffhh"; + static uint8 const arraySizes[5] = { 3, 1, 1, 1, 8 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct LightDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiiiiiiiiiiiiiiifffffffffiiiiiihh"; + static uint8 const arraySizes[35] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 35, types, arraySizes); + return &instance; + } +}; + +struct LightParamsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffhbbbi"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1 }; + static DB2Meta instance(10, 11, types, arraySizes); + return &instance; + } +}; + +struct LightSkyboxMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct LiquidMaterialMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct LiquidObjectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct LiquidTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sifffffSifihhbbbbbi"; + static uint8 const arraySizes[19] = { 1, 1, 1, 1, 1, 1, 1, 6, 2, 18, 4, 1, 1, 1, 1, 1, 1, 6, 1 }; + static DB2Meta instance(-1, 19, types, arraySizes); + return &instance; + } +}; + +struct LoadingScreenTaxiSplinesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhhb"; + static uint8 const arraySizes[5] = { 10, 10, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct LoadingScreensMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct LocaleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct LocationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ff"; + static uint8 const arraySizes[2] = { 3, 3 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct LockMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbb"; + static uint8 const arraySizes[4] = { 8, 8, 8, 8 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct LockTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssssi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(4, 5, types, arraySizes); + return &instance; + } +}; + +struct LookAtControllerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffhhhhbbbbbiiiii"; + static uint8 const arraySizes[18] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 18, types, arraySizes); + return &instance; + } +}; + +struct MailTemplateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ManifestInterfaceActionIconMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(0, 1, types, arraySizes); + return &instance; + } +}; + +struct ManifestInterfaceDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ss"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ManifestInterfaceItemIconMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(0, 1, types, arraySizes); + return &instance; + } +}; + +struct ManifestInterfaceTOCDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ManifestMP3Meta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(0, 1, types, arraySizes); + return &instance; + } +}; + +struct MapMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siffssshhhhhhbbbbb"; + static uint8 const arraySizes[18] = { 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 18, types, arraySizes); + return &instance; + } +}; + +struct MapChallengeModeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 3, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct MapDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbbbbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct MapDifficultyXConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct MarketingPromotionsXLocaleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiisbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct MaterialMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "biii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct MinorTalentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ModelAnimCloakDampeningMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ModelFileDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(1, 3, types, arraySizes); + return &instance; + } +}; + +struct ModelRibbonQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ib"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ModifierTreeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihbbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct MountMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iisssfhhhbi"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(10, 11, types, arraySizes); + return &instance; + } +}; + +struct MountCapabilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihhhbii"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(6, 8, types, arraySizes); + return &instance; + } +}; + +struct MountTypeXCapabilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct MovieMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct MovieFileDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct MovieVariationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct NPCSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 4 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct NameGenMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct NamesProfanityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct NamesReservedMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "S"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct NamesReservedLocaleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct NpcModelItemSlotDisplayInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iib"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ObjectEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sfhbbbbbi"; + static uint8 const arraySizes[9] = { 1, 3, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct ObjectEffectGroupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ObjectEffectModifierMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbbb"; + static uint8 const arraySizes[4] = { 4, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ObjectEffectPackageMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ObjectEffectPackageElemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct OutlineEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fiiiii"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct OverrideSpellDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iib"; + static uint8 const arraySizes[3] = { 10, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct PageTextMaterialMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct PaperDollItemFrameMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ParticleColorMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 3, 3, 3 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct PathMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbbbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct PathNodeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iihh"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(0, 4, types, arraySizes); + return &instance; + } +}; + +struct PathNodePropertyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhbii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(3, 5, types, arraySizes); + return &instance; + } +}; + +struct PathPropertyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct PhaseMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct PhaseShiftZoneSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhbbbbiiii"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct PhaseXPhaseGroupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct PlayerConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiiiiiiiiiiishhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbiiiiiiiiiiiiiii"; + // 1111111121411111144414442144111111111131111114111444111111111111113444141461112 + static uint8 const arraySizes[79] = { 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 4, 4, 4, 2, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 1, 4, 1, 4, 6, 1, 1, 1, 2 }; + static DB2Meta instance(-1, 79, types, arraySizes); + return &instance; + } +}; + +struct PositionerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct PositionerStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbiiiiii"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct PositionerStateEntryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffbbbbbbbbi"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct PowerDisplayMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Sbbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct PowerTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssffhhhbbbbb"; + static uint8 const arraySizes[12] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 12, types, arraySizes); + return &instance; + } +}; + +struct PrestigeLevelInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct PvpBracketTypesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bi"; + static uint8 const arraySizes[2] = { 1, 4 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct PvpDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct PvpItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ib"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct PvpRewardMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct PvpTalentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iisiiiiii"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct PvpTalentUnlockMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct QuestFactionRewardMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 10 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct QuestFeedbackEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct QuestInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct QuestLineMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct QuestLineXQuestMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct QuestMoneyRewardMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 10 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct QuestObjectiveMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iishbbbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct QuestPOIBlobMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct QuestPOIPointMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct QuestPOIPointCliTaskMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct QuestPackageItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct QuestSortMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct QuestV2Meta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct QuestV2CliTaskMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "issihhhhhhhbbbbbbbbbiii"; + static uint8 const arraySizes[23] = { 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(20, 23, types, arraySizes); + return &instance; + } +}; + +struct QuestXPMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "h"; + static uint8 const arraySizes[1] = { 10 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct RacialMountsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ib"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct RandPropPointsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 5, 5, 5 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ResearchBranchMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssihb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ResearchFieldMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct ResearchProjectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssishbbii"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 9, types, arraySizes); + return &instance; + } +}; + +struct ResearchSiteMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ishi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ResistancesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct RewardPackMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifbbii"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct RewardPackXCurrencyTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct RewardPackXItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct RibbonQualityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct RulesetItemUpgradeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ScalingStatDistributionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ScenarioMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ScenarioEventEntryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct ScenarioStepMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhhhbbi"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct SceneScriptMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshh"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SceneScriptPackageMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SceneScriptPackageMemberMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ScheduledIntervalMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ScheduledWorldStateMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiiiii"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct ScheduledWorldStateGroupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct ScheduledWorldStateXUniqCatMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(0, 3, types, arraySizes); + return &instance; + } +}; + +struct ScreenEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sihhhhbbbiii"; + static uint8 const arraySizes[12] = { 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 12, types, arraySizes); + return &instance; + } +}; + +struct ScreenLocationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SeamlessSiteMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "i"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ServerMessagesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct ShadowyEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiffffffbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct SkillLineMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssshhbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct SkillLineAbilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiihhhhhhbbi"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct SkillRaceClassInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhbbi"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct SoundAmbienceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "biii"; + static uint8 const arraySizes[4] = { 1, 2, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SoundAmbienceFlavorMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SoundBusMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhbbbbbbbbi"; + static uint8 const arraySizes[12] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(11, 12, types, arraySizes); + return &instance; + } +}; + +struct SoundEmitterPillPointsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fh"; + static uint8 const arraySizes[2] = { 3, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SoundEmittersMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffshhhbbbbii"; + static uint8 const arraySizes[12] = { 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(10, 12, types, arraySizes); + return &instance; + } +}; + +struct SoundFilterMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SoundFilterElemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbb"; + static uint8 const arraySizes[3] = { 9, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SoundKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sffffffffhhhbbbbi"; + static uint8 const arraySizes[17] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(16, 17, types, arraySizes); + return &instance; + } +}; + +struct SoundKitAdvancedMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fiiiiiifffffiiffffffihbbbbiiiiii"; + static uint8 const arraySizes[32] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 32, types, arraySizes); + return &instance; + } +}; + +struct SoundKitChildMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SoundKitEntryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SoundKitFallbackMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SoundOverrideMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SoundProviderPreferencesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sfffffffffffffffhhhhhbb"; + static uint8 const arraySizes[23] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 23, types, arraySizes); + return &instance; + } +}; + +struct SourceInfoMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpamMessagesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SpecializationSpellsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iishbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(5, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssssiii"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(5, 7, types, arraySizes); + return &instance; + } +}; + +struct SpellActionBarPrefMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ih"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellActivationOverlayMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiifibbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 4, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct SpellAuraOptionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiihbbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct SpellAuraRestrictionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiibbbbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct SpellAuraVisXChrSpecMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellAuraVisibilityMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(3, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellCastTimesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iih"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellCastingRequirementsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhbbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct SpellCategoriesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhbbbbb"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct SpellCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sibbbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellChainEffectsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffiifffffffffffffffffffffffffffffffffffiffsshhhhbbbbbbbbbbbi"; + static uint8 const arraySizes[62] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 3, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 62, types, arraySizes); + return &instance; + } +}; + +struct SpellClassOptionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iibi"; + static uint8 const arraySizes[4] = { 1, 4, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellCooldownsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiib"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct SpellDescriptionVariablesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SpellDispelTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellDurationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iih"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffiffiiiiiiiiiiiiiiiii"; + static uint8 const arraySizes[25] = { 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1 }; + static DB2Meta instance(8, 25, types, arraySizes); + return &instance; + } +}; + +struct SpellEffectCameraShakesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hh"; + static uint8 const arraySizes[2] = { 3, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellEffectEmissionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellEffectGroupSizeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "if"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellEffectScalingMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellEquippedItemsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiib"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellFlyoutMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isshbi"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellFlyoutItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellFocusObjectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SpellIconMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SpellInterruptsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiihb"; + static uint8 const arraySizes[5] = { 1, 2, 2, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct SpellItemEnchantmentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isfiihhhhhhbbbbbbbi"; + static uint8 const arraySizes[19] = { 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 19, types, arraySizes); + return &instance; + } +}; + +struct SpellItemEnchantmentConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbbbi"; + static uint8 const arraySizes[6] = { 5, 5, 5, 5, 5, 5 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellKeyboundOverrideMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellLabelMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ii"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellLearnSpellMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellLevelsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellMechanicMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SpellMiscMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffhhhhhb"; + static uint8 const arraySizes[9] = { 14, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct SpellMiscDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellMissileMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffffffffffffb"; + static uint8 const arraySizes[15] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 15, types, arraySizes); + return &instance; + } +}; + +struct SpellMissileMotionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellPowerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiffifbbiiiiii"; + static uint8 const arraySizes[14] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(8, 14, types, arraySizes); + return &instance; + } +}; + +struct SpellPowerDifficultyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellProceduralEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fbi"; + static uint8 const arraySizes[3] = { 4, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellProcsPerMinuteMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellProcsPerMinuteModMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellRadiusMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffff"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellRangeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffssb"; + static uint8 const arraySizes[5] = { 2, 2, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct SpellReagentsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iih"; + static uint8 const arraySizes[3] = { 1, 8, 8 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellReagentsCurrencyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellScalingMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihbbi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct SpellShapeshiftMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiib"; + static uint8 const arraySizes[4] = { 1, 2, 2, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct SpellShapeshiftFormMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sfihhhhhbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 4, 8, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct SpellSpecialUnitEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hi"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct SpellTargetRestrictionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffihbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct SpellTotemsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iih"; + static uint8 const arraySizes[3] = { 1, 2, 2 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiiiiiiiiiiiiiffiihhhbbiiii"; + static uint8 const arraySizes[28] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(24, 28, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualAnimMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualColorEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fifhhhhhbbi"; + static uint8 const arraySizes[11] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualEffectNameMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sffffffiiibii"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifhhii"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(4, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualKitAreaModelMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffhb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualKitEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualKitModelAttachMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffffffffffifhhhhhhbbi"; + static uint8 const arraySizes[22] = { 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(21, 22, types, arraySizes); + return &instance; + } +}; + +struct SpellVisualMissileMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiffhhhhhhbbiii"; + static uint8 const arraySizes[16] = { 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(13, 16, types, arraySizes); + return &instance; + } +}; + +struct SpellXSpellVisualMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifhhhbbi"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(7, 8, types, arraySizes); + return &instance; + } +}; + +struct Startup_StringsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ss"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct StationeryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct StringLookupsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct SummonPropertiesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiii"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct TactKeyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 16 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct TactKeyLookupMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 8 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct TalentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iishbbbbb"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 1, 1, 1, 2, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct TaxiNodesMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fsifhhhbi"; + static uint8 const arraySizes[9] = { 3, 1, 2, 2, 1, 1, 1, 1, 1 }; + static DB2Meta instance(8, 9, types, arraySizes); + return &instance; + } +}; + +struct TaxiPathMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(2, 4, types, arraySizes); + return &instance; + } +}; + +struct TaxiPathNodeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fihhhhbbi"; + static uint8 const arraySizes[9] = { 3, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(8, 9, types, arraySizes); + return &instance; + } +}; + +struct TerrainMaterialMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ssb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct TerrainTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct TerrainTypeSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct TextureBlendSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffffbbbb"; + static uint8 const arraySizes[10] = { 3, 3, 3, 3, 3, 4, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct TextureFileDataMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(2, 3, types, arraySizes); + return &instance; + } +}; + +struct TotemCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sib"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ToyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "isbbi"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(4, 5, types, arraySizes); + return &instance; + } +}; + +struct TradeSkillCategoryMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhhb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct TradeSkillItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct TransformMatrixMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffff"; + static uint8 const arraySizes[5] = { 3, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct TransmogSetMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(0, 4, types, arraySizes); + return &instance; + } +}; + +struct TransmogSetItemMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiii"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(0, 4, types, arraySizes); + return &instance; + } +}; + +struct TransportAnimationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iifb"; + static uint8 const arraySizes[4] = { 1, 1, 3, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct TransportPhysicsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffffffff"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct TransportRotationMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iif"; + static uint8 const arraySizes[3] = { 1, 1, 4 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct TrophyMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct UiCamFbackTransmogChrRaceMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct UiCamFbackTransmogWeaponMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct UiCameraMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sfffhbbbi"; + static uint8 const arraySizes[9] = { 1, 3, 3, 3, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct UiCameraTypeMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sii"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct UiMapPOIMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifiiiii"; + static uint8 const arraySizes[7] = { 1, 3, 1, 1, 1, 1, 1 }; + static DB2Meta instance(6, 7, types, arraySizes); + return &instance; + } +}; + +struct UiTextureAtlasMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct UiTextureAtlasMemberMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhhhhbb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct UiTextureKitMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct UnitBloodMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shhhiii"; + static uint8 const arraySizes[7] = { 5, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct UnitBloodLevelsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "b"; + static uint8 const arraySizes[1] = { 3 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct UnitConditionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ibbb"; + static uint8 const arraySizes[4] = { 8, 1, 8, 8 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct UnitPowerBarMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffiissssffhhbbii"; + static uint8 const arraySizes[16] = { 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 16, types, arraySizes); + return &instance; + } +}; + +struct VehicleMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iffffffffffffffffffSSSffhhhbb"; + static uint8 const arraySizes[29] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 8, 1, 3, 1, 1 }; + static DB2Meta instance(-1, 29, types, arraySizes); + return &instance; + } +}; + +struct VehicleSeatMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "iiiffffffffffffffffffffffffffffffihhhhhhhhhhhhhhhhhhhbbbbbbii"; + static uint8 const arraySizes[61] = { 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 61, types, arraySizes); + return &instance; + } +}; + +struct VehicleUIIndSeatMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffhb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct VehicleUIIndicatorMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct VideoHardwareMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sshhbbbbbbbbbbiiiiiiii"; + static uint8 const arraySizes[22] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(14, 22, types, arraySizes); + return &instance; + } +}; + +struct VignetteMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sffhbii"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct VocalUISoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 2 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct WMOAreaTableMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ishhhhhhhbbbbii"; + static uint8 const arraySizes[15] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(13, 15, types, arraySizes); + return &instance; + } +}; + +struct WbAccessControlListMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct WbCertBlacklistMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 20 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct WbCertWhitelistMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbbb"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct WbPermissionsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sb"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct WeaponImpactSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbbiiii"; + static uint8 const arraySizes[7] = { 1, 1, 1, 11, 11, 11, 11 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct WeaponSwingSounds2Meta +{ + static DB2Meta const* Instance() + { + static char const* types = "bbi"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct WeaponTrailMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ifffiffff"; + static uint8 const arraySizes[9] = { 1, 1, 1, 1, 3, 3, 3, 3, 3 }; + static DB2Meta instance(-1, 9, types, arraySizes); + return &instance; + } +}; + +struct WeaponTrailModelDefMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct WeaponTrailParamMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffhbbbb"; + static uint8 const arraySizes[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct WeatherMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffsfffffhbbbi"; + static uint8 const arraySizes[14] = { 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 14, types, arraySizes); + return &instance; + } +}; + +struct WindSettingsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffffffffb"; + static uint8 const arraySizes[10] = { 1, 3, 1, 1, 3, 1, 3, 1, 1, 1 }; + static DB2Meta instance(-1, 10, types, arraySizes); + return &instance; + } +}; + +struct WmoMinimapTextureMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhbb"; + static uint8 const arraySizes[5] = { 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 5, types, arraySizes); + return &instance; + } +}; + +struct WorldBossLockoutMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sh"; + static uint8 const arraySizes[2] = { 1, 1 }; + static DB2Meta instance(-1, 2, types, arraySizes); + return &instance; + } +}; + +struct WorldChunkSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hbbbbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct WorldEffectMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhbb"; + static uint8 const arraySizes[6] = { 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 6, types, arraySizes); + return &instance; + } +}; + +struct WorldElapsedTimerMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sbb"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct WorldMapAreaMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Sffffhhhhhhbbbbii"; + static uint8 const arraySizes[17] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(15, 17, types, arraySizes); + return &instance; + } +}; + +struct WorldMapContinentMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffffhhbbbbb"; + static uint8 const arraySizes[11] = { 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 11, types, arraySizes); + return &instance; + } +}; + +struct WorldMapOverlayMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "Shhiiiiiiiiii"; + static uint8 const arraySizes[13] = { 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 13, types, arraySizes); + return &instance; + } +}; + +struct WorldMapTransformsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fffhhhhb"; + static uint8 const arraySizes[8] = { 6, 2, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct WorldSafeLocsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ffsh"; + static uint8 const arraySizes[4] = { 3, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct WorldStateExpressionMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "s"; + static uint8 const arraySizes[1] = { 1 }; + static DB2Meta instance(-1, 1, types, arraySizes); + return &instance; + } +}; + +struct WorldStateUIMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "sssssshhhhhbbbbi"; + static uint8 const arraySizes[16] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1 }; + static DB2Meta instance(15, 16, types, arraySizes); + return &instance; + } +}; + +struct WorldStateZoneSoundsMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "ihhhhhhb"; + static uint8 const arraySizes[8] = { 1, 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 8, types, arraySizes); + return &instance; + } +}; + +struct World_PVP_AreaMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "hhhhhbb"; + static uint8 const arraySizes[7] = { 1, 1, 1, 1, 1, 1, 1 }; + static DB2Meta instance(-1, 7, types, arraySizes); + return &instance; + } +}; + +struct ZoneIntroMusicTableMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shbi"; + static uint8 const arraySizes[4] = { 1, 1, 1, 1 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +struct ZoneLightMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "shh"; + static uint8 const arraySizes[3] = { 1, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ZoneLightPointMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "fhb"; + static uint8 const arraySizes[3] = { 2, 1, 1 }; + static DB2Meta instance(-1, 3, types, arraySizes); + return &instance; + } +}; + +struct ZoneMusicMeta +{ + static DB2Meta const* Instance() + { + static char const* types = "siii"; + static uint8 const arraySizes[4] = { 1, 2, 2, 2 }; + static DB2Meta instance(-1, 4, types, arraySizes); + return &instance; + } +}; + +#endif // DB2Metadata_h__ diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 0c2c02f2ca8..dfae9795b4e 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -18,197 +18,196 @@ #include "DB2Stores.h" #include "Common.h" #include "Containers.h" -#include "DB2fmt.h" -#include "HotfixDatabase.h" +#include "DatabaseEnv.h" +#include "DB2Metadata.h" #include "Log.h" #include "TransportMgr.h" #include "World.h" -DB2Storage sAchievementStore("Achievement.db2", AchievementFormat, HOTFIX_SEL_ACHIEVEMENT); -DB2Storage sAnimKitStore("AnimKit.db2", AnimKitFormat, HOTFIX_SEL_ANIM_KIT); -DB2Storage sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER); -DB2Storage sAreaTableStore("AreaTable.db2", AreaTableFormat, HOTFIX_SEL_AREA_TABLE); -DB2Storage sAreaTriggerStore("AreaTrigger.db2", AreaTriggerFormat, HOTFIX_SEL_AREA_TRIGGER); -DB2Storage sArmorLocationStore("ArmorLocation.db2", ArmorLocationFormat, HOTFIX_SEL_ARMOR_LOCATION); -DB2Storage sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE); -DB2Storage sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesFormat, HOTFIX_SEL_BANK_BAG_SLOT_PRICES); -DB2Storage sBannedAddOnsStore("BannedAddOns.db2", BannedAddOnsFormat, HOTFIX_SEL_BANNED_ADDONS); -DB2Storage sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleFormat, HOTFIX_SEL_BARBER_SHOP_STYLE); -DB2Storage sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityFormat, HOTFIX_SEL_BATTLE_PET_BREED_QUALITY); -DB2Storage sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateFormat, HOTFIX_SEL_BATTLE_PET_BREED_STATE); -DB2Storage sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesFormat, HOTFIX_SEL_BATTLE_PET_SPECIES); -DB2Storage sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateFormat, HOTFIX_SEL_BATTLE_PET_SPECIES_STATE); -DB2Storage sBattlemasterListStore("BattlemasterList.db2", BattlemasterListFormat, HOTFIX_SEL_BATTLEMASTER_LIST); -DB2Storage sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); -DB2Storage sCharSectionsStore("CharSections.db2", CharSectionsFormat, HOTFIX_SEL_CHAR_SECTIONS); -DB2Storage sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT); -DB2Storage sCharTitlesStore("CharTitles.db2", CharTitlesFormat, HOTFIX_SEL_CHAR_TITLES); -DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsFormat, HOTFIX_SEL_CHAT_CHANNELS); -DB2Storage sChrClassesStore("ChrClasses.db2", ChrClassesFormat, HOTFIX_SEL_CHR_CLASSES); -DB2Storage sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); -DB2Storage sChrRacesStore("ChrRaces.db2", ChrRacesFormat, HOTFIX_SEL_CHR_RACES); -DB2Storage sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationFormat, HOTFIX_SEL_CHR_SPECIALIZATION); -DB2Storage sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES); -DB2Storage sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO); -DB2Storage sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA); -DB2Storage sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyFormat, HOTFIX_SEL_CREATURE_FAMILY); -DB2Storage sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataFormat, HOTFIX_SEL_CREATURE_MODEL_DATA); -DB2Storage sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE); -DB2Storage sCriteriaStore("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA); -DB2Storage sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE); -DB2Storage sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES); -DB2Storage sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT); -DB2Storage sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA); -DB2Storage sDifficultyStore("Difficulty.db2", DifficultyFormat, HOTFIX_SEL_DIFFICULTY); -DB2Storage sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterFormat, HOTFIX_SEL_DUNGEON_ENCOUNTER); -DB2Storage sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsFormat, HOTFIX_SEL_DURABILITY_COSTS); -DB2Storage sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY); -DB2Storage sEmotesStore("Emotes.db2", EmotesFormat, HOTFIX_SEL_EMOTES); -DB2Storage sEmotesTextStore("EmotesText.db2", EmotesTextFormat, HOTFIX_SEL_EMOTES_TEXT); -DB2Storage sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundFormat, HOTFIX_SEL_EMOTES_TEXT_SOUND); -DB2Storage sFactionStore("Faction.db2", FactionFormat, HOTFIX_SEL_FACTION); -DB2Storage sFactionTemplateStore("FactionTemplate.db2", FactionTemplateFormat, HOTFIX_SEL_FACTION_TEMPLATE); -DB2Storage sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); -DB2Storage sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoFormat, HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO); -DB2Storage sGarrAbilityStore("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY); -DB2Storage sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING); -DB2Storage sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST); -DB2Storage sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecFormat, HOTFIX_SEL_GARR_CLASS_SPEC); -DB2Storage sGarrFollowerStore("GarrFollower.db2", GarrFollowerFormat, HOTFIX_SEL_GARR_FOLLOWER); -DB2Storage sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityFormat, HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY); -DB2Storage sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingFormat, HOTFIX_SEL_GARR_PLOT_BUILDING); -DB2Storage sGarrPlotStore("GarrPlot.db2", GarrPlotFormat, HOTFIX_SEL_GARR_PLOT); -DB2Storage sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE); -DB2Storage sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL); -DB2Storage sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST); -DB2Storage sGemPropertiesStore("GemProperties.db2", GemPropertiesFormat, HOTFIX_SEL_GEM_PROPERTIES); -DB2Storage sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesFormat, HOTFIX_SEL_GLYPH_PROPERTIES); -DB2Storage sGlyphSlotStore("GlyphSlot.db2", GlyphSlotFormat, HOTFIX_SEL_GLYPH_SLOT); -DB2Storage sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundFormat, HOTFIX_SEL_GUILD_COLOR_BACKGROUND); -DB2Storage sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderFormat, HOTFIX_SEL_GUILD_COLOR_BORDER); -DB2Storage sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemFormat, HOTFIX_SEL_GUILD_COLOR_EMBLEM); -DB2Storage sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsFormat, HOTFIX_SEL_GUILD_PERK_SPELLS); -DB2Storage sHeirloomStore("Heirloom.db2", HeirloomFormat, HOTFIX_SEL_HEIRLOOM); -DB2Storage sHolidaysStore("Holidays.db2", HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS); -DB2Storage sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorFormat, HOTFIX_SEL_IMPORT_PRICE_ARMOR); -DB2Storage sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityFormat, HOTFIX_SEL_IMPORT_PRICE_QUALITY); -DB2Storage sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldFormat, HOTFIX_SEL_IMPORT_PRICE_SHIELD); -DB2Storage sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponFormat, HOTFIX_SEL_IMPORT_PRICE_WEAPON); -DB2Storage sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE); -DB2Storage sItemArmorQualityStore("ItemArmorQuality.db2", ItemArmorQualityFormat, HOTFIX_SEL_ITEM_ARMOR_QUALITY); -DB2Storage sItemArmorShieldStore("ItemArmorShield.db2", ItemArmorShieldFormat, HOTFIX_SEL_ITEM_ARMOR_SHIELD); -DB2Storage sItemArmorTotalStore("ItemArmorTotal.db2", ItemArmorTotalFormat, HOTFIX_SEL_ITEM_ARMOR_TOTAL); -DB2Storage sItemBagFamilyStore("ItemBagFamily.db2", ItemBagFamilyFormat, HOTFIX_SEL_ITEM_BAG_FAMILY); -DB2Storage sItemBonusStore("ItemBonus.db2", ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS); -DB2Storage sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE); -DB2Storage sItemClassStore("ItemClass.db2", ItemClassFormat, HOTFIX_SEL_ITEM_CLASS); -DB2Storage sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST); -DB2Storage sItemDamageAmmoStore("ItemDamageAmmo.db2", ItemDamageAmmoFormat, HOTFIX_SEL_ITEM_DAMAGE_AMMO); -DB2Storage sItemDamageOneHandStore("ItemDamageOneHand.db2", ItemDamageOneHandFormat, HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND); -DB2Storage sItemDamageOneHandCasterStore("ItemDamageOneHandCaster.db2", ItemDamageOneHandCasterFormat, HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND_CASTER); -DB2Storage sItemDamageTwoHandStore("ItemDamageTwoHand.db2", ItemDamageTwoHandFormat, HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND); -DB2Storage sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", ItemDamageTwoHandCasterFormat, HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND_CASTER); -DB2Storage sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootFormat, HOTFIX_SEL_ITEM_DISENCHANT_LOOT); -DB2Storage sItemEffectStore("ItemEffect.db2", ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT); -DB2Storage sItemStore("Item.db2", ItemFormat, HOTFIX_SEL_ITEM); -DB2Storage sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST); -DB2Storage sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryFormat, HOTFIX_SEL_ITEM_LIMIT_CATEGORY); -DB2Storage sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE); -DB2Storage sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseFormat, HOTFIX_SEL_ITEM_PRICE_BASE); -DB2Storage sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES); -DB2Storage sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX); -DB2Storage sItemSetStore("ItemSet.db2", ItemSetFormat, HOTFIX_SEL_ITEM_SET); -DB2Storage sItemSetSpellStore("ItemSetSpell.db2", ItemSetSpellFormat, HOTFIX_SEL_ITEM_SET_SPELL); -DB2SparseStorage sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE); -DB2Storage sItemSpecStore("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC); -DB2Storage sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideFormat, HOTFIX_SEL_ITEM_SPEC_OVERRIDE); -DB2Storage sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE); -DB2Storage sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); -DB2Storage sLfgDungeonsStore("LfgDungeons.db2", LfgDungeonsFormat, HOTFIX_SEL_LFG_DUNGEONS); -DB2Storage sLightStore("Light.db2", LightFormat, HOTFIX_SEL_LIGHT); -DB2Storage sLiquidTypeStore("LiquidType.db2", LiquidTypeFormat, HOTFIX_SEL_LIQUID_TYPE); -DB2Storage sLockStore("Lock.db2", LockFormat, HOTFIX_SEL_LOCK); -DB2Storage sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE); -DB2Storage sMapStore("Map.db2", MapFormat, HOTFIX_SEL_MAP); -DB2Storage sMapDifficultyStore("MapDifficulty.db2", MapDifficultyFormat, HOTFIX_SEL_MAP_DIFFICULTY); -DB2Storage sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE); -DB2Storage sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY); -DB2Storage sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT); -DB2Storage sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityFormat, HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY); -DB2Storage sMovieStore("Movie.db2", MovieFormat, HOTFIX_SEL_MOVIE); -DB2Storage sNameGenStore("NameGen.db2", NameGenFormat, HOTFIX_SEL_NAME_GEN); -DB2Storage sNamesProfanityStore("NamesProfanity.db2", NamesProfanityFormat, HOTFIX_SEL_NAMES_PROFANITY); -DB2Storage sNamesReservedStore("NamesReserved.db2", NamesReservedFormat, HOTFIX_SEL_NAMES_RESERVED); -DB2Storage sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleFormat, HOTFIX_SEL_NAMES_RESERVED_LOCALE); -DB2Storage sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA); -DB2Storage sPhaseStore("Phase.db2", PhaseFormat, HOTFIX_SEL_PHASE); -DB2Storage sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP); -DB2Storage sPlayerConditionStore("PlayerCondition.db2", PlayerConditionFormat, HOTFIX_SEL_PLAYER_CONDITION); -DB2Storage sPowerDisplayStore("PowerDisplay.db2", PowerDisplayFormat, HOTFIX_SEL_POWER_DISPLAY); -DB2Storage sPvpDifficultyStore("PvpDifficulty.db2", PvpDifficultyFormat, HOTFIX_SEL_PVP_DIFFICULTY); -DB2Storage sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardFormat, HOTFIX_SEL_QUEST_FACTION_REWARD); -DB2Storage sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardFormat, HOTFIX_SEL_QUEST_MONEY_REWARD); -DB2Storage sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemFormat, HOTFIX_SEL_QUEST_PACKAGE_ITEM); -DB2Storage sQuestSortStore("QuestSort.db2", QuestSortFormat, HOTFIX_SEL_QUEST_SORT); -DB2Storage sQuestV2Store("QuestV2.db2", QuestV2Format, HOTFIX_SEL_QUEST_V2); -DB2Storage sQuestXPStore("QuestXP.db2", QuestXPFormat, HOTFIX_SEL_QUEST_XP); -DB2Storage sRandPropPointsStore("RandPropPoints.db2", RandPropPointsFormat, HOTFIX_SEL_RAND_PROP_POINTS); -DB2Storage sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionFormat, HOTFIX_SEL_SCALING_STAT_DISTRIBUTION); -DB2Storage sSkillLineStore("SkillLine.db2", SkillLineFormat, HOTFIX_SEL_SKILL_LINE); -DB2Storage sSkillLineAbilityStore("SkillLineAbility.db2", SkillLineAbilityFormat, HOTFIX_SEL_SKILL_LINE_ABILITY); -DB2Storage sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", SkillRaceClassInfoFormat, HOTFIX_SEL_SKILL_RACE_CLASS_INFO); -DB2Storage sSoundKitStore("SoundKit.db2", SoundKitFormat, HOTFIX_SEL_SOUND_KIT); -DB2Storage sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsFormat, HOTFIX_SEL_SPECIALIZATION_SPELLS); -DB2Storage sSpellStore("Spell.db2", SpellFormat, HOTFIX_SEL_SPELL); -DB2Storage sSpellAuraOptionsStore("SpellAuraOptions.db2", SpellAuraOptionsFormat, HOTFIX_SEL_SPELL_AURA_OPTIONS); -DB2Storage sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS); -DB2Storage sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesFormat, HOTFIX_SEL_SPELL_CAST_TIMES); -DB2Storage sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS); -DB2Storage sSpellCategoriesStore("SpellCategories.db2", SpellCategoriesFormat, HOTFIX_SEL_SPELL_CATEGORIES); -DB2Storage sSpellCategoryStore("SpellCategory.db2", SpellCategoryFormat, HOTFIX_SEL_SPELL_CATEGORY); -DB2Storage sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS); -DB2Storage sSpellCooldownsStore("SpellCooldowns.db2", SpellCooldownsFormat, HOTFIX_SEL_SPELL_COOLDOWNS); -DB2Storage sSpellDurationStore("SpellDuration.db2", SpellDurationFormat, HOTFIX_SEL_SPELL_DURATION); -DB2Storage sSpellEffectStore("SpellEffect.db2", SpellEffectFormat, HOTFIX_SEL_SPELL_EFFECT); -DB2Storage sSpellEffectScalingStore("SpellEffectScaling.db2", SpellEffectScalingFormat, HOTFIX_SEL_SPELL_EFFECT_SCALING); -DB2Storage sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsFormat, HOTFIX_SEL_SPELL_EQUIPPED_ITEMS); -DB2Storage sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectFormat, HOTFIX_SEL_SPELL_FOCUS_OBJECT); -DB2Storage sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsFormat, HOTFIX_SEL_SPELL_INTERRUPTS); -DB2Storage sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT); -DB2Storage sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); -DB2Storage sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL); -DB2Storage sSpellLevelsStore("SpellLevels.db2", SpellLevelsFormat, HOTFIX_SEL_SPELL_LEVELS); -DB2Storage sSpellMiscStore("SpellMisc.db2", SpellMiscFormat, HOTFIX_SEL_SPELL_MISC); -DB2Storage sSpellPowerStore("SpellPower.db2", SpellPowerFormat, HOTFIX_SEL_SPELL_POWER); -DB2Storage sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyFormat, HOTFIX_SEL_SPELL_POWER_DIFFICULTY); -DB2Storage sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", SpellProcsPerMinuteFormat, HOTFIX_SEL_SPELL_PROCS_PER_MINUTE); -DB2Storage sSpellProcsPerMinuteModStore("SpellProcsPerMinuteMod.db2", SpellProcsPerMinuteModFormat, HOTFIX_SEL_SPELL_PROCS_PER_MINUTE_MOD); -DB2Storage sSpellRadiusStore("SpellRadius.db2", SpellRadiusFormat, HOTFIX_SEL_SPELL_RADIUS); -DB2Storage sSpellRangeStore("SpellRange.db2", SpellRangeFormat, HOTFIX_SEL_SPELL_RANGE); -DB2Storage sSpellReagentsStore("SpellReagents.db2", SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS); -DB2Storage sSpellScalingStore("SpellScaling.db2", SpellScalingFormat, HOTFIX_SEL_SPELL_SCALING); -DB2Storage sSpellShapeshiftStore("SpellShapeshift.db2", SpellShapeshiftFormat, HOTFIX_SEL_SPELL_SHAPESHIFT); -DB2Storage sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", SpellShapeshiftFormFormat, HOTFIX_SEL_SPELL_SHAPESHIFT_FORM); -DB2Storage sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsFormat, HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS); -DB2Storage sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS); -DB2Storage sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL); -DB2Storage sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesFormat, HOTFIX_SEL_SUMMON_PROPERTIES); -DB2Storage sTalentStore("Talent.db2", TalentFormat, HOTFIX_SEL_TALENT); -DB2Storage sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES); -DB2Storage sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH); -DB2Storage sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE); -DB2Storage sTotemCategoryStore("TotemCategory.db2", TotemCategoryFormat, HOTFIX_SEL_TOTEM_CATEGORY); -DB2Storage sToyStore("Toy.db2", ToyFormat, HOTFIX_SEL_TOY); -DB2Storage sTransportAnimationStore("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION); -DB2Storage sTransportRotationStore("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION); -DB2Storage sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR); -DB2Storage sVehicleStore("Vehicle.db2", VehicleFormat, HOTFIX_SEL_VEHICLE); -DB2Storage sVehicleSeatStore("VehicleSeat.db2", VehicleSeatFormat, HOTFIX_SEL_VEHICLE_SEAT); -DB2Storage sWMOAreaTableStore("WMOAreaTable.db2", WMOAreaTableFormat, HOTFIX_SEL_WMO_AREA_TABLE); -DB2Storage sWorldMapAreaStore("WorldMapArea.db2", WorldMapAreaFormat, HOTFIX_SEL_WORLD_MAP_AREA); -DB2Storage sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY); -DB2Storage sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsFormat, HOTFIX_SEL_WORLD_MAP_TRANSFORMS); -DB2Storage sWorldSafeLocsStore("WorldSafeLocs.db2", WorldSafeLocsFormat, HOTFIX_SEL_WORLD_SAFE_LOCS); +DB2Storage sAchievementStore("Achievement.db2", AchievementMeta::Instance(), HOTFIX_SEL_ACHIEVEMENT); +DB2Storage sAnimKitStore("AnimKit.db2", AnimKitMeta::Instance(), HOTFIX_SEL_ANIM_KIT); +DB2Storage sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberMeta::Instance(), HOTFIX_SEL_AREA_GROUP_MEMBER); +DB2Storage sAreaTableStore("AreaTable.db2", AreaTableMeta::Instance(), HOTFIX_SEL_AREA_TABLE); +DB2Storage sAreaTriggerStore("AreaTrigger.db2", AreaTriggerMeta::Instance(), HOTFIX_SEL_AREA_TRIGGER); +DB2Storage sArmorLocationStore("ArmorLocation.db2", ArmorLocationMeta::Instance(), HOTFIX_SEL_ARMOR_LOCATION); +DB2Storage sAuctionHouseStore("AuctionHouse.db2", AuctionHouseMeta::Instance(), HOTFIX_SEL_AUCTION_HOUSE); +DB2Storage sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesMeta::Instance(), HOTFIX_SEL_BANK_BAG_SLOT_PRICES); +DB2Storage sBannedAddOnsStore("BannedAddOns.db2", BannedAddOnsMeta::Instance(), HOTFIX_SEL_BANNED_ADDONS); +DB2Storage sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleMeta::Instance(), HOTFIX_SEL_BARBER_SHOP_STYLE); +DB2Storage sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityMeta::Instance(), HOTFIX_SEL_BATTLE_PET_BREED_QUALITY); +DB2Storage sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateMeta::Instance(), HOTFIX_SEL_BATTLE_PET_BREED_STATE); +DB2Storage sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesMeta::Instance(), HOTFIX_SEL_BATTLE_PET_SPECIES); +DB2Storage sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateMeta::Instance(), HOTFIX_SEL_BATTLE_PET_SPECIES_STATE); +DB2Storage sBattlemasterListStore("BattlemasterList.db2", BattlemasterListMeta::Instance(), HOTFIX_SEL_BATTLEMASTER_LIST); +DB2Storage sBroadcastTextStore("BroadcastText.db2", BroadcastTextMeta::Instance(), HOTFIX_SEL_BROADCAST_TEXT); +DB2Storage sCharSectionsStore("CharSections.db2", CharSectionsMeta::Instance(), HOTFIX_SEL_CHAR_SECTIONS); +DB2Storage sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitMeta::Instance(), HOTFIX_SEL_CHAR_START_OUTFIT); +DB2Storage sCharTitlesStore("CharTitles.db2", CharTitlesMeta::Instance(), HOTFIX_SEL_CHAR_TITLES); +DB2Storage sChatChannelsStore("ChatChannels.db2", ChatChannelsMeta::Instance(), HOTFIX_SEL_CHAT_CHANNELS); +DB2Storage sChrClassesStore("ChrClasses.db2", ChrClassesMeta::Instance(), HOTFIX_SEL_CHR_CLASSES); +DB2Storage sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesMeta::Instance(), HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); +DB2Storage sChrRacesStore("ChrRaces.db2", ChrRacesMeta::Instance(), HOTFIX_SEL_CHR_RACES); +DB2Storage sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationMeta::Instance(), HOTFIX_SEL_CHR_SPECIALIZATION); +DB2Storage sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesMeta::Instance(), HOTFIX_SEL_CINEMATIC_SEQUENCES); +DB2Storage sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoMeta::Instance(), HOTFIX_SEL_CREATURE_DISPLAY_INFO); +DB2Storage sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraMeta::Instance(), HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA); +DB2Storage sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyMeta::Instance(), HOTFIX_SEL_CREATURE_FAMILY); +DB2Storage sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataMeta::Instance(), HOTFIX_SEL_CREATURE_MODEL_DATA); +DB2Storage sCreatureTypeStore("CreatureType.db2", CreatureTypeMeta::Instance(), HOTFIX_SEL_CREATURE_TYPE); +DB2Storage sCriteriaStore("Criteria.db2", CriteriaMeta::Instance(), HOTFIX_SEL_CRITERIA); +DB2Storage sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeMeta::Instance(), HOTFIX_SEL_CRITERIA_TREE); +DB2Storage sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesMeta::Instance(), HOTFIX_SEL_CURRENCY_TYPES); +DB2Storage sCurvePointStore("CurvePoint.db2", CurvePointMeta::Instance(), HOTFIX_SEL_CURVE_POINT); +DB2Storage sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataMeta::Instance(), HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA); +DB2Storage sDifficultyStore("Difficulty.db2", DifficultyMeta::Instance(), HOTFIX_SEL_DIFFICULTY); +DB2Storage sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterMeta::Instance(), HOTFIX_SEL_DUNGEON_ENCOUNTER); +DB2Storage sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsMeta::Instance(), HOTFIX_SEL_DURABILITY_COSTS); +DB2Storage sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityMeta::Instance(), HOTFIX_SEL_DURABILITY_QUALITY); +DB2Storage sEmotesStore("Emotes.db2", EmotesMeta::Instance(), HOTFIX_SEL_EMOTES); +DB2Storage sEmotesTextStore("EmotesText.db2", EmotesTextMeta::Instance(), HOTFIX_SEL_EMOTES_TEXT); +DB2Storage sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundMeta::Instance(), HOTFIX_SEL_EMOTES_TEXT_SOUND); +DB2Storage sFactionStore("Faction.db2", FactionMeta::Instance(), HOTFIX_SEL_FACTION); +DB2Storage sFactionTemplateStore("FactionTemplate.db2", FactionTemplateMeta::Instance(), HOTFIX_SEL_FACTION_TEMPLATE); +DB2Storage sGameObjectsStore("GameObjects.db2", GameObjectsMeta::Instance(), HOTFIX_SEL_GAMEOBJECTS); +DB2Storage sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoMeta::Instance(), HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO); +DB2Storage sGarrAbilityStore("GarrAbility.db2", GarrAbilityMeta::Instance(), HOTFIX_SEL_GARR_ABILITY); +DB2Storage sGarrBuildingStore("GarrBuilding.db2", GarrBuildingMeta::Instance(), HOTFIX_SEL_GARR_BUILDING); +DB2Storage sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstMeta::Instance(), HOTFIX_SEL_GARR_BUILDING_PLOT_INST); +DB2Storage sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecMeta::Instance(), HOTFIX_SEL_GARR_CLASS_SPEC); +DB2Storage sGarrFollowerStore("GarrFollower.db2", GarrFollowerMeta::Instance(), HOTFIX_SEL_GARR_FOLLOWER); +DB2Storage sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityMeta::Instance(), HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY); +DB2Storage sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingMeta::Instance(), HOTFIX_SEL_GARR_PLOT_BUILDING); +DB2Storage sGarrPlotStore("GarrPlot.db2", GarrPlotMeta::Instance(), HOTFIX_SEL_GARR_PLOT); +DB2Storage sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceMeta::Instance(), HOTFIX_SEL_GARR_PLOT_INSTANCE); +DB2Storage sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelMeta::Instance(), HOTFIX_SEL_GARR_SITE_LEVEL); +DB2Storage sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstMeta::Instance(), HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST); +DB2Storage sGemPropertiesStore("GemProperties.db2", GemPropertiesMeta::Instance(), HOTFIX_SEL_GEM_PROPERTIES); +DB2Storage sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesMeta::Instance(), HOTFIX_SEL_GLYPH_PROPERTIES); +DB2Storage sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_BACKGROUND); +DB2Storage sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_BORDER); +DB2Storage sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_EMBLEM); +DB2Storage sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsMeta::Instance(), HOTFIX_SEL_GUILD_PERK_SPELLS); +DB2Storage sHeirloomStore("Heirloom.db2", HeirloomMeta::Instance(), HOTFIX_SEL_HEIRLOOM); +DB2Storage sHolidaysStore("Holidays.db2", HolidaysMeta::Instance(), HOTFIX_SEL_HOLIDAYS); +DB2Storage sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_ARMOR); +DB2Storage sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_QUALITY); +DB2Storage sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_SHIELD); +DB2Storage sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_WEAPON); +DB2Storage sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceMeta::Instance(), HOTFIX_SEL_ITEM_APPEARANCE); +DB2Storage sItemArmorQualityStore("ItemArmorQuality.db2", ItemArmorQualityMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_QUALITY); +DB2Storage sItemArmorShieldStore("ItemArmorShield.db2", ItemArmorShieldMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_SHIELD); +DB2Storage sItemArmorTotalStore("ItemArmorTotal.db2", ItemArmorTotalMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_TOTAL); +DB2Storage sItemBagFamilyStore("ItemBagFamily.db2", ItemBagFamilyMeta::Instance(), HOTFIX_SEL_ITEM_BAG_FAMILY); +DB2Storage sItemBonusStore("ItemBonus.db2", ItemBonusMeta::Instance(), HOTFIX_SEL_ITEM_BONUS); +DB2Storage sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeMeta::Instance(), HOTFIX_SEL_ITEM_BONUS_TREE_NODE); +DB2Storage sItemClassStore("ItemClass.db2", ItemClassMeta::Instance(), HOTFIX_SEL_ITEM_CLASS); +DB2Storage sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostMeta::Instance(), HOTFIX_SEL_ITEM_CURRENCY_COST); +DB2Storage sItemDamageAmmoStore("ItemDamageAmmo.db2", ItemDamageAmmoMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_AMMO); +DB2Storage sItemDamageOneHandStore("ItemDamageOneHand.db2", ItemDamageOneHandMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND); +DB2Storage sItemDamageOneHandCasterStore("ItemDamageOneHandCaster.db2", ItemDamageOneHandCasterMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND_CASTER); +DB2Storage sItemDamageTwoHandStore("ItemDamageTwoHand.db2", ItemDamageTwoHandMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND); +DB2Storage sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", ItemDamageTwoHandCasterMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND_CASTER); +DB2Storage sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootMeta::Instance(), HOTFIX_SEL_ITEM_DISENCHANT_LOOT); +DB2Storage sItemEffectStore("ItemEffect.db2", ItemEffectMeta::Instance(), HOTFIX_SEL_ITEM_EFFECT); +DB2Storage sItemStore("Item.db2", ItemMeta::Instance(), HOTFIX_SEL_ITEM); +DB2Storage sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostMeta::Instance(), HOTFIX_SEL_ITEM_EXTENDED_COST); +DB2Storage sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryMeta::Instance(), HOTFIX_SEL_ITEM_LIMIT_CATEGORY); +DB2Storage sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceMeta::Instance(), HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE); +DB2Storage sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseMeta::Instance(), HOTFIX_SEL_ITEM_PRICE_BASE); +DB2Storage sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesMeta::Instance(), HOTFIX_SEL_ITEM_RANDOM_PROPERTIES); +DB2Storage sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixMeta::Instance(), HOTFIX_SEL_ITEM_RANDOM_SUFFIX); +DB2Storage sItemSetStore("ItemSet.db2", ItemSetMeta::Instance(), HOTFIX_SEL_ITEM_SET); +DB2Storage sItemSetSpellStore("ItemSetSpell.db2", ItemSetSpellMeta::Instance(), HOTFIX_SEL_ITEM_SET_SPELL); +DB2SparseStorage sItemSparseStore("Item-sparse.db2", ItemSparseMeta::Instance(), HOTFIX_SEL_ITEM_SPARSE); +DB2Storage sItemSpecStore("ItemSpec.db2", ItemSpecMeta::Instance(), HOTFIX_SEL_ITEM_SPEC); +DB2Storage sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideMeta::Instance(), HOTFIX_SEL_ITEM_SPEC_OVERRIDE); +DB2Storage sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeMeta::Instance(), HOTFIX_SEL_ITEM_X_BONUS_TREE); +DB2Storage sKeyChainStore("KeyChain.db2", KeyChainMeta::Instance(), HOTFIX_SEL_KEY_CHAIN); +DB2Storage sLfgDungeonsStore("LfgDungeons.db2", LfgDungeonsMeta::Instance(), HOTFIX_SEL_LFG_DUNGEONS); +DB2Storage sLightStore("Light.db2", LightMeta::Instance(), HOTFIX_SEL_LIGHT); +DB2Storage sLiquidTypeStore("LiquidType.db2", LiquidTypeMeta::Instance(), HOTFIX_SEL_LIQUID_TYPE); +DB2Storage sLockStore("Lock.db2", LockMeta::Instance(), HOTFIX_SEL_LOCK); +DB2Storage sMailTemplateStore("MailTemplate.db2", MailTemplateMeta::Instance(), HOTFIX_SEL_MAIL_TEMPLATE); +DB2Storage sMapStore("Map.db2", MapMeta::Instance(), HOTFIX_SEL_MAP); +DB2Storage sMapDifficultyStore("MapDifficulty.db2", MapDifficultyMeta::Instance(), HOTFIX_SEL_MAP_DIFFICULTY); +DB2Storage sModifierTreeStore("ModifierTree.db2", ModifierTreeMeta::Instance(), HOTFIX_SEL_MODIFIER_TREE); +DB2Storage sMountCapabilityStore("MountCapability.db2", MountCapabilityMeta::Instance(), HOTFIX_SEL_MOUNT_CAPABILITY); +DB2Storage sMountStore("Mount.db2", MountMeta::Instance(), HOTFIX_SEL_MOUNT); +DB2Storage sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityMeta::Instance(), HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY); +DB2Storage sMovieStore("Movie.db2", MovieMeta::Instance(), HOTFIX_SEL_MOVIE); +DB2Storage sNameGenStore("NameGen.db2", NameGenMeta::Instance(), HOTFIX_SEL_NAME_GEN); +DB2Storage sNamesProfanityStore("NamesProfanity.db2", NamesProfanityMeta::Instance(), HOTFIX_SEL_NAMES_PROFANITY); +DB2Storage sNamesReservedStore("NamesReserved.db2", NamesReservedMeta::Instance(), HOTFIX_SEL_NAMES_RESERVED); +DB2Storage sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleMeta::Instance(), HOTFIX_SEL_NAMES_RESERVED_LOCALE); +DB2Storage sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataMeta::Instance(), HOTFIX_SEL_OVERRIDE_SPELL_DATA); +DB2Storage sPhaseStore("Phase.db2", PhaseMeta::Instance(), HOTFIX_SEL_PHASE); +DB2Storage sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupMeta::Instance(), HOTFIX_SEL_PHASE_X_PHASE_GROUP); +DB2Storage sPlayerConditionStore("PlayerCondition.db2", PlayerConditionMeta::Instance(), HOTFIX_SEL_PLAYER_CONDITION); +DB2Storage sPowerDisplayStore("PowerDisplay.db2", PowerDisplayMeta::Instance(), HOTFIX_SEL_POWER_DISPLAY); +DB2Storage sPvpDifficultyStore("PvpDifficulty.db2", PvpDifficultyMeta::Instance(), HOTFIX_SEL_PVP_DIFFICULTY); +DB2Storage sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardMeta::Instance(), HOTFIX_SEL_QUEST_FACTION_REWARD); +DB2Storage sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardMeta::Instance(), HOTFIX_SEL_QUEST_MONEY_REWARD); +DB2Storage sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemMeta::Instance(), HOTFIX_SEL_QUEST_PACKAGE_ITEM); +DB2Storage sQuestSortStore("QuestSort.db2", QuestSortMeta::Instance(), HOTFIX_SEL_QUEST_SORT); +DB2Storage sQuestV2Store("QuestV2.db2", QuestV2Meta::Instance(), HOTFIX_SEL_QUEST_V2); +DB2Storage sQuestXPStore("QuestXP.db2", QuestXPMeta::Instance(), HOTFIX_SEL_QUEST_XP); +DB2Storage sRandPropPointsStore("RandPropPoints.db2", RandPropPointsMeta::Instance(), HOTFIX_SEL_RAND_PROP_POINTS); +DB2Storage sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionMeta::Instance(), HOTFIX_SEL_SCALING_STAT_DISTRIBUTION); +DB2Storage sSkillLineStore("SkillLine.db2", SkillLineMeta::Instance(), HOTFIX_SEL_SKILL_LINE); +DB2Storage sSkillLineAbilityStore("SkillLineAbility.db2", SkillLineAbilityMeta::Instance(), HOTFIX_SEL_SKILL_LINE_ABILITY); +DB2Storage sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", SkillRaceClassInfoMeta::Instance(), HOTFIX_SEL_SKILL_RACE_CLASS_INFO); +DB2Storage sSoundKitStore("SoundKit.db2", SoundKitMeta::Instance(), HOTFIX_SEL_SOUND_KIT); +DB2Storage sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsMeta::Instance(), HOTFIX_SEL_SPECIALIZATION_SPELLS); +DB2Storage sSpellStore("Spell.db2", SpellMeta::Instance(), HOTFIX_SEL_SPELL); +DB2Storage sSpellAuraOptionsStore("SpellAuraOptions.db2", SpellAuraOptionsMeta::Instance(), HOTFIX_SEL_SPELL_AURA_OPTIONS); +DB2Storage sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsMeta::Instance(), HOTFIX_SEL_SPELL_AURA_RESTRICTIONS); +DB2Storage sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesMeta::Instance(), HOTFIX_SEL_SPELL_CAST_TIMES); +DB2Storage sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsMeta::Instance(), HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS); +DB2Storage sSpellCategoriesStore("SpellCategories.db2", SpellCategoriesMeta::Instance(), HOTFIX_SEL_SPELL_CATEGORIES); +DB2Storage sSpellCategoryStore("SpellCategory.db2", SpellCategoryMeta::Instance(), HOTFIX_SEL_SPELL_CATEGORY); +DB2Storage sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsMeta::Instance(), HOTFIX_SEL_SPELL_CLASS_OPTIONS); +DB2Storage sSpellCooldownsStore("SpellCooldowns.db2", SpellCooldownsMeta::Instance(), HOTFIX_SEL_SPELL_COOLDOWNS); +DB2Storage sSpellDurationStore("SpellDuration.db2", SpellDurationMeta::Instance(), HOTFIX_SEL_SPELL_DURATION); +DB2Storage sSpellEffectStore("SpellEffect.db2", SpellEffectMeta::Instance(), HOTFIX_SEL_SPELL_EFFECT); +DB2Storage sSpellEffectScalingStore("SpellEffectScaling.db2", SpellEffectScalingMeta::Instance(), HOTFIX_SEL_SPELL_EFFECT_SCALING); +DB2Storage sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsMeta::Instance(), HOTFIX_SEL_SPELL_EQUIPPED_ITEMS); +DB2Storage sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectMeta::Instance(), HOTFIX_SEL_SPELL_FOCUS_OBJECT); +DB2Storage sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsMeta::Instance(), HOTFIX_SEL_SPELL_INTERRUPTS); +DB2Storage sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentMeta::Instance(), HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT); +DB2Storage sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionMeta::Instance(), HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); +DB2Storage sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellMeta::Instance(), HOTFIX_SEL_SPELL_LEARN_SPELL); +DB2Storage sSpellLevelsStore("SpellLevels.db2", SpellLevelsMeta::Instance(), HOTFIX_SEL_SPELL_LEVELS); +DB2Storage sSpellMiscStore("SpellMisc.db2", SpellMiscMeta::Instance(), HOTFIX_SEL_SPELL_MISC); +DB2Storage sSpellPowerStore("SpellPower.db2", SpellPowerMeta::Instance(), HOTFIX_SEL_SPELL_POWER); +DB2Storage sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyMeta::Instance(), HOTFIX_SEL_SPELL_POWER_DIFFICULTY); +DB2Storage sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", SpellProcsPerMinuteMeta::Instance(), HOTFIX_SEL_SPELL_PROCS_PER_MINUTE); +DB2Storage sSpellProcsPerMinuteModStore("SpellProcsPerMinuteMod.db2", SpellProcsPerMinuteModMeta::Instance(), HOTFIX_SEL_SPELL_PROCS_PER_MINUTE_MOD); +DB2Storage sSpellRadiusStore("SpellRadius.db2", SpellRadiusMeta::Instance(), HOTFIX_SEL_SPELL_RADIUS); +DB2Storage sSpellRangeStore("SpellRange.db2", SpellRangeMeta::Instance(), HOTFIX_SEL_SPELL_RANGE); +DB2Storage sSpellReagentsStore("SpellReagents.db2", SpellReagentsMeta::Instance(), HOTFIX_SEL_SPELL_REAGENTS); +DB2Storage sSpellScalingStore("SpellScaling.db2", SpellScalingMeta::Instance(), HOTFIX_SEL_SPELL_SCALING); +DB2Storage sSpellShapeshiftStore("SpellShapeshift.db2", SpellShapeshiftMeta::Instance(), HOTFIX_SEL_SPELL_SHAPESHIFT); +DB2Storage sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", SpellShapeshiftFormMeta::Instance(), HOTFIX_SEL_SPELL_SHAPESHIFT_FORM); +DB2Storage sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsMeta::Instance(), HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS); +DB2Storage sSpellTotemsStore("SpellTotems.db2", SpellTotemsMeta::Instance(), HOTFIX_SEL_SPELL_TOTEMS); +DB2Storage sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualMeta::Instance(), HOTFIX_SEL_SPELL_X_SPELL_VISUAL); +DB2Storage sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesMeta::Instance(), HOTFIX_SEL_SUMMON_PROPERTIES); +DB2Storage sTalentStore("Talent.db2", TalentMeta::Instance(), HOTFIX_SEL_TALENT); +DB2Storage sTaxiNodesStore("TaxiNodes.db2", TaxiNodesMeta::Instance(), HOTFIX_SEL_TAXI_NODES); +DB2Storage sTaxiPathStore("TaxiPath.db2", TaxiPathMeta::Instance(), HOTFIX_SEL_TAXI_PATH); +DB2Storage sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeMeta::Instance(), HOTFIX_SEL_TAXI_PATH_NODE); +DB2Storage sTotemCategoryStore("TotemCategory.db2", TotemCategoryMeta::Instance(), HOTFIX_SEL_TOTEM_CATEGORY); +DB2Storage sToyStore("Toy.db2", ToyMeta::Instance(), HOTFIX_SEL_TOY); +DB2Storage sTransportAnimationStore("TransportAnimation.db2", TransportAnimationMeta::Instance(), HOTFIX_SEL_TRANSPORT_ANIMATION); +DB2Storage sTransportRotationStore("TransportRotation.db2", TransportRotationMeta::Instance(), HOTFIX_SEL_TRANSPORT_ROTATION); +DB2Storage sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarMeta::Instance(), HOTFIX_SEL_UNIT_POWER_BAR); +DB2Storage sVehicleStore("Vehicle.db2", VehicleMeta::Instance(), HOTFIX_SEL_VEHICLE); +DB2Storage sVehicleSeatStore("VehicleSeat.db2", VehicleSeatMeta::Instance(), HOTFIX_SEL_VEHICLE_SEAT); +DB2Storage sWMOAreaTableStore("WMOAreaTable.db2", WMOAreaTableMeta::Instance(), HOTFIX_SEL_WMO_AREA_TABLE); +DB2Storage sWorldMapAreaStore("WorldMapArea.db2", WorldMapAreaMeta::Instance(), HOTFIX_SEL_WORLD_MAP_AREA); +DB2Storage sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayMeta::Instance(), HOTFIX_SEL_WORLD_MAP_OVERLAY); +DB2Storage sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsMeta::Instance(), HOTFIX_SEL_WORLD_MAP_TRANSFORMS); +DB2Storage sWorldSafeLocsStore("WorldSafeLocs.db2", WorldSafeLocsMeta::Instance(), HOTFIX_SEL_WORLD_SAFE_LOCS); TaxiMask sTaxiNodesMask; TaxiMask sOldContinentsNodesMask; @@ -225,22 +224,14 @@ template class DB2> inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, DB2Manager::StorageMap& stores, DB2StorageBase* storage, std::string const& db2Path, uint32 defaultLocale, DB2 const& /*hint*/) { // compatibility format and C++ structure sizes - ASSERT(DB2FileLoader::GetFormatRecordSize(storage->GetFormat()) == sizeof(T), + ASSERT(storage->GetMeta()->GetRecordSize() == sizeof(T), "Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").", - storage->GetFileName().c_str(), DB2FileLoader::GetFormatRecordSize(storage->GetFormat()), sizeof(T)); + storage->GetFileName().c_str(), storage->GetMeta()->GetRecordSize(), sizeof(T)); ++DB2FilesCount; -#define EXPECTED_DB2_BUILD 21414 - if (storage->Load(db2Path + localeNames[defaultLocale] + '/', defaultLocale)) { - if (storage->GetBuild() != EXPECTED_DB2_BUILD) - { - errlist.push_back(Trinity::StringFormat("DB2 file %s is from wrong client version!", storage->GetFileName())); - return; - } - storage->LoadFromDB(); for (uint32 i = 0; i < TOTAL_LOCALES; ++i) @@ -261,7 +252,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D if (FILE* f = fopen((db2Path + localeNames[defaultLocale] + '/' + storage->GetFileName()).c_str(), "rb")) { std::ostringstream stream; - stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << strlen(storage->GetFormat()) + stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << storage->GetMeta()->FieldCount << "). Extracted file might be from wrong client version."; std::string buf = stream.str(); errlist.push_back(buf); @@ -271,7 +262,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D errlist.push_back(storage->GetFileName()); } - stores[storage->GetHash()] = storage; + stores[storage->GetTableHash()] = storage; } DB2Manager& DB2Manager::Instance() @@ -350,7 +341,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sGarrSiteLevelPlotInstStore); LOAD_DB2(sGemPropertiesStore); LOAD_DB2(sGlyphPropertiesStore); - LOAD_DB2(sGlyphSlotStore); LOAD_DB2(sGuildColorBackgroundStore); LOAD_DB2(sGuildColorBorderStore); LOAD_DB2(sGuildColorEmblemStore); @@ -547,10 +537,6 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) std::swap(*(float*)(&gameObjectDisplayInfo->GeoBoxMax.Z), *(float*)(&gameObjectDisplayInfo->GeoBoxMin.Z)); } - for (GlyphSlotEntry const* glyphSlot : sGlyphSlotStore) - if (glyphSlot->Type == GLYPH_SLOT_MAJOR || glyphSlot->Type == GLYPH_SLOT_MINOR) - _glyphSlots.insert(glyphSlot); - for (HeirloomEntry const* heirloom : sHeirloomStore) _heirlooms[heirloom->ItemID] = heirloom; @@ -1476,13 +1462,6 @@ bool DB2Manager::ChrClassesXPowerTypesEntryComparator::Compare(ChrClassesXPowerT return left->PowerType < right->PowerType; } -bool DB2Manager::GlyphSlotEntryComparator::Compare(GlyphSlotEntry const* left, GlyphSlotEntry const* right) -{ - if (left->Tooltip != right->Tooltip) - return left->Tooltip < right->Tooltip; - return left->Type > right->Type; -} - bool DB2Manager::MountTypeXCapabilityEntryComparator::Compare(MountTypeXCapabilityEntry const* left, MountTypeXCapabilityEntry const* right) { if (left->MountTypeID == right->MountTypeID) diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 6a325579aa2..a0c54d28ef4 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -78,7 +78,6 @@ TC_GAME_API extern DB2Storage sGarrSiteLev TC_GAME_API extern DB2Storage sGarrSiteLevelPlotInstStore; TC_GAME_API extern DB2Storage sGemPropertiesStore; TC_GAME_API extern DB2Storage sGlyphPropertiesStore; -TC_GAME_API extern DB2Storage sGlyphSlotStore; TC_GAME_API extern DB2Storage sGuildColorBackgroundStore; TC_GAME_API extern DB2Storage sGuildColorBorderStore; TC_GAME_API extern DB2Storage sGuildColorEmblemStore; @@ -189,7 +188,7 @@ typedef std::map TaxiPathSetBySource; typedef std::vector TaxiPathNodeList; typedef std::vector TaxiPathNodesByPath; -#define TaxiMaskSize 232 +#define TaxiMaskSize 234 typedef std::array TaxiMask; TC_GAME_API extern TaxiMask sTaxiNodesMask; @@ -219,7 +218,6 @@ class TC_GAME_API DB2Manager { public: DEFINE_DB2_SET_COMPARATOR(ChrClassesXPowerTypesEntry); - DEFINE_DB2_SET_COMPARATOR(GlyphSlotEntry); DEFINE_DB2_SET_COMPARATOR(MountTypeXCapabilityEntry); typedef std::map StorageMap; @@ -229,7 +227,6 @@ public: typedef ChrSpecializationEntry const* ChrSpecializationByIndexContainer[MAX_CLASSES + 1][MAX_SPECIALIZATIONS]; typedef std::map, EmotesTextSoundEntry const*> EmotesTextSoundContainer; typedef std::unordered_map> FactionTeamContainer; - typedef std::set GlyphSlotContainer; typedef std::map>> HeirloomCurvesContainer; typedef std::unordered_map HeirloomItemsContainer; typedef std::vector ItemBonusList; @@ -278,7 +275,6 @@ public: static char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); EmotesTextSoundEntry const* GetTextSoundEmoteFor(uint32 emote, uint8 race, uint8 gender, uint8 class_) const; std::vector const* GetFactionTeamList(uint32 faction) const; - GlyphSlotContainer const& GetGlyphSlots() const { return _glyphSlots; } uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const; HeirloomEntry const* GetHeirloomByItemId(uint32 itemId) const; ItemBonusList const* GetItemBonusList(uint32 bonusListId) const; @@ -328,7 +324,6 @@ private: ChrSpecializationByIndexContainer _chrSpecializationsByIndex; EmotesTextSoundContainer _emoteTextSounds; FactionTeamContainer _factionTeams; - GlyphSlotContainer _glyphSlots; HeirloomItemsContainer _heirlooms; HeirloomCurvesContainer _heirloomCurvePoints; ItemBonusListContainer _itemBonusLists; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 568729ec4cb..ae1ef3bf598 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -26,7 +26,6 @@ struct AchievementEntry { - uint32 ID; LocalizedString* Title; LocalizedString* Description; uint32 Flags; @@ -41,6 +40,7 @@ struct AchievementEntry int8 Faction; // -1 = all, 0 = horde, 1 = alliance uint8 Points; uint8 MinimumCriteria; // need this count of completed criterias (own or referenced achievement criterias) + uint32 ID; }; struct AnimKitEntry @@ -72,10 +72,9 @@ struct AreaTableEntry uint16 ZoneMusic; uint16 IntroSound; uint16 LiquidTypeID[4]; - uint16 UWIntroMusic; uint16 UWZoneMusic; uint16 UWAmbience; - uint16 PvPCombastWorldStateID; + uint16 PvPCombatWorldStateID; uint8 SoundProviderPref; uint8 SoundProviderPrefUnderwater; uint8 ExplorationLevel; @@ -84,6 +83,7 @@ struct AreaTableEntry uint8 WildBattlePetLevelMin; uint8 WildBattlePetLevelMax; uint8 WindSettingsID; + uint32 UWIntroSound; // helpers bool IsSanctuary() const @@ -96,7 +96,6 @@ struct AreaTableEntry struct AreaTriggerEntry { - uint32 ID; DBCPosition3D Pos; float Radius; float BoxLength; @@ -111,6 +110,7 @@ struct AreaTriggerEntry uint8 PhaseUseFlags; uint8 ShapeType; uint8 Flag; + uint32 ID; }; struct ArmorLocationEntry @@ -144,7 +144,6 @@ struct BannedAddOnsEntry struct BarberShopStyleEntry { - uint32 ID; LocalizedString* DisplayName; LocalizedString* Description; float CostModifier; @@ -152,6 +151,7 @@ struct BarberShopStyleEntry uint8 Race; uint8 Sex; uint8 Data; // real ID to hair/facial hair + uint32 ID; }; struct BattlePetBreedQualityEntry @@ -171,7 +171,6 @@ struct BattlePetBreedStateEntry struct BattlePetSpeciesEntry { - uint32 ID; uint32 CreatureID; uint32 IconFileID; uint32 SummonSpellID; @@ -179,7 +178,8 @@ struct BattlePetSpeciesEntry LocalizedString* Description; uint16 Flags; uint8 PetType; - int8 Source; + int8 Source; + uint32 ID; }; struct BattlePetSpeciesStateEntry @@ -219,10 +219,11 @@ struct BroadcastTextEntry LocalizedString* FemaleText; uint16 EmoteID[MAX_BROADCAST_TEXT_EMOTES]; uint16 EmoteDelay[MAX_BROADCAST_TEXT_EMOTES]; - uint16 SoundID; uint16 UnkEmoteID; uint8 Language; uint8 Type; + uint32 SoundID[2]; + uint32 PlayerConditionID; }; struct CharSectionsEntry @@ -272,8 +273,6 @@ struct ChatChannelsEntry struct ChrClassesEntry { - uint32 ID; - uint8 PowerType; char const* PetNameToken; LocalizedString* Name; LocalizedString* NameFemale; @@ -285,12 +284,14 @@ struct ChrClassesEntry uint16 Flags; uint16 CinematicSequenceID; uint16 DefaultSpec; + uint8 PowerType; uint8 SpellClassSet; uint8 AttackPowerPerStrength; uint8 AttackPowerPerAgility; uint8 RangedAttackPowerPerAgility; uint8 IconFileDataID; uint8 Unk1; + uint32 ID; }; struct ChrClassesXPowerTypesEntry @@ -325,8 +326,6 @@ struct ChrRacesEntry uint16 CinematicSequenceID; uint16 UAMaleCreatureSoundDataID; uint16 UAFemaleCreatureSoundDataID; - uint16 HighResMaleDisplayID; - uint16 HighResFemaleDisplayID; uint16 Unk; uint8 BaseLanguage; uint8 CreatureType; @@ -338,16 +337,15 @@ struct ChrRacesEntry uint8 NeutralRaceID; uint8 ItemAppearanceFrameRaceID; uint8 CharComponentTexLayoutHiResID; + uint32 HighResMaleDisplayID; + uint32 HighResFemaleDisplayID; }; #define MAX_MASTERY_SPELLS 2 struct ChrSpecializationEntry { - uint32 ID; uint32 MasterySpellID[MAX_MASTERY_SPELLS]; - uint32 Flags; - uint32 AnimReplacementSetID; LocalizedString* Name; LocalizedString* Name2; LocalizedString* Description; @@ -358,6 +356,9 @@ struct ChrSpecializationEntry uint8 PetTalentType; uint8 Role; uint8 PrimaryStatOrder; + uint32 ID; + uint32 Flags; + uint32 AnimReplacementSetID; }; struct CinematicSequencesEntry @@ -428,8 +429,6 @@ struct CreatureFamilyEntry struct CreatureModelDataEntry { uint32 ID; - uint32 Flags; - uint32 FileDataID; float ModelScale; float FootprintTextureLength; float FootprintTextureWidth; @@ -449,16 +448,18 @@ struct CreatureModelDataEntry float OverrideSelectionRadius; float TamedPetBaseScale; float HoverHeight; - uint16 SoundID; - uint16 CreatureGeosetDataID; - uint8 SizeClass; - uint8 BloodID; - uint8 FootprintTextureID; - uint8 FoleyMaterialID; - uint8 Unk700_1; - uint8 Unk700_2; - uint8 FootstepShakeSize; - uint8 DeathThudShakeSize; + uint32 Flags; + uint32 FileDataID; + uint32 SizeClass; + uint32 BloodID; + uint32 FootprintTextureID; + uint32 FoleyMaterialID; + uint32 FootstepEffectID; + uint32 DeathThudEffectID; + uint32 FootstepShakeSize; + uint32 DeathThudShakeSize; + uint32 SoundID; + uint32 CreatureGeosetDataID; }; struct CreatureTypeEntry @@ -605,13 +606,13 @@ struct CriteriaEntry struct CriteriaTreeEntry { uint32 ID; + uint32 CriteriaID; uint32 Amount; LocalizedString* Description; - uint16 CriteriaID; uint16 Parent; uint16 Flags; - uint16 OrderIndex; uint8 Operator; + uint32 OrderIndex; }; struct CurrencyTypesEntry @@ -624,9 +625,9 @@ struct CurrencyTypesEntry uint32 Flags; LocalizedString* Description; uint8 CategoryID; - uint8 SpellWeight; uint8 SpellCategory; uint8 Quality; + uint32 SpellWeight; }; struct CurvePointEntry @@ -689,11 +690,11 @@ struct DungeonEncounterEntry LocalizedString* Name; uint32 CreatureDisplayID; uint16 MapID; - uint16 OrderIndex; uint16 SpellIconID; uint8 DifficultyID; uint8 Bit; uint8 Flags; + uint32 OrderIndex; }; struct DurabilityCostsEntry @@ -715,12 +716,12 @@ struct EmotesEntry char const* EmoteSlashCommand; uint32 SpellVisualKitID; uint32 EmoteFlags; - int32 Unk703_1; - int32 Unk703_2; uint16 AnimID; - uint16 EmoteSpecProcParam; - uint16 EmoteSoundID; uint8 EmoteSpecProc; + uint32 EmoteSpecProcParam; + uint32 EmoteSoundID; + uint32 ClassMask; + uint32 RaceMask; }; struct EmotesTextEntry @@ -734,10 +735,10 @@ struct EmotesTextSoundEntry { uint32 ID; uint16 EmotesTextId; - uint16 SoundId; uint8 RaceId; uint8 SexId; uint8 ClassId; + uint32 SoundId; }; struct FactionEntry @@ -749,6 +750,7 @@ struct FactionEntry float ParentFactionModOut; // Faction outputs rep * ParentFactionModOut as spillover reputation LocalizedString* Name; LocalizedString* Description; + uint32 ReputationMax[4]; int16 ReputationIndex; uint16 ReputationClassMask[4]; uint16 ReputationFlags[4]; @@ -825,7 +827,6 @@ struct FactionTemplateEntry struct GameObjectsEntry { - uint32 ID; DBCPosition3D Position; float RotationX; float RotationY; @@ -840,6 +841,7 @@ struct GameObjectsEntry uint16 PhaseGroupID; uint8 PhaseUseFlags; uint8 Type; + uint32 ID; }; struct GameObjectDisplayInfoEntry @@ -855,7 +857,6 @@ struct GameObjectDisplayInfoEntry struct GarrAbilityEntry { - uint32 ID; LocalizedString* Name; LocalizedString* Description; uint32 IconFileDataID; @@ -863,6 +864,7 @@ struct GarrAbilityEntry uint16 OtherFactionGarrAbilityID; uint8 GarrAbilityCategoryID; uint8 FollowerTypeID; + uint32 ID; }; struct GarrBuildingEntry @@ -875,37 +877,36 @@ struct GarrBuildingEntry LocalizedString* Description; LocalizedString* Tooltip; uint32 IconFileDataID; - uint16 BuildDuration; uint16 CostCurrencyID; - int16 CostCurrencyAmount; + uint16 HordeTexPrefixKitID; + uint16 AllianceTexPrefixKitID; uint16 AllianceActivationScenePackageID; uint16 HordeActivationScenePackageID; + uint16 FollowerRequiredGarrAbilityID; + uint16 FollowerGarrAbilityEffectID; int16 CostMoney; uint8 Unknown; uint8 Type; uint8 Level; - uint8 HordeTexPrefixKitID; - uint8 AllianceTexPrefixKitID; - uint8 BonusAmount; uint8 Flags; uint8 MaxShipments; - uint8 FollowerRequiredGarrAbilityID; - uint8 FollowerGarrAbilityEffectID; uint8 GarrTypeID; + uint32 BuildDuration; + int32 CostCurrencyAmount; + uint32 BonusAmount; }; struct GarrBuildingPlotInstEntry { - uint32 ID; DBCPosition2D LandmarkOffset; uint16 UiTextureAtlasMemberID; uint16 GarrSiteLevelPlotInstID; uint8 GarrBuildingID; + uint32 ID; }; struct GarrClassSpecEntry { - uint32 ID; LocalizedString* NameMale; LocalizedString* NameFemale; LocalizedString* NameGenderless; @@ -913,37 +914,42 @@ struct GarrClassSpecEntry uint8 GarrFollItemSetID; uint8 Limit; uint8 Flags; + uint32 ID; }; struct GarrFollowerEntry { - uint32 ID; uint32 HordeCreatureID; uint32 AllianceCreatureID; LocalizedString* HordeSourceText; LocalizedString* AllianceSourceText; uint32 HordePortraitIconID; uint32 AlliancePortraitIconID; + uint32 HordeAddedBroadcastTextID; + uint32 AllianceAddedBroadcastTextID; + uint16 HordeGarrFollItemSetID; + uint16 AllianceGarrFollItemSetID; uint16 ItemLevelWeapon; uint16 ItemLevelArmor; + uint16 HordeListPortraitTextureKitID; + uint16 AllianceListPortraitTextureKitID; uint8 FollowerTypeID; uint8 HordeUiAnimRaceInfoID; uint8 AllianceUiAnimRaceInfoID; uint8 Quality; uint8 HordeGarrClassSpecID; uint8 AllianceGarrClassSpecID; - uint8 HordeGarrFollItemSetID; - uint8 AllianceGarrFollItemSetID; uint8 Level; uint8 Unknown1; uint8 Flags; int8 Unknown2; int8 Unknown3; - uint8 HordeListPortraitTextureKitID; - uint8 AllianceListPortraitTextureKitID; uint8 GarrTypeID; uint8 MaxDurability; uint8 Class; + uint8 HordeFlavorTextGarrStringID; + uint8 AllianceFlavorTextGarrStringID; + uint32 ID; }; struct GarrFollowerXAbilityEntry @@ -960,11 +966,11 @@ struct GarrPlotEntry LocalizedString* Name; uint32 AllianceConstructionGameObjectID; uint32 HordeConstructionGameObjectID; - uint16 MinCount; - uint16 MaxCount; uint8 GarrPlotUICategoryID; uint8 PlotType; uint8 Flags; + uint32 MinCount; + uint32 MaxCount; }; struct GarrPlotBuildingEntry @@ -986,10 +992,10 @@ struct GarrSiteLevelEntry uint32 ID; DBCPosition2D TownHall; uint16 MapID; + uint16 SiteID; uint16 UpgradeResourceCost; uint16 UpgradeMoneyCost; uint8 Level; - uint8 SiteID; uint8 UITextureKitID; uint8 MovieID; uint8 Level2; @@ -1021,13 +1027,6 @@ struct GlyphPropertiesEntry uint8 GlyphExclusiveCategoryID; }; -struct GlyphSlotEntry -{ - uint32 ID; - uint16 Tooltip; - uint8 Type; -}; - struct GuildColorBackgroundEntry { uint32 ID; @@ -1060,7 +1059,6 @@ struct GuildPerkSpellsEntry struct HeirloomEntry { - uint32 ID; uint32 ItemID; LocalizedString* SourceText; uint32 OldItem[2]; @@ -1069,6 +1067,7 @@ struct HeirloomEntry uint16 ItemBonusListID[2]; uint8 Flags; uint8 Source; + uint32 ID; }; #define MAX_HOLIDAY_DURATIONS 10 @@ -1267,7 +1266,6 @@ struct ItemExtendedCostEntry uint32 ID; uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // required item id uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES]; // required curency count - uint32 RequiredMoney; uint16 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // required count of 1st item uint16 RequiredPersonalArenaRating; // required personal arena rating uint16 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES]; // required curency id @@ -1288,12 +1286,12 @@ struct ItemLimitCategoryEntry struct ItemModifiedAppearanceEntry { - uint32 ID; uint32 ItemID; uint16 AppearanceID; uint8 AppearanceModID; uint8 Index; uint8 SourceType; + uint32 ID; }; struct ItemPriceBaseEntry @@ -1329,9 +1327,9 @@ struct ItemSetEntry uint32 ID; LocalizedString* Name; uint32 ItemID[MAX_ITEM_SET_ITEMS]; - uint32 Unknown703; uint16 RequiredSkillRank; - uint8 RequiredSkill; + uint32 RequiredSkill; + uint32 Flags; }; struct ItemSetSpellEntry @@ -1450,7 +1448,6 @@ struct KeyChainEntry struct LfgDungeonsEntry { - uint32 ID; LocalizedString* Name; uint32 Flags; char const* TextureFilename; @@ -1480,6 +1477,7 @@ struct LfgDungeonsEntry uint8 MinCountDamage; uint8 SubType; uint8 MentorCharLevel; + uint32 ID; // Helpers uint32 Entry() const { return ID + (Type << 24); } @@ -1510,13 +1508,13 @@ struct LiquidTypeEntry float Float[18]; uint32 Int[4]; uint16 Flags; - uint16 SoundID; + uint16 LightID; uint8 Type; - uint8 LightID; uint8 ParticleMovement; uint8 ParticleTexSlots; uint8 MaterialID; uint8 DepthTexCount[6]; + uint32 SoundID; }; #define MAX_LOCK_CASE 8 @@ -1595,13 +1593,13 @@ struct MapDifficultyEntry { uint32 ID; LocalizedString* Message_lang; // m_message_lang (text showed when transfer to map failed) - uint32 Context; uint16 MapID; uint8 DifficultyID; uint8 RaidDurationType; // 1 means daily reset, 2 means weekly uint8 MaxPlayers; // m_maxPlayers some heroic versions have 0 when expected same amount as in normal version uint8 LockID; uint8 ItemBonusTreeModID; + uint32 Context; uint32 GetRaidDuration() const { @@ -1626,28 +1624,29 @@ struct ModifierTreeEntry struct MountEntry { - uint32 ID; uint32 SpellId; uint32 DisplayId; LocalizedString* Name; LocalizedString* Description; LocalizedString* SourceDescription; + float CameraPivotMultiplier; uint16 MountTypeId; uint16 Flags; uint16 PlayerConditionId; uint8 Source; + uint32 ID; }; struct MountCapabilityEntry { - uint32 ID; - uint32 RequiredAura; uint32 RequiredSpell; uint32 SpeedModSpell; uint16 RequiredRidingSkill; uint16 RequiredArea; int16 RequiredMap; uint8 Flags; + uint32 ID; + uint32 RequiredAura; }; struct MountTypeXCapabilityEntry @@ -1720,7 +1719,7 @@ struct PhaseXPhaseGroupEntry struct PlayerConditionEntry { - uint32 ID; + uint32 ID; // 1, 1, 1 uint32 RaceMask; uint32 SkillLogic; uint32 ReputationLogic; @@ -1728,26 +1727,19 @@ struct PlayerConditionEntry uint32 CurrQuestLogic; uint32 CurrentCompletedQuestLogic; uint32 SpellLogic; - uint32 SpellID[4]; uint32 ItemLogic; - uint32 ItemID[4]; uint32 Time[2]; uint32 AuraSpellLogic; uint32 AuraSpellID[4]; uint32 AchievementLogic; uint32 AreaLogic; uint32 QuestKillLogic; - uint32 QuestKillMonster[6]; LocalizedString* FailureDescription; - uint32 Unknown700_1; - uint32 Unknown700_2; uint16 MinLevel; uint16 MaxLevel; - uint16 ClassMask; uint16 SkillID[4]; int16 MinSkill[4]; int16 MaxSkill[4]; - uint16 MinFactionID[3]; uint16 MaxFactionID; uint16 PrevQuestID[4]; uint16 CurrQuestID[4]; @@ -1758,15 +1750,12 @@ struct PlayerConditionEntry uint16 AreaID[4]; uint16 QuestKillID; uint16 PhaseID; - uint16 MinAvgItemLevel; - uint16 MaxAvgItemLevel; uint16 MinAvgEquippedItemLevel; uint16 MaxAvgEquippedItemLevel; uint16 ModifierTreeID; uint8 Flags; int8 Gender; int8 NativeGender; - uint8 LanguageID; uint8 MinLanguage; uint8 MaxLanguage; uint8 MinReputation[3]; @@ -1775,18 +1764,13 @@ struct PlayerConditionEntry uint8 MinPVPRank; uint8 MaxPVPRank; uint8 PvpMedal; - uint8 ItemCount[4]; uint8 ItemFlags; uint8 AuraCount[4]; uint8 WeatherID; uint8 PartyStatus; uint8 LifetimeMaxPVPRank; - uint8 LfgLogic; uint8 LfgStatus[4]; uint8 LfgCompare[4]; - uint8 LfgValue[4]; - uint8 CurrencyLogic; - uint8 CurrencyID[4]; uint8 CurrencyCount[4]; int8 MinExpansionLevel; int8 MaxExpansionLevel; @@ -1795,12 +1779,26 @@ struct PlayerConditionEntry uint8 MinGuildLevel; uint8 MaxGuildLevel; uint8 PhaseUseFlags; - uint8 PhaseGroupID; int8 ChrSpecializationIndex; int8 ChrSpecializationRole; int8 PowerType; int8 PowerTypeComp; int8 PowerTypeValue; + uint32 ClassMask; + uint32 LanguageID; + uint32 MinFactionID[3]; + uint32 SpellID[4]; + uint32 ItemID[4]; + uint32 ItemCount[4]; + uint32 LfgLogic; + uint32 LfgValue[4]; + uint32 CurrencyLogic; + uint32 CurrencyID[4]; + uint32 QuestKillMonster[6]; + uint32 PhaseGroupID; + uint32 MinAvgItemLevel; + uint32 MaxAvgItemLevel; + uint32 Unknown700[2]; }; struct PowerDisplayEntry @@ -1877,8 +1875,8 @@ struct ScalingStatDistributionEntry { uint32 ID; uint16 ItemLevelCurveID; - uint8 MinLevel; - uint8 MaxLevel; + uint32 MinLevel; + uint32 MaxLevel; }; struct SkillLineEntry @@ -1891,7 +1889,7 @@ struct SkillLineEntry uint16 Flags; uint8 CategoryID; uint8 CanLink; - uint8 ParentSkillLineID; + uint32 ParentSkillLineID; }; struct SkillLineAbilityEntry @@ -1899,8 +1897,8 @@ struct SkillLineAbilityEntry uint32 ID; uint32 SpellID; uint32 RaceMask; - uint32 ClassMask; uint32 SupercedesSpell; + uint32 Unknown703; uint16 SkillLine; uint16 MinSkillLineRank; uint16 TrivialSkillLineRankHigh; @@ -1909,23 +1907,23 @@ struct SkillLineAbilityEntry uint16 TradeSkillCategoryID; uint8 AquireMethod; uint8 NumSkillUps; + uint32 ClassMask; }; struct SkillRaceClassInfoEntry { uint32 ID; int32 RaceMask; - int32 ClassMask; uint16 SkillID; uint16 Flags; uint16 SkillTierID; uint8 Availability; uint8 MinLevel; + int32 ClassMask; }; struct SoundKitEntry { - uint32 ID; LocalizedString* Name; float VolumeFloat; float MinDistance; @@ -1942,27 +1940,28 @@ struct SoundKitEntry uint8 EAXDef; uint8 DialogType; uint8 Unk700; + uint32 ID; }; struct SpecializationSpellsEntry { - uint32 ID; uint32 SpellID; uint32 OverridesSpellID; LocalizedString* Description; uint16 SpecID; uint8 OrderIndex; + uint32 ID; }; struct SpellEntry { - uint32 ID; LocalizedString* Name; LocalizedString* NameSubtext; LocalizedString* Description; LocalizedString* AuraDescription; uint32 MiscID; - uint16 DescriptionVariablesID; + uint32 ID; + uint32 DescriptionVariablesID; }; struct SpellAuraOptionsEntry @@ -2032,10 +2031,10 @@ struct SpellCategoryEntry uint32 ID; LocalizedString* Name; int32 ChargeRecoveryTime; - uint32 Unk703; uint8 Flags; uint8 UsesPerWeek; uint8 MaxCharges; + uint32 Unk703; }; struct SpellClassOptionsEntry @@ -2043,8 +2042,8 @@ struct SpellClassOptionsEntry uint32 ID; uint32 SpellID; flag128 SpellClassMask; - uint16 ModalNextSpell; - uint8 SpellClassSet; + uint8 SpellClassSet; + uint32 ModalNextSpell; }; struct SpellCooldownsEntry @@ -2067,33 +2066,33 @@ struct SpellDurationEntry struct SpellEffectEntry { - uint32 ID; float EffectAmplitude; - uint32 EffectAuraPeriod; - uint32 EffectBasePoints; float EffectBonusCoefficient; float EffectChainAmplitude; + float EffectPointsPerResource; + float EffectRealPointsPerLevel; + flag128 EffectSpellClassMask; + float EffectPosFacing; + float BonusCoefficientFromAP; + uint32 ID; + uint32 DifficultyID; + uint32 Effect; + uint32 EffectAura; + uint32 EffectAuraPeriod; + uint32 EffectBasePoints; + uint32 EffectChainTargets; uint32 EffectDieSides; uint32 EffectItemType; + uint32 EffectMechanic; int32 EffectMiscValue; int32 EffectMiscValueB; - float EffectPointsPerResource; - float EffectRealPointsPerLevel; - flag128 EffectSpellClassMask; + uint32 EffectRadiusIndex; + uint32 EffectRadiusMaxIndex; uint32 EffectTriggerSpell; - float EffectPosFacing; + uint32 ImplicitTarget[2]; uint32 SpellID; + uint32 EffectIndex; uint32 EffectAttributes; - float BonusCoefficientFromAP; - uint16 EffectAura; - uint16 EffectChainTargets; - uint8 DifficultyID; - uint8 Effect; - uint8 EffectMechanic; - uint8 EffectRadiusIndex; - uint8 EffectRadiusMaxIndex; - uint8 ImplicitTarget[2]; - uint8 EffectIndex; }; #define MAX_SPELL_EFFECTS 32 @@ -2141,7 +2140,6 @@ struct SpellItemEnchantmentEntry uint32 EffectSpellID[MAX_ITEM_ENCHANTMENT_EFFECTS]; LocalizedString* Name; float EffectScalingPoints[MAX_ITEM_ENCHANTMENT_EFFECTS]; - uint32 PlayerConditionID; uint32 TransmogCost; uint32 TextureFileDataID; uint16 EffectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS]; @@ -2157,17 +2155,18 @@ struct SpellItemEnchantmentEntry uint8 MaxLevel; int8 ScalingClass; int8 ScalingClassRestricted; + uint32 PlayerConditionID; }; struct SpellItemEnchantmentConditionEntry { uint32 ID; uint8 LTOperandType[5]; - uint8 LTOperand[5]; uint8 Operator[5]; uint8 RTOperandType[5]; uint8 RTOperand[5]; uint8 Logic[5]; + uint32 LTOperand[5]; }; struct SpellLearnSpellEntry @@ -2218,28 +2217,28 @@ struct SpellMiscEntry struct SpellPowerEntry { - uint32 ID; uint32 SpellID; uint32 ManaCost; float ManaCostPercentage; float ManaCostPercentagePerSecond; uint32 RequiredAura; float HealthCostPercentage; - uint16 ManaCostPerSecond; - uint16 ManaCostAdditional; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource - // only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG - uint16 PowerDisplayID; - uint16 UnitPowerBarID; uint8 PowerIndex; uint8 PowerType; - uint8 ManaCostPerLevel; + uint32 ID; + uint32 ManaCostPerLevel; + uint32 ManaCostPerSecond; + uint32 ManaCostAdditional; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource + // only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG + uint32 PowerDisplayID; + uint32 UnitPowerBarID; }; struct SpellPowerDifficultyEntry { - uint32 SpellPowerID; uint8 DifficultyID; uint8 PowerIndex; + uint32 ID; }; struct SpellProcsPerMinuteEntry @@ -2294,9 +2293,9 @@ struct SpellScalingEntry uint32 ID; uint32 SpellID; uint16 ScalesFromItemLevel; - int8 ScalingClass; uint8 MinScalingLevel; uint8 MaxScalingLevel; + int32 ScalingClass; }; struct SpellShapeshiftEntry @@ -2320,8 +2319,8 @@ struct SpellShapeshiftFormEntry uint16 CombatRoundTime; uint16 CreatureDisplayID[4]; uint16 PresetSpellID[MAX_SHAPESHIFT_SPELLS]; + uint16 MountTypeID; int8 CreatureType; - uint8 MountTypeID; uint8 BonusActionBar; }; @@ -2332,10 +2331,10 @@ struct SpellTargetRestrictionsEntry float ConeAngle; float Width; uint32 Targets; - uint16 MaxTargetLevel; uint16 TargetCreatureType; uint8 DifficultyID; uint8 MaxAffectedTargets; + uint32 MaxTargetLevel; }; #define MAX_SPELL_TOTEMS 2 @@ -2345,18 +2344,18 @@ struct SpellTotemsEntry uint32 ID; uint32 SpellID; uint32 Totem[MAX_SPELL_TOTEMS]; - uint8 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; + uint16 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; }; struct SpellXSpellVisualEntry { - uint32 ID; uint32 SpellID; float Unk620; uint16 SpellVisualID[2]; uint16 PlayerConditionID; uint8 DifficultyID; uint8 Flags; + uint32 ID; }; struct SummonPropertiesEntry @@ -2388,7 +2387,6 @@ struct TalentEntry struct TaxiNodesEntry { - uint32 ID; DBCPosition3D Pos; LocalizedString* Name; uint32 MountCreatureID[2]; @@ -2397,19 +2395,19 @@ struct TaxiNodesEntry uint16 ConditionID; uint16 LearnableIndex; uint8 Flags; + uint32 ID; }; struct TaxiPathEntry { - uint32 ID; uint16 From; uint16 To; - uint16 Cost; + uint32 ID; + uint32 Cost; }; struct TaxiPathNodeEntry { - uint32 ID; DBCPosition3D Loc; uint32 Delay; uint16 PathID; @@ -2418,6 +2416,7 @@ struct TaxiPathNodeEntry uint16 DepartureEventID; uint8 NodeIndex; uint8 Flags; + uint32 ID; }; struct TotemCategoryEntry @@ -2430,11 +2429,11 @@ struct TotemCategoryEntry struct ToyEntry { - uint32 ID; uint32 ItemID; LocalizedString* Description; uint8 Flags; uint8 CategoryFilter; + uint32 ID; }; struct TransportAnimationEntry @@ -2460,7 +2459,6 @@ struct TransportRotationEntry struct UnitPowerBarEntry { uint32 ID; - uint32 MaxPower; float RegenerationPeace; float RegenerationCombat; uint32 FileDataID[6]; @@ -2473,9 +2471,10 @@ struct UnitPowerBarEntry float EndInset; uint16 StartPower; uint16 Flags; - uint8 MinPower; uint8 CenterPower; uint8 BarType; + uint32 MinPower; + uint32 MaxPower; }; #define MAX_VEHICLE_SEATS 8 @@ -2538,8 +2537,6 @@ struct VehicleSeatEntry float PassengerRoll; float VehicleEnterAnimDelay; float VehicleExitAnimDelay; - uint32 EnterUISoundID; - uint32 ExitUISoundID; float CameraEnteringDelay; float CameraEnteringDuration; float CameraExitingDelay; @@ -2576,6 +2573,8 @@ struct VehicleSeatEntry int8 VehicleExitAnimBone; int8 VehicleRideAnimLoopBone; uint8 VehicleAbilityDisplay; + uint32 EnterUISoundID; + uint32 ExitUISoundID; bool CanEnterOrExit() const { @@ -2595,7 +2594,6 @@ struct VehicleSeatEntry struct WMOAreaTableEntry { - uint32 ID; int32 WMOGroupID; // used in group WMO LocalizedString* AreaName; int16 WMOID; // used in root WMO @@ -2609,12 +2607,12 @@ struct WMOAreaTableEntry uint8 SoundProviderPref; uint8 SoundProviderPrefUnderwater; uint8 Flags; - uint8 UWZoneMusic; + uint32 ID; + uint32 UWZoneMusic; }; struct WorldMapAreaEntry { - uint32 ID; char const* AreaName; float LocLeft; float LocRight; @@ -2626,11 +2624,12 @@ struct WorldMapAreaEntry int16 DefaultDungeonFloor; uint16 ParentWorldMapID; uint16 Flags; - uint16 PlayerConditionID; uint8 LevelRangeMin; uint8 LevelRangeMax; uint8 BountySetID; uint8 BountyBoardLocation; + uint32 ID; + uint32 PlayerConditionID; }; #define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4 @@ -2639,18 +2638,18 @@ struct WorldMapOverlayEntry { uint32 ID; char const* TextureName; - uint16 MapAreaID; // idx in WorldMapArea.dbc - uint16 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; uint16 TextureWidth; uint16 TextureHeight; - uint16 OffsetX; - uint16 OffsetY; - uint16 HitRectTop; - uint16 HitRectLeft; - uint16 HitRectBottom; - uint16 HitRectRight; - uint16 PlayerConditionID; - uint8 Flags; + uint32 MapAreaID; // idx in WorldMapArea.dbc + uint32 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; + uint32 OffsetX; + uint32 OffsetY; + uint32 HitRectTop; + uint32 HitRectLeft; + uint32 HitRectBottom; + uint32 HitRectRight; + uint32 PlayerConditionID; + uint32 Flags; }; struct WorldMapTransformsEntry diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h deleted file mode 100644 index 57963f3aec6..00000000000 --- a/src/server/game/DataStores/DB2fmt.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef TRINITY_DB2SFRM_H -#define TRINITY_DB2SFRM_H - -char const AchievementFormat[] = "nssishhhhhhhbbb"; -char const AnimKitFormat[] = "dihh"; -char const AreaGroupMemberFormat[] = "dhh"; -char const AreaTableFormat[] = "diiSfshhhhhhhhhhhhhhbbbbbbbb"; -char const AreaTriggerFormat[] = "nffffffffhhhhhbbb"; -char const ArmorLocationFormat[] = "dfffff"; -char const AuctionHouseFormat[] = "dshbb"; -char const BankBagSlotPricesFormat[] = "di"; -char const BannedAddOnsFormat[] = "dSSb"; -char const BarberShopStyleFormat[] = "nssfbbbb"; -char const BattlePetBreedQualityFormat[] = "dfb"; -char const BattlePetBreedStateFormat[] = "nhbb"; -char const BattlePetSpeciesFormat[] = "niiisshbb"; -char const BattlePetSpeciesStateFormat[] = "nihb"; -char const BattlemasterListFormat[] = "nsishhhhhhhhhhhhhhhhhhbbbbbbbbb"; -char const BroadcastTextFormat[] = "dsshhhhhhhhbb"; -char const CharStartOutfitFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiibbbbb"; -char const CharSectionsFormat[] = "niiihbbbbb"; -char const CharTitlesFormat[] = "dsshhb"; -char const ChatChannelsFormat[] = "dissb"; -char const ChrClassesFormat[] = "nSsssSiiihhhbbbbbbb"; -char const ChrClassesXPowerTypesFormat[] = "dbb"; -char const ChrRacesFormat[] = "niSSsssSSSiiffffffihhhhhhhhhhhhbbbbbbbbbb"; -char const ChrSpecializationFormat[] = "niiiisssShbbbbb"; -char const CinematicSequencesFormat[] = "dhhhhhhhhh"; -char const CreatureDisplayInfoFormat[] = "diffiiiSiiifhhhhhhbbbbbb"; -char const CreatureDisplayInfoExtraFormat[] = "diibbbbbbbbbbbb"; -char const CreatureFamilyFormat[] = "dffsshhhbbbb"; -char const CreatureModelDataFormat[] = "diifffffffffffffffffffffffhhbbbbbbbb"; -char const CreatureTypeFormat[] = "dsb"; -char const CriteriaFormat[] = "diiihhhbbbbb"; -char const CriteriaTreeFormat[] = "dishhhhb"; -char const CurrencyTypesFormat[] = "nSSsiiisbbbb"; -char const CurvePointFormat[] = "dffhb"; -char const DestructibleModelDataFormat[] = "dhhhhhbbbbbbbbbbbbbbbbb"; -char const DifficultyFormat[] = "nsbbbbbbbbbbbb"; -char const DungeonEncounterFormat[] = "dsihhhbbb"; -char const DurabilityCostsFormat[] = "dhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"; -char const DurabilityQualityFormat[] = "df"; -char const EmotesFormat[] = "dSiiiihhhb"; -char const EmotesTextFormat[] = "dsh"; -char const EmotesTextSoundFormat[] = "dhhbbb"; -char const FactionFormat[] = "diiiiiiiiffsshhhhhhhhhhbbbbb"; -char const FactionTemplateFormat[] = "dhhhhhhhhhhbbb"; -char const GameObjectsFormat[] = "nffffffffiiiiiiiishhhhbb"; -char const GameObjectDisplayInfoFormat[] = "diffffffffh"; -char const GarrAbilityFormat[] = "nssihhbb"; -char const GarrBuildingFormat[] = "diissssihhhhhhbbbbbbbbbbb"; -char const GarrBuildingPlotInstFormat[] = "nffhhb"; -char const GarrClassSpecFormat[] = "nssshbbb"; -char const GarrFollowerFormat[] = "niissiihhbbbbbbbbbbbbbbbbbb"; -char const GarrFollowerXAbilityFormat[] = "dhhb"; -char const GarrPlotFormat[] = "dsiihhbbb"; -char const GarrPlotBuildingFormat[] = "dbb"; -char const GarrPlotInstanceFormat[] = "dsb"; -char const GarrSiteLevelFormat[] = "dffhhhbbbbb"; -char const GarrSiteLevelPlotInstFormat[] = "dffhbb"; -char const GemPropertiesFormat[] = "dihh"; -char const GlyphPropertiesFormat[] = "dihbb"; -char const GlyphSlotFormat[] = "dhb"; -char const GuildColorBackgroundFormat[] = "dbbb"; -char const GuildColorBorderFormat[] = "dbbb"; -char const GuildColorEmblemFormat[] = "dbbb"; -char const GuildPerkSpellsFormat[] = "di"; -char const HeirloomFormat[] = "nisiiiiihhbb"; -char const HolidaysEntryFormat[] = "diiiiiiiiiiiiiiiiShhhhhhhhhhhbbbbbbbbbbbbbbbb"; -char const ImportPriceArmorFormat[] = "dffff"; -char const ImportPriceQualityFormat[] = "df"; -char const ImportPriceShieldFormat[] = "df"; -char const ImportPriceWeaponFormat[] = "df"; -char const ItemFormat[] = "dibbbbbbb"; -char const ItemAppearanceFormat[] = "diiib"; -char const ItemArmorQualityFormat[] = "dfffffffh"; -char const ItemArmorShieldFormat[] = "dfffffffh"; -char const ItemArmorTotalFormat[] = "dffffh"; -char const ItemBagFamilyFormat[] = "ds"; -char const ItemBonusFormat[] = "niihbb"; -char const ItemBonusTreeNodeFormat[] = "dhhhb"; -char const ItemClassFormat[] = "dfsb"; -char const ItemCurrencyCostFormat[] = "di"; -char const ItemDamageAmmoFormat[] = "dfffffffh"; -char const ItemDamageOneHandFormat[] = "dfffffffh"; -char const ItemDamageOneHandCasterFormat[] = "dfffffffh"; -char const ItemDamageTwoHandFormat[] = "dfffffffh"; -char const ItemDamageTwoHandCasterFormat[] = "dfffffffh"; -char const ItemDisenchantLootFormat[] = "dhhhbbb"; -char const ItemEffectFormat[] = "diiiihhhbb"; -char const ItemExtendedCostFormat[] = "diiiiiiiiiiihhhhhhhhhhhbbbbb"; -char const ItemLimitCategoryFormat[] = "dsbb"; -char const ItemModifiedAppearanceFormat[] = "nihbbb"; -char const ItemPriceBaseFormat[] = "dffh"; -char const ItemRandomPropertiesFormat[] = "dshhhhh"; -char const ItemRandomSuffixFormat[] = "dsshhhhhhhhhh"; -char const ItemSetFormat[] = "dsiiiiiiiiiiiiiiiiiihb"; -char const ItemSetSpellFormat[] = "dihhb"; -char const ItemSparseFormat[] = "diiiffiiiiiiiiiiiiiiiiifffffffffffsssssififhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; -char const ItemSpecFormat[] = "dhbbbbb"; -char const ItemSpecOverrideFormat[] = "dih"; -char const ItemXBonusTreeFormat[] = "dih"; -char const KeyChainFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; -char const LfgDungeonsFormat[] = "nsiSshhhhhhhhbbbbbbbbbbbbbbbbb"; -char const LightFormat[] = "dfffffhhhhhhhhh"; -char const LiquidTypeFormat[] = "dsifffffssssssiiffffffffffffffffffiiiihhbbbbbbbbbbb"; -char const LockFormat[] = "diiiiiiiihhhhhhhhbbbbbbbbbbbbbbbb"; -char const MailTemplateFormat[] = "ds"; -char const MapFormat[] = "dsiifffssshhhhhhbbbbb"; -char const MapDifficultyFormat[] = "dsihbbbbb"; -char const ModifierTreeFormat[] = "diihbbbb"; -char const MountFormat[] = "niissshhhb"; -char const MountCapabilityFormat[] = "niiihhhb"; -char const MountTypeXCapabilityFormat[] = "dhhb"; -char const MovieFormat[] = "diibb"; -char const NameGenFormat[] = "dsbb"; -char const NamesProfanityFormat[] = "dSb"; -char const NamesReservedFormat[] = "dS"; -char const NamesReservedLocaleFormat[] = "dSb"; -char const OverrideSpellDataFormat[] = "diiiiiiiiiiib"; -char const PhaseFormat[] = "dh"; -char const PhaseXPhaseGroupFormat[] = "dhh"; -char const PlayerConditionFormat[] = "diiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; -char const PowerDisplayFormat[] = "dSbbbb"; -char const PvpDifficultyFormat[] = "dhbbb"; -char const QuestFactionRewardFormat[] = "dhhhhhhhhhh"; -char const QuestMoneyRewardFormat[] = "diiiiiiiiii"; -char const QuestPackageItemFormat[] = "dihbb"; -char const QuestSortFormat[] = "dsb"; -char const QuestV2Format[] = "dh"; -char const QuestXPFormat[] = "dhhhhhhhhhh"; -char const RandPropPointsFormat[] = "diiiiiiiiiiiiiii"; -char const ScalingStatDistributionFormat[] = "dhbb"; -char const SkillLineFormat[] = "dssshhbbb"; -char const SkillLineAbilityFormat[] = "diiiihhhhhhbb"; -char const SkillRaceClassInfoFormat[] = "diihhhbb"; -char const SoundKitFormat[] = "nsffffffffhhhbbbb"; -char const SpecializationSpellsFormat[] = "niishb"; -char const SpellFormat[] = "nssssih"; -char const SpellAuraOptionsFormat[] = "diiiihbbb"; -char const SpellAuraRestrictionsFormat[] = "diiiiibbbbb"; -char const SpellCastTimesFormat[] = "diih"; -char const SpellCastingRequirementsFormat[] = "dihhhbbb"; -char const SpellCategoriesFormat[] = "dihhhbbbbb"; -char const SpellCategoryFormat[] = "dsiibbb"; -char const SpellClassOptionsFormat[] = "diiiiihb"; -char const SpellCooldownsFormat[] = "diiiib"; -char const SpellDurationFormat[] = "diih"; -char const SpellEffectFormat[] = "nfiiffiiiiffiiiiifiifhhbbbbbbbb"; -char const SpellEffectScalingFormat[] = "dfffi"; -char const SpellEquippedItemsFormat[] = "diiib"; -char const SpellFocusObjectFormat[] = "ds"; -char const SpellInterruptsFormat[] = "diiiiihb"; -char const SpellItemEnchantmentFormat[] = "diiisfffiiihhhhhhhhbbbbbbbbb"; -char const SpellItemEnchantmentConditionFormat[] = "dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; -char const SpellLearnSpellFormat[] = "diii"; -char const SpellLevelsFormat[] = "dihhhbb"; -char const SpellMiscFormat[] = "diiiiiiiiiiiiiiffhhhhhb"; -char const SpellPowerFormat[] = "niiffifhhhhbbb"; -char const SpellPowerDifficultyFormat[] = "nbb"; -char const SpellProcsPerMinuteFormat[] = "dfb"; -char const SpellProcsPerMinuteModFormat[] = "dfhbb"; -char const SpellRadiusFormat[] = "dffff"; -char const SpellRangeFormat[] = "dffffssb"; -char const SpellReagentsFormat[] = "diiiiiiiiihhhhhhhh"; -char const SpellScalingFormat[] = "dihbbb"; -char const SpellShapeshiftFormat[] = "diiiiib"; -char const SpellShapeshiftFormFormat[] = "dsfihhhhhhhhhhhhhhbbb"; -char const SpellTargetRestrictionsFormat[] = "diffihhbb"; -char const SpellTotemsFormat[] = "diiibb"; -char const SpellXSpellVisualFormat[] = "nifhhhbb"; -char const SummonPropertiesFormat[] = "diiiii"; -char const TalentFormat[] = "diishbbbbbb"; -char const TaxiNodesFormat[] = "nfffsiiffhhhb"; -char const TaxiPathFormat[] = "nhhh"; -char const TaxiPathNodeFormat[] = "nfffihhhhbb"; -char const TotemCategoryFormat[] = "dsib"; -char const ToyFormat[] = "nisbb"; -char const TransportAnimationFormat[] = "diifffb"; -char const TransportRotationFormat[] = "diiffff"; -char const UnitPowerBarFormat[] = "diffiiiiiiiiiiiissssffhhbbb"; -char const VehicleFormat[] = "difffffffffffffffffffSSSSffhhhhhhhhhhhhbb"; -char const VehicleSeatFormat[] = "diiiffffffffffffffffffffffiiffffffffffffihhhhhhhhhhhhhhhhhhhbbbbbb"; -char const WMOAreaTableFormat[] = "nishhhhhhhbbbbb"; -char const WorldMapAreaFormat[] = "nSffffhhhhhhhbbbb"; -char const WorldMapOverlayFormat[] = "dShhhhhhhhhhhhhhb"; -char const WorldMapTransformsFormat[] = "dfffffffffhhhhb"; -char const WorldSafeLocsFormat[] = "dffffsh"; - -#endif diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index f71e105a62b..b00cbf7e9fb 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -585,6 +585,11 @@ enum ItemLimitCategoryMode ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems) }; +enum ItemSetFlags +{ + ITEM_SET_FLAG_LEGACY_INACTIVE = 0x01, +}; + enum ItemSpecStat { ITEM_SPEC_STAT_INTELLECT = 0, diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h deleted file mode 100644 index 3027402f596..00000000000 --- a/src/server/game/DataStores/DBCfmt.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef TRINITY_DBCSFRM_H -#define TRINITY_DBCSFRM_H - -// x - skip, X - skip, s - char*, f - float, i - uint32, b - uint8, d - index (not included) -// n - index (included), l - uint64, p - field present in sql dbc, a - field absent in sql dbc - - -#endif diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 84138cf0b45..a049256f0a7 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -49,6 +49,9 @@ void AddItemsSetItem(Player* player, Item* item) if (set->RequiredSkill && player->GetSkillValue(set->RequiredSkill) < set->RequiredSkillRank) return; + if (set->Flags & ITEM_SET_FLAG_LEGACY_INACTIVE) + return; + ItemSetEffect* eff = NULL; for (size_t x = 0; x < player->ItemSetEff.size(); ++x) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index fefceea25e1..9626b828cf9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -561,7 +561,6 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac // base stats and related field values InitStatsForLevel(); InitTaxiNodesForLevel(); - InitGlyphsForLevel(); InitTalentForLevel(); InitPrimaryProfessions(); // to max set before any spell added @@ -2448,7 +2447,6 @@ void Player::GiveLevel(uint8 level) InitTalentForLevel(); InitTaxiNodesForLevel(); - InitGlyphsForLevel(); UpdateAllStats(); @@ -4021,10 +4019,6 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe stmt->setUInt64(0, guid); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_GLYPHS); - stmt->setUInt64(0, guid); - trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_QUESTSTATUS_DAILY); stmt->setUInt64(0, guid); trans->Append(stmt); @@ -16800,7 +16794,6 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) // reset stats before loading any modifiers InitStatsForLevel(); - InitGlyphsForLevel(); InitTaxiNodesForLevel(); InitRunes(); @@ -16869,9 +16862,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) LearnSpecializationSpells(); - _LoadGlyphs(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GLYPHS)); _LoadAuras(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_AURAS), holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_AURA_EFFECTS), time_diff); - _LoadGlyphAuras(); // add ghost flag (must be after aura load: PLAYER_FLAGS_GHOST set in aura) if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) m_deathState = DEAD; @@ -17241,36 +17232,6 @@ void Player::_LoadAuras(PreparedQueryResult auraResult, PreparedQueryResult effe } } -void Player::_LoadGlyphAuras() -{ - for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - { - if (uint32 glyph = GetGlyph(GetActiveTalentGroup(), i)) - { - if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) - { - if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i))) - { - if (gp->Type == gs->Type) - { - CastSpell(this, gp->SpellID, true); - continue; - } - else - TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has glyph with typeflags %u in slot with typeflags %u, removing.", GetName().c_str(), GetGUID().ToString().c_str(), gp->Type, gs->Type); - } - else - TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has not existing glyph slot entry %u on index %u", GetName().c_str(), GetGUID().ToString().c_str(), GetGlyphSlot(i), i); - } - else - TC_LOG_ERROR("entities.player", "Player::_LoadGlyphAuras: Player '%s' (%s) has not existing glyph entry %u on index %u", GetName().c_str(), GetGUID().ToString().c_str(), glyph, i); - - // On any error remove glyph - SetGlyph(i, 0); - } - } -} - void Player::LoadCorpse(PreparedQueryResult result) { if (IsAlive() || HasAtLoginFlag(AT_LOGIN_RESURRECT)) @@ -18874,7 +18835,6 @@ void Player::SaveToDB(bool create /*=false*/) m_reputationMgr->SaveToDB(trans); _SaveEquipmentSets(trans); GetSession()->SaveTutorialsData(trans); // changed only while character in game - _SaveGlyphs(trans); _SaveInstanceTimeRestrictions(trans); _SaveCurrency(trans); _SaveCUFProfiles(trans); @@ -24014,25 +23974,6 @@ uint32 Player::GetBarberShopCost(BarberShopStyleEntry const* newHairStyle, uint8 return cost; } -void Player::InitGlyphsForLevel() -{ - //uint32 slotMask = 0; - //uint8 slot = 0; - //uint8 level = getLevel(); - //for (GlyphSlotEntry const* gs : sDB2Manager.GetGlyphSlots()) - //{ - // if (level >= ((gs->Tooltip + 1) * 25)) - // slotMask |= 1 << slot; - - // SetGlyphSlot(slot++, gs->ID); - //} -} - -void Player::SetGlyph(uint8 slot, uint32 glyph) -{ - _talentMgr->GroupInfo[GetActiveTalentGroup()].Glyphs[slot] = glyph; -} - bool Player::isTotalImmune() const { AuraEffectList const& immune = GetAuraEffectsByType(SPELL_AURA_SCHOOL_IMMUNITY); @@ -24840,9 +24781,6 @@ void Player::SendTalentsInfoData() groupInfoPkt.TalentIDs.push_back(uint16(itr->first)); } - for (uint32 x = 0; x < MAX_GLYPH_SLOT_INDEX; ++x) - groupInfoPkt.GlyphIDs[x] = uint16(GetGlyph(i, x)); - packet.Info.TalentGroups.push_back(groupInfoPkt); } @@ -25021,48 +24959,6 @@ void Player::SetMap(Map* map) m_mapRef.link(map, this); } -void Player::_LoadGlyphs(PreparedQueryResult result) -{ - // SELECT group, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6, glyph7, glyph8, glyph9 FROM character_glyphs WHERE guid = '%u' - if (!result) - return; - - do - { - Field* fields = result->Fetch(); - - uint8 group = fields[0].GetUInt8(); - if (group >= GetTalentGroupsCount()) - continue; - - for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - _talentMgr->GroupInfo[group].Glyphs[i] = fields[i + 1].GetUInt16(); - } - while (result->NextRow()); -} - -void Player::_SaveGlyphs(SQLTransaction& trans) const -{ - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_GLYPHS); - stmt->setUInt64(0, GetGUID().GetCounter()); - trans->Append(stmt); - - for (uint8 group = 0; group < GetTalentGroupsCount(); ++group) - { - uint8 index = 0; - - stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_GLYPHS); - stmt->setUInt64(index++, GetGUID().GetCounter()); - - stmt->setUInt8(index++, group); - - for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - stmt->setUInt16(index++, uint16(GetGlyph(group, i))); - - trans->Append(stmt); - } -} - void Player::_LoadTalents(PreparedQueryResult result) { // SetPQuery(PLAYER_LOGIN_QUERY_LOADTALENTS, "SELECT spell, spec FROM character_talent WHERE guid = '%u'", GUID_LOPART(m_guid)); @@ -25215,13 +25111,6 @@ void Player::ActivateTalentGroup(uint8 spec) // Remove spec specific spells RemoveSpecializationSpells(); - // set glyphs - for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot) - // remove secondary glyph - if (uint32 oldglyph = GetGlyph(GetActiveTalentGroup(), slot)) - if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) - RemoveAurasDueToSpell(old_gp->SpellID); - SetActiveTalentGroup(spec); SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, GetSpecId(spec)); @@ -25255,19 +25144,6 @@ void Player::ActivateTalentGroup(uint8 spec) if (uint32 mastery = specialization->MasterySpellID[i]) LearnSpell(mastery, false); - // set glyphs - for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot) - { - uint32 glyph = GetGlyph(GetActiveTalentGroup(), slot); - - // apply primary glyph - if (glyph) - if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) - CastSpell(this, gp->SpellID, true); - - SetGlyph(slot, glyph); - } - InitTalentForLevel(); { diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 2f2258118b0..7edc88bdecc 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -956,7 +956,6 @@ enum PlayerLoginQueryIndex PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, PLAYER_LOGIN_QUERY_LOAD_BG_DATA, - PLAYER_LOGIN_QUERY_LOAD_GLYPHS, PLAYER_LOGIN_QUERY_LOAD_TALENTS, PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, PLAYER_LOGIN_QUERY_LOAD_SKILLS, @@ -1150,11 +1149,8 @@ struct TC_GAME_API PlayerTalentInfo for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) { GroupInfo[i].Talents = new PlayerTalentMap(); - memset(GroupInfo[i].Glyphs, 0, MAX_GLYPH_SLOT_INDEX * sizeof(uint32)); GroupInfo[i].SpecId = 0; } - - GlyphSlots.fill(0); } ~PlayerTalentInfo() @@ -1166,7 +1162,6 @@ struct TC_GAME_API PlayerTalentInfo struct TalentGroupInfo { PlayerTalentMap* Talents; - uint32 Glyphs[MAX_GLYPH_SLOT_INDEX]; uint32 SpecId; } GroupInfo[MAX_TALENT_GROUPS]; @@ -1175,8 +1170,6 @@ struct TC_GAME_API PlayerTalentInfo uint8 ActiveGroup; uint8 GroupsCount; - std::array GlyphSlots; - private: PlayerTalentInfo(PlayerTalentInfo const&); }; @@ -1784,13 +1777,6 @@ class TC_GAME_API Player : public Unit, public GridObject void UpdateTalentGroupCount(uint8 count); void ActivateTalentGroup(uint8 group); - void InitGlyphsForLevel(); - void SetGlyphSlot(uint8 slot, uint32 slottype) { _talentMgr->GlyphSlots[slot] = slottype; } - - uint32 GetGlyphSlot(uint8 slot) const { return _talentMgr->GlyphSlots[slot]; } - void SetGlyph(uint8 slot, uint32 glyph); - uint32 GetGlyph(uint8 group, uint8 slot) const { return _talentMgr->GroupInfo[group].Glyphs[slot]; } - PlayerTalentMap const* GetTalentMap(uint8 spec) const { return _talentMgr->GroupInfo[spec].Talents; } PlayerTalentMap* GetTalentMap(uint8 spec) { return _talentMgr->GroupInfo[spec].Talents; } ActionButtonList const& GetActionButtons() const { return m_actionButtons; } @@ -2524,7 +2510,6 @@ class TC_GAME_API Player : public Unit, public GridObject void _LoadActions(PreparedQueryResult result); void _LoadAuras(PreparedQueryResult auraResult, PreparedQueryResult effectResult, uint32 timediff); - void _LoadGlyphAuras(); void _LoadBoundInstances(PreparedQueryResult result); void _LoadInventory(PreparedQueryResult result, uint32 timeDiff); void _LoadVoidStorage(PreparedQueryResult result); @@ -2547,7 +2532,6 @@ class TC_GAME_API Player : public Unit, public GridObject void _LoadArenaTeamInfo(PreparedQueryResult result); void _LoadEquipmentSets(PreparedQueryResult result); void _LoadBGData(PreparedQueryResult result); - void _LoadGlyphs(PreparedQueryResult result); void _LoadTalents(PreparedQueryResult result); void _LoadInstanceTimeRestrictions(PreparedQueryResult result); void _LoadCurrency(PreparedQueryResult result); @@ -2571,7 +2555,6 @@ class TC_GAME_API Player : public Unit, public GridObject void _SaveSpells(SQLTransaction& trans); void _SaveEquipmentSets(SQLTransaction& trans); void _SaveBGData(SQLTransaction& trans); - void _SaveGlyphs(SQLTransaction& trans) const; void _SaveTalents(SQLTransaction& trans); void _SaveStats(SQLTransaction& trans) const; void _SaveInstanceTimeRestrictions(SQLTransaction& trans); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index d4ea3927f6c..1e80aa8018b 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -199,10 +199,6 @@ bool LoginQueryHolder::Initialize() stmt->setUInt64(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BG_DATA, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS); - stmt->setUInt64(0, lowGuid); - res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GLYPHS, stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS); stmt->setUInt64(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TALENTS, stmt); @@ -1462,28 +1458,6 @@ void WorldSession::HandleAlterAppearance(WorldPackets::Character::AlterApperance _player->SetStandState(UNIT_STAND_STATE_STAND); } -void WorldSession::HandleRemoveGlyph(WorldPacket& recvData) -{ - uint32 slot; - recvData >> slot; - - if (slot >= MAX_GLYPH_SLOT_INDEX) - { - TC_LOG_DEBUG("network", "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot); - return; - } - - if (uint32 glyph = _player->GetGlyph(_player->GetActiveTalentGroup(), slot)) - { - if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) - { - _player->RemoveAurasDueToSpell(gp->SpellID); - _player->SetGlyph(slot, 0); - _player->SendTalentsInfoData(); - } - } -} - void WorldSession::HandleCharCustomizeOpcode(WorldPackets::Character::CharCustomize& packet) { if (!IsLegitCharacterForAccount(packet.CustomizeInfo->CharGUID)) diff --git a/src/server/game/Handlers/InspectHandler.cpp b/src/server/game/Handlers/InspectHandler.cpp index 3ffde3dc3e3..3ac39c2d500 100644 --- a/src/server/game/Handlers/InspectHandler.cpp +++ b/src/server/game/Handlers/InspectHandler.cpp @@ -58,9 +58,6 @@ void WorldSession::HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect) if (v.second != PLAYERSPELL_REMOVED) inspectResult.Talents.push_back(v.first); } - - for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - inspectResult.Glyphs.push_back(player->GetGlyph(player->GetActiveTalentGroup(), i)); } if (Guild* guild = sGuildMgr->GetGuildById(player->GetGuildId())) diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index d796b789f8d..6bbec483634 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -855,7 +855,6 @@ enum SpellAttr13 #define MAX_TALENT_GROUP 1 #define MIN_TALENT_GROUPS 1 #define MAX_TALENT_GROUPS 2 -#define MAX_GLYPH_SLOT_INDEX 6 #define MIN_SPECIALIZATION_LEVEL 10 #define MAX_SPECIALIZATIONS 4 #define PET_SPEC_OVERRIDE_CLASS_INDEX MAX_CLASSES diff --git a/src/server/game/Server/Packets/TalentPackets.cpp b/src/server/game/Server/Packets/TalentPackets.cpp index 7dc2daaa706..bc7b6aec20c 100644 --- a/src/server/game/Server/Packets/TalentPackets.cpp +++ b/src/server/game/Server/Packets/TalentPackets.cpp @@ -27,8 +27,8 @@ WorldPacket const* WorldPackets::Talent::UpdateTalentData::Write() _worldPacket << talentGroupInfo.SpecID; _worldPacket << uint32(talentGroupInfo.TalentIDs.size()); - for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - _worldPacket << talentGroupInfo.GlyphIDs[i]; + //for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) + // _worldPacket << talentGroupInfo.GlyphIDs[i]; for (uint16 talentID : talentGroupInfo.TalentIDs) _worldPacket << talentID; diff --git a/src/server/game/Server/Packets/TalentPackets.h b/src/server/game/Server/Packets/TalentPackets.h index ca6b0217a28..9e09605b362 100644 --- a/src/server/game/Server/Packets/TalentPackets.h +++ b/src/server/game/Server/Packets/TalentPackets.h @@ -29,7 +29,7 @@ namespace WorldPackets { uint32 SpecID; std::vector TalentIDs; - uint16 GlyphIDs[MAX_GLYPH_SLOT_INDEX]; + //uint16 GlyphIDs[MAX_GLYPH_SLOT_INDEX]; }; struct TalentInfoUpdate diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 5becf594568..d58b03ebb2c 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -1650,7 +1650,6 @@ class TC_GAME_API WorldSession // Miscellaneous void HandleSpellClick(WorldPackets::Spells::SpellClick& spellClick); void HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorImageData& getMirrorImageData); - void HandleRemoveGlyph(WorldPacket& recvData); void HandleGuildSetFocusedAchievement(WorldPackets::Achievement::GuildSetFocusedAchievement& setFocusedAchievement); void HandleEquipmentSetSave(WorldPackets::EquipmentSet::SaveEquipmentSet& saveEquipmentSet); void HandleDeleteEquipmentSet(WorldPackets::EquipmentSet::DeleteEquipmentSet& deleteEquipmentSet); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e529990cccd..9962a214f97 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1359,23 +1359,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const target->CastSpell(target, itr->first, true, NULL, this); } - // Also do it for Glyphs - for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - { - if (uint32 glyphId = plrTarget->GetGlyph(plrTarget->GetActiveTalentGroup(), i)) - { - if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId)) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellID); - if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE))) - continue; - - if (spellInfo->Stances & (UI64LIT(1) << (GetMiscValue() - 1))) - target->CastSpell(target, glyph->SpellID, true, NULL, this); - } - } - } - // Leader of the Pack if (plrTarget->HasSpell(17007)) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d22b6df71e4..3b452024c80 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3922,72 +3922,9 @@ void Spell::EffectApplyGlyph(SpellEffIndex /*effIndex*/) if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT) return; - if (m_misc.GlyphSlot >= MAX_GLYPH_SLOT_INDEX) - return; - Player* player = m_caster->ToPlayer(); if (!player) return; - - // glyph sockets level requirement - uint8 minLevel = 0; - switch (m_misc.GlyphSlot) - { - case 0: - case 1: - case 6: minLevel = 25; break; - case 2: - case 3: - case 7: minLevel = 50; break; - case 4: - case 5: - case 8: minLevel = 75; break; - } - - if (minLevel && m_caster->getLevel() < minLevel) - { - SendCastResult(SPELL_FAILED_GLYPH_SOCKET_LOCKED); - return; - } - - // apply new one - if (uint32 newGlyph = effectInfo->MiscValue) - { - if (GlyphPropertiesEntry const* newGlyphProperties = sGlyphPropertiesStore.LookupEntry(newGlyph)) - { - if (GlyphSlotEntry const* newGlyphSlot = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_misc.GlyphSlot))) - { - if (newGlyphProperties->Type != newGlyphSlot->Type) - { - SendCastResult(SPELL_FAILED_INVALID_GLYPH); - return; // glyph slot mismatch - } - } - - // remove old glyph - if (uint32 oldGlyph = player->GetGlyph(player->GetActiveTalentGroup(), m_misc.GlyphSlot)) - { - if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) - { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); - player->SetGlyph(m_misc.GlyphSlot, 0); - } - } - - player->CastSpell(m_caster, newGlyphProperties->SpellID, true); - player->SetGlyph(m_misc.GlyphSlot, newGlyph); - player->SendTalentsInfoData(); - } - } - else if (uint32 oldGlyph = player->GetGlyph(player->GetActiveTalentGroup(), m_misc.GlyphSlot)) // Removing the glyph, get the old one - { - if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) - { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); - player->SetGlyph(m_misc.GlyphSlot, 0); - player->SendTalentsInfoData(); - } - } } void Spell::EffectEnchantHeldItem(SpellEffIndex /*effIndex*/) diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index e77893e9de6..f72d7c614cc 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -134,7 +134,6 @@ public: target->InitRunes(); target->InitStatsForLevel(true); target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); target->InitTalentForLevel(); target->SetUInt32Value(PLAYER_XP, 0); @@ -190,7 +189,6 @@ public: target->InitRunes(); target->InitStatsForLevel(true); target->InitTaxiNodesForLevel(); - target->InitGlyphsForLevel(); target->InitTalentForLevel(); return true; diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index d41dcb42411..0829441e17a 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1008,7 +1008,7 @@ class spell_sha_lava_surge_proc : public SpellScriptLoader void ResetCooldown() { - GetCaster()->GetSpellHistory()->RestoreCharge(sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_LAVA_BURST)->ChargeCategoryEntry); + GetCaster()->GetSpellHistory()->RestoreCharge(sSpellMgr->AssertSpellInfo(SPELL_SHAMAN_LAVA_BURST)->ChargeCategoryId); } void Register() override diff --git a/src/server/shared/DataStores/DB2Meta.cpp b/src/server/shared/DataStores/DB2Meta.cpp new file mode 100644 index 00000000000..66c18961551 --- /dev/null +++ b/src/server/shared/DataStores/DB2Meta.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2008-2016 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "DB2Meta.h" + +DB2Meta::DB2Meta(int32 indexField, uint32 fieldCount, char const* types, uint8 const* arraySizes) + : IndexField(indexField), FieldCount(fieldCount), Types(types), ArraySizes(arraySizes) +{ +} + +bool DB2Meta::HasIndexFieldInData() const +{ + return IndexField != -1; +} + +uint32 DB2Meta::GetIndexField() const +{ + return IndexField == -1 ? 0 : uint32(IndexField); +} + +uint32 DB2Meta::GetRecordSize() const +{ + uint32 size = 0; + for (uint32 i = 0; i < FieldCount; ++i) + { + for (uint8 j = 0; j < ArraySizes[i]; ++j) + { + switch (Types[i]) + { + case FT_BYTE: + size += 1; + break; + case FT_SHORT: + size += 2; + break; + case FT_FLOAT: + case FT_INT: + size += 4; + break; + case FT_STRING: + case FT_STRING_NOT_LOCALIZED: + size += sizeof(char*); + break; + } + } + } + + if (!HasIndexFieldInData()) + size += 4; + + return size; +} + +uint32 DB2Meta::GetDbIndexField() const +{ + if (IndexField == -1) + return 0; + + uint32 index = 0; + for (uint32 i = 0; i < FieldCount && i < uint32(IndexField); ++i) + index += ArraySizes[i]; + + return index; +} + +uint32 DB2Meta::GetDbFieldCount() const +{ + uint32 fields = 0; + for (uint32 i = 0; i < FieldCount; ++i) + fields += ArraySizes[i]; + + if (!HasIndexFieldInData()) + ++fields; + + return fields; +} + +uint32 DB2Meta::GetStringFieldCount(bool localizedOnly) const +{ + uint32 stringFields = 0; + for (uint32 i = 0; i < FieldCount; ++i) + if (Types[i] == FT_STRING || (Types[i] == FT_STRING_NOT_LOCALIZED && !localizedOnly)) + for (uint8 j = 0; j < ArraySizes[i]; ++j) + ++stringFields; + + return stringFields; +} diff --git a/src/server/shared/DataStores/DB2Meta.h b/src/server/shared/DataStores/DB2Meta.h new file mode 100644 index 00000000000..adfdfea37fb --- /dev/null +++ b/src/server/shared/DataStores/DB2Meta.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008-2016 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef DB2Meta_h__ +#define DB2Meta_h__ + +#include "Define.h" + +struct DB2Meta +{ + DB2Meta(int32 indexField, uint32 fieldCount, char const* types, uint8 const* arraySizes); + + bool HasIndexFieldInData() const; + + // Returns field index for data loaded in our structures (ID field is appended in the front if not present in db2 file data section) + uint32 GetIndexField() const; + + // Returns size of final loaded structure + uint32 GetRecordSize() const; + + uint32 GetDbIndexField() const; + uint32 GetDbFieldCount() const; + + uint32 GetStringFieldCount(bool localizedOnly) const; + + int32 IndexField; + uint32 FieldCount; + char const* Types; + uint8 const* ArraySizes; +}; + +#endif // DB2Meta_h__ diff --git a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp index 2d5c11b9d5d..721ce6d8813 100644 --- a/src/server/shared/DataStores/DB2SparseStorageLoader.cpp +++ b/src/server/shared/DataStores/DB2SparseStorageLoader.cpp @@ -23,14 +23,14 @@ DB2SparseFileLoader::DB2SparseFileLoader() { fileName = nullptr; + meta = nullptr; recordCount = 0; fieldCount = 0; recordSize = 0; offsetsPos = 0; tableHash = 0; - build = 0; - unk1 = 0; + layoutHash = 0; minIndex = 0; maxIndex = 0; localeMask = 0; @@ -39,9 +39,10 @@ DB2SparseFileLoader::DB2SparseFileLoader() dataStart = 0; data = nullptr; offsets = nullptr; + fields = nullptr; } -bool DB2SparseFileLoader::Load(const char *filename) +bool DB2SparseFileLoader::Load(const char *filename, DB2Meta const* meta) { if (data) { @@ -54,6 +55,7 @@ bool DB2SparseFileLoader::Load(const char *filename) return false; fileName = filename; + this->meta = meta; uint32 header; if (fread(&header, 4, 1, f) != 1) // Signature { @@ -63,10 +65,10 @@ bool DB2SparseFileLoader::Load(const char *filename) EndianConvert(header); - if (header != 0x34424457) + if (header != 0x35424457) { fclose(f); - return false; //'WDB4' + return false; //'WDB5' } if (fread(&recordCount, 4, 1, f) != 1) // Number of records @@ -109,21 +111,13 @@ bool DB2SparseFileLoader::Load(const char *filename) EndianConvert(tableHash); - if (fread(&build, 4, 1, f) != 1) // Build + if (fread(&layoutHash, 4, 1, f) != 1) // Layout hash { fclose(f); return false; } - EndianConvert(build); - - if (fread(&unk1, 4, 1, f) != 1) // Unknown WDB2 - { - fclose(f); - return false; - } - - EndianConvert(unk1); + EndianConvert(layoutHash); if (fread(&minIndex, 4, 1, f) != 1) // MinIndex WDB2 { @@ -165,6 +159,13 @@ bool DB2SparseFileLoader::Load(const char *filename) EndianConvert(metaFlags); + fields = new FieldEntry[fieldCount]; + if (fread(fields, fieldCount * sizeof(FieldEntry), 1, f) != 1) + { + fclose(f); + return false; + } + dataStart = ftell(f); data = new unsigned char[offsetsPos - dataStart]; @@ -190,69 +191,19 @@ DB2SparseFileLoader::~DB2SparseFileLoader() { delete[] data; delete[] offsets; -} - -uint32 DB2SparseFileLoader::GetFormatRecordSize(const char * format) -{ - uint32 recordsize = 0; - for (uint32 x = 0; format[x]; ++x) - { - switch (format[x]) - { - case FT_FLOAT: - case FT_INT: - case FT_SORT: - recordsize += 4; - break; - case FT_STRING: - case FT_STRING_NOT_LOCALIZED: - recordsize += sizeof(char*); - break; - case FT_BYTE: - recordsize += 1; - break; - case FT_LONG: - recordsize += 8; - break; - case FT_SHORT: - recordsize += 2; - break; - } - } - - return recordsize; -} - -uint32 DB2SparseFileLoader::GetFormatStringFieldCount(const char* format) -{ - uint32 stringfields = 0; - for (uint32 x = 0; format[x]; ++x) - if (format[x] == FT_STRING || format[x] == FT_STRING_NOT_LOCALIZED) - ++stringfields; - - return stringfields; -} - -uint32 DB2SparseFileLoader::GetFormatLocalizedStringFieldCount(char const* format) -{ - uint32 stringfields = 0; - for (uint32 x = 0; format[x]; ++x) - if (format[x] == FT_STRING) - ++stringfields; - - return stringfields; + delete[] fields; } static char const* const nullStr = ""; -char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& indexTable, uint32 locale, std::vector& stringPool) +char* DB2SparseFileLoader::AutoProduceData(IndexTable const& indexTable, uint32 locale, std::vector& stringPool) { typedef char* ptr; - if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) + if (meta->FieldCount != fieldCount) return NULL; //get struct size and index pos - uint32 recordsize = GetFormatRecordSize(format); + uint32 recordsize = meta->GetRecordSize(); uint32 offsetCount = maxIndex - minIndex + 1; uint32 records = 0; @@ -269,12 +220,11 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& char* dataTable = new char[records * recordsize]; // we store flat holders pool as single memory block - std::size_t stringFields = GetFormatStringFieldCount(format); - std::size_t localizedStringFields = GetFormatLocalizedStringFieldCount(format); + std::size_t stringFields = meta->GetStringFieldCount(false); + std::size_t localizedStringFields = meta->GetStringFieldCount(true); // each string field at load have array of string for each locale - std::size_t stringHolderSize = sizeof(char*) * TOTAL_LOCALES; - std::size_t stringHoldersRecordPoolSize = localizedStringFields * stringHolderSize + (stringFields - localizedStringFields) * sizeof(char*); + std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*); std::size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * records; char* stringHoldersPool = new char[stringHoldersPoolSize]; @@ -284,8 +234,8 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& for (std::size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i) ((char const**)stringHoldersPool)[i] = nullStr; - char* stringTable = new char[expandedDataSize - records * ((recordsize - (format[0] == FT_SORT ? 4 : 0)) - stringFields * sizeof(char*))]; - memset(stringTable, 0, expandedDataSize - records * ((recordsize - (format[0] == FT_SORT ? 4 : 0)) - stringFields * sizeof(char*))); + char* stringTable = new char[expandedDataSize - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))]; + memset(stringTable, 0, expandedDataSize - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))); stringPool.push_back(stringTable); char* stringPtr = stringTable; @@ -299,64 +249,113 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& indexTable.Insert(y + minIndex, &dataTable[offset]); uint32 fieldOffset = 0; uint32 stringFieldOffset = 0; - for (uint32 x = 0; x < (fieldCount + (format[0] == FT_SORT ? 1 : 0)); x++) + + if (!meta->HasIndexFieldInData()) + { + *((uint32*)(&dataTable[offset])) = y + minIndex; + offset += 4; + } + + for (uint32 x = 0; x < fieldCount; ++x) { - switch (format[x]) + uint16 fieldBytes = 4 - fields[x].UnusedBits / 8; + for (uint32 z = 0; z < meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - *((float*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); - offset += 4; - fieldOffset += 4; - break; - case FT_IND: - case FT_INT: - *((uint32*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); - offset += 4; - fieldOffset += 4; - break; - case FT_BYTE: - *((uint8*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); - offset += 1; - fieldOffset += 1; - break; - case FT_LONG: - *((uint64*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); - offset += 8; - fieldOffset += 8; - break; - case FT_SHORT: - *((uint16*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); - offset += 2; - fieldOffset += 2; - break; - case FT_STRING: - { - LocalizedString** slot = (LocalizedString**)(&dataTable[offset]); - *slot = (LocalizedString*)(&stringHoldersPool[stringHoldersRecordPoolSize * recordNum + stringFieldOffset]); - (*slot)->Str[locale] = stringPtr; - strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); - fieldOffset += strlen(stringPtr) + 1; - stringPtr += strlen(stringPtr) + 1; - stringFieldOffset += stringHolderSize; - offset += sizeof(LocalizedString*); - break; - } - case FT_STRING_NOT_LOCALIZED: + switch (meta->Types[x]) { - char const*** slot = (char const***)(&dataTable[offset]); - *slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * recordNum + stringFieldOffset]); - **slot = stringPtr; - strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); - fieldOffset += strlen(stringPtr) + 1; - stringPtr += strlen(stringPtr) + 1; - ++stringFieldOffset; - offset += sizeof(char*); - break; + case FT_FLOAT: + { + float val = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + EndianConvert(val); + *((float*)(&dataTable[offset])) = val; + offset += 4; + fieldOffset += 4; + break; + } + case FT_INT: + { + ASSERT(fieldBytes && fieldBytes <= 4); + uint32 val; + switch (fieldBytes) + { + case 1: + val = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + break; + case 2: + { + uint16 val16 = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + EndianConvert(val16); + val = val16; + break; + } + case 3: + { +#pragma pack(push, 1) + struct dbcint24 { uint8 v[3]; }; +#pragma pack(pop) + dbcint24 i24v = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + EndianConvert(i24v); + val = uint32(i24v.v[0]) | (uint32(i24v.v[1]) << 8) | (uint32(i24v.v[2]) << 16); + break; + } + case 4: + val = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + EndianConvert(val); + break; + default: + break; + } + *((uint32*)(&dataTable[offset])) = val; + offset += 4; + fieldOffset += fieldBytes; + break; + } + case FT_BYTE: + { + ASSERT(fieldBytes == 1); + *((uint8*)(&dataTable[offset])) = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + offset += 1; + fieldOffset += 1; + break; + } + case FT_SHORT: + { + ASSERT(fieldBytes == 2); + uint16 val = *reinterpret_cast(&data[offsets[y].FileOffset - dataStart + fieldOffset]); + EndianConvert(val); + *((uint16*)(&dataTable[offset])) = val; + offset += 2; + fieldOffset += 2; + break; + } + case FT_STRING: + { + LocalizedString** slot = (LocalizedString**)(&dataTable[offset]); + *slot = (LocalizedString*)(&stringHoldersPool[stringHoldersRecordPoolSize * recordNum + stringFieldOffset]); + (*slot)->Str[locale] = stringPtr; + strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); + fieldOffset += strlen(stringPtr) + 1; + stringPtr += strlen(stringPtr) + 1; + stringFieldOffset += sizeof(LocalizedString); + offset += sizeof(LocalizedString*); + break; + } + case FT_STRING_NOT_LOCALIZED: + { + char const*** slot = (char const***)(&dataTable[offset]); + *slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * recordNum + stringFieldOffset]); + **slot = stringPtr; + strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); + fieldOffset += strlen(stringPtr) + 1; + stringPtr += strlen(stringPtr) + 1; + stringFieldOffset += sizeof(char*); + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName); + break; } - case FT_SORT: - *((uint32*)(&dataTable[offset])) = y + minIndex; - offset += 4; - break; } } @@ -366,9 +365,9 @@ char* DB2SparseFileLoader::AutoProduceData(const char* format, IndexTable const& return dataTable; } -char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTable, uint32 locale) +char* DB2SparseFileLoader::AutoProduceStrings(char* dataTable, uint32 locale) { - if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) + if (meta->FieldCount != fieldCount) return nullptr; if (!(localeMask & (1 << locale))) @@ -394,10 +393,10 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl if (offsets[i].FileOffset && offsets[i].RecordSize) ++records; - uint32 recordsize = GetFormatRecordSize(format); - std::size_t stringFields = GetFormatLocalizedStringFieldCount(format); - char* stringTable = new char[offsetsPos - dataStart - records * (recordsize - stringFields * sizeof(char*))]; - memset(stringTable, 0, offsetsPos - dataStart - records * (recordsize - stringFields * sizeof(char*))); + uint32 recordsize = meta->GetRecordSize(); + std::size_t stringFields = meta->GetStringFieldCount(true); + char* stringTable = new char[offsetsPos - dataStart - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))]; + memset(stringTable, 0, offsetsPos - dataStart - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))); char* stringPtr = stringTable; uint32 offset = 0; @@ -407,44 +406,51 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl if (!offsets[y].FileOffset || !offsets[y].RecordSize) continue; + if (!meta->HasIndexFieldInData()) + offset += 4; + uint32 fieldOffset = 0; - for (uint32 x = 0; x < fieldCount; x++) + for (uint32 x = 0; x < fieldCount; ++x) { - switch (format[x]) + for (uint32 z = 0; z < meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - case FT_IND: - case FT_INT: - offset += 4; - fieldOffset += 4; - break; - case FT_BYTE: - offset += 1; - fieldOffset += 1; - break; - case FT_LONG: - offset += 8; - fieldOffset += 8; - break; - case FT_SHORT: - offset += 2; - fieldOffset += 2; - break; - case FT_STRING: - { - LocalizedString* db2str = *(LocalizedString**)(&dataTable[offset]); - db2str->Str[locale] = stringPtr; - strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); - fieldOffset += strlen(stringPtr) + 1; - stringPtr += strlen(stringPtr) + 1; - offset += sizeof(char*); - break; - } - case FT_STRING_NOT_LOCALIZED: + switch (meta->Types[x]) { - fieldOffset += strlen((char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]) + 1; - offset += sizeof(char*); - break; + case FT_FLOAT: + offset += 4; + fieldOffset += 4; + break; + case FT_INT: + offset += 4; + fieldOffset += 4 - fields[x].UnusedBits / 8; + break; + case FT_BYTE: + offset += 1; + fieldOffset += 1; + break; + case FT_SHORT: + offset += 2; + fieldOffset += 2; + break; + case FT_STRING: + { + LocalizedString* db2str = *(LocalizedString**)(&dataTable[offset]); + db2str->Str[locale] = stringPtr; + strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]); + fieldOffset += strlen(stringPtr) + 1; + stringPtr += strlen(stringPtr) + 1; + offset += sizeof(char*); + break; + } + case FT_STRING_NOT_LOCALIZED: + { + fieldOffset += strlen((char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]) + 1; + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName); + break; } } } @@ -453,27 +459,26 @@ char* DB2SparseFileLoader::AutoProduceStrings(const char* format, char* dataTabl return stringTable; } -char* DB2SparseDatabaseLoader::Load(const char* format, HotfixDatabaseStatements preparedStatement, IndexTable const& indexTable, std::vector& stringPool) +char* DB2SparseDatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, IndexTable const& indexTable, std::vector& stringPool) { // Even though this query is executed only once, prepared statement is used to send data from mysql server in binary format PreparedQueryResult result = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(preparedStatement)); if (!result) return nullptr; - uint32 const fieldCount = strlen(format); - if (fieldCount != result->GetFieldCount()) + if (_meta->GetDbFieldCount() != result->GetFieldCount()) return nullptr; // get struct size and index pos - uint32 recordSize = DB2SparseFileLoader::GetFormatRecordSize(format); + uint32 indexField = _meta->GetDbIndexField(); + uint32 recordSize = _meta->GetRecordSize(); // we store flat holders pool as single memory block - std::size_t stringFields = DB2SparseFileLoader::GetFormatStringFieldCount(format); - std::size_t localizedStringFields = DB2SparseFileLoader::GetFormatLocalizedStringFieldCount(format); + std::size_t stringFields = _meta->GetStringFieldCount(false); + std::size_t localizedStringFields = _meta->GetStringFieldCount(true); // each string field at load have array of string for each locale - std::size_t stringHolderSize = sizeof(char*) * TOTAL_LOCALES; - std::size_t stringHoldersRecordPoolSize = localizedStringFields * stringHolderSize + (stringFields - localizedStringFields) * sizeof(char*); + std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*); char* stringHolders = nullptr; if (stringFields) @@ -498,7 +503,7 @@ char* DB2SparseDatabaseLoader::Load(const char* format, HotfixDatabaseStatements uint32 offset = 0; uint32 stringFieldOffset = 0; - uint32 indexValue = fields[0].GetUInt32(); + uint32 indexValue = fields[indexField].GetUInt32(); // Attempt to overwrite existing data char* dataValue = indexTable.Get(indexValue); @@ -508,60 +513,69 @@ char* DB2SparseDatabaseLoader::Load(const char* format, HotfixDatabaseStatements dataValue = &tempDataTable[newRecords++ * recordSize]; } - for (uint32 f = 0; f < fieldCount; f++) + uint32 f = 0; + if (!_meta->HasIndexFieldInData()) + { + *((uint32*)(&dataValue[offset])) = indexValue; + offset += 4; + ++f; + } + + for (uint32 x = 0; x < _meta->FieldCount; ++x) { - switch (format[f]) + for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - *((float*)(&dataValue[offset])) = fields[f].GetFloat(); - offset += 4; - break; - case FT_IND: - case FT_INT: - case FT_SORT: - *((int32*)(&dataValue[offset])) = fields[f].GetInt32(); - offset += 4; - break; - case FT_BYTE: - *((int8*)(&dataValue[offset])) = fields[f].GetInt8(); - offset += 1; - break; - case FT_LONG: - *((int64*)(&dataValue[offset])) = fields[f].GetInt64(); - offset += 8; - break; - case FT_SHORT: - *((int16*)(&dataValue[offset])) = fields[f].GetInt16(); - offset += 2; - break; - case FT_STRING: + switch (_meta->Types[x]) { - LocalizedString** slot = (LocalizedString**)(&dataValue[offset]); - *slot = (LocalizedString*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); - ASSERT(*slot); + case FT_FLOAT: + *((float*)(&dataValue[offset])) = fields[f].GetFloat(); + offset += 4; + break; + case FT_INT: + *((int32*)(&dataValue[offset])) = fields[f].GetInt32(); + offset += 4; + break; + case FT_BYTE: + *((int8*)(&dataValue[offset])) = fields[f].GetInt8(); + offset += 1; + break; + case FT_SHORT: + *((int16*)(&dataValue[offset])) = fields[f].GetInt16(); + offset += 2; + break; + case FT_STRING: + { + LocalizedString** slot = (LocalizedString**)(&dataValue[offset]); + *slot = (LocalizedString*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); + ASSERT(*slot); - // Value in database in main table field must be for enUS locale - if (char* str = AddString(&(*slot)->Str[LOCALE_enUS], fields[f].GetString())) - stringPool.push_back(str); + // Value in database in main table field must be for enUS locale + if (char* str = AddString(&(*slot)->Str[LOCALE_enUS], fields[f].GetString())) + stringPool.push_back(str); - stringFieldOffset += stringHolderSize; - offset += sizeof(char*); - break; - } - case FT_STRING_NOT_LOCALIZED: - { - char const** slot = (char const**)(&dataValue[offset]); - *slot = (char*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); - ASSERT(*slot); + stringFieldOffset += sizeof(LocalizedString); + offset += sizeof(char*); + break; + } + case FT_STRING_NOT_LOCALIZED: + { + char const** slot = (char const**)(&dataValue[offset]); + *slot = (char*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); + ASSERT(*slot); - // Value in database in main table field must be for enUS locale - if (char* str = AddString(slot, fields[f].GetString())) - stringPool.push_back(str); + // Value in database in main table field must be for enUS locale + if (char* str = AddString(slot, fields[f].GetString())) + stringPool.push_back(str); - ++stringFieldOffset; - offset += sizeof(char*); - break; + stringFieldOffset += sizeof(char*); + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str()); + break; } + ++f; } } @@ -590,7 +604,7 @@ char* DB2SparseDatabaseLoader::Load(const char* format, HotfixDatabaseStatements return dataTable; } -void DB2SparseDatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements preparedStatement, uint32 locale, IndexTable const& indexTable, std::vector& stringPool) +void DB2SparseDatabaseLoader::LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, IndexTable const& indexTable, std::vector& stringPool) { PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(preparedStatement); stmt->setString(0, localeNames[locale]); @@ -598,13 +612,12 @@ void DB2SparseDatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStat if (!result) return; - size_t stringFields = DB2SparseFileLoader::GetFormatLocalizedStringFieldCount(format); + size_t stringFields = _meta->GetStringFieldCount(true); if (result->GetFieldCount() != stringFields + 1 /*ID*/) return; - uint32 const fieldCount = strlen(format); - uint32 recordSize = DB2SparseFileLoader::GetFormatRecordSize(format); - ASSERT(0 >= 0, "DB2Storage must be indexed to load localized strings"); + uint32 fieldCount = _meta->FieldCount; + uint32 recordSize = _meta->GetRecordSize(); do { @@ -616,36 +629,40 @@ void DB2SparseDatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStat // Attempt to overwrite existing data if (char* dataValue = indexTable.Get(indexValue)) { - for (uint32 x = 0; x < fieldCount; x++) + if (!_meta->HasIndexFieldInData()) + offset += 4; + + for (uint32 x = 0; x < fieldCount; ++x) { - switch (format[x]) + for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - case FT_IND: - case FT_INT: - case FT_SORT: - offset += 4; - break; - case FT_BYTE: - offset += 1; - break; - case FT_LONG: - offset += 8; - break; - case FT_SHORT: - offset += 2; - break; - case FT_STRING: + switch (_meta->Types[x]) { - // fill only not filled entries - LocalizedString* db2str = *(LocalizedString**)(&dataValue[offset]); - if (db2str->Str[locale] == nullStr) - if (char* str = AddString(&db2str->Str[locale], fields[1 + stringFieldNumInRecord].GetString())) - stringPool.push_back(str); - - ++stringFieldNumInRecord; - offset += sizeof(char*); - break; + case FT_FLOAT: + case FT_INT: + offset += 4; + break; + case FT_BYTE: + offset += 1; + break; + case FT_SHORT: + offset += 2; + break; + case FT_STRING: + { + // fill only not filled entries + LocalizedString* db2str = *(LocalizedString**)(&dataValue[offset]); + if (db2str->Str[locale] == nullStr) + if (char* str = AddString(&db2str->Str[locale], fields[1 + stringFieldNumInRecord].GetString())) + stringPool.push_back(str); + + ++stringFieldNumInRecord; + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str()); + break; } } } diff --git a/src/server/shared/DataStores/DB2SparseStorageLoader.h b/src/server/shared/DataStores/DB2SparseStorageLoader.h index ac75e6b82d5..0936947ea6a 100644 --- a/src/server/shared/DataStores/DB2SparseStorageLoader.h +++ b/src/server/shared/DataStores/DB2SparseStorageLoader.h @@ -18,13 +18,13 @@ #ifndef DB2_SPARSE_FILE_LOADER_H #define DB2_SPARSE_FILE_LOADER_H -#include "Define.h" +#include "DB2Meta.h" #include "Utilities/ByteConverter.h" #include "Implementation/HotfixDatabase.h" #include #include -class IndexTable +class TC_SHARED_API IndexTable { public: virtual void Insert(uint32 index, char* data) const = 0; @@ -54,24 +54,22 @@ private: std::unordered_map& _indexTable; }; -class DB2SparseFileLoader +class TC_SHARED_API DB2SparseFileLoader { public: DB2SparseFileLoader(); ~DB2SparseFileLoader(); - bool Load(const char *filename); + bool Load(char const* filename, DB2Meta const* meta); uint32 GetNumRows() const { return recordCount; } uint32 GetCols() const { return fieldCount; } - uint32 GetHash() const { return tableHash; } - uint32 GetBuild() const { return build; } + uint32 GetTableHash() const { return tableHash; } + uint32 GetLayoutHash() const { return layoutHash; } bool IsLoaded() const { return (data != NULL); } - char* AutoProduceData(const char* fmt, IndexTable const& indexTable, uint32 locale, std::vector& stringPool); - char* AutoProduceStrings(const char* fmt, char* dataTable, uint32 locale); - static uint32 GetFormatRecordSize(const char * format); - static uint32 GetFormatStringFieldCount(const char * format); - static uint32 GetFormatLocalizedStringFieldCount(const char * format); + char* AutoProduceData(IndexTable const& indexTable, uint32 locale, std::vector& stringPool); + char* AutoProduceStrings(char* dataTable, uint32 locale); + private: #pragma pack(push, 1) struct OffsetTableEntry @@ -79,9 +77,15 @@ private: uint32 FileOffset; uint16 RecordSize; }; + struct FieldEntry + { + uint16 UnusedBits; + uint16 Offset; + }; #pragma pack(pop) char const* fileName; + DB2Meta const* meta; // WDB2 / WCH2 fields uint32 recordSize; @@ -89,30 +93,31 @@ private: uint32 fieldCount; uint32 offsetsPos; uint32 tableHash; - uint32 build; - uint32 unk1; + uint32 layoutHash; uint32 minIndex; uint32 maxIndex; uint32 localeMask; uint32 copyIdSize; uint32 metaFlags; + FieldEntry* fields; uint32 dataStart; unsigned char* data; OffsetTableEntry* offsets; }; -class DB2SparseDatabaseLoader +class TC_SHARED_API DB2SparseDatabaseLoader { public: - explicit DB2SparseDatabaseLoader(std::string const& storageName) : _storageName(storageName) { } + DB2SparseDatabaseLoader(std::string const& storageName, DB2Meta const* meta) : _storageName(storageName), _meta(meta) { } - char* Load(const char* format, HotfixDatabaseStatements preparedStatement, IndexTable const& indexTable, std::vector& stringPool); - void LoadStrings(const char* format, HotfixDatabaseStatements preparedStatement, uint32 locale, IndexTable const& indexTable, std::vector& stringPool); + char* Load(HotfixDatabaseStatements preparedStatement, IndexTable const& indexTable, std::vector& stringPool); + void LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, IndexTable const& indexTable, std::vector& stringPool); static char* AddString(char const** holder, std::string const& value); private: std::string _storageName; + DB2Meta const* _meta; }; #endif diff --git a/src/server/shared/DataStores/DB2StorageLoader.cpp b/src/server/shared/DataStores/DB2StorageLoader.cpp index 56a8dbbed65..0f45b75c8d6 100644 --- a/src/server/shared/DataStores/DB2StorageLoader.cpp +++ b/src/server/shared/DataStores/DB2StorageLoader.cpp @@ -23,28 +23,28 @@ DB2FileLoader::DB2FileLoader() { fileName = nullptr; + meta = nullptr; recordSize = 0; recordCount = 0; fieldCount = 0; stringSize = 0; tableHash = 0; - build = 0; - unk1 = 0; + layoutHash = 0; minIndex = 0; maxIndex = 0; localeMask = 0; copyIdSize = 0; - fieldsOffset = nullptr; data = nullptr; stringTable = nullptr; idTable = nullptr; idTableSize = 0; copyTable = nullptr; + fields = nullptr; } -bool DB2FileLoader::Load(const char *filename, const char *fmt) +bool DB2FileLoader::Load(char const* filename, DB2Meta const* meta) { if (data) { @@ -57,6 +57,7 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt) return false; fileName = filename; + this->meta = meta; uint32 header; if (fread(&header, 4, 1, f) != 1) // Signature { @@ -66,10 +67,10 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt) EndianConvert(header); - if (header != 0x34424457) + if (header != 0x35424457) { fclose(f); - return false; //'WDB4' + return false; //'WDB5' } if (fread(&recordCount, 4, 1, f) != 1) // Number of records @@ -112,21 +113,13 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt) EndianConvert(tableHash); - if (fread(&build, 4, 1, f) != 1) // Build + if (fread(&layoutHash, 4, 1, f) != 1) // Build { fclose(f); return false; } - EndianConvert(build); - - if (fread(&unk1, 4, 1, f) != 1) // Unknown WDB2 - { - fclose(f); - return false; - } - - EndianConvert(unk1); + EndianConvert(layoutHash); if (fread(&minIndex, 4, 1, f) != 1) // MinIndex WDB2 { @@ -168,26 +161,17 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt) EndianConvert(metaFlags); - if (fmt[0] == FT_SORT) + ASSERT((meta->IndexField == -1) || (meta->IndexField == (metaFlags >> 16))); + + fields = new FieldEntry[fieldCount]; + if (fread(fields, fieldCount * sizeof(FieldEntry), 1, f) != 1) { - idTableSize = recordCount * sizeof(uint32); - ++fmt; + fclose(f); + return false; } - fieldsOffset = new uint32[fieldCount]; - fieldsOffset[0] = 0; - for (uint32 i = 1; i < fieldCount; i++) - { - fieldsOffset[i] = fieldsOffset[i - 1]; - if (fmt[i - 1] == FT_BYTE) // byte fields - fieldsOffset[i] += 1; - else if (fmt[i - 1] == FT_LONG) - fieldsOffset[i] += 8; - else if (fmt[i - 1] == FT_SHORT) - fieldsOffset[i] += 2; - else // 4 byte fields (int32/float/strings) - fieldsOffset[i] += 4; - } + if (!meta->HasIndexFieldInData()) + idTableSize = recordCount * sizeof(uint32); data = new unsigned char[recordSize * recordCount + stringSize]; stringTable = data + recordSize * recordCount; @@ -227,7 +211,7 @@ DB2FileLoader::~DB2FileLoader() delete[] data; delete[] idTable; delete[] copyTable; - delete[] fieldsOffset; + delete[] fields; } DB2FileLoader::Record DB2FileLoader::getRecord(size_t id) @@ -236,181 +220,98 @@ DB2FileLoader::Record DB2FileLoader::getRecord(size_t id) return Record(*this, data + id * recordSize); } -uint32 DB2FileLoader::GetFormatRecordSize(const char * format, int32* index_pos) -{ - uint32 recordsize = 0; - int32 i = -1; - for (uint32 x = 0; format[x]; ++x) - { - switch (format[x]) - { - case FT_FLOAT: - case FT_INT: - recordsize += 4; - break; - case FT_STRING: - case FT_STRING_NOT_LOCALIZED: - recordsize += sizeof(char*); - break; - case FT_SORT: - case FT_IND: - i = x; - recordsize += 4; - break; - case FT_BYTE: - recordsize += 1; - break; - case FT_LONG: - recordsize += 8; - break; - case FT_SHORT: - recordsize += 2; - break; - } - } - - if (index_pos) - *index_pos = i; - - return recordsize; -} - -uint32 DB2FileLoader::GetFormatStringFieldCount(const char* format) -{ - uint32 stringfields = 0; - for (uint32 x = 0; format[x]; ++x) - if (format[x] == FT_STRING || format[x] == FT_STRING_NOT_LOCALIZED) - ++stringfields; - - return stringfields; -} - -uint32 DB2FileLoader::GetFormatLocalizedStringFieldCount(char const* format) -{ - uint32 stringfields = 0; - for (uint32 x = 0; format[x]; ++x) - if (format[x] == FT_STRING) - ++stringfields; - - return stringfields; -} - -char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char**& indexTable) +char* DB2FileLoader::AutoProduceData(uint32& records, char**& indexTable) { typedef char* ptr; - if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) + if (meta->FieldCount != fieldCount) return NULL; //get struct size and index pos - int32 indexField; - uint32 recordsize = GetFormatRecordSize(format, &indexField); + uint32 indexField = meta->GetIndexField(); + uint32 recordsize = meta->GetRecordSize(); - if (indexField >= 0) + uint32 maxi = 0; + //find max index + if (!idTableSize) { - uint32 maxi = 0; - //find max index - if (!idTableSize) - { - for (uint32 y = 0; y < recordCount; ++y) - { - uint32 ind = getRecord(y).getUInt(indexField); - if (ind > maxi) - maxi = ind; - } - } - else + for (uint32 y = 0; y < recordCount; ++y) { - for (uint32 y = 0; y < recordCount; ++y) - { - uint32 ind = ((uint32*)idTable)[y]; - if (ind > maxi) - maxi = ind; - } + uint32 ind = getRecord(y).getUInt(indexField, 0); + if (ind > maxi) + maxi = ind; } - for (uint32 y = 0; y < copyIdSize; y += 8) + } + else + { + for (uint32 y = 0; y < recordCount; ++y) { - uint32 ind = *((uint32*)(copyTable + y)); + uint32 ind = ((uint32*)idTable)[y]; if (ind > maxi) maxi = ind; } - - ++maxi; - records = maxi; - indexTable = new ptr[maxi]; - memset(indexTable, 0, maxi * sizeof(ptr)); } - else + + for (uint32 y = 0; y < copyIdSize; y += 8) { - ASSERT(!copyIdSize, "Storage %s uses id copy table - must be indexed!", fileName); - records = recordCount; - indexTable = new ptr[recordCount]; + uint32 ind = *((uint32*)(copyTable + y)); + if (ind > maxi) + maxi = ind; } + ++maxi; + records = maxi; + indexTable = new ptr[maxi]; + memset(indexTable, 0, maxi * sizeof(ptr)); + char* dataTable = new char[(recordCount + (copyIdSize / 8)) * recordsize]; uint32 offset = 0; for (uint32 y = 0; y < recordCount; y++) { - uint32 indexVal; - if (indexField >= 0) - indexVal = !idTableSize ? getRecord(y).getUInt(indexField) : ((uint32*)idTable)[y]; - else - indexVal = y; + uint32 indexVal = meta->HasIndexFieldInData() ? getRecord(y).getUInt(indexField, 0) : ((uint32*)idTable)[y]; indexTable[indexVal] = &dataTable[offset]; - uint32 x = 0; - for (char const* fmt = format; *fmt != '\0'; ++fmt) + if (!meta->HasIndexFieldInData()) { - switch (*fmt) - { - case FT_FLOAT: - *((float*)(&dataTable[offset])) = getRecord(y).getFloat(x++); - offset += 4; - break; - case FT_IND: - case FT_INT: - *((uint32*)(&dataTable[offset])) = getRecord(y).getUInt(x++); - offset += 4; - break; - case FT_BYTE: - *((uint8*)(&dataTable[offset])) = getRecord(y).getUInt8(x++); - offset += 1; - break; - case FT_LONG: - *((uint64*)(&dataTable[offset])) = getRecord(y).getUInt64(x++); - offset += 8; - break; - case FT_SHORT: - *((uint16*)(&dataTable[offset])) = getRecord(y).getUInt16(x++); - offset += 2; - break; - case FT_STRING: - case FT_STRING_NOT_LOCALIZED: - *((char**)(&dataTable[offset])) = nullptr; // will be replaces non-empty or "" strings in AutoProduceStrings - offset += sizeof(char*); - ++x; - break; - case FT_SORT: - *((uint32*)(&dataTable[offset])) = indexVal; - offset += 4; - break; - } + *((uint32*)(&dataTable[offset])) = indexVal; + offset += 4; } - } - uint32* copyIds = (uint32*)copyTable; - for (uint32 c = 0; c < copyIdSize / 4; c += 2) - { - uint32 to = copyIds[c]; - uint32 from = copyIds[c + 1]; - - if (from && from < records && indexTable[from]) + Record rec = getRecord(y); + for (uint32 x = 0; x < fieldCount; ++x) { - indexTable[to] = &dataTable[offset]; - memcpy(indexTable[to], indexTable[from], recordsize); - offset += recordsize; + for (uint32 z = 0; z < meta->ArraySizes[x]; ++z) + { + switch (meta->Types[x]) + { + case FT_FLOAT: + *((float*)(&dataTable[offset])) = rec.getFloat(x, z); + offset += 4; + break; + case FT_INT: + *((uint32*)(&dataTable[offset])) = rec.getUInt(x, z); + offset += 4; + break; + case FT_BYTE: + *((uint8*)(&dataTable[offset])) = rec.getUInt8(x, z); + offset += 1; + break; + case FT_SHORT: + *((uint16*)(&dataTable[offset])) = rec.getUInt16(x, z); + offset += 2; + break; + case FT_STRING: + case FT_STRING_NOT_LOCALIZED: + *((char**)(&dataTable[offset])) = nullptr; // will be replaced by non-empty or "" strings in AutoProduceStrings + offset += sizeof(char*); + break; + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName); + break; + } + } } } @@ -419,21 +320,20 @@ char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char** static char const* const nullStr = ""; -char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* dataTable) +char* DB2FileLoader::AutoProduceStringsArrayHolders(char* dataTable) { - if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) + if (meta->FieldCount != fieldCount) return nullptr; // we store flat holders pool as single memory block - std::size_t stringFields = GetFormatStringFieldCount(format); + std::size_t stringFields = meta->GetStringFieldCount(false); if (!stringFields) return nullptr; - std::size_t localizedStringFields = GetFormatLocalizedStringFieldCount(format); + std::size_t localizedStringFields = meta->GetStringFieldCount(true); // each string field at load have array of string for each locale - std::size_t stringHolderSize = sizeof(char*) * TOTAL_LOCALES; - std::size_t stringHoldersRecordPoolSize = localizedStringFields * stringHolderSize + (stringFields - localizedStringFields) * sizeof(char*); + std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*); std::size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * recordCount; char* stringHoldersPool = new char[stringHoldersPoolSize]; @@ -449,41 +349,43 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da { uint32 stringFieldOffset = 0; - for (char const* fmt = format; *fmt != '\0'; ++fmt) + if (!meta->HasIndexFieldInData()) + offset += 4; + + for (uint32 x = 0; x < fieldCount; ++x) { - switch (*fmt) + for (uint32 z = 0; z < meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - case FT_IND: - case FT_INT: - case FT_SORT: - offset += 4; - break; - case FT_BYTE: - offset += 1; - break; - case FT_LONG: - offset += 8; - break; - case FT_SHORT: - offset += 2; - break; - case FT_STRING: - case FT_STRING_NOT_LOCALIZED: + switch (meta->Types[x]) { - // init db2 string field slots by pointers to string holders - char const*** slot = (char const***)(&dataTable[offset]); - *slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * y + stringFieldOffset]); - if (*fmt == FT_STRING) - stringFieldOffset += stringHolderSize; - else - ++stringFieldOffset; - - offset += sizeof(char*); - break; + case FT_FLOAT: + case FT_INT: + offset += 4; + break; + case FT_BYTE: + offset += 1; + break; + case FT_SHORT: + offset += 2; + break; + case FT_STRING: + case FT_STRING_NOT_LOCALIZED: + { + // init db2 string field slots by pointers to string holders + char const*** slot = (char const***)(&dataTable[offset]); + *slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * y + stringFieldOffset]); + if (meta->Types[x] == FT_STRING) + stringFieldOffset += sizeof(LocalizedString); + else + stringFieldOffset += sizeof(char*); + + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName); + break; } - default: - ASSERT(false, "unknown format character %c", *fmt); } } } @@ -492,9 +394,9 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da return stringHoldersPool; } -char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable, uint32 locale) +char* DB2FileLoader::AutoProduceStrings(char* dataTable, uint32 locale) { - if (strlen(format) != fieldCount + (format[0] == FT_SORT ? 1 : 0)) + if (meta->FieldCount != fieldCount) return nullptr; if (!(localeMask & (1 << locale))) @@ -521,86 +423,110 @@ char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable, uin for (uint32 y = 0; y < recordCount; y++) { - uint32 x = 0; - for (char const* fmt = format; *fmt != '\0'; ++fmt) + if (!meta->HasIndexFieldInData()) + offset += 4; + + for (uint32 x = 0; x < fieldCount; ++x) { - switch (*fmt) + for (uint32 z = 0; z < meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - case FT_IND: - case FT_INT: - case FT_SORT: - offset += 4; - break; - case FT_BYTE: - offset += 1; - break; - case FT_LONG: - offset += 8; - break; - case FT_SHORT: - offset += 2; - break; - case FT_STRING: + switch (meta->Types[x]) { - // fill only not filled entries - LocalizedString* db2str = *(LocalizedString**)(&dataTable[offset]); - if (db2str->Str[locale] == nullStr) + case FT_FLOAT: + case FT_INT: + offset += 4; + break; + case FT_BYTE: + offset += 1; + break; + case FT_SHORT: + offset += 2; + break; + case FT_STRING: { - char const* st = getRecord(y).getString(x); - db2str->Str[locale] = stringPool + (st - (char const*)stringTable); - } + // fill only not filled entries + LocalizedString* db2str = *(LocalizedString**)(&dataTable[offset]); + if (db2str->Str[locale] == nullStr) + { + char const* st = getRecord(y).getString(x, z); + db2str->Str[locale] = stringPool + (st - (char const*)stringTable); + } - offset += sizeof(char*); - break; - } - case FT_STRING_NOT_LOCALIZED: - { - char** db2str = (char**)(&dataTable[offset]); - char const* st = getRecord(y).getString(x); - *db2str = stringPool + (st - (char const*)stringTable); - offset += sizeof(char*); - break; + offset += sizeof(char*); + break; + } + case FT_STRING_NOT_LOCALIZED: + { + char** db2str = (char**)(&dataTable[offset]); + char const* st = getRecord(y).getString(x, z); + *db2str = stringPool + (st - (char const*)stringTable); + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName); + break; } } - - if (*fmt != FT_SORT) - ++x; } } return stringPool; } -char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector& stringPool) +void DB2FileLoader::AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable) +{ + uint32 recordsize = meta->GetRecordSize(); + uint32 offset = recordCount * recordsize; + uint32* copyIds = (uint32*)copyTable; + for (uint32 c = 0; c < copyIdSize / 4; c += 2) + { + uint32 to = copyIds[c]; + uint32 from = copyIds[c + 1]; + + if (from && from < records && indexTable[from]) + { + indexTable[to] = &dataTable[offset]; + memcpy(indexTable[to], indexTable[from], recordsize); + + if (meta->HasIndexFieldInData()) + *((uint32*)(&dataTable[offset + fields[meta->GetIndexField()].Offset])) = to; + else + *((uint32*)(&dataTable[offset])) = to; + + offset += recordsize; + } + } +} + +char* DB2DatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector& stringPool) { // Even though this query is executed only once, prepared statement is used to send data from mysql server in binary format PreparedQueryResult result = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(preparedStatement)); if (!result) return nullptr; - uint32 const fieldCount = strlen(format); - if (fieldCount != result->GetFieldCount()) + if (_meta->GetDbFieldCount() != result->GetFieldCount()) return nullptr; // get struct size and index pos - int32 indexField; - uint32 recordSize = DB2FileLoader::GetFormatRecordSize(format, &indexField); + uint32 indexField = _meta->GetDbIndexField(); + uint32 recordSize = _meta->GetRecordSize(); // we store flat holders pool as single memory block - size_t stringFields = DB2FileLoader::GetFormatStringFieldCount(format); + std::size_t stringFields = _meta->GetStringFieldCount(false); + std::size_t localizedStringFields = _meta->GetStringFieldCount(true); // each string field at load have array of string for each locale - size_t stringHolderSize = sizeof(char*) * TOTAL_LOCALES; - size_t stringHoldersRecordPoolSize = stringFields * stringHolderSize; + std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*); if (stringFields) { - size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * result->GetRowCount(); + std::size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * result->GetRowCount(); stringHolders = new char[stringHoldersPoolSize]; // DB2 strings expected to have at least empty string - for (size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i) + for (std::size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i) ((char const**)stringHolders)[i] = nullStr; } else @@ -608,15 +534,9 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa // Resize index table // database query *MUST* contain ORDER BY `index_field` DESC clause - uint32 indexTableSize; - if (indexField >= 0) - { - indexTableSize = (*result)[indexField].GetUInt32() + 1; - if (indexTableSize < records) - indexTableSize = records; - } - else - indexTableSize = records + result->GetRowCount(); + uint32 indexTableSize = (*result)[indexField].GetUInt32() + 1; + if (indexTableSize < records) + indexTableSize = records; if (indexTableSize > records) { @@ -636,13 +556,9 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa { Field* fields = result->Fetch(); uint32 offset = 0; - uint32 stringFieldNumInRecord = 0; + uint32 stringFieldOffset = 0; - uint32 indexValue; - if (indexField >= 0) - indexValue = fields[indexField].GetUInt32(); - else - indexValue = records + rec; + uint32 indexValue = fields[indexField].GetUInt32(); // Attempt to overwrite existing data char* dataValue = indexTable[indexValue]; @@ -652,63 +568,69 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa dataValue = &tempDataTable[newRecords++ * recordSize]; } - for (uint32 f = 0; f < fieldCount; f++) + uint32 f = 0; + if (!_meta->HasIndexFieldInData()) + { + *((uint32*)(&dataValue[offset])) = indexValue; + offset += 4; + ++f; + } + + for (uint32 x = 0; x < _meta->FieldCount; ++x) { - switch (format[f]) + for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - *((float*)(&dataValue[offset])) = fields[f].GetFloat(); - offset += 4; - break; - case FT_IND: - case FT_INT: - *((int32*)(&dataValue[offset])) = fields[f].GetInt32(); - offset += 4; - break; - case FT_BYTE: - *((int8*)(&dataValue[offset])) = fields[f].GetInt8(); - offset += 1; - break; - case FT_LONG: - *((int64*)(&dataValue[offset])) = fields[f].GetInt64(); - offset += 8; - break; - case FT_SHORT: - *((int16*)(&dataValue[offset])) = fields[f].GetInt16(); - offset += 2; - break; - case FT_STRING: + switch (_meta->Types[x]) { - LocalizedString** slot = (LocalizedString**)(&dataValue[offset]); - *slot = (LocalizedString*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringHolderSize * stringFieldNumInRecord]); - ASSERT(*slot); + case FT_FLOAT: + *((float*)(&dataValue[offset])) = fields[f].GetFloat(); + offset += 4; + break; + case FT_INT: + *((int32*)(&dataValue[offset])) = fields[f].GetInt32(); + offset += 4; + break; + case FT_BYTE: + *((int8*)(&dataValue[offset])) = fields[f].GetInt8(); + offset += 1; + break; + case FT_SHORT: + *((int16*)(&dataValue[offset])) = fields[f].GetInt16(); + offset += 2; + break; + case FT_STRING: + { + LocalizedString** slot = (LocalizedString**)(&dataValue[offset]); + *slot = (LocalizedString*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); + ASSERT(*slot); - // Value in database in main table field must be for enUS locale - if (char* str = AddString(&(*slot)->Str[LOCALE_enUS], fields[f].GetString())) - stringPool.push_back(str); + // Value in database in main table field must be for enUS locale + if (char* str = AddString(&(*slot)->Str[LOCALE_enUS], fields[f].GetString())) + stringPool.push_back(str); - ++stringFieldNumInRecord; - offset += sizeof(char*); - break; - } - case FT_STRING_NOT_LOCALIZED: - { - char const** slot = (char const**)(&dataValue[offset]); - *slot = (char*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringHolderSize * stringFieldNumInRecord]); - ASSERT(*slot); + stringFieldOffset += sizeof(LocalizedString); + offset += sizeof(char*); + break; + } + case FT_STRING_NOT_LOCALIZED: + { + char const** slot = (char const**)(&dataValue[offset]); + *slot = (char*)(&stringHolders[stringHoldersRecordPoolSize * rec + stringFieldOffset]); + ASSERT(*slot); - // Value in database in main table field must be for enUS locale - if (char* str = AddString(slot, fields[f].GetString())) - stringPool.push_back(str); + // Value in database in main table field must be for enUS locale + if (char* str = AddString(slot, fields[f].GetString())) + stringPool.push_back(str); - ++stringFieldNumInRecord; - offset += sizeof(char*); - break; + stringFieldOffset += sizeof(char*); + offset += sizeof(char*); + break; + } + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str()); + break; } - case FT_SORT: - *((int32*)(&dataValue[offset])) = indexValue; - offset += 4; - break; + ++f; } } @@ -739,7 +661,7 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa return dataTable; } -void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements preparedStatement, uint32 locale, char**& indexTable, std::vector& stringPool) +void DB2DatabaseLoader::LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, uint32 records, char** indexTable, std::vector& stringPool) { PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(preparedStatement); stmt->setString(0, localeNames[locale]); @@ -747,14 +669,12 @@ void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements if (!result) return; - size_t stringFields = DB2FileLoader::GetFormatLocalizedStringFieldCount(format); + std::size_t stringFields = _meta->GetStringFieldCount(true); if (result->GetFieldCount() != stringFields + 1 /*ID*/) return; - uint32 const fieldCount = strlen(format); - int32 indexField; - uint32 recordSize = DB2FileLoader::GetFormatRecordSize(format, &indexField); - ASSERT(indexField >= 0, "DB2Storage must be indexed to load localized strings"); + uint32 fieldCount = _meta->FieldCount; + uint32 recordSize = _meta->GetRecordSize(); do { @@ -763,39 +683,49 @@ void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements uint32 stringFieldNumInRecord = 0; uint32 indexValue = fields[0].GetUInt32(); + if (indexValue >= records) + continue; + // Attempt to overwrite existing data if (char* dataValue = indexTable[indexValue]) { - for (uint32 x = 0; x < fieldCount; x++) + if (!_meta->HasIndexFieldInData()) + offset += 4; + + for (uint32 x = 0; x < fieldCount; ++x) { - switch (format[x]) + for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z) { - case FT_FLOAT: - case FT_IND: - case FT_INT: - case FT_SORT: - offset += 4; - break; - case FT_BYTE: - offset += 1; - break; - case FT_LONG: - offset += 8; - break; - case FT_SHORT: - offset += 2; - break; - case FT_STRING: + switch (_meta->Types[x]) { - // fill only not filled entries - LocalizedString* db2str = *(LocalizedString**)(&dataValue[offset]); - if (db2str->Str[locale] == nullStr) - if (char* str = AddString(&db2str->Str[locale], fields[1 + stringFieldNumInRecord].GetString())) - stringPool.push_back(str); - - ++stringFieldNumInRecord; - offset += sizeof(char*); - break; + case FT_FLOAT: + case FT_INT: + offset += 4; + break; + case FT_BYTE: + offset += 1; + break; + case FT_SHORT: + offset += 2; + break; + case FT_STRING: + { + // fill only not filled entries + LocalizedString* db2str = *(LocalizedString**)(&dataValue[offset]); + if (db2str->Str[locale] == nullStr) + if (char* str = AddString(&db2str->Str[locale], fields[1 + stringFieldNumInRecord].GetString())) + stringPool.push_back(str); + + ++stringFieldNumInRecord; + offset += sizeof(LocalizedString*); + break; + } + case FT_STRING_NOT_LOCALIZED: + offset += sizeof(char*); + break; + default: + ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str()); + break; } } } @@ -803,7 +733,7 @@ void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements ASSERT(offset == recordSize); } else - TC_LOG_ERROR("sql.sql", "Hotfix locale table for storage %s references row that does not exist %u!", _storageName.c_str(), indexValue); + TC_LOG_ERROR("sql.sql", "Hotfix locale table for storage %s references row that does not exist %u locale %s!", _storageName.c_str(), indexValue, localeNames[locale]); } while (result->NextRow()); diff --git a/src/server/shared/DataStores/DB2StorageLoader.h b/src/server/shared/DataStores/DB2StorageLoader.h index c84f38b74b9..b302a1afe7d 100644 --- a/src/server/shared/DataStores/DB2StorageLoader.h +++ b/src/server/shared/DataStores/DB2StorageLoader.h @@ -18,10 +18,10 @@ #ifndef DB2_FILE_LOADER_H #define DB2_FILE_LOADER_H -#include "Define.h" +#include "DB2Meta.h" #include "Utilities/ByteConverter.h" #include "Implementation/HotfixDatabase.h" -#include +#include "Errors.h" #include class TC_SHARED_API DB2FileLoader @@ -30,53 +30,101 @@ class TC_SHARED_API DB2FileLoader DB2FileLoader(); ~DB2FileLoader(); - bool Load(const char *filename, const char *fmt); + bool Load(char const* filename, DB2Meta const* meta); class Record { public: - float getFloat(size_t field) const + float getFloat(uint32 field, uint32 arrayIndex) const { - assert(field < file.fieldCount); - float val = *reinterpret_cast(offset + file.GetOffset(field)); + ASSERT(field < file.fieldCount); + float val = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(float)); EndianConvert(val); return val; } - uint32 getUInt(size_t field) const - { - assert(field < file.fieldCount); - uint32 val = *reinterpret_cast(offset + file.GetOffset(field)); - EndianConvert(val); - return val; - } - uint8 getUInt8(size_t field) const + + uint32 getUInt(uint32 field, uint32 arrayIndex) const { - assert(field < file.fieldCount); - return *reinterpret_cast(offset + file.GetOffset(field)); + ASSERT(field < file.fieldCount); + return GetVarInt(field, GetByteSize(field), arrayIndex); } - uint64 getUInt64(size_t field) const + + uint8 getUInt8(uint32 field, uint32 arrayIndex) const { - assert(field < file.fieldCount); - uint64 val = *reinterpret_cast(offset + file.GetOffset(field)); - EndianConvert(val); - return val; + ASSERT(field < file.fieldCount); + ASSERT(GetByteSize(field) == 1); + return *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint8)); } - uint16 getUInt16(size_t field) const + + uint16 getUInt16(uint32 field, uint32 arrayIndex) const { - assert(field < file.fieldCount); - uint16 val = *reinterpret_cast(offset + file.GetOffset(field)); + ASSERT(field < file.fieldCount); + ASSERT(GetByteSize(field) == 2); + uint16 val = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint16)); EndianConvert(val); return val; } - const char *getString(size_t field) const + + char const* getString(uint32 field, uint32 arrayIndex) const { - assert(field < file.fieldCount); - size_t stringOffset = getUInt(field); - assert(stringOffset < file.stringSize); + ASSERT(field < file.fieldCount); + uint32 stringOffset = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint32)); + EndianConvert(stringOffset); + ASSERT(stringOffset < file.stringSize); return reinterpret_cast(file.stringTable + stringOffset); } private: + uint16 GetOffset(uint32 field) const + { + ASSERT(field < file.fieldCount); + return file.fields[field].Offset; + } + + uint16 GetByteSize(uint32 field) const + { + ASSERT(field < file.fieldCount); + return 4 - file.fields[field].UnusedBits / 8; + } + + uint32 GetVarInt(uint32 field, uint16 size, uint32 arrayIndex) const + { + ASSERT(field < file.fieldCount); + switch (size) + { + case 1: + { + return *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint8)); + } + case 2: + { + uint16 val = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint16)); + EndianConvert(val); + return val; + } + case 3: + { +#pragma pack(push, 1) + struct dbcint24 { uint8 v[3]; }; +#pragma pack(pop) + dbcint24 val = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(dbcint24)); + EndianConvert(val); + return uint32(val.v[0]) | (uint32(val.v[1]) << 8) | (uint32(val.v[2]) << 16); + } + case 4: + { + uint32 val = *reinterpret_cast(offset + GetOffset(field) + arrayIndex * sizeof(uint32)); + EndianConvert(val); + return val; + } + default: + break; + } + + ASSERT(false, "GetByteSize(field) < 4"); + return 0; + } + Record(DB2FileLoader &file_, unsigned char *offset_): offset(offset_), file(file_) {} unsigned char *offset; DB2FileLoader &file; @@ -86,22 +134,28 @@ class TC_SHARED_API DB2FileLoader // Get record by id Record getRecord(size_t id); - /// Get begin iterator over records uint32 GetNumRows() const { return recordCount;} uint32 GetCols() const { return fieldCount; } - uint32 GetOffset(size_t id) const { return (fieldsOffset != NULL && id < fieldCount) ? fieldsOffset[id] : 0; } - uint32 GetHash() const { return tableHash; } - uint32 GetBuild() const { return build; } + uint32 GetTableHash() const { return tableHash; } + uint32 GetLayoutHash() const { return layoutHash; } bool IsLoaded() const { return (data != NULL); } - char* AutoProduceData(const char* fmt, uint32& count, char**& indexTable); - char* AutoProduceStringsArrayHolders(const char* fmt, char* dataTable); - char* AutoProduceStrings(const char* fmt, char* dataTable, uint32 locale); - static uint32 GetFormatRecordSize(const char * format, int32 * index_pos = NULL); - static uint32 GetFormatStringFieldCount(const char * format); - static uint32 GetFormatLocalizedStringFieldCount(const char * format); + char* AutoProduceData(uint32& count, char**& indexTable); + char* AutoProduceStringsArrayHolders(char* dataTable); + char* AutoProduceStrings(char* dataTable, uint32 locale); + void AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable); + private: +#pragma pack(push, 1) + struct FieldEntry + { + uint16 UnusedBits; + uint16 Offset; + }; +#pragma pack(pop) + char const* fileName; + DB2Meta const* meta; // WDB2 / WCH2 fields uint32 recordSize; @@ -109,33 +163,33 @@ private: uint32 fieldCount; uint32 stringSize; uint32 tableHash; - uint32 build; - uint32 unk1; + uint32 layoutHash; uint32 minIndex; uint32 maxIndex; uint32 localeMask; uint32 copyIdSize; uint32 metaFlags; - uint32 *fieldsOffset; unsigned char* data; unsigned char* stringTable; unsigned char* idTable; uint32 idTableSize; unsigned char* copyTable; + FieldEntry* fields; }; class TC_SHARED_API DB2DatabaseLoader { public: - explicit DB2DatabaseLoader(std::string const& storageName) : _storageName(storageName) { } + DB2DatabaseLoader(std::string const& storageName, DB2Meta const* meta) : _storageName(storageName), _meta(meta) { } - char* Load(const char* format, HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector& stringPool); - void LoadStrings(const char* format, HotfixDatabaseStatements preparedStatement, uint32 locale, char**& indexTable, std::vector& stringPool); + char* Load(HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector& stringPool); + void LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, uint32 records, char** indexTable, std::vector& stringPool); static char* AddString(char const** holder, std::string const& value); private: std::string _storageName; + DB2Meta const* _meta; }; #endif diff --git a/src/server/shared/DataStores/DB2Store.h b/src/server/shared/DataStores/DB2Store.h index e1c05cfbbe7..e673b8a6a97 100644 --- a/src/server/shared/DataStores/DB2Store.h +++ b/src/server/shared/DataStores/DB2Store.h @@ -28,8 +28,8 @@ class DB2StorageBase { public: - DB2StorageBase(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) - : _tableHash(0), _build(0), _fileName(fileName), _fieldCount(0), _format(format), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex) { } + DB2StorageBase(char const* fileName, DB2Meta const* meta, HotfixDatabaseStatements preparedStmtIndex) + : _tableHash(0), _layoutHash(0), _fileName(fileName), _fieldCount(0), _meta(meta), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex) { } virtual ~DB2StorageBase() { @@ -39,9 +39,9 @@ public: delete[] strings; } - uint32 GetHash() const { return _tableHash; } + uint32 GetTableHash() const { return _tableHash; } - uint32 GetBuild() const { return _build; } + uint32 GetLayoutHash() const { return _layoutHash; } virtual bool HasRecord(uint32 id) const = 0; @@ -53,7 +53,7 @@ public: uint32 GetFieldCount() const { return _fieldCount; } - char const* GetFormat() const { return _format; } + DB2Meta const* GetMeta() const { return _meta; } virtual bool Load(std::string const& path, uint32 locale) = 0; virtual bool LoadStringsFrom(std::string const& path, uint32 locale) = 0; @@ -63,63 +63,67 @@ public: protected: void WriteRecordData(char const* entry, uint32 locale, ByteBuffer& buffer) const { - std::size_t fields = strlen(_format); - for (uint32 i = 0; i < fields; ++i) + if (!_meta->HasIndexFieldInData()) + entry += 4; + + for (uint32 i = 0; i < _meta->FieldCount; ++i) { - switch (_format[i]) + for (uint32 a = 0; a < _meta->ArraySizes[i]; ++a) { - case FT_IND: - case FT_INT: - buffer << *(uint32*)entry; - entry += 4; - break; - case FT_FLOAT: - buffer << *(float*)entry; - entry += 4; - break; - case FT_BYTE: - buffer << *(uint8*)entry; - entry += 1; - break; - case FT_STRING: + switch (_meta->Types[i]) { - LocalizedString* locStr = *(LocalizedString**)entry; - if (locStr->Str[locale][0] == '\0') - locale = 0; - - char const* str = locStr->Str[locale]; - std::size_t len = strlen(str); - buffer << uint16(len ? len + 1 : 0); - if (len) + case FT_INT: + buffer << *(uint32*)entry; + entry += 4; + break; + case FT_FLOAT: + buffer << *(float*)entry; + entry += 4; + break; + case FT_BYTE: + buffer << *(uint8*)entry; + entry += 1; + break; + case FT_STRING: { - buffer.append(str, len); - buffer << uint8(0); + LocalizedString* locStr = *(LocalizedString**)entry; + if (locStr->Str[locale][0] == '\0') + locale = 0; + + char const* str = locStr->Str[locale]; + std::size_t len = strlen(str); + buffer << uint16(len ? len + 1 : 0); + if (len) + { + buffer.append(str, len); + buffer << uint8(0); + } + entry += sizeof(LocalizedString*); + break; } - entry += sizeof(LocalizedString*); - break; - } - case FT_STRING_NOT_LOCALIZED: - { - char const* str = *(char const**)entry; - std::size_t len = strlen(str); - buffer << uint16(len ? len + 1 : 0); - if (len) + case FT_STRING_NOT_LOCALIZED: { - buffer.append(str, len); - buffer << uint8(0); + char const* str = *(char const**)entry; + std::size_t len = strlen(str); + buffer << uint16(len ? len + 1 : 0); + if (len) + { + buffer.append(str, len); + buffer << uint8(0); + } + entry += sizeof(char const*); + break; } - entry += sizeof(char const*); - break; } } } } uint32 _tableHash; - uint32 _build; + uint32 _layoutHash; std::string _fileName; uint32 _fieldCount; - char const* _format; + DB2Meta const* _meta; char* _dataTable; char* _dataTableEx; std::vector _stringPool; @@ -134,7 +138,7 @@ class DB2Storage : public DB2StorageBase public: typedef DBStorageIterator iterator; - DB2Storage(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) : DB2StorageBase(fileName, format, preparedStmtIndex), + DB2Storage(char const* fileName, DB2Meta const* meta, HotfixDatabaseStatements preparedStmtIndex) : DB2StorageBase(fileName, meta, preparedStmtIndex), _indexTableSize(0) { _indexTable.AsT = NULL; @@ -161,26 +165,28 @@ public: { DB2FileLoader db2; // Check if load was successful, only then continue - if (!db2.Load((path + _fileName).c_str(), _format)) + if (!db2.Load((path + _fileName).c_str(), _meta)) return false; _fieldCount = db2.GetCols(); - _tableHash = db2.GetHash(); - _build = db2.GetBuild(); + _tableHash = db2.GetTableHash(); + _layoutHash = db2.GetLayoutHash(); // load raw non-string data - _dataTable = db2.AutoProduceData(_format, _indexTableSize, _indexTable.AsChar); + _dataTable = db2.AutoProduceData(_indexTableSize, _indexTable.AsChar); // create string holders for loaded string fields - if (char* stringHolders = db2.AutoProduceStringsArrayHolders(_format, _dataTable)) + if (char* stringHolders = db2.AutoProduceStringsArrayHolders(_dataTable)) { _stringPool.push_back(stringHolders); // load strings from db2 data - if (char* stringBlock = db2.AutoProduceStrings(_format, _dataTable, locale)) + if (char* stringBlock = db2.AutoProduceStrings(_dataTable, locale)) _stringPool.push_back(stringBlock); } + db2.AutoProduceRecordCopies(_indexTableSize, _indexTable.AsChar, _dataTable); + // error in db2 file at loading if NULL return _indexTable.AsT != NULL; } @@ -193,12 +199,12 @@ public: DB2FileLoader db2; // Check if load was successful, only then continue - if (!db2.Load((path + _fileName).c_str(), _format)) + if (!db2.Load((path + _fileName).c_str(), _meta)) return false; // load strings from another locale db2 data - if (DB2FileLoader::GetFormatLocalizedStringFieldCount(_format)) - if (char* stringBlock = db2.AutoProduceStrings(_format, _dataTable, locale)) + if (_meta->GetStringFieldCount(true)) + if (char* stringBlock = db2.AutoProduceStrings(_dataTable, locale)) _stringPool.push_back(stringBlock); return true; } @@ -206,17 +212,17 @@ public: void LoadFromDB() override { char* extraStringHolders = nullptr; - _dataTableEx = DB2DatabaseLoader(_fileName).Load(_format, _hotfixStatement, _indexTableSize, _indexTable.AsChar, extraStringHolders, _stringPool); + _dataTableEx = DB2DatabaseLoader(_fileName, _meta).Load(_hotfixStatement, _indexTableSize, _indexTable.AsChar, extraStringHolders, _stringPool); if (extraStringHolders) _stringPool.push_back(extraStringHolders); } void LoadStringsFromDB(uint32 locale) override { - if (!DB2FileLoader::GetFormatLocalizedStringFieldCount(_format)) + if (!_meta->GetStringFieldCount(true)) return; - DB2DatabaseLoader(_fileName).LoadStrings(_format, HotfixDatabaseStatements(_hotfixStatement + 1), locale, _indexTable.AsChar, _stringPool); + DB2DatabaseLoader(_fileName, _meta).LoadStrings(HotfixDatabaseStatements(_hotfixStatement + 1), locale, _indexTableSize, _indexTable.AsChar, _stringPool); } iterator begin() { return iterator(_indexTable.AsT, _indexTableSize); } @@ -249,8 +255,8 @@ public: T const* operator*() const { return Base::operator*().second; } } iterator; - DB2SparseStorage(char const* fileName, char const* format, HotfixDatabaseStatements preparedStmtIndex) - : DB2StorageBase(fileName, format, preparedStmtIndex) + DB2SparseStorage(char const* fileName, DB2Meta const* meta, HotfixDatabaseStatements preparedStmtIndex) + : DB2StorageBase(fileName, meta, preparedStmtIndex) { } @@ -282,15 +288,15 @@ public: { DB2SparseFileLoader db2; // Check if load was successful, only then continue - if (!db2.Load((path + _fileName).c_str())) + if (!db2.Load((path + _fileName).c_str(), _meta)) return false; _fieldCount = db2.GetCols(); - _tableHash = db2.GetHash(); - _build = db2.GetBuild(); + _tableHash = db2.GetTableHash(); + _layoutHash = db2.GetLayoutHash(); // load raw non-string data - _dataTable = db2.AutoProduceData(_format, IndexTableAdapter(_indexTable), locale, _stringPool); + _dataTable = db2.AutoProduceData(IndexTableAdapter(_indexTable), locale, _stringPool); // error in db2 file at loading if NULL return !_indexTable.empty(); @@ -304,27 +310,27 @@ public: DB2SparseFileLoader db2; // Check if load was successful, only then continue - if (!db2.Load((path + _fileName).c_str())) + if (!db2.Load((path + _fileName).c_str(), _meta)) return false; // load strings from another locale db2 data - if (DB2SparseFileLoader::GetFormatLocalizedStringFieldCount(_format)) - if (char* stringBlock = db2.AutoProduceStrings(_format, _dataTable, locale)) + if (_meta->GetStringFieldCount(true)) + if (char* stringBlock = db2.AutoProduceStrings(_dataTable, locale)) _stringPool.push_back(stringBlock); return true; } void LoadFromDB() override { - _dataTableEx = DB2SparseDatabaseLoader(_fileName).Load(_format, _hotfixStatement, IndexTableAdapter(_indexTable), _stringPool); + _dataTableEx = DB2SparseDatabaseLoader(_fileName, _meta).Load(_hotfixStatement, IndexTableAdapter(_indexTable), _stringPool); } void LoadStringsFromDB(uint32 locale) override { - if (!DB2SparseFileLoader::GetFormatLocalizedStringFieldCount(_format)) + if (!_meta->GetStringFieldCount(true)) return; - DB2SparseDatabaseLoader(_fileName).LoadStrings(_format, HotfixDatabaseStatements(_hotfixStatement + 1), locale, IndexTableAdapter(_indexTable), _stringPool); + DB2SparseDatabaseLoader(_fileName, _meta).LoadStrings(HotfixDatabaseStatements(_hotfixStatement + 1), locale, IndexTableAdapter(_indexTable), _stringPool); } iterator begin() const { return iterator(_indexTable.begin()); } diff --git a/src/tools/connection_patcher/Patterns/Windows.hpp b/src/tools/connection_patcher/Patterns/Windows.hpp index 5b2de204a7b..239d2a19b36 100644 --- a/src/tools/connection_patcher/Patterns/Windows.hpp +++ b/src/tools/connection_patcher/Patterns/Windows.hpp @@ -29,8 +29,8 @@ namespace Connection_Patcher { struct x86 { - static const std::vector CertBundleCASCLocalFile() { return{ 0x6A, 0x00, 0x8D, 0x45, 0xFC, 0x50, 0x8D, 0x45, 0xF8, 0x50, 0x68 }; } - static const std::vector CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0x75, 0x08, 0x47, 0x83, 0xFF, 0x02 }; } + static const std::vector CertBundleCASCLocalFile() { return{ 0x6A, 0x00, 0x50, 0x8D, 0x45, 0xF8, 0x50, 0x68 }; } + static const std::vector CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0x75, 0x08, 0x46, 0x83, 0xFE, 0x02 }; } }; struct x64 -- cgit v1.2.3 From c95f4a507021bc2623f512f456fafe303f2c4766 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 30 May 2016 23:49:35 +0200 Subject: Core/GameObjects: Updated GameObjectTemplate to 7.0.3.21796 --- src/server/game/Entities/Creature/Creature.cpp | 2 +- src/server/game/Entities/GameObject/GameObject.h | 76 +++++++++++++++++----- src/server/game/Entities/Transport/Transport.cpp | 2 +- src/server/game/Garrison/Garrison.cpp | 4 +- src/server/game/Globals/ObjectMgr.cpp | 4 +- src/server/scripts/Commands/cs_misc.cpp | 2 +- src/server/scripts/Commands/cs_npc.cpp | 2 +- .../IcecrownCitadel/instance_icecrown_citadel.cpp | 4 +- 8 files changed, 70 insertions(+), 26 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 553b4f0babc..679238ecb17 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1054,7 +1054,7 @@ void Creature::SaveToDB() return; } - uint32 mapId = GetTransport() ? GetTransport()->GetGOInfo()->moTransport.mapID : GetMapId(); + uint32 mapId = GetTransport() ? GetTransport()->GetGOInfo()->moTransport.SpawnMap : GetMapId(); SaveToDB(mapId, data->spawnMask, GetPhaseMask()); } diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index ada26800505..b52dbed8994 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -57,7 +57,7 @@ struct GameObjectTemplate uint32 closeTextID; // 5 closeTextID, References: BroadcastText, NoValue = 0 uint32 IgnoredByPathing; // 6 Ignored By Pathing, enum { false, true, }; Default: false uint32 conditionID1; // 7 conditionID1, References: PlayerCondition, NoValue = 0 - uint32 EnablePortalsonopen; // 8 Enable Portals on open, enum { false, true, }; Default: false + uint32 DoorisOpaque; // 8 Door is Opaque (Disable portal on close), enum { false, true, }; Default: true uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false uint32 InfiniteAOI; // 10 Infinite AOI, enum { false, true, }; Default: false } door; @@ -112,9 +112,9 @@ struct GameObjectTemplate uint32 usegrouplootrules; // 15 use group loot rules, enum { false, true, }; Default: false uint32 floatingTooltip; // 16 floatingTooltip, enum { false, true, }; Default: false uint32 conditionID1; // 17 conditionID1, References: PlayerCondition, NoValue = 0 - int32 xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 100, Default value: 0 - uint32 xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, Placeholder2, }; Default: No Exp - uint32 lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 100, Default value: 0 + int32 xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 123, Default value: 0 + uint32 xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp + uint32 lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 123, Default value: 0 uint32 GroupXP; // 21 Group XP, enum { false, true, }; Default: false uint32 DamageImmuneOK; // 22 Damage Immune OK, enum { false, true, }; Default: false uint32 trivialSkillLow; // 23 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0 @@ -222,7 +222,7 @@ struct GameObjectTemplate uint32 allowMounted; // 17 allowMounted, enum { false, true, }; Default: false uint32 floatingTooltip; // 18 floatingTooltip, enum { false, true, }; Default: false uint32 gossipID; // 19 gossipID, References: Gossip, NoValue = 0 - uint32 WorldStateSetsState; // 20 WorldStateSetsState, enum { false, true, }; Default: false + uint32 AllowMultiInteract; // 20 Allow Multi-Interact, enum { false, true, }; Default: false uint32 floatOnWater; // 21 floatOnWater, enum { false, true, }; Default: false uint32 conditionID1; // 22 conditionID1, References: PlayerCondition, NoValue = 0 uint32 playerCast; // 23 playerCast, enum { false, true, }; Default: false @@ -242,7 +242,7 @@ struct GameObjectTemplate uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0 uint32 Reached1stfloor; // 3 Reached 1st floor, References: GameEvents, NoValue = 0 uint32 Reached2ndfloor; // 4 Reached 2nd floor, References: GameEvents, NoValue = 0 - int32 mapID; // 5 mapID, References: Map, NoValue = -1 + int32 SpawnMap; // 5 Spawn Map, References: Map, NoValue = -1 uint32 Timeto3rdfloor; // 6 Time to 3rd floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0 uint32 Reached3rdfloor; // 7 Reached 3rd floor, References: GameEvents, NoValue = 0 uint32 Timeto4thfloor; // 8 Time to 4th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0 @@ -296,7 +296,7 @@ struct GameObjectTemplate uint32 startEventID; // 3 startEventID, References: GameEvents, NoValue = 0 uint32 stopEventID; // 4 stopEventID, References: GameEvents, NoValue = 0 uint32 transportPhysics; // 5 transportPhysics, References: TransportPhysics, NoValue = 0 - int32 mapID; // 6 mapID, References: Map, NoValue = -1 + int32 SpawnMap; // 6 Spawn Map, References: Map, NoValue = -1 uint32 worldState1; // 7 worldState1, References: WorldState, NoValue = 0 uint32 allowstopping; // 8 allow stopping, enum { false, true, }; Default: false uint32 InitStopped; // 9 Init Stopped, enum { false, true, }; Default: false @@ -534,13 +534,13 @@ struct GameObjectTemplate // 38 GAMEOBJECT_TYPE_GARRISON_BUILDING struct { - int32 mapID; // 0 mapID, References: Map, NoValue = -1 + int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1 } garrisonBuilding; // 39 GAMEOBJECT_TYPE_GARRISON_PLOT struct { uint32 PlotInstance; // 0 Plot Instance, References: GarrPlotInstance, NoValue = 0 - int32 mapID; // 1 mapID, References: Map, NoValue = -1 + int32 SpawnMap; // 1 Spawn Map, References: Map, NoValue = -1 } garrisonPlot; // 40 GAMEOBJECT_TYPE_CLIENT_CREATURE struct @@ -583,10 +583,10 @@ struct GameObjectTemplate // 43 GAMEOBJECT_TYPE_PHASEABLE_MO struct { - int32 mapID; // 0 mapID, References: Map, NoValue = -1 - int32 namedset; // 1 named set (Area Names), int, Min value: -2147483648, Max value: 2147483647, Default value: 0 - uint32 Primarydoodadset; // 2 Primary doodad set, int, Min value: -2147483648, Max value: 2147483647, Default value: 0 - uint32 Secondarydoodadset; // 3 Secondary doodad set, int, Min value: -2147483648, Max value: 2147483647, Default value: 0 + int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1 + uint32 AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0 + uint32 DoodadSetA; // 2 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0 + uint32 DoodadSetB; // 3 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0 } phaseableMO; // 44 GAMEOBJECT_TYPE_GARRISON_MONUMENT struct @@ -606,15 +606,59 @@ struct GameObjectTemplate { uint32 TrophyInstanceID; // 0 Trophy Instance ID, References: TrophyInstance, NoValue = 0 } garrisonMonumentPlaque; - // 47 GAMEOBJECT_TYPE_DO_NOT_USE_3 + // 47 GAMEOBJECT_TYPE_ARTIFACT_FORGE struct { - } DONOTUSE3; + uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0 + uint32 LargeAOI; // 1 Large AOI, enum { false, true, }; Default: false + uint32 IgnoreBoundingBox; // 2 Ignore Bounding Box, enum { false, true, }; Default: false + uint32 CameraMode; // 3 Camera Mode, References: CameraMode, NoValue = 0 + uint32 FadeRegionRadius; // 4 Fade Region Radius, int, Min value: 0, Max value: 2147483647, Default value: 0 + } artifactForge; // 48 GAMEOBJECT_TYPE_UI_LINK struct { - uint32 UILinkType; // 0 UI Link Type, Type id: 10 + uint32 UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, }; Default: Adventure Journal + uint32 allowMounted; // 1 allowMounted, enum { false, true, }; Default: false + uint32 GiganticAOI; // 2 Gigantic AOI, enum { false, true, }; Default: false + uint32 spellFocusType; // 3 spellFocusType, References: SpellFocusObject, NoValue = 0 + uint32 radius; // 4 radius, int, Min value: 0, Max value: 50, Default value: 10 } UILink; + // 49 GAMEOBJECT_TYPE_KEYSTONE_RECEPTACLE + struct + { + } KeystoneReceptacle; + // 50 GAMEOBJECT_TYPE_GATHERING_NODE + struct + { + uint32 open; // 0 open, References: Lock_, NoValue = 0 + uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0 + uint32 level; // 2 level, int, Min value: 0, Max value: 65535, Default value: 0 + uint32 notInCombat; // 3 notInCombat, enum { false, true, }; Default: false + uint32 trivialSkillLow; // 4 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0 + uint32 trivialSkillHigh; // 5 trivialSkillHigh, int, Min value: 0, Max value: 65535, Default value: 0 + uint32 ObjectDespawnDelay; // 6 Object Despawn Delay, int, Min value: 0, Max value: 600, Default value: 15 + uint32 triggeredEvent; // 7 triggeredEvent, References: GameEvents, NoValue = 0 + uint32 requireLOS; // 8 require LOS, enum { false, true, }; Default: false + uint32 openTextID; // 9 openTextID, References: BroadcastText, NoValue = 0 + uint32 floatingTooltip; // 10 floatingTooltip, enum { false, true, }; Default: false + uint32 conditionID1; // 11 conditionID1, References: PlayerCondition, NoValue = 0 + uint32 xpLevel; // 12 xpLevel, int, Min value: -1, Max value: 123, Default value: 0 + uint32 xpDifficulty; // 13 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp + uint32 spell; // 14 spell, References: Spell, NoValue = 0 + uint32 GiganticAOI; // 15 Gigantic AOI, enum { false, true, }; Default: false + uint32 LargeAOI; // 16 Large AOI, enum { false, true, }; Default: false + uint32 SpawnVignette; // 17 Spawn Vignette, References: vignette, NoValue = 0 + uint32 MaxNumberofLoots; // 18 Max Number of Loots, int, Min value: 1, Max value: 40, Default value: 10 + uint32 logloot; // 19 log loot, enum { false, true, }; Default: false + uint32 linkedTrap; // 20 linkedTrap, References: GameObjects, NoValue = 0 + } gatheringNode; + // 51 GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD + struct + { + uint32 chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0 + uint32 WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0 + } challengeModeReward; struct { uint32 data[MAX_GAMEOBJECT_DATA]; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 58a9b68e0e5..ca89c6bc055 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -525,7 +525,7 @@ void Transport::UpdatePosition(float x, float y, float z, float o) void Transport::LoadStaticPassengers() { - if (uint32 mapId = GetGOInfo()->moTransport.mapID) + if (uint32 mapId = GetGOInfo()->moTransport.SpawnMap) { CellObjectGuidsMap const& cells = sObjectMgr->GetMapObjectGuids(mapId, GetMap()->GetSpawnMode()); CellGuidSet::const_iterator guidEnd; diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp index 2789978a7fe..468648da78c 100644 --- a/src/server/game/Garrison/Garrison.cpp +++ b/src/server/game/Garrison/Garrison.cpp @@ -745,9 +745,9 @@ GameObject* Garrison::Plot::CreateGameObject(Map* map, GarrisonFactionIndex fact } } - if (building->GetGoType() == GAMEOBJECT_TYPE_GARRISON_BUILDING && building->GetGOInfo()->garrisonBuilding.mapID) + if (building->GetGoType() == GAMEOBJECT_TYPE_GARRISON_BUILDING && building->GetGOInfo()->garrisonBuilding.SpawnMap) { - for (CellObjectGuidsMap::value_type const& cellGuids : sObjectMgr->GetMapObjectGuids(building->GetGOInfo()->garrisonBuilding.mapID, map->GetSpawnMode())) + for (CellObjectGuidsMap::value_type const& cellGuids : sObjectMgr->GetMapObjectGuids(building->GetGOInfo()->garrisonBuilding.SpawnMap, map->GetSpawnMode())) { for (ObjectGuid::LowType spawnId : cellGuids.second.creatures) if (Creature* spawn = BuildingSpawnHelper(building, spawnId, map)) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5f7039b4b10..60035178292 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6729,7 +6729,7 @@ void ObjectMgr::LoadGameObjectTemplate() TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.", entry, got.type, got.moTransport.taxiPathID, got.moTransport.taxiPathID); } - if (uint32 transportMap = got.moTransport.mapID) + if (uint32 transportMap = got.moTransport.SpawnMap) _transportMaps.insert(transportMap); break; } @@ -6772,7 +6772,7 @@ void ObjectMgr::LoadGameObjectTemplate() } break; case GAMEOBJECT_TYPE_GARRISON_BUILDING: - if (uint32 transportMap = got.garrisonBuilding.mapID) + if (uint32 transportMap = got.garrisonBuilding.SpawnMap) _transportMaps.insert(transportMap); break; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 236197b84c9..dd36281cb72 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -242,7 +242,7 @@ public: object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation()); if (Transport* transport = object->GetTransport()) handler->PSendSysMessage(LANG_TRANSPORT_POSITION, - transport->GetGOInfo()->moTransport.mapID, object->GetTransOffsetX(), object->GetTransOffsetY(), object->GetTransOffsetZ(), object->GetTransOffsetO(), + transport->GetGOInfo()->moTransport.SpawnMap, object->GetTransOffsetX(), object->GetTransOffsetY(), object->GetTransOffsetZ(), object->GetTransOffsetO(), transport->GetEntry(), transport->GetName().c_str()); handler->PSendSysMessage(LANG_GRID_POSITION, cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(), diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index d9d54353246..5fd9ff8028a 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -268,7 +268,7 @@ public: Creature* creature = trans->CreateNPCPassenger(guid, &data); - creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMask()); + creature->SaveToDB(trans->GetGOInfo()->moTransport.SpawnMap, 1 << map->GetSpawnMode(), chr->GetPhaseMask()); sObjectMgr->AddCreatureToGrid(guid, &data); return true; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 1d6b1ffb61e..037b6a2988e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -384,8 +384,8 @@ class instance_icecrown_citadel : public InstanceMapScript break; case NPC_ZAFOD_BOOMBOX: if (GameObjectTemplate const* go = sObjectMgr->GetGameObjectTemplate(GO_THE_SKYBREAKER_A)) - if ((TeamInInstance == ALLIANCE && data->mapid == go->moTransport.mapID) || - (TeamInInstance == HORDE && data->mapid != go->moTransport.mapID)) + if ((TeamInInstance == ALLIANCE && data->mapid == go->moTransport.SpawnMap) || + (TeamInInstance == HORDE && data->mapid != go->moTransport.SpawnMap)) return entry; return 0; case NPC_IGB_MURADIN_BRONZEBEARD: -- cgit v1.2.3 From a1ce7ae6a200db23c19581e64de2251e9d4ada49 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 3 Jun 2016 16:49:42 +0200 Subject: Build fixes --- src/server/scripts/Commands/cs_debug.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 245aa60b846..f0e5ba81f58 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -215,7 +215,7 @@ public: uint8 failArg2 = fail2 ? (uint8)atoi(fail2) : 0; WorldPackets::Spells::CastFailed castFailed(SMSG_CAST_FAILED); - castFailed.CastID = 0; + castFailed.CastID = ObjectGuid::Empty; castFailed.SpellID = 133; castFailed.Reason = failNum; castFailed.FailedArg1 = failArg1; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index dd36281cb72..0e20efb0eaf 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -923,7 +923,7 @@ public: return false; if (Player* caster = handler->GetSession()->GetPlayer()) - Spell::SendCastResult(caster, spellInfo, 0, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + Spell::SendCastResult(caster, spellInfo, ObjectGuid::Empty, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); return false; } -- cgit v1.2.3 From 6b1c85a6762e6343e5b1787db73e0b200c5af70d Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 5 Jun 2016 14:08:53 +0200 Subject: Core/PacketIO: Updated spell packets --- src/server/game/Entities/Object/ObjectGuid.h | 5 +- src/server/game/Entities/Pet/Pet.cpp | 3 +- src/server/game/Entities/Player/Player.cpp | 45 +- src/server/game/Entities/Unit/Unit.cpp | 11 +- src/server/game/Handlers/PetHandler.cpp | 8 +- src/server/game/Handlers/SpellHandler.cpp | 11 +- src/server/game/Handlers/ToyHandler.cpp | 7 +- src/server/game/Miscellaneous/SharedDefines.h | 887 +++++++++++++-------- src/server/game/Server/Packets/MovementPackets.cpp | 6 +- src/server/game/Server/Packets/SpellPackets.cpp | 274 ++++--- src/server/game/Server/Packets/SpellPackets.h | 65 +- src/server/game/Server/Protocol/Opcodes.cpp | 43 +- src/server/game/Server/Protocol/Opcodes.h | 1 + src/server/game/Spells/Auras/SpellAuras.cpp | 33 +- src/server/game/Spells/Auras/SpellAuras.h | 20 +- src/server/game/Spells/Spell.cpp | 140 ++-- src/server/game/Spells/Spell.h | 17 +- src/server/game/Spells/SpellEffects.cpp | 2 +- src/server/scripts/Commands/cs_debug.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 15 +- 20 files changed, 974 insertions(+), 621 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h index e770a8b34a3..000028ef852 100644 --- a/src/server/game/Entities/Object/ObjectGuid.h +++ b/src/server/game/Entities/Object/ObjectGuid.h @@ -181,7 +181,7 @@ GUID_TRAIT_MAP_SPECIFIC(HighGuid::CallForHelp) GUID_TRAIT_MAP_SPECIFIC(HighGuid::AIResource) GUID_TRAIT_MAP_SPECIFIC(HighGuid::AILock) GUID_TRAIT_MAP_SPECIFIC(HighGuid::AILockTicket) -GUID_TRAIT_MAP_SPECIFIC(HighGuid::Cast) // Guessed +GUID_TRAIT_MAP_SPECIFIC(HighGuid::Cast) class ObjectGuid; class PackedGuid; @@ -209,6 +209,9 @@ class TC_GAME_API ObjectGuid template static typename std::enable_if::MapSpecific, ObjectGuid>::type Create(uint16 mapId, uint32 entry, LowType counter) { return MapSpecific(type, 0, mapId, 0, entry, counter); } + template + static typename std::enable_if::MapSpecific, ObjectGuid>::type Create(uint8 subType, uint16 mapId, uint32 entry, LowType counter) { return MapSpecific(type, subType, mapId, 0, entry, counter); } + ObjectGuid() : _low(0), _high(0) { } std::vector GetRawValue() const; diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 332924c0ea0..fb7ba8f22b7 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1239,7 +1239,8 @@ void Pet::_LoadAuras(uint32 timediff) remainCharges = 0; AuraLoadEffectInfo& info = effectInfo[key]; - if (Aura* aura = Aura::TryCreate(spellInfo, key.EffectMask, this, NULL, info.BaseAmounts.data(), NULL, casterGuid)) + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, GetMapId(), spellInfo->Id, GetMap()->GenerateLowGuid()); + if (Aura* aura = Aura::TryCreate(spellInfo, castId, key.EffectMask, this, NULL, info.BaseAmounts.data(), NULL, casterGuid)) { if (!aura->CanBeSaved()) { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index b0b661b1393..2f626fc39ea 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7790,8 +7790,13 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec } Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE); + + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = castCount; + spellPrepare.ServerCastID = spell->m_castId; + SendDirectMessage(spellPrepare.Write()); + spell->m_CastItem = item; - spell->m_cast_count = castCount; //set count of casts spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id); spell->prepare(&targets); return; @@ -7815,8 +7820,13 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec } Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE); + + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = castCount; + spellPrepare.ServerCastID = spell->m_castId; + SendDirectMessage(spellPrepare.Write()); + spell->m_CastItem = item; - spell->m_cast_count = castCount; // set count of casts spell->m_misc.Raw.Data[0] = misc[0]; spell->m_misc.Raw.Data[1] = misc[1]; spell->prepare(&targets); @@ -7843,8 +7853,13 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec } Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE); + + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = castCount; + spellPrepare.ServerCastID = spell->m_castId; + SendDirectMessage(spellPrepare.Write()); + spell->m_CastItem = item; - spell->m_cast_count = castCount; // set count of casts spell->m_misc.Raw.Data[0] = misc[0]; spell->m_misc.Raw.Data[1] = misc[1]; spell->prepare(&targets); @@ -17214,7 +17229,8 @@ void Player::_LoadAuras(PreparedQueryResult auraResult, PreparedQueryResult effe remainCharges = 0; AuraLoadEffectInfo& info = effectInfo[key]; - if (Aura* aura = Aura::TryCreate(spellInfo, key.EffectMask, this, nullptr, info.BaseAmounts.data(), nullptr, casterGuid, castItemLevel)) + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, GetMapId(), spellInfo->Id, GetMap()->GenerateLowGuid()); + if (Aura* aura = Aura::TryCreate(spellInfo, castId, key.EffectMask, this, nullptr, info.BaseAmounts.data(), nullptr, casterGuid, castItemLevel)) { if (!aura->CanBeSaved()) { @@ -24123,8 +24139,27 @@ void Runes::SetRuneState(uint8 index, bool set /*= true*/) void Player::ResyncRunes() const { WorldPackets::Spells::ResyncRunes data(MAX_RUNES); + data.Runes.Start = 0; + data.Runes.Count = GetRunesState(); + for (uint32 i = 0; i < MAX_RUNES; ++i) - data.Runes.push_back(uint8(255 - (GetRuneCooldown(i) * 51))); + data.Runes.Cooldowns.push_back(uint8(255 - (GetRuneCooldown(i) * 51))); + + // calculate mask of recharging runes + uint32 regeneratedRunes = 0; + uint32 regenIndex = 0; + while (regeneratedRunes < MAX_RECHARGING_RUNES && !m_runes->CooldownOrder.empty()) + { + uint8 runeToRegen = m_runes->CooldownOrder[regenIndex++]; + uint32 runeCooldown = GetRuneCooldown(runeToRegen); + if (runeCooldown > m_regenTimer) + { + data.Runes.Start |= 1 << runeToRegen; + ++regenIndex; + } + + ++regeneratedRunes; + } GetSession()->SendPacket(data.Write()); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6a886ef3f62..4106beb6862 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3308,7 +3308,7 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura) { Unit* caster = aura->GetCaster(); if (caster && caster->GetTypeId() == TYPEID_PLAYER) - Spell::SendCastResult(caster->ToPlayer(), aura->GetSpellInfo(), ObjectGuid::Create(GetMapId(), 0, 1), SPELL_FAILED_AURA_BOUNCED); + Spell::SendCastResult(caster->ToPlayer(), aura->GetSpellInfo(), aura->GetSpellInfo()->GetSpellXSpellVisualId(caster->GetMap()->GetDifficultyID()), aura->GetCastGUID(), SPELL_FAILED_AURA_BOUNCED); } aura->Remove(); @@ -3673,7 +3673,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, ObjectGuid casterGUID, U if (aura->IsSingleTarget()) aura->UnregisterSingleTarget(); - if (Aura* newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellInfo(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID())) + if (Aura* newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellInfo(), aura->GetCastGUID(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID())) { // created aura must not be single target aura,, so stealer won't loose it on recast if (newAura->IsSingleTarget()) @@ -13968,7 +13968,8 @@ Aura* Unit::AddAura(SpellInfo const* spellInfo, uint32 effMask, Unit* target) effMask &= ~(1<(SPELL_CAST_SOURCE_NORMAL, GetMapId(), spellInfo->Id, GetMap()->GenerateLowGuid()); + if (Aura* aura = Aura::TryRefreshStackOrCreate(spellInfo, castId, effMask, target, this)) { aura->ApplyForTargets(); return aura; @@ -14702,7 +14703,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) bp0[effect->EffectIndex] = effect->BasePoints; bp0[i] = seatId; - Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, bp0, NULL, origCasterGUID); + Aura::TryRefreshStackOrCreate(spellEntry, ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, GetMapId(), spellEntry->Id, GetMap()->GenerateLowGuid()), MAX_EFFECT_MASK, this, clicker, bp0, NULL, origCasterGUID); } } else @@ -14710,7 +14711,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) if (IsInMap(caster)) caster->CastSpell(target, spellEntry, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID); else - Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID); + Aura::TryRefreshStackOrCreate(spellEntry, ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, GetMapId(), spellEntry->Id, GetMap()->GenerateLowGuid()), MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID); } result = true; diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index c3a57893bfc..faf13940eff 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -380,7 +380,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe else { if (pet->isPossessed() || pet->IsVehicle()) /// @todo: confirm this check - Spell::SendCastResult(GetPlayer(), spellInfo, ObjectGuid::Create(GetPlayer()->GetMapId(), 0, 0), result); + Spell::SendCastResult(GetPlayer(), spellInfo, spell->m_SpellVisual, spell->m_castId, result); else spell->SendPetCastResult(result); @@ -677,7 +677,6 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell& caster->ClearUnitState(UNIT_STATE_FOLLOW); Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE); - spell->m_cast_count = petCastSpell.Cast.CastID; spell->m_misc.Raw.Data[0] = petCastSpell.Cast.Misc[0]; spell->m_misc.Raw.Data[1] = petCastSpell.Cast.Misc[1]; spell->m_targets = targets; @@ -698,6 +697,11 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell& } } + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = petCastSpell.Cast.CastID; + spellPrepare.ServerCastID = spell->m_castId; + SendPacket(spellPrepare.Write()); + spell->prepare(&targets); } else diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 12dcfcb77df..323dec31e5a 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -300,7 +300,12 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast) } Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false); - spell->m_cast_count = cast.Cast.CastID; // set count of casts + + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = cast.Cast.CastID; + spellPrepare.ServerCastID = spell->m_castId; + SendPacket(spellPrepare.Write()); + spell->m_misc.Raw.Data[0] = cast.Cast.Misc[0]; spell->m_misc.Raw.Data[1] = cast.Cast.Misc[1]; spell->prepare(&targets); @@ -509,6 +514,8 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorI mirrorImageComponentedData.HairVariation = player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID); mirrorImageComponentedData.HairColor = player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID); mirrorImageComponentedData.BeardVariation = player->GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE); + for (uint32 i = 0; i < PLAYER_CUSTOM_DISPLAY_SIZE; ++i) + mirrorImageComponentedData.CustomDisplay[i] = player->GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_CUSTOM_DISPLAY_OPTION + i); mirrorImageComponentedData.GuildGUID = (guild ? guild->GetGUID() : ObjectGuid::Empty); mirrorImageComponentedData.ItemDisplayID.reserve(11); @@ -530,7 +537,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorI }; // Display items in visible slots - for (auto const& slot : itemSlots) + for (EquipmentSlots slot : itemSlots) { uint32 itemDisplayId; if ((slot == EQUIPMENT_SLOT_HEAD && player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM)) || diff --git a/src/server/game/Handlers/ToyHandler.cpp b/src/server/game/Handlers/ToyHandler.cpp index 27edf4905ad..2e894438bf6 100644 --- a/src/server/game/Handlers/ToyHandler.cpp +++ b/src/server/game/Handlers/ToyHandler.cpp @@ -75,8 +75,13 @@ void WorldSession::HandleUseToy(WorldPackets::Toy::UseToy& packet) SpellCastTargets targets(_player, packet.Cast); Spell* spell = new Spell(_player, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false); + + WorldPackets::Spells::SpellPrepare spellPrepare; + spellPrepare.ClientCastID = packet.Cast.CastID; + spellPrepare.ServerCastID = spell->m_castId; + SendPacket(spellPrepare.Write()); + spell->m_castItemEntry = packet.ItemID; - spell->m_cast_count = packet.Cast.CastID; spell->m_misc.Raw.Data[0] = packet.Cast.Misc[0]; spell->m_misc.Raw.Data[1] = packet.Cast.Misc[1]; spell->m_castFlagsEx |= CAST_FLAG_EX_USE_TOY_SPELL; diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index cc87bf7ac08..dbabbf5a486 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -1270,7 +1270,7 @@ enum SpellEffectName TOTAL_SPELL_EFFECTS = 256, }; -enum SpellCastResult // 21355 +enum SpellCastResult { SPELL_FAILED_SUCCESS = 0, SPELL_FAILED_AFFECTING_COMBAT = 1, @@ -1324,51 +1324,51 @@ enum SpellCastResult // 21355 SPELL_FAILED_GARRISON_FOLLOWER_NOT_MAX_LEVEL = 49, SPELL_FAILED_GARRISON_FOLLOWER_HAS_ABILITY = 50, SPELL_FAILED_GARRISON_FOLLOWER_HAS_SINGLE_MISSION_ABILITY = 51, - SPELL_FAILED_GARRISON_MISSION_NOT_IN_PROGRESS = 52, - SPELL_FAILED_GARRISON_MISSION_COMPLETE = 53, - SPELL_FAILED_GARRISON_NO_MISSIONS_AVAILABLE = 54, - SPELL_FAILED_HIGHLEVEL = 55, - SPELL_FAILED_HUNGER_SATIATED = 56, - SPELL_FAILED_IMMUNE = 57, - SPELL_FAILED_INCORRECT_AREA = 58, - SPELL_FAILED_INTERRUPTED = 59, - SPELL_FAILED_INTERRUPTED_COMBAT = 60, - SPELL_FAILED_ITEM_ALREADY_ENCHANTED = 61, - SPELL_FAILED_ITEM_GONE = 62, - SPELL_FAILED_ITEM_NOT_FOUND = 63, - SPELL_FAILED_ITEM_NOT_READY = 64, - SPELL_FAILED_LEVEL_REQUIREMENT = 65, - SPELL_FAILED_LINE_OF_SIGHT = 66, - SPELL_FAILED_LOWLEVEL = 67, - SPELL_FAILED_LOW_CASTLEVEL = 68, - SPELL_FAILED_MAINHAND_EMPTY = 69, - SPELL_FAILED_MOVING = 70, - SPELL_FAILED_NEED_AMMO = 71, - SPELL_FAILED_NEED_AMMO_POUCH = 72, - SPELL_FAILED_NEED_EXOTIC_AMMO = 73, - SPELL_FAILED_NEED_MORE_ITEMS = 74, - SPELL_FAILED_NOPATH = 75, - SPELL_FAILED_NOT_BEHIND = 76, - SPELL_FAILED_NOT_FISHABLE = 77, - SPELL_FAILED_NOT_FLYING = 78, - SPELL_FAILED_NOT_HERE = 79, - SPELL_FAILED_NOT_INFRONT = 80, - SPELL_FAILED_NOT_IN_CONTROL = 81, - SPELL_FAILED_NOT_KNOWN = 82, - SPELL_FAILED_NOT_MOUNTED = 83, - SPELL_FAILED_NOT_ON_TAXI = 84, - SPELL_FAILED_NOT_ON_TRANSPORT = 85, - SPELL_FAILED_NOT_READY = 86, - SPELL_FAILED_NOT_SHAPESHIFT = 87, - SPELL_FAILED_NOT_STANDING = 88, - SPELL_FAILED_NOT_TRADEABLE = 89, - SPELL_FAILED_NOT_TRADING = 90, - SPELL_FAILED_NOT_UNSHEATHED = 91, - SPELL_FAILED_NOT_WHILE_GHOST = 92, - SPELL_FAILED_NOT_WHILE_LOOTING = 93, - SPELL_FAILED_NO_AMMO = 94, - SPELL_FAILED_NO_CHARGES_REMAIN = 95, - SPELL_FAILED_NO_CHAMPION = 96, + SPELL_FAILED_GARRISON_FOLLOWER_REQUIRES_EPIC = 52, + SPELL_FAILED_GARRISON_MISSION_NOT_IN_PROGRESS = 53, + SPELL_FAILED_GARRISON_MISSION_COMPLETE = 54, + SPELL_FAILED_GARRISON_NO_MISSIONS_AVAILABLE = 55, + SPELL_FAILED_HIGHLEVEL = 56, + SPELL_FAILED_HUNGER_SATIATED = 57, + SPELL_FAILED_IMMUNE = 58, + SPELL_FAILED_INCORRECT_AREA = 59, + SPELL_FAILED_INTERRUPTED = 60, + SPELL_FAILED_INTERRUPTED_COMBAT = 61, + SPELL_FAILED_ITEM_ALREADY_ENCHANTED = 62, + SPELL_FAILED_ITEM_GONE = 63, + SPELL_FAILED_ITEM_NOT_FOUND = 64, + SPELL_FAILED_ITEM_NOT_READY = 65, + SPELL_FAILED_LEVEL_REQUIREMENT = 66, + SPELL_FAILED_LINE_OF_SIGHT = 67, + SPELL_FAILED_LOWLEVEL = 68, + SPELL_FAILED_LOW_CASTLEVEL = 69, + SPELL_FAILED_MAINHAND_EMPTY = 70, + SPELL_FAILED_MOVING = 71, + SPELL_FAILED_NEED_AMMO = 72, + SPELL_FAILED_NEED_AMMO_POUCH = 73, + SPELL_FAILED_NEED_EXOTIC_AMMO = 74, + SPELL_FAILED_NEED_MORE_ITEMS = 75, + SPELL_FAILED_NOPATH = 76, + SPELL_FAILED_NOT_BEHIND = 77, + SPELL_FAILED_NOT_FISHABLE = 78, + SPELL_FAILED_NOT_FLYING = 79, + SPELL_FAILED_NOT_HERE = 80, + SPELL_FAILED_NOT_INFRONT = 81, + SPELL_FAILED_NOT_IN_CONTROL = 82, + SPELL_FAILED_NOT_KNOWN = 83, + SPELL_FAILED_NOT_MOUNTED = 84, + SPELL_FAILED_NOT_ON_TAXI = 85, + SPELL_FAILED_NOT_ON_TRANSPORT = 86, + SPELL_FAILED_NOT_READY = 87, + SPELL_FAILED_NOT_SHAPESHIFT = 88, + SPELL_FAILED_NOT_STANDING = 89, + SPELL_FAILED_NOT_TRADEABLE = 90, + SPELL_FAILED_NOT_TRADING = 91, + SPELL_FAILED_NOT_UNSHEATHED = 92, + SPELL_FAILED_NOT_WHILE_GHOST = 93, + SPELL_FAILED_NOT_WHILE_LOOTING = 94, + SPELL_FAILED_NO_AMMO = 95, + SPELL_FAILED_NO_CHARGES_REMAIN = 96, SPELL_FAILED_NO_COMBO_POINTS = 97, SPELL_FAILED_NO_DUELING = 98, SPELL_FAILED_NO_ENDURANCE = 99, @@ -1380,316 +1380,499 @@ enum SpellCastResult // 21355 SPELL_FAILED_NOTHING_TO_DISPEL = 105, SPELL_FAILED_NOTHING_TO_STEAL = 106, SPELL_FAILED_ONLY_ABOVEWATER = 107, - SPELL_FAILED_ONLY_DAYTIME = 108, - SPELL_FAILED_ONLY_INDOORS = 109, - SPELL_FAILED_ONLY_MOUNTED = 110, - SPELL_FAILED_ONLY_NIGHTTIME = 111, - SPELL_FAILED_ONLY_OUTDOORS = 112, - SPELL_FAILED_ONLY_SHAPESHIFT = 113, - SPELL_FAILED_ONLY_STEALTHED = 114, - SPELL_FAILED_ONLY_UNDERWATER = 115, - SPELL_FAILED_OUT_OF_RANGE = 116, - SPELL_FAILED_PACIFIED = 117, - SPELL_FAILED_POSSESSED = 118, - SPELL_FAILED_REAGENTS = 119, - SPELL_FAILED_REQUIRES_AREA = 120, - SPELL_FAILED_REQUIRES_SPELL_FOCUS = 121, - SPELL_FAILED_ROOTED = 122, - SPELL_FAILED_SILENCED = 123, - SPELL_FAILED_SPELL_IN_PROGRESS = 124, - SPELL_FAILED_SPELL_LEARNED = 125, - SPELL_FAILED_SPELL_UNAVAILABLE = 126, - SPELL_FAILED_STUNNED = 127, - SPELL_FAILED_TARGETS_DEAD = 128, - SPELL_FAILED_TARGET_AFFECTING_COMBAT = 129, - SPELL_FAILED_TARGET_AURASTATE = 130, - SPELL_FAILED_TARGET_DUELING = 131, - SPELL_FAILED_TARGET_ENEMY = 132, - SPELL_FAILED_TARGET_ENRAGED = 133, - SPELL_FAILED_TARGET_FRIENDLY = 134, - SPELL_FAILED_TARGET_IN_COMBAT = 135, - SPELL_FAILED_TARGET_IN_PET_BATTLE = 136, - SPELL_FAILED_TARGET_IS_PLAYER = 137, - SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED = 138, - SPELL_FAILED_TARGET_NOT_DEAD = 139, - SPELL_FAILED_TARGET_NOT_IN_PARTY = 140, - SPELL_FAILED_TARGET_NOT_LOOTED = 141, - SPELL_FAILED_TARGET_NOT_PLAYER = 142, - SPELL_FAILED_TARGET_NO_POCKETS = 143, - SPELL_FAILED_TARGET_NO_WEAPONS = 144, - SPELL_FAILED_TARGET_NO_RANGED_WEAPONS = 145, - SPELL_FAILED_TARGET_UNSKINNABLE = 146, - SPELL_FAILED_THIRST_SATIATED = 147, - SPELL_FAILED_TOO_CLOSE = 148, - SPELL_FAILED_TOO_MANY_OF_ITEM = 149, - SPELL_FAILED_TOTEM_CATEGORY = 150, - SPELL_FAILED_TOTEMS = 151, - SPELL_FAILED_TRY_AGAIN = 152, - SPELL_FAILED_UNIT_NOT_BEHIND = 153, - SPELL_FAILED_UNIT_NOT_INFRONT = 154, - SPELL_FAILED_VISION_OBSCURED = 155, - SPELL_FAILED_WRONG_PET_FOOD = 156, - SPELL_FAILED_NOT_WHILE_FATIGUED = 157, - SPELL_FAILED_TARGET_NOT_IN_INSTANCE = 158, - SPELL_FAILED_NOT_WHILE_TRADING = 159, - SPELL_FAILED_TARGET_NOT_IN_RAID = 160, - SPELL_FAILED_TARGET_FREEFORALL = 161, - SPELL_FAILED_NO_EDIBLE_CORPSES = 162, - SPELL_FAILED_ONLY_BATTLEGROUNDS = 163, - SPELL_FAILED_TARGET_NOT_GHOST = 164, - SPELL_FAILED_TRANSFORM_UNUSABLE = 165, - SPELL_FAILED_WRONG_WEATHER = 166, - SPELL_FAILED_DAMAGE_IMMUNE = 167, - SPELL_FAILED_PREVENTED_BY_MECHANIC = 168, - SPELL_FAILED_PLAY_TIME = 169, - SPELL_FAILED_REPUTATION = 170, - SPELL_FAILED_MIN_SKILL = 171, - SPELL_FAILED_NOT_IN_RATED_BATTLEGROUND = 172, - SPELL_FAILED_NOT_ON_SHAPESHIFT = 173, - SPELL_FAILED_NOT_ON_STEALTHED = 174, - SPELL_FAILED_NOT_ON_DAMAGE_IMMUNE = 175, - SPELL_FAILED_NOT_ON_MOUNTED = 176, - SPELL_FAILED_TOO_SHALLOW = 177, - SPELL_FAILED_TARGET_NOT_IN_SANCTUARY = 178, - SPELL_FAILED_TARGET_IS_TRIVIAL = 179, - SPELL_FAILED_BM_OR_INVISGOD = 180, - SPELL_FAILED_GROUND_MOUNT_NOT_ALLOWED = 181, - SPELL_FAILED_FLOATING_MOUNT_NOT_ALLOWED = 182, - SPELL_FAILED_UNDERWATER_MOUNT_NOT_ALLOWED = 183, - SPELL_FAILED_FLYING_MOUNT_NOT_ALLOWED = 184, - SPELL_FAILED_APPRENTICE_RIDING_REQUIREMENT = 185, - SPELL_FAILED_JOURNEYMAN_RIDING_REQUIREMENT = 186, - SPELL_FAILED_EXPERT_RIDING_REQUIREMENT = 187, - SPELL_FAILED_ARTISAN_RIDING_REQUIREMENT = 188, - SPELL_FAILED_MASTER_RIDING_REQUIREMENT = 189, - SPELL_FAILED_COLD_RIDING_REQUIREMENT = 190, - SPELL_FAILED_FLIGHT_MASTER_RIDING_REQUIREMENT = 191, - SPELL_FAILED_CS_RIDING_REQUIREMENT = 192, - SPELL_FAILED_PANDA_RIDING_REQUIREMENT = 193, - SPELL_FAILED_DRAENOR_RIDING_REQUIREMENT = 194, - SPELL_FAILED_MOUNT_NO_FLOAT_HERE = 195, - SPELL_FAILED_MOUNT_NO_UNDERWATER_HERE = 196, - SPELL_FAILED_MOUNT_ABOVE_WATER_HERE = 197, - SPELL_FAILED_MOUNT_COLLECTED_ON_OTHER_CHAR = 198, - SPELL_FAILED_NOT_IDLE = 199, - SPELL_FAILED_NOT_INACTIVE = 200, - SPELL_FAILED_PARTIAL_PLAYTIME = 201, - SPELL_FAILED_NO_PLAYTIME = 202, - SPELL_FAILED_NOT_IN_BATTLEGROUND = 203, - SPELL_FAILED_NOT_IN_RAID_INSTANCE = 204, - SPELL_FAILED_ONLY_IN_ARENA = 205, - SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE = 206, - SPELL_FAILED_ON_USE_ENCHANT = 207, - SPELL_FAILED_NOT_ON_GROUND = 208, - SPELL_FAILED_CUSTOM_ERROR = 209, - SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW = 210, - SPELL_FAILED_TOO_MANY_SOCKETS = 211, - SPELL_FAILED_INVALID_GLYPH = 212, - SPELL_FAILED_UNIQUE_GLYPH = 213, - SPELL_FAILED_GLYPH_SOCKET_LOCKED = 214, - SPELL_FAILED_GLYPH_EXCLUSIVE_CATEGORY = 215, - SPELL_FAILED_GLYPH_INVALID_SPEC = 216, - SPELL_FAILED_GLYPH_NO_SPEC = 217, - SPELL_FAILED_NO_VALID_TARGETS = 218, - SPELL_FAILED_ITEM_AT_MAX_CHARGES = 219, - SPELL_FAILED_NOT_IN_BARBERSHOP = 220, - SPELL_FAILED_FISHING_TOO_LOW = 221, - SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW = 222, - SPELL_FAILED_SUMMON_PENDING = 223, - SPELL_FAILED_MAX_SOCKETS = 224, - SPELL_FAILED_PET_CAN_RENAME = 225, - SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED = 226, - SPELL_FAILED_TARGET_HAS_RESURRECT_PENDING = 227, - SPELL_FAILED_NO_ACTIONS = 228, - SPELL_FAILED_CURRENCY_WEIGHT_MISMATCH = 229, - SPELL_FAILED_WEIGHT_NOT_ENOUGH = 230, - SPELL_FAILED_WEIGHT_TOO_MUCH = 231, - SPELL_FAILED_NO_VACANT_SEAT = 232, - SPELL_FAILED_NO_LIQUID = 233, - SPELL_FAILED_ONLY_NOT_SWIMMING = 234, - SPELL_FAILED_BY_NOT_MOVING = 235, - SPELL_FAILED_IN_COMBAT_RES_LIMIT_REACHED = 236, - SPELL_FAILED_NOT_IN_ARENA = 237, - SPELL_FAILED_TARGET_NOT_GROUNDED = 238, - SPELL_FAILED_EXCEEDED_WEEKLY_USAGE = 239, - SPELL_FAILED_NOT_IN_LFG_DUNGEON = 240, - SPELL_FAILED_BAD_TARGET_FILTER = 241, - SPELL_FAILED_NOT_ENOUGH_TARGETS = 242, - SPELL_FAILED_NO_SPEC = 243, - SPELL_FAILED_CANT_ADD_BATTLE_PET = 244, - SPELL_FAILED_CANT_UPGRADE_BATTLE_PET = 245, - SPELL_FAILED_WRONG_BATTLE_PET_TYPE = 246, - SPELL_FAILED_NO_DUNGEON_ENCOUNTER = 247, - SPELL_FAILED_NO_TELEPORT_FROM_DUNGEON = 248, - SPELL_FAILED_MAX_LEVEL_TOO_LOW = 249, - SPELL_FAILED_CANT_REPLACE_ITEM_BONUS = 250, - GRANT_PET_LEVEL_FAIL = 251, - SPELL_FAILED_SKILL_LINE_NOT_KNOWN = 252, - SPELL_FAILED_BLUEPRINT_KNOWN = 253, - SPELL_FAILED_FOLLOWER_KNOWN = 254, - SPELL_FAILED_CANT_OVERRIDE_ENCHANT_VISUAL = 255, - SPELL_FAILED_ITEM_NOT_A_WEAPON = 256, - SPELL_FAILED_SAME_ENCHANT_VISUAL = 257, - SPELL_FAILED_TOY_USE_LIMIT_REACHED = 258, - SPELL_FAILED_TOY_ALREADY_KNOWN = 259, - SPELL_FAILED_SHIPMENTS_FULL = 260, - SPELL_FAILED_NO_SHIPMENTS_FOR_CONTAINER = 261, - SPELL_FAILED_NO_BUILDING_FOR_SHIPMENT = 262, - SPELL_FAILED_NOT_ENOUGH_SHIPMENTS_FOR_CONTAINER = 263, - SPELL_FAILED_HAS_MISSION = 264, - SPELL_FAILED_BUILDING_ACTIVATE_NOT_READY = 265, - SPELL_FAILED_NOT_SOULBOUND = 266, - SPELL_FAILED_RIDING_VEHICLE = 267, - SPELL_FAILED_VETERAN_TRIAL_ABOVE_SKILL_RANK_MAX = 268, - SPELL_FAILED_NOT_WHILE_MERCENARY = 269, - SPELL_FAILED_UNKNOWN = 270, - SPELL_CAST_OK = 0xFFFF // custom value, must not be sent to client + SPELL_FAILED_ONLY_INDOORS = 108, + SPELL_FAILED_ONLY_MOUNTED = 109, + SPELL_FAILED_ONLY_OUTDOORS = 110, + SPELL_FAILED_ONLY_SHAPESHIFT = 111, + SPELL_FAILED_ONLY_STEALTHED = 112, + SPELL_FAILED_ONLY_UNDERWATER = 113, + SPELL_FAILED_OUT_OF_RANGE = 114, + SPELL_FAILED_PACIFIED = 115, + SPELL_FAILED_POSSESSED = 116, + SPELL_FAILED_REAGENTS = 117, + SPELL_FAILED_REQUIRES_AREA = 118, + SPELL_FAILED_REQUIRES_SPELL_FOCUS = 119, + SPELL_FAILED_ROOTED = 120, + SPELL_FAILED_SILENCED = 121, + SPELL_FAILED_SPELL_IN_PROGRESS = 122, + SPELL_FAILED_SPELL_LEARNED = 123, + SPELL_FAILED_SPELL_UNAVAILABLE = 124, + SPELL_FAILED_STUNNED = 125, + SPELL_FAILED_TARGETS_DEAD = 126, + SPELL_FAILED_TARGET_AFFECTING_COMBAT = 127, + SPELL_FAILED_TARGET_AURASTATE = 128, + SPELL_FAILED_TARGET_DUELING = 129, + SPELL_FAILED_TARGET_ENEMY = 130, + SPELL_FAILED_TARGET_ENRAGED = 131, + SPELL_FAILED_TARGET_FRIENDLY = 132, + SPELL_FAILED_TARGET_IN_COMBAT = 133, + SPELL_FAILED_TARGET_IN_PET_BATTLE = 134, + SPELL_FAILED_TARGET_IS_PLAYER = 135, + SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED = 136, + SPELL_FAILED_TARGET_NOT_DEAD = 137, + SPELL_FAILED_TARGET_NOT_IN_PARTY = 138, + SPELL_FAILED_TARGET_NOT_LOOTED = 139, + SPELL_FAILED_TARGET_NOT_PLAYER = 140, + SPELL_FAILED_TARGET_NO_POCKETS = 141, + SPELL_FAILED_TARGET_NO_WEAPONS = 142, + SPELL_FAILED_TARGET_NO_RANGED_WEAPONS = 143, + SPELL_FAILED_TARGET_UNSKINNABLE = 144, + SPELL_FAILED_THIRST_SATIATED = 145, + SPELL_FAILED_TOO_CLOSE = 146, + SPELL_FAILED_TOO_MANY_OF_ITEM = 147, + SPELL_FAILED_TOTEM_CATEGORY = 148, + SPELL_FAILED_TOTEMS = 149, + SPELL_FAILED_TRY_AGAIN = 150, + SPELL_FAILED_UNIT_NOT_BEHIND = 151, + SPELL_FAILED_UNIT_NOT_INFRONT = 152, + SPELL_FAILED_VISION_OBSCURED = 153, + SPELL_FAILED_WRONG_PET_FOOD = 154, + SPELL_FAILED_NOT_WHILE_FATIGUED = 155, + SPELL_FAILED_TARGET_NOT_IN_INSTANCE = 156, + SPELL_FAILED_NOT_WHILE_TRADING = 157, + SPELL_FAILED_TARGET_NOT_IN_RAID = 158, + SPELL_FAILED_TARGET_FREEFORALL = 159, + SPELL_FAILED_NO_EDIBLE_CORPSES = 160, + SPELL_FAILED_ONLY_BATTLEGROUNDS = 161, + SPELL_FAILED_TARGET_NOT_GHOST = 162, + SPELL_FAILED_TRANSFORM_UNUSABLE = 163, + SPELL_FAILED_WRONG_WEATHER = 164, + SPELL_FAILED_DAMAGE_IMMUNE = 165, + SPELL_FAILED_PREVENTED_BY_MECHANIC = 166, + SPELL_FAILED_PLAY_TIME = 167, + SPELL_FAILED_REPUTATION = 168, + SPELL_FAILED_MIN_SKILL = 169, + SPELL_FAILED_NOT_IN_RATED_BATTLEGROUND = 170, + SPELL_FAILED_NOT_ON_SHAPESHIFT = 171, + SPELL_FAILED_NOT_ON_STEALTHED = 172, + SPELL_FAILED_NOT_ON_DAMAGE_IMMUNE = 173, + SPELL_FAILED_NOT_ON_MOUNTED = 174, + SPELL_FAILED_TOO_SHALLOW = 175, + SPELL_FAILED_TARGET_NOT_IN_SANCTUARY = 176, + SPELL_FAILED_TARGET_IS_TRIVIAL = 177, + SPELL_FAILED_BM_OR_INVISGOD = 178, + SPELL_FAILED_GROUND_MOUNT_NOT_ALLOWED = 179, + SPELL_FAILED_FLOATING_MOUNT_NOT_ALLOWED = 180, + SPELL_FAILED_UNDERWATER_MOUNT_NOT_ALLOWED = 181, + SPELL_FAILED_FLYING_MOUNT_NOT_ALLOWED = 182, + SPELL_FAILED_APPRENTICE_RIDING_REQUIREMENT = 183, + SPELL_FAILED_JOURNEYMAN_RIDING_REQUIREMENT = 184, + SPELL_FAILED_EXPERT_RIDING_REQUIREMENT = 185, + SPELL_FAILED_ARTISAN_RIDING_REQUIREMENT = 186, + SPELL_FAILED_MASTER_RIDING_REQUIREMENT = 187, + SPELL_FAILED_COLD_RIDING_REQUIREMENT = 188, + SPELL_FAILED_FLIGHT_MASTER_RIDING_REQUIREMENT = 189, + SPELL_FAILED_CS_RIDING_REQUIREMENT = 190, + SPELL_FAILED_PANDA_RIDING_REQUIREMENT = 191, + SPELL_FAILED_DRAENOR_RIDING_REQUIREMENT = 192, + SPELL_FAILED_MOUNT_NO_FLOAT_HERE = 193, + SPELL_FAILED_MOUNT_NO_UNDERWATER_HERE = 194, + SPELL_FAILED_MOUNT_ABOVE_WATER_HERE = 195, + SPELL_FAILED_MOUNT_COLLECTED_ON_OTHER_CHAR = 196, + SPELL_FAILED_NOT_IDLE = 197, + SPELL_FAILED_NOT_INACTIVE = 198, + SPELL_FAILED_PARTIAL_PLAYTIME = 199, + SPELL_FAILED_NO_PLAYTIME = 200, + SPELL_FAILED_NOT_IN_BATTLEGROUND = 201, + SPELL_FAILED_NOT_IN_RAID_INSTANCE = 202, + SPELL_FAILED_ONLY_IN_ARENA = 203, + SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE = 204, + SPELL_FAILED_ON_USE_ENCHANT = 205, + SPELL_FAILED_NOT_ON_GROUND = 206, + SPELL_FAILED_CUSTOM_ERROR = 207, + SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW = 208, + SPELL_FAILED_TOO_MANY_SOCKETS = 209, + SPELL_FAILED_INVALID_GLYPH = 210, + SPELL_FAILED_UNIQUE_GLYPH = 211, + SPELL_FAILED_GLYPH_SOCKET_LOCKED = 212, + SPELL_FAILED_GLYPH_EXCLUSIVE_CATEGORY = 213, + SPELL_FAILED_GLYPH_INVALID_SPEC = 214, + SPELL_FAILED_GLYPH_NO_SPEC = 215, + SPELL_FAILED_NO_VALID_TARGETS = 216, + SPELL_FAILED_ITEM_AT_MAX_CHARGES = 217, + SPELL_FAILED_NOT_IN_BARBERSHOP = 218, + SPELL_FAILED_FISHING_TOO_LOW = 219, + SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW = 220, + SPELL_FAILED_SUMMON_PENDING = 221, + SPELL_FAILED_MAX_SOCKETS = 222, + SPELL_FAILED_PET_CAN_RENAME = 223, + SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED = 224, + SPELL_FAILED_TARGET_HAS_RESURRECT_PENDING = 225, + SPELL_FAILED_NO_ACTIONS = 226, + SPELL_FAILED_CURRENCY_WEIGHT_MISMATCH = 227, + SPELL_FAILED_WEIGHT_NOT_ENOUGH = 228, + SPELL_FAILED_WEIGHT_TOO_MUCH = 229, + SPELL_FAILED_NO_VACANT_SEAT = 230, + SPELL_FAILED_NO_LIQUID = 231, + SPELL_FAILED_ONLY_NOT_SWIMMING = 232, + SPELL_FAILED_BY_NOT_MOVING = 233, + SPELL_FAILED_IN_COMBAT_RES_LIMIT_REACHED = 234, + SPELL_FAILED_NOT_IN_ARENA = 235, + SPELL_FAILED_TARGET_NOT_GROUNDED = 236, + SPELL_FAILED_EXCEEDED_WEEKLY_USAGE = 237, + SPELL_FAILED_NOT_IN_LFG_DUNGEON = 238, + SPELL_FAILED_BAD_TARGET_FILTER = 239, + SPELL_FAILED_NOT_ENOUGH_TARGETS = 240, + SPELL_FAILED_NO_SPEC = 241, + SPELL_FAILED_CANT_ADD_BATTLE_PET = 242, + SPELL_FAILED_CANT_UPGRADE_BATTLE_PET = 243, + SPELL_FAILED_WRONG_BATTLE_PET_TYPE = 244, + SPELL_FAILED_NO_DUNGEON_ENCOUNTER = 245, + SPELL_FAILED_NO_TELEPORT_FROM_DUNGEON = 246, + SPELL_FAILED_MAX_LEVEL_TOO_LOW = 247, + SPELL_FAILED_CANT_REPLACE_ITEM_BONUS = 248, + GRANT_PET_LEVEL_FAIL = 249, + SPELL_FAILED_SKILL_LINE_NOT_KNOWN = 250, + SPELL_FAILED_BLUEPRINT_KNOWN = 251, + SPELL_FAILED_FOLLOWER_KNOWN = 252, + SPELL_FAILED_CANT_OVERRIDE_ENCHANT_VISUAL = 253, + SPELL_FAILED_ITEM_NOT_A_WEAPON = 254, + SPELL_FAILED_SAME_ENCHANT_VISUAL = 255, + SPELL_FAILED_TOY_USE_LIMIT_REACHED = 256, + SPELL_FAILED_TOY_ALREADY_KNOWN = 257, + SPELL_FAILED_SHIPMENTS_FULL = 258, + SPELL_FAILED_NO_SHIPMENTS_FOR_CONTAINER = 259, + SPELL_FAILED_NO_BUILDING_FOR_SHIPMENT = 260, + SPELL_FAILED_NOT_ENOUGH_SHIPMENTS_FOR_CONTAINER = 261, + SPELL_FAILED_HAS_MISSION = 262, + SPELL_FAILED_BUILDING_ACTIVATE_NOT_READY = 263, + SPELL_FAILED_NOT_SOULBOUND = 264, + SPELL_FAILED_RIDING_VEHICLE = 265, + SPELL_FAILED_VETERAN_TRIAL_ABOVE_SKILL_RANK_MAX = 266, + SPELL_FAILED_NOT_WHILE_MERCENARY = 267, + SPELL_FAILED_SPEC_DISABLED = 268, + SPELL_FAILED_CANT_BE_OBLITERATED = 269, + SPELL_FAILED_FOLLOWER_CLASS_SPEC_CAP = 270, + SPELL_FAILED_TRANSPORT_NOT_READY = 271, + SPELL_FAILED_TRANSMOG_SET_ALREADY_KNOWN = 272, + SPELL_FAILED_DISABLED_BY_AURA_LABEL = 273, + SPELL_FAILED_DISABLED_BY_MAX_USABLE_LEVEL = 274, + SPELL_FAILED_SPELL_ALREADY_KNOWN = 275, + SPELL_FAILED_MUST_KNOW_SUPERCEDING_SPELL = 276, + SPELL_FAILED_YOU_CANNOT_USE_THAT_IN_PVP_INSTANCE = 277, + SPELL_FAILED_UNKNOWN = 278, + + // ok cast value - here in case a future version removes SPELL_FAILED_SUCCESS and we need to use a custom value (not sent to client either way) + SPELL_CAST_OK = SPELL_FAILED_SUCCESS }; enum SpellCustomErrors { - SPELL_CUSTOM_ERROR_NONE = 0, - SPELL_CUSTOM_ERROR_CUSTOM_MSG = 1, // Something bad happened, and we want to display a custom message! - SPELL_CUSTOM_ERROR_ALEX_BROKE_QUEST = 2, // Alex broke your quest! Thank him later! - SPELL_CUSTOM_ERROR_NEED_HELPLESS_VILLAGER = 3, // This spell may only be used on Helpless Wintergarde Villagers that have not been rescued. - SPELL_CUSTOM_ERROR_NEED_WARSONG_DISGUISE = 4, // Requires that you be wearing the Warsong Orc Disguise. - SPELL_CUSTOM_ERROR_REQUIRES_PLAGUE_WAGON = 5, // You must be closer to a plague wagon in order to drop off your 7th Legion Siege Engineer. - SPELL_CUSTOM_ERROR_CANT_TARGET_FRIENDLY_NONPARTY = 6, // You cannot target friendly units outside your party. - SPELL_CUSTOM_ERROR_NEED_CHILL_NYMPH = 7, // You must target a weakened chill nymph. - SPELL_CUSTOM_ERROR_MUST_BE_IN_ENKILAH = 8, // The Imbued Scourge Shroud will only work when equipped in the Temple City of En'kilah. - SPELL_CUSTOM_ERROR_REQUIRES_CORPSE_DUST = 9, // Requires Corpse Dust - SPELL_CUSTOM_ERROR_CANT_SUMMON_GARGOYLE = 10, // You cannot summon another gargoyle yet. - SPELL_CUSTOM_ERROR_NEED_CORPSE_DUST_IF_NO_TARGET = 11, // Requires Corpse Dust if the target is not dead and humanoid. - SPELL_CUSTOM_ERROR_MUST_BE_AT_SHATTERHORN = 12, // Can only be placed near Shatterhorn - SPELL_CUSTOM_ERROR_MUST_TARGET_PROTO_DRAKE_EGG = 13, // You must first select a Proto-Drake Egg. - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_TREE = 14, // You must be close to a marked tree. - SPELL_CUSTOM_ERROR_MUST_TARGET_TURKEY = 15, // You must target a Fjord Turkey. - SPELL_CUSTOM_ERROR_MUST_TARGET_HAWK = 16, // You must target a Fjord Hawk. - SPELL_CUSTOM_ERROR_TOO_FAR_FROM_BOUY = 17, // You are too far from the bouy. - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_OIL_SLICK = 18, // Must be used near an oil slick. - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_BOUY = 19, // You must be closer to the buoy! - SPELL_CUSTOM_ERROR_WYRMREST_VANQUISHER = 20, // You may only call for the aid of a Wyrmrest Vanquisher in Wyrmrest Temple, The Dragon Wastes, Galakrond's Rest or The Wicked Coil. - SPELL_CUSTOM_ERROR_MUST_TARGET_ICE_HEART_JORMUNGAR = 21, // That can only be used on a Ice Heart Jormungar Spawn. - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_SINKHOLE = 22, // You must be closer to a sinkhole to use your map. - SPELL_CUSTOM_ERROR_REQUIRES_HAROLD_LANE = 23, // You may only call down a stampede on Harold Lane. - SPELL_CUSTOM_ERROR_REQUIRES_GAMMOTH_MAGNATAUR = 24, // You may only use the Pouch of Crushed Bloodspore on Gammothra or other magnataur in the Bloodspore Plains and Gammoth. - SPELL_CUSTOM_ERROR_MUST_BE_IN_RESURRECTION_CHAMBER = 25, // Requires the magmawyrm resurrection chamber in the back of the Maw of Neltharion. - SPELL_CUSTOM_ERROR_CANT_CALL_WINTERGARDE_HERE = 26, // You may only call down a Wintergarde Gryphon in Wintergarde Keep or the Carrion Fields. - SPELL_CUSTOM_ERROR_MUST_TARGET_WILHELM = 27, // What are you doing? Only aim that thing at Wilhelm! - SPELL_CUSTOM_ERROR_NOT_ENOUGH_HEALTH = 28, // Not enough health! - SPELL_CUSTOM_ERROR_NO_NEARBY_CORPSES = 29, // There are no nearby corpses to use - SPELL_CUSTOM_ERROR_TOO_MANY_GHOULS = 30, // You've created enough ghouls. Return to Gothik the Harvester at Death's Breach. - SPELL_CUSTOM_ERROR_GO_FURTHER_FROM_SUNDERED_SHARD = 31, // Your companion does not want to come here. Go further from the Sundered Shard. - SPELL_CUSTOM_ERROR_MUST_BE_IN_CAT_FORM = 32, // Must be in Cat Form - SPELL_CUSTOM_ERROR_MUST_BE_DEATH_KNIGHT = 33, // Only Death Knights may enter Ebon Hold. - SPELL_CUSTOM_ERROR_MUST_BE_IN_FERAL_FORM = 34, // Must be in Cat Form, Bear Form, or Dire Bear Form - SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER = 35, // You must be within range of a Helpless Wintergarde Villager. - SPELL_CUSTOM_ERROR_CANT_TARGET_ELEMENTAL_MECHANICAL = 36, // You cannot target an elemental or mechanical corpse. - SPELL_CUSTOM_ERROR_MUST_HAVE_USED_DALARAN_CRYSTAL = 37, // This teleport crystal cannot be used until the teleport crystal in Dalaran has been used at least once. - SPELL_CUSTOM_ERROR_YOU_ALREADY_HOLD_SOMETHING = 38, // You are already holding something in your hand. You must throw the creature in your hand before picking up another. - SPELL_CUSTOM_ERROR_YOU_DONT_HOLD_ANYTHING = 39, // You don't have anything to throw! Find a Vargul and use Gymer Grab to pick one up! - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_VALDURAN = 40, // Bouldercrag's War Horn can only be used within 10 yards of Valduran the Stormborn. - SPELL_CUSTOM_ERROR_NO_PASSENGER = 41, // You are not carrying a passenger. There is nobody to drop off. - SPELL_CUSTOM_ERROR_CANT_BUILD_MORE_VEHICLES = 42, // You cannot build any more siege vehicles. - SPELL_CUSTOM_ERROR_ALREADY_CARRYING_CRUSADER = 43, // You are already carrying a captured Argent Crusader. You must return to the Argent Vanguard infirmary and drop off your passenger before you may pick up another. - SPELL_CUSTOM_ERROR_CANT_DO_WHILE_ROOTED = 44, // You can't do that while rooted. - SPELL_CUSTOM_ERROR_REQUIRES_NEARBY_TARGET = 45, // Requires a nearby target. - SPELL_CUSTOM_ERROR_NOTHING_TO_DISCOVER = 46, // Nothing left to discover. - SPELL_CUSTOM_ERROR_NOT_ENOUGH_TARGETS = 47, // No targets close enough to bluff. - SPELL_CUSTOM_ERROR_CONSTRUCT_TOO_FAR = 48, // Your Iron Rune Construct is out of range. - SPELL_CUSTOM_ERROR_REQUIRES_GRAND_MASTER_ENGINEER = 49, // Requires Grand Master Engineer - SPELL_CUSTOM_ERROR_CANT_USE_THAT_MOUNT = 50, // You can't use that mount. - SPELL_CUSTOM_ERROR_NOONE_TO_EJECT = 51, // There is nobody to eject! - SPELL_CUSTOM_ERROR_TARGET_MUST_BE_BOUND = 52, // The target must be bound to you. - SPELL_CUSTOM_ERROR_TARGET_MUST_BE_UNDEAD = 53, // Target must be undead. - SPELL_CUSTOM_ERROR_TARGET_TOO_FAR = 54, // You have no target or your target is too far away. - SPELL_CUSTOM_ERROR_MISSING_DARK_MATTER = 55, // Missing Reagents: Dark Matter - SPELL_CUSTOM_ERROR_CANT_USE_THAT_ITEM = 56, // You can't use that item - SPELL_CUSTOM_ERROR_CANT_DO_WHILE_CYCYLONED = 57, // You can't do that while Cycloned - SPELL_CUSTOM_ERROR_TARGET_HAS_SCROLL = 58, // Target is already affected by a scroll - SPELL_CUSTOM_ERROR_POISON_TOO_STRONG = 59, // That anti-venom is not strong enough to dispel that poison - SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED = 60, // You must have a lance equipped. - SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_MAIDEN = 61, // You must be near the Maiden of Winter's Breath Lake. - SPELL_CUSTOM_ERROR_LEARNED_EVERYTHING = 62, // You have learned everything from that book - SPELL_CUSTOM_ERROR_PET_IS_DEAD = 63, // Your pet is dead - SPELL_CUSTOM_ERROR_NO_VALID_TARGETS = 64, // There are no valid targets within range. - SPELL_CUSTOM_ERROR_GM_ONLY = 65, // Only GMs may use that. Your account has been reported for investigation. - SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_58 = 66, // You must reach level 58 to use this portal. - SPELL_CUSTOM_ERROR_AT_HONOR_CAP = 67, // You already have the maximum amount of honor. - SPELL_CUSTOM_ERROR_HAVE_HOT_ROD = 68, // You already have a Hot Rod. - SPELL_CUSTOM_ERROR_PARTYGOER_MORE_BUBBLY = 69, // This partygoer wants some more bubbly - SPELL_CUSTOM_ERROR_PARTYGOER_NEED_BUCKET = 70, // This partygoer needs a bucket! - SPELL_CUSTOM_ERROR_PARTYGOER_WANT_TO_DANCE = 71, // This partygoer wants to dance with you. - SPELL_CUSTOM_ERROR_PARTYGOER_WANT_FIREWORKS = 72, // This partygoer wants to see some fireworks. - SPELL_CUSTOM_ERROR_PARTYGOER_WANT_APPETIZER = 73, // This partygoer wants some more hors d'oeuvres. - SPELL_CUSTOM_ERROR_GOBLIN_BATTERY_DEPLETED = 74, // The Goblin All-In-1-Der Belt's battery is depleted. - SPELL_CUSTOM_ERROR_MUST_HAVE_DEMONIC_CIRCLE = 75, // You must have a demonic circle active. - SPELL_CUSTOM_ERROR_AT_MAX_RAGE = 76, // You already have maximum rage - SPELL_CUSTOM_ERROR_REQUIRES_350_ENGINEERING = 77, // Requires Engineering (350) - SPELL_CUSTOM_ERROR_SOUL_BELONGS_TO_LICH_KING = 78, // Your soul belongs to the Lich King - SPELL_CUSTOM_ERROR_ATTENDANT_HAS_PONY = 79, // Your attendant already has an Argent Pony - SPELL_CUSTOM_ERROR_GOBLIN_STARTING_MISSION = 80, // First, Overload the Defective Generator, Activate the Leaky Stove, and Drop a Cigar on the Flammable Bed. - SPELL_CUSTOM_ERROR_GASBOT_ALREADY_SENT = 81, // You've already sent in the Gasbot and destroyed headquarters! - SPELL_CUSTOM_ERROR_GOBLIN_IS_PARTIED_OUT = 82, // This goblin is all partied out! - SPELL_CUSTOM_ERROR_MUST_HAVE_FIRE_TOTEM = 83, // You must have a Fire Totem active. - SPELL_CUSTOM_ERROR_CANT_TARGET_VAMPIRES = 84, // You may not bite other vampires. - SPELL_CUSTOM_ERROR_PET_ALREADY_AT_YOUR_LEVEL = 85, // Your pet is already at your level. - SPELL_CUSTOM_ERROR_MISSING_ITEM_REQUIREMENS = 86, // You do not meet the level requirements for this item. - SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS = 87, // There are too many Mutated Abominations. - SPELL_CUSTOM_ERROR_ALL_POTIONS_USED = 88, // The potions have all been depleted by Professor Putricide. - SPELL_CUSTOM_ERROR_DEFEATED_ENOUGH_ALREADY = 89, // You have already defeated enough of them. - SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_65 = 90, // Requires level 65 - SPELL_CUSTOM_ERROR_DESTROYED_KTC_OIL_PLATFORM = 91, // You have already destroyed the KTC Oil Platform. - SPELL_CUSTOM_ERROR_LAUNCHED_ENOUGH_CAGES = 92, // You have already launched enough cages. - SPELL_CUSTOM_ERROR_REQUIRES_BOOSTER_ROCKETS = 93, // Requires Single-Stage Booster Rockets. Return to Hobart Grapplehammer to get more. - SPELL_CUSTOM_ERROR_ENOUGH_WILD_CLUCKERS = 94, // You have already captured enough wild cluckers. - SPELL_CUSTOM_ERROR_REQUIRES_CONTROL_FIREWORKS = 95, // Requires Remote Control Fireworks. Return to Hobart Grapplehammer to get more. - SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_RECRUITS = 96, // You already have the max number of recruits. - SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_VOLUNTEERS = 97, // You already have the max number of volunteers. - SPELL_CUSTOM_ERROR_FROSTMOURNE_RENDERED_RESURRECT = 98, // Frostmourne has rendered you unable to resurrect. - SPELL_CUSTOM_ERROR_CANT_MOUNT_WITH_SHAPESHIFT = 99, // You can't mount while affected by that shapeshift. - SPELL_CUSTOM_ERROR_FAWNS_ALREADY_FOLLOWING = 100, // Three fawns are already following you! - SPELL_CUSTOM_ERROR_ALREADY_HAVE_RIVER_BOAT = 101, // You already have a River Boat. - SPELL_CUSTOM_ERROR_NO_ACTIVE_ENCHANTMENT = 102, // You have no active enchantment to unleash. - SPELL_CUSTOM_ERROR_ENOUGH_HIGHBOURNE_SOULS = 103, // You have bound enough Highborne souls. Return to Arcanist Valdurian. - SPELL_CUSTOM_ERROR_ATLEAST_40YD_FROM_OIL_DRILLING = 104, // You must be at least 40 yards away from all other Oil Drilling Rigs. - SPELL_CUSTOM_ERROR_ABOVE_ENSLAVED_PEARL_MINER = 106, // You must be above the Enslaved Pearl Miner. - SPELL_CUSTOM_ERROR_MUST_TARGET_CORPSE_SPECIAL_1 = 107, // You must target the corpse of a Seabrush Terrapin, Scourgut Remora, or Spinescale Hammerhead. - SPELL_CUSTOM_ERROR_SLAGHAMMER_ALREADY_PRISONER = 108, // Ambassador Slaghammer is already your prisoner. - SPELL_CUSTOM_ERROR_REQUIRE_ATTUNED_LOCATION_1 = 109, // Requires a location that is attuned with the Naz'jar Battlemaiden. - SPELL_CUSTOM_ERROR_NEED_TO_FREE_DRAKE_FIRST = 110, // Free the Drake from the net first! - SPELL_CUSTOM_ERROR_DRAGONMAW_ALLIES_ALREADY_FOLLOW = 111, // You already have three Dragonmaw allies following you. - SPELL_CUSTOM_ERROR_REQUIRE_OPPOSABLE_THUMBS = 112, // Requires Opposable Thumbs. - SPELL_CUSTOM_ERROR_NOT_ENOUGH_HEALTH_2 = 113, // Not enough health - SPELL_CUSTOM_ERROR_ENOUGH_FORSAKEN_TROOPERS = 114, // You already have enough Forsaken Troopers. - SPELL_CUSTOM_ERROR_CANNOT_JUMP_TO_BOULDER = 115, // You cannot jump to another boulder yet. - SPELL_CUSTOM_ERROR_SKILL_TOO_HIGH = 116, // Skill too high. - SPELL_CUSTOM_ERROR_ALREADY_6_SURVIVORS_RESCUED = 117, // You have already rescued 6 Survivors. - SPELL_CUSTOM_ERROR_MUST_FACE_SHIPS_FROM_BALLOON = 118, // You need to be facing the ships from the rescue balloon. - SPELL_CUSTOM_ERROR_CANNOT_SUPERVISE_MORE_CULTISTS = 119, // You cannot supervise more than 5 Arrested Cultists at a time. - SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_85 = 120, // You must reach level 85 to use this portal. - SPELL_CUSTOM_ERROR_MUST_BE_BELOW_35_HEALTH = 121, // Your target must be below 35% health. - SPELL_CUSTOM_ERROR_MUST_SELECT_TALENT_SPECIAL = 122, // You must select a talent specialization first. - SPELL_CUSTOM_ERROR_TOO_WISE_AND_POWERFUL = 123, // You are too wise and powerful to gain any benefit from that item. - SPELL_CUSTOM_ERROR_TOO_CLOSE_ARGENT_LIGHTWELL = 124, // You are within 10 yards of another Argent Lightwell. - SPELL_CUSTOM_ERROR_NOT_WHILE_SHAPESHIFTED = 125, // You can't do that while shapeshifted. - SPELL_CUSTOM_ERROR_MANA_GEM_IN_BANK = 126, // You already have a Mana Gem in your bank. - SPELL_CUSTOM_ERROR_FLAME_SHOCK_NOT_ACTIVE = 127, // You must have at least one Flame Shock active. - SPELL_CUSTOM_ERROR_CANT_TRANSFORM = 128, // You cannot transform right now - SPELL_CUSTOM_ERROR_PET_MUST_BE_ATTACKING = 129, // Your pet must be attacking a target. - SPELL_CUSTOM_ERROR_GNOMISH_ENGINEERING = 130, // Requires Gnomish Engineering - SPELL_CUSTOM_ERROR_GOBLIN_ENGINEERING = 131, // Requires Goblin Engineering - SPELL_CUSTOM_ERROR_NO_TARGET = 132, // You have no target. - SPELL_CUSTOM_ERROR_PET_OUT_OF_RANGE = 133, // Your Pet is out of range of the target. - SPELL_CUSTOM_ERROR_HOLDING_FLAG = 134, // You can't do that while holding the flag. - SPELL_CUSTOM_ERROR_TARGET_HOLDING_FLAG = 135, // You can't do that to targets holding the flag. - SPELL_CUSTOM_ERROR_PORTAL_NOT_OPEN = 136, // The portal is not yet open. Continue helping the druids at the Sanctuary of Malorne. - SPELL_CUSTOM_ERROR_AGGRA_AIR_TOTEM = 137, // You need to be closer to Aggra's Air Totem, in the west. - SPELL_CUSTOM_ERROR_AGGRA_WATER_TOTEM = 138, // You need to be closer to Aggra's Water Totem, in the north. - SPELL_CUSTOM_ERROR_AGGRA_EARTH_TOTEM = 139, // You need to be closer to Aggra's Earth Totem, in the east. - SPELL_CUSTOM_ERROR_AGGRA_FIRE_TOTEM = 140, // You need to be closer to Aggra's Fire Totem, near Thrall. - SPELL_CUSTOM_ERROR_TARGET_HAS_STARTDUST_2 = 148, // Target is already affected by Stardust No. 2. - SPELL_CUSTOM_ERROR_ELEMENTIUM_GEM_CLUSTERS = 149 // You cannot deconstruct Elementium Gem Clusters while collecting them! + SPELL_CUSTOM_ERROR_NONE = 0, + SPELL_CUSTOM_ERROR_CUSTOM_MSG = 1, // Something bad happened, and we want to display a custom message! + SPELL_CUSTOM_ERROR_ALEX_BROKE_QUEST = 2, // Alex broke your quest! Thank him later! + SPELL_CUSTOM_ERROR_NEED_HELPLESS_VILLAGER = 3, // This spell may only be used on Helpless Wintergarde Villagers that have not been rescued. + SPELL_CUSTOM_ERROR_NEED_WARSONG_DISGUISE = 4, // Requires that you be wearing the Warsong Orc Disguise. + SPELL_CUSTOM_ERROR_REQUIRES_PLAGUE_WAGON = 5, // You must be closer to a plague wagon in order to drop off your 7th Legion Siege Engineer. + SPELL_CUSTOM_ERROR_CANT_TARGET_FRIENDLY_NONPARTY = 6, // You cannot target friendly units outside your party. + SPELL_CUSTOM_ERROR_NEED_CHILL_NYMPH = 7, // You must target a weakened chill nymph. + SPELL_CUSTOM_ERROR_MUST_BE_IN_ENKILAH = 8, // The Imbued Scourge Shroud will only work when equipped in the Temple City of En'kilah. + SPELL_CUSTOM_ERROR_REQUIRES_CORPSE_DUST = 9, // Requires Corpse Dust + SPELL_CUSTOM_ERROR_CANT_SUMMON_GARGOYLE = 10, // You cannot summon another gargoyle yet. + SPELL_CUSTOM_ERROR_NEED_CORPSE_DUST_IF_NO_TARGET = 11, // Requires Corpse Dust if the target is not dead and humanoid. + SPELL_CUSTOM_ERROR_MUST_BE_AT_SHATTERHORN = 12, // Can only be placed near Shatterhorn + SPELL_CUSTOM_ERROR_MUST_TARGET_PROTO_DRAKE_EGG = 13, // You must first select a Proto-Drake Egg. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_TREE = 14, // You must be close to a marked tree. + SPELL_CUSTOM_ERROR_MUST_TARGET_TURKEY = 15, // You must target a Fjord Turkey. + SPELL_CUSTOM_ERROR_MUST_TARGET_HAWK = 16, // You must target a Fjord Hawk. + SPELL_CUSTOM_ERROR_TOO_FAR_FROM_BOUY = 17, // You are too far from the bouy. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_OIL_SLICK = 18, // Must be used near an oil slick. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_BOUY = 19, // You must be closer to the buoy! + SPELL_CUSTOM_ERROR_WYRMREST_VANQUISHER = 20, // You may only call for the aid of a Wyrmrest Vanquisher in Wyrmrest Temple, The Dragon Wastes, Galakrond's Rest or The Wicked Coil. + SPELL_CUSTOM_ERROR_MUST_TARGET_ICE_HEART_JORMUNGAR = 21, // That can only be used on a Ice Heart Jormungar Spawn. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_SINKHOLE = 22, // You must be closer to a sinkhole to use your map. + SPELL_CUSTOM_ERROR_REQUIRES_HAROLD_LANE = 23, // You may only call down a stampede on Harold Lane. + SPELL_CUSTOM_ERROR_REQUIRES_GAMMOTH_MAGNATAUR = 24, // You may only use the Pouch of Crushed Bloodspore on Gammothra or other magnataur in the Bloodspore Plains and Gammoth. + SPELL_CUSTOM_ERROR_MUST_BE_IN_RESURRECTION_CHAMBER = 25, // Requires the magmawyrm resurrection chamber in the back of the Maw of Neltharion. + SPELL_CUSTOM_ERROR_CANT_CALL_WINTERGARDE_HERE = 26, // You may only call down a Wintergarde Gryphon in Wintergarde Keep or the Carrion Fields. + SPELL_CUSTOM_ERROR_MUST_TARGET_WILHELM = 27, // What are you doing? Only aim that thing at Wilhelm! + SPELL_CUSTOM_ERROR_NOT_ENOUGH_HEALTH = 28, // Not enough health! + SPELL_CUSTOM_ERROR_NO_NEARBY_CORPSES = 29, // There are no nearby corpses to use. + SPELL_CUSTOM_ERROR_TOO_MANY_GHOULS = 30, // You've created enough ghouls. Return to Gothik the Harvester at Death's Breach. + SPELL_CUSTOM_ERROR_GO_FURTHER_FROM_SUNDERED_SHARD = 31, // Your companion does not want to come here. Go further from the Sundered Shard. + SPELL_CUSTOM_ERROR_MUST_BE_IN_CAT_FORM = 32, // Must be in Cat Form + SPELL_CUSTOM_ERROR_MUST_BE_DEATH_KNIGHT = 33, // Only Death Knights may enter Ebon Hold. + SPELL_CUSTOM_ERROR_MUST_BE_IN_BEAR_FORM = 34, // Must be in Bear Form + SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER = 35, // You must be within range of a Helpless Wintergarde Villager. + SPELL_CUSTOM_ERROR_CANT_TARGET_ELEMENTAL_MECHANICAL = 36, // You cannot target an elemental or mechanical corpse. + SPELL_CUSTOM_ERROR_MUST_HAVE_USED_DALARAN_CRYSTAL = 37, // This teleport crystal cannot be used until the teleport crystal in Dalaran has been used at least once. + SPELL_CUSTOM_ERROR_YOU_ALREADY_HOLD_SOMETHING = 38, // You are already holding something in your hand. You must throw the creature in your hand before picking up another. + SPELL_CUSTOM_ERROR_YOU_DONT_HOLD_ANYTHING = 39, // You don't have anything to throw! Find a Vargul and use Gymer Grab to pick one up! + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_VALDURAN = 40, // Bouldercrag's War Horn can only be used within 10 yards of Valduran the Stormborn. + SPELL_CUSTOM_ERROR_NO_PASSENGER = 41, // You are not carrying a passenger. There is nobody to drop off. + SPELL_CUSTOM_ERROR_CANT_BUILD_MORE_VEHICLES = 42, // You cannot build any more siege vehicles. + SPELL_CUSTOM_ERROR_ALREADY_CARRYING_CRUSADER = 43, // You are already carrying a captured Argent Crusader. You must return to the Argent Vanguard infirmary and drop off your passenger before you may pick up another. + SPELL_CUSTOM_ERROR_CANT_DO_WHILE_ROOTED = 44, // You can't do that while rooted. + SPELL_CUSTOM_ERROR_REQUIRES_NEARBY_TARGET = 45, // Requires a nearby target. + SPELL_CUSTOM_ERROR_NOTHING_TO_DISCOVER = 46, // Nothing left to discover. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_TARGETS = 47, // No targets close enough to bluff. + SPELL_CUSTOM_ERROR_CONSTRUCT_TOO_FAR = 48, // Your Iron Rune Construct is out of range. + SPELL_CUSTOM_ERROR_REQUIRES_GRAND_MASTER_ENGINEER = 49, // Requires Engineering (350) + SPELL_CUSTOM_ERROR_CANT_USE_THAT_MOUNT = 50, // You can't use that mount. + SPELL_CUSTOM_ERROR_NOONE_TO_EJECT = 51, // There is nobody to eject! + SPELL_CUSTOM_ERROR_TARGET_MUST_BE_BOUND = 52, // The target must be bound to you. + SPELL_CUSTOM_ERROR_TARGET_MUST_BE_UNDEAD = 53, // Target must be undead. + SPELL_CUSTOM_ERROR_TARGET_TOO_FAR = 54, // You have no target or your target is too far away. + SPELL_CUSTOM_ERROR_MISSING_DARK_MATTER = 55, // Missing Reagents: Dark Matter + SPELL_CUSTOM_ERROR_CANT_USE_THAT_ITEM = 56, // You can't use that item + SPELL_CUSTOM_ERROR_CANT_DO_WHILE_CYCYLONED = 57, // You can't do that while Cycloned + SPELL_CUSTOM_ERROR_TARGET_HAS_SCROLL = 58, // Target is already affected by a similar effect + SPELL_CUSTOM_ERROR_POISON_TOO_STRONG = 59, // That anti-venom is not strong enough to dispel that poison + SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED = 60, // You must have a lance equipped. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_MAIDEN = 61, // You must be near the Maiden of Winter's Breath Lake. + SPELL_CUSTOM_ERROR_LEARNED_EVERYTHING = 62, // You have learned everything from that book + SPELL_CUSTOM_ERROR_PET_IS_DEAD = 63, // Your pet is dead + SPELL_CUSTOM_ERROR_NO_VALID_TARGETS = 64, // There are no valid targets within range. + SPELL_CUSTOM_ERROR_GM_ONLY = 65, // Only GMs may use that. Your account has been reported for investigation. + SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_58 = 66, // You must reach level 58 to use this portal. + SPELL_CUSTOM_ERROR_AT_HONOR_CAP = 67, // You already have the maximum amount of honor. + SPELL_CUSTOM_ERROR_HAVE_HOT_ROD = 68, // You already have a Hot Rod. + SPELL_CUSTOM_ERROR_PARTYGOER_MORE_BUBBLY = 69, // This partygoer wants some more bubbly. + SPELL_CUSTOM_ERROR_PARTYGOER_NEED_BUCKET = 70, // This partygoer needs a bucket! + SPELL_CUSTOM_ERROR_PARTYGOER_WANT_TO_DANCE = 71, // This partygoer wants to dance with you. + SPELL_CUSTOM_ERROR_PARTYGOER_WANT_FIREWORKS = 72, // This partygoer wants to see some fireworks. + SPELL_CUSTOM_ERROR_PARTYGOER_WANT_APPETIZER = 73, // This partygoer wants some more hors d'oeuvres. + SPELL_CUSTOM_ERROR_GOBLIN_BATTERY_DEPLETED = 74, // The Goblin All-In-1-Der Belt's battery is depleted. + SPELL_CUSTOM_ERROR_MUST_HAVE_DEMONIC_CIRCLE = 75, // You must have a demonic circle active. + SPELL_CUSTOM_ERROR_AT_MAX_RAGE = 76, // You already have maximum rage + SPELL_CUSTOM_ERROR_REQUIRES_350_ENGINEERING = 77, // Requires Engineering (350) + SPELL_CUSTOM_ERROR_SOUL_BELONGS_TO_LICH_KING = 78, // Your soul belongs to the Lich King + SPELL_CUSTOM_ERROR_ATTENDANT_HAS_PONY = 79, // Your attendant already has an Argent Pony + SPELL_CUSTOM_ERROR_GOBLIN_STARTING_MISSION = 80, // First, Overload the Defective Generator, Activate the Leaky Stove, and Drop a Cigar on the Flammable Bed. + SPELL_CUSTOM_ERROR_GASBOT_ALREADY_SENT = 81, // You've already sent in the Gasbot and destroyed headquarters! + SPELL_CUSTOM_ERROR_GOBLIN_IS_PARTIED_OUT = 82, // This goblin is all partied out! + SPELL_CUSTOM_ERROR_MUST_HAVE_FIRE_TOTEM = 83, // You must have a Magma, Flametongue, or Fire Elemental Totem active. + SPELL_CUSTOM_ERROR_CANT_TARGET_VAMPIRES = 84, // You may not bite other vampires. + SPELL_CUSTOM_ERROR_PET_ALREADY_AT_YOUR_LEVEL = 85, // Your pet is already at your level. + SPELL_CUSTOM_ERROR_MISSING_ITEM_REQUIREMENS = 86, // You do not meet the level requirements for this item. + SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS = 87, // There are too many Mutated Abominations. + SPELL_CUSTOM_ERROR_ALL_POTIONS_USED = 88, // The potions have all been depleted by Professor Putricide. + SPELL_CUSTOM_ERROR_DEFEATED_ENOUGH_ALREADY = 89, // You have already defeated enough of them. + SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_65 = 90, // Requires level 65 + SPELL_CUSTOM_ERROR_DESTROYED_KTC_OIL_PLATFORM = 91, // You have already destroyed the KTC Oil Platform. + SPELL_CUSTOM_ERROR_LAUNCHED_ENOUGH_CAGES = 92, // You have already launched enough cages. + SPELL_CUSTOM_ERROR_REQUIRES_BOOSTER_ROCKETS = 93, // Requires Single-Stage Booster Rockets. Return to Hobart Grapplehammer to get more. + SPELL_CUSTOM_ERROR_ENOUGH_WILD_CLUCKERS = 94, // You have already captured enough wild cluckers. + SPELL_CUSTOM_ERROR_REQUIRES_CONTROL_FIREWORKS = 95, // Requires Remote Control Fireworks. Return to Hobart Grapplehammer to get more. + SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_RECRUITS = 96, // You already have the max number of recruits. + SPELL_CUSTOM_ERROR_MAX_NUMBER_OF_VOLUNTEERS = 97, // You already have the max number of volunteers. + SPELL_CUSTOM_ERROR_FROSTMOURNE_RENDERED_RESURRECT = 98, // Frostmourne has rendered you unable to resurrect. + SPELL_CUSTOM_ERROR_CANT_MOUNT_WITH_SHAPESHIFT = 99, // You can't mount while affected by that shapeshift. + SPELL_CUSTOM_ERROR_FAWNS_ALREADY_FOLLOWING = 100, // Three fawns are already following you! + SPELL_CUSTOM_ERROR_ALREADY_HAVE_RIVER_BOAT = 101, // You already have a River Boat. + SPELL_CUSTOM_ERROR_NO_ACTIVE_ENCHANTMENT = 102, // You have no active enchantment to unleash. + SPELL_CUSTOM_ERROR_ENOUGH_HIGHBOURNE_SOULS = 103, // You have bound enough Highborne souls. Return to Arcanist Valdurian. + SPELL_CUSTOM_ERROR_ATLEAST_40YD_FROM_OIL_DRILLING = 104, // You must be at least 40 yards away from all other Oil Drilling Rigs. + SPELL_CUSTOM_ERROR_ABOVE_ENSLAVED_PEARL_MINER = 106, // You must be above the Enslaved Pearl Miner. + SPELL_CUSTOM_ERROR_MUST_TARGET_CORPSE_SPECIAL_1 = 107, // You must target the corpse of a Seabrush Terrapin, Scourgut Remora, or Spinescale Hammerhead. + SPELL_CUSTOM_ERROR_SLAGHAMMER_ALREADY_PRISONER = 108, // Ambassador Slaghammer is already your prisoner. + SPELL_CUSTOM_ERROR_REQUIRE_ATTUNED_LOCATION_1 = 109, // Requires a location that is attuned with the Naz'jar Battlemaiden. + SPELL_CUSTOM_ERROR_NEED_TO_FREE_DRAKE_FIRST = 110, // Free the Drake from the net first! + SPELL_CUSTOM_ERROR_DRAGONMAW_ALLIES_ALREADY_FOLLOW = 111, // You already have three Dragonmaw allies following you. + SPELL_CUSTOM_ERROR_REQUIRE_OPPOSABLE_THUMBS = 112, // Requires Opposable Thumbs. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_HEALTH_2 = 113, // Not enough health + SPELL_CUSTOM_ERROR_ENOUGH_FORSAKEN_TROOPERS = 114, // You already have enough Forsaken Troopers. + SPELL_CUSTOM_ERROR_CANNOT_JUMP_TO_BOULDER = 115, // You cannot jump to another boulder yet. + SPELL_CUSTOM_ERROR_SKILL_TOO_HIGH = 116, // Skill too high. + SPELL_CUSTOM_ERROR_ALREADY_6_SURVIVORS_RESCUED = 117, // You have already rescued 6 Survivors. + SPELL_CUSTOM_ERROR_MUST_FACE_SHIPS_FROM_BALLOON = 118, // You need to be facing the ships from the rescue balloon. + SPELL_CUSTOM_ERROR_CANNOT_SUPERVISE_MORE_CULTISTS = 119, // You cannot supervise more than 5 Arrested Cultists at a time. + SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_85 = 120, // You must reach level 85 to use this portal. + SPELL_CUSTOM_ERROR_MUST_BE_BELOW_35_HEALTH = 121, // Your target must be below 35% health. + SPELL_CUSTOM_ERROR_MUST_SELECT_SPECIALIZATION = 122, // You must select a specialization first. + SPELL_CUSTOM_ERROR_TOO_WISE_AND_POWERFUL = 123, // You are too wise and powerful to gain any benefit from that item. + SPELL_CUSTOM_ERROR_TOO_CLOSE_ARGENT_LIGHTWELL = 124, // You are within 10 yards of another Argent Lightwell. + SPELL_CUSTOM_ERROR_NOT_WHILE_SHAPESHIFTED = 125, // You can't do that while shapeshifted. + SPELL_CUSTOM_ERROR_MANA_GEM_IN_BANK = 126, // You already have a Mana Gem in your bank. + SPELL_CUSTOM_ERROR_FLAME_SHOCK_NOT_ACTIVE = 127, // You must have at least one Flame Shock active. + SPELL_CUSTOM_ERROR_CANT_TRANSFORM = 128, // You cannot transform right now + SPELL_CUSTOM_ERROR_PET_MUST_BE_ATTACKING = 129, // Your pet must be attacking a target. + SPELL_CUSTOM_ERROR_GNOMISH_ENGINEERING = 130, // Requires Gnomish Engineering + SPELL_CUSTOM_ERROR_GOBLIN_ENGINEERING = 131, // Requires Goblin Engineering + SPELL_CUSTOM_ERROR_NO_TARGET = 132, // You have no target. + SPELL_CUSTOM_ERROR_PET_OUT_OF_RANGE = 133, // Your Pet is out of range of the target. + SPELL_CUSTOM_ERROR_HOLDING_FLAG = 134, // You can't do that while holding the flag. + SPELL_CUSTOM_ERROR_TARGET_HOLDING_FLAG = 135, // You can't do that to targets holding the flag. + SPELL_CUSTOM_ERROR_PORTAL_NOT_OPEN = 136, // The portal is not yet open. Continue helping the druids at the Sanctuary of Malorne. + SPELL_CUSTOM_ERROR_AGGRA_AIR_TOTEM = 137, // You need to be closer to Aggra's Air Totem, in the west. + SPELL_CUSTOM_ERROR_AGGRA_WATER_TOTEM = 138, // You need to be closer to Aggra's Water Totem, in the north. + SPELL_CUSTOM_ERROR_AGGRA_EARTH_TOTEM = 139, // You need to be closer to Aggra's Earth Totem, in the east. + SPELL_CUSTOM_ERROR_AGGRA_FIRE_TOTEM = 140, // You need to be closer to Aggra's Fire Totem, near Thrall. + SPELL_CUSTOM_ERROR_FACING_WRONG_WAY = 141, // You are facing the wrong way. + SPELL_CUSTOM_ERROR_TOO_CLOSE_TO_MAKESHIFT_DYNAMITE = 142, // You are within 10 yards of another Makeshift Dynamite. + SPELL_CUSTOM_ERROR_NOT_NEAR_SAPPHIRE_SUNKEN_SHIP = 143, // You must be near the sunken ship at Sapphire's End in the Jade Forest. + SPELL_CUSTOM_ERROR_DEMONS_HEALTH_FULL = 144, // That demon's health is already full. + SPELL_CUSTOM_ERROR_ONYX_SERPENT_NOT_OVERHEAD = 145, // Wait until the Onyx Serpent is directly overhead. + SPELL_CUSTOM_ERROR_OBJECTIVE_ALREADY_COMPLETE = 146, // Your objective is already complete. + SPELL_CUSTOM_ERROR_PUSH_SAD_PANDA_TOWARDS_TOWN = 147, // You can only push Sad Panda towards Sad Panda Town! + SPELL_CUSTOM_ERROR_TARGET_HAS_STARTDUST_2 = 148, // Target is already affected by Stardust No. 2. + SPELL_CUSTOM_ERROR_ELEMENTIUM_GEM_CLUSTERS = 149, // You cannot deconstruct Elementium Gem Clusters while collecting them! + SPELL_CUSTOM_ERROR_YOU_DONT_HAVE_ENOUGH_HEALTH = 150, // You don't have enough health. + SPELL_CUSTOM_ERROR_YOU_CANNOT_USE_THE_GATEWAY_YET = 151, // You cannot use the gateway yet. + SPELL_CUSTOM_ERROR_CHOOSE_SPEC_FOR_ASCENDANCE = 152, // You must choose a specialization to use Ascendance. + SPELL_CUSTOM_ERROR_INSUFFICIENT_BLOOD_CHARGES = 153, // You have insufficient Blood Charges. + SPELL_CUSTOM_ERROR_NO_FULLY_DEPLETED_RUNES = 154, // No fully depleted runes. + SPELL_CUSTOM_ERROR_NO_MORE_CHARGES = 155, // No more charges. + SPELL_CUSTOM_ERROR_STATUE_IS_OUT_OF_RANGE_OF_TARGET = 156, // Statue is out of range of the target. + SPELL_CUSTOM_ERROR_YOU_DONT_HAVE_A_STATUE_SUMMONED = 157, // You don't have a statue summoned. + SPELL_CUSTOM_ERROR_YOU_HAVE_NO_SPIRIT_ACTIVE = 158, // You have no spirit active. + SPELL_CUSTOM_ERROR_BOTH_DISESASES_MUST_BE_ON_TARGET = 159, // Both Frost Fever and Blood Plague must be present on the target. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_WITH_ORB_OF_POWER = 160, // You can't do that while holding an Orb of Power. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_WHILE_JUMPING_OR_FALLING = 161, // You can't do that while jumping or falling. + SPELL_CUSTOM_ERROR_MUST_BE_TRANSFORMED_BY_POLYFORMIC_ACID = 162, // You must be transformed by Polyformic Acid. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_ACID_TO_STORE_TRANSFORMATION = 163, // There isn't enough acid left to store this transformation. + SPELL_CUSTOM_ERROR_MUST_HAVE_FLIGHT_MASTERS_LICENSE = 164, // You must obtain a Flight Master's License before using this spell. + SPELL_CUSTOM_ERROR_ALREADY_SAMPLED_SAP_FROM_FEEDER = 165, // You have already sampled sap from this Feeder. + SPELL_CUSTOM_ERROR_MUST_BE_NEWR_MANTID_FEEDER = 166, // Requires you to be near a Mantid Feeder in the Heart of Fear. + SPELL_CUSTOM_ERROR_TARGET_MUST_BE_IN_DIRECTLY_FRONT = 167, // Target must be directly in front of you. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_WHILE_MYTHIC_KEYSTONE_IS_ACTIVE = 168, // You can't do that while a Mythic Keystone is active. + SPELL_CUSTOM_ERROR_WRONG_CLASS_FOR_MOUNT = 169, // You are not the correct class for that mount. + SPELL_CUSTOM_ERROR_NOTHING_LEFT_TO_DISCOVER = 170, // Nothing left to discover. + SPELL_CUSTOM_ERROR_NO_EXPLOSIVES_AVAILABLE = 171, // There are no explosives available. + SPELL_CUSTOM_ERROR_YOU_MUST_BE_FLAGGED_FOR_PVP = 172, // You must be flagged for PvP. + SPELL_CUSTOM_ERROR_REQUIRES_BATTLE_RATIONS = 173, // Requires Battle Rations or Meaty Haunch + SPELL_CUSTOM_ERROR_REQUIRES_BRITTLE_ROOT = 174, // Requires Brittle Root + SPELL_CUSTOM_ERROR_REQUIRES_LABORERS_TOOL = 175, // Requires Laborer's Tool + SPELL_CUSTOM_ERROR_REQUIRES_UNEXPLODED_CANNONBALL = 176, // Requires Unexploded Cannonball + SPELL_CUSTOM_ERROR_REQUIRES_MISPLACED_KEG = 177, // Requires Misplaced Keg + SPELL_CUSTOM_ERROR_REQUIRES_LIQUID_FIRE = 178, // Requires Liquid Fire, Jungle Hops, or Spirit-kissed Water + SPELL_CUSTOM_ERROR_REQUIRES_KRASARI_IRON = 179, // Requires Krasari Iron + SPELL_CUSTOM_ERROR_REQUIRES_SPIRIT_KISSED_WATER = 180, // Requires Spirit-Kissed Water + SPELL_CUSTOM_ERROR_REQUIRES_SNAKE_OIL = 181, // Requires Snake Oil + SPELL_CUSTOM_ERROR_SCENARIO_IS_IN_PROGRESS = 182, // You can't do that while a Scenario is in progress. + SPELL_CUSTOM_ERROR_REQUIRES_DARKMOON_FAIRE_OPEN = 183, // Requires the Darkmoon Faire to be open. + SPELL_CUSTOM_ERROR_ALREADY_AT_VALOR_CAP = 184, // Already at Valor cap + SPELL_CUSTOM_ERROR_ALREADY_COMMENDED_BY_THIS_FACTION = 185, // Already commended by this faction + SPELL_CUSTOM_ERROR_OUT_OF_COINS = 186, // Out of coins! Pickpocket humanoids to get more. + SPELL_CUSTOM_ERROR_ONLY_ONE_ELEMENTAL_SPIRIT = 187, // Only one elemental spirit on a target at a time. + SPELL_CUSTOM_ERROR_DONT_KNOW_HOW_TO_TAME_DIREHORNS = 188, // You do not know how to tame Direhorns. + SPELL_CUSTOM_ERROR_MUST_BE_NEAR_BLOODIED_COURT_GATE = 189, // You must be near the Bloodied Court gate. + SPELL_CUSTOM_ERROR_YOU_ARE_NOT_ELECTRIFIED = 190, // You are not Electrified. + SPELL_CUSTOM_ERROR_THERE_IS_NOTHING_TO_BE_FETCHED = 191, // There is nothing to be fetched. + SPELL_CUSTOM_ERROR_REQUIRES_THE_THUNDER_FORGE = 192, // Requires The Thunder Forge. + SPELL_CUSTOM_ERROR_CANNOT_USE_THE_DICE_AGAIN_YET = 193, // You cannot use the dice again yet. + SPELL_CUSTOM_ERROR_ALREADY_MEMBER_OF_BRAWLERS_GUILD = 194, // You are already a member of the Brawler's Guild. + SPELL_CUSTOM_ERROR_CANT_CHANGE_SPEC_IN_CELESTIAL_CHALLENGE = 195, // You may not change talent specializations during a celestial challenge. + SPELL_CUSTOM_ERROR_SPEC_DOES_MATCH_CHALLENGE = 196, // Your talent specialization does not match the selected challenge. + SPELL_CUSTOM_ERROR_YOU_DONT_HAVE_ENOUGH_CURRENCY = 197, // You don't have enough currency to do that. + SPELL_CUSTOM_ERROR_TARGET_CANNOT_BENEFIT_FROM_SPELL = 198, // Target cannot benefit from that spell + SPELL_CUSTOM_ERROR_YOU_CAN_ONLY_HAVE_ONE_HEALING_RAIN = 199, // You can only have one Healing Rain active at a time. + SPELL_CUSTOM_ERROR_THE_DOOR_IS_LOCKED = 200, // The door is locked. + SPELL_CUSTOM_ERROR_YOU_NEED_TO_SELECT_WAITING_CUSTOMER = 201, // You need to select a customer who is waiting in line first. + SPELL_CUSTOM_ERROR_CANT_CHANGE_SPEC_DURING_TRIAL = 202, // You may not change specialization while a trial is in progress. + SPELL_CUSTOM_ERROR_CUSTOMER_NEED_TO_GET_IN_LINE = 203, // You must wait for customers to get in line before you can select them to be seated. + SPELL_CUSTOM_ERROR_MUST_BE_CLOSER_TO_GAZLOWE_OBJECTIVE = 204, // Must be closer to one of Gazlowe's objectives to deploy! + SPELL_CUSTOM_ERROR_MUST_BE_CLOSER_TO_THAELIN_OBJECTIVE = 205, // Must be closer to one of Thaelin's objectives to deploy! + SPELL_CUSTOM_ERROR_YOUR_PACK_OF_VOLEN_IS_FULL = 206, // Your pack of volen is already full! + SPELL_CUSTOM_ERROR_REQUIRES_600_MINING_OR_BLACKSMITHING = 207, // Requires 600 Mining or Blacksmithing + SPELL_CUSTOM_ERROR_ARKONITE_PROTECTOR_NOT_IN_RANGE = 208, // The Arkonite Protector is not in range. + SPELL_CUSTOM_ERROR_TARGET_CANNOT_HAVE_BOTH_BEACONS = 209, // You are unable to have both Beacon of Light and Beacon of Faith on the same target. + SPELL_CUSTOM_ERROR_CAN_ONLY_USE_ON_AFK_PLAYER = 210, // Can only be used on AFK players. + SPELL_CUSTOM_ERROR_NO_LOOTABLE_CORPSES_IN_RANGE = 211, // No lootable corpse in range + SPELL_CUSTOM_ERROR_CHIMAERON_TOO_CALM_TO_TAME = 212, // Chimaeron is too calm to tame right now. + SPELL_CUSTOM_ERROR_CAN_ONLY_CARRY_ONE_TYPE_OF_MUNITIONS = 213, // You may only carry one type of Blackrock Munitions. + SPELL_CUSTOM_ERROR_OUT_OF_BLACKROCK_MUNITIONS = 214, // You have run out of Blackrock Munitions. + SPELL_CUSTOM_ERROR_CARRYING_MAX_AMOUNT_OF_MUNITIONS = 215, // You are carrying the maximum amount of Blackrock Munitions. + SPELL_CUSTOM_ERROR_TARGET_IS_TOO_FAR_AWAY = 216, // Target is too far away. + SPELL_CUSTOM_ERROR_CANNOT_USE_DURING_BOSS_ENCOUNTER = 217, // Cannot use during a boss encounter. + SPELL_CUSTOM_ERROR_MUST_HAVE_MELEE_WEAPON_IN_BOTH_HANDS = 218, // Must have a Melee Weapon equipped in both hands + SPELL_CUSTOM_ERROR_YOUR_WEAPON_HAS_OVERHEATED = 219, // Your weapon has overheated. + SPELL_CUSTOM_ERROR_MUST_BE_PARTY_LEADER_TO_QUEUE = 220, // You must be a party leader to queue your group. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_FUEL = 221, // Not enough fuel + SPELL_CUSTOM_ERROR_YOU_ARE_ALREADY_DISGUISED = 222, // You are already disguised! + SPELL_CUSTOM_ERROR_YOU_NEED_TO_BE_IN_SHREDDER = 223, // You need to be in a Shredder to chop this up! + SPELL_CUSTOM_ERROR_FOOD_CANNOT_EAT_FOOD = 224, // Food cannot eat food + SPELL_CUSTOM_ERROR_MYSTERIOUS_FORCE_PREVENTS_OPENING_CHEST = 225, // A mysterious force prevents you from opening the chest. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_WHILE_HOLDING_EMPOWERED_ORE = 226, // You can't do that while holding Empowered Ore. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_AMMUNITION = 227, // Not enough Ammunition! + SPELL_CUSTOM_ERROR_YOU_NEED_BEATFACE_THE_GLADIATOR = 228, // You need Beatface the Sparring Arena gladiator to break this! + SPELL_CUSTOM_ERROR_YOU_CAN_ONLY_HAVE_ONE_WAYGATE = 229, // You can only have one waygate open. Disable an activated waygate first. + SPELL_CUSTOM_ERROR_YOU_CAN_ONLY_HAVE_TWO_WAYGATES = 230, // You can only have two waygates open. Disable an activated waygate first. + SPELL_CUSTOM_ERROR_YOU_CAN_ONLY_HAVE_THREE_WAYGATES = 231, // You can only have three waygates open. Disable an activated waygate first. + SPELL_CUSTOM_ERROR_REQUIRES_MAGE_TOWER = 232, // Requires Mage Tower + SPELL_CUSTOM_ERROR_REQUIRES_SPIRIT_LODGE = 233, // Requires Spirit Lodge + SPELL_CUSTOM_ERROR_FROST_WYRM_ALREADY_ACTIVE = 234, // A Frost Wyrm is already active. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_RUNIC_POWER = 235, // Not enough Runic Power + SPELL_CUSTOM_ERROR_YOU_ARE_THE_PARTY_LEADER = 236, // You are the Party Leader. + SPELL_CUSTOM_ERROR_YULON_IS_ALREADY_ACTIVE = 237, // Yu'lon is already active. + SPELL_CUSTOM_ERROR_A_STAMPEDE_IS_ALREADY_ACTIVE = 238, // A Stampede is already active. + SPELL_CUSTOM_ERROR_YOU_ARE_ALREADY_WELL_FED = 239, // You are already Well Fed. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_UNDER_SUPPRESSIVE_FIRE = 240, // You cannot do that while under Suppressive Fire. + SPELL_CUSTOM_ERROR_YOU_ALREADY_HAVE_MURLOC_SLOP = 241, // You already have a piece of Murloc Slop. + SPELL_CUSTOM_ERROR_YOU_DONT_HAVE_ARTIFACT_FRAGMENTS = 242, // You don't have any Artifact Fragments. + SPELL_CUSTOM_ERROR_YOU_ARENT_IN_A_PARTY = 243, // You aren't in a Party. + SPELL_CUSTOM_ERROR_REQUIRES_20_AMMUNITION = 244, // Requires 30 Ammunition! + SPELL_CUSTOM_ERROR_REQUIRES_30_AMMUNITION = 245, // Requires 20 Ammunition! + SPELL_CUSTOM_ERROR_YOU_ALREADY_HAVE_MAX_OUTCAST_FOLLOWERS = 246, // You already have the maximum amount of Outcasts following you. + SPELL_CUSTOM_ERROR_NOT_IN_WORLD_PVP_ZONE = 247, // Not in World PvP zone. + SPELL_CUSTOM_ERROR_ALREADY_AT_RESOURCE_CAP = 248, // Already at Resource cap + SPELL_CUSTOM_ERROR_APEXIS_SENTINEL_REQUIRES_ENERGY = 249, // This Apexis Sentinel requires energy from a nearby Apexis Pylon to be powered up. + SPELL_CUSTOM_ERROR_YOU_MUST_HAVE_3_OR_FEWER_PLAYER = 250, // You must have 3 or fewer players. + SPELL_CUSTOM_ERROR_YOU_ALREADY_READ_TREASURE_MAP = 251, // You have already read that treasure map. + SPELL_CUSTOM_ERROR_MAY_ONLY_USE_WHILE_GARRISON_UNDER_ATTACK = 252, // You may only use this item while your garrison is under attack. + SPELL_CUSTOM_ERROR_REQUIRES_ACTIVE_MUSHROOMS = 253, // This spell requires active mushrooms for you to detonate. + SPELL_CUSTOM_ERROR_REQUIRES_FASTER_TIME_WITH_RACER = 254, // Requires a faster time with the basic racer + SPELL_CUSTOM_ERROR_REQUIRES_INFERNO_SHOT_AMMO = 255, // Requires Inferno Shot Ammo! + SPELL_CUSTOM_ERROR_YOU_CANNOT_DO_THAT_RIGHT_NOW = 256, // You cannot do that right now. + SPELL_CUSTOM_ERROR_A_TRAP_IS_ALREADY_PLACED_THERE = 257, // A trap is already placed there. + SPELL_CUSTOM_ERROR_YOU_ARE_ALREADY_ON_THAT_QUEST = 258, // You are already on that quest. + SPELL_CUSTOM_ERROR_REQUIRES_FELFORGED_CUDGEL = 259, // Requires a Felforged Cudgel! + SPELL_CUSTOM_ERROR_CANT_TAKE_WHILE_BEING_DAMAGED = 260, // Can't take while being damaged! + SPELL_CUSTOM_ERROR_YOU_ARE_BOUND_TO_DRAENOR = 261, // You are bound to Draenor by Archimonde's magic. + SPELL_CUSTOM_ERROR_ALREAY_HAVE_MAX_NUMBER_OF_SHIPS = 262, // You already have the maximum number of ships your shipyard can support. + SPELL_CUSTOM_ERROR_MUST_BE_AT_SHIPYARD = 263, // You must be at your shipyard. + SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_3_MAGE_TOWER = 264, // Requires a level 3 Mage Tower. + SPELL_CUSTOM_ERROR_REQUIRES_LEVEL_3_SPIRIT_LODGE = 265, // Requires a level 3 Spirit Lodge. + SPELL_CUSTOM_ERROR_YOU_DO_NOT_LIKE_FEL_EGGS_AND_HAM = 266, // You do not like Fel Eggs and Ham. + SPELL_CUSTOM_ERROR_ALREADY_ENTERED_IN_THIS_AGREEMENT = 267, // You have already entered in to this trade agreement. + SPELL_CUSTOM_ERROR_CANNOT_STEAL_THAT_WHILE_GUARDS_ARE_ON_DUTY = 268, // You cannot steal that while guards are on duty. + SPELL_CUSTOM_ERROR_YOU_ALREADY_USED_VANTUS_RUNE = 269, // You have already used a Vantus Rune this week. + SPELL_CUSTOM_ERROR_THAT_ITEM_CANNOT_BE_OBLITERATED = 270, // That item cannot be obliterated. + SPELL_CUSTOM_ERROR_NO_SKINNABLE_CORPSE_IN_RANGE = 271, // No skinnable corpse in range + SPELL_CUSTOM_ERROR_MUST_BE_MERCENARY_TO_USE_TRINKET = 272, // You must be a Mercenary to use this trinket. + SPELL_CUSTOM_ERROR_YOU_MUST_BE_IN_COMBAT = 273, // You must be in combat. + SPELL_CUSTOM_ERROR_NO_ENEMIES_NEAR_TARGET = 274, // No enemies near target. + SPELL_CUSTOM_ERROR_REQUIRES_LEYSPINE_MISSILE = 275, // Requires a Leyspine Missile + SPELL_CUSTOM_ERROR_REQUIRES_BOTH_CURRENTS_CONNECTED = 276, // Requires both currents connected. + SPELL_CUSTOM_ERROR_CANT_DO_THAT_IN_DEMON_FORM = 277, // Can't do that while in demon form (yet) + SPELL_CUSTOM_ERROR_YOU_DONT_KNOW_HOW_TO_TAME_MECHS = 278, // You do not know how to tame or obtain lore about Mechs. + SPELL_CUSTOM_ERROR_CANNOT_CHARM_ANY_MORE_WITHERED = 279, // You cannot charm any more withered. + SPELL_CUSTOM_ERROR_REQUIRES_ACTIVE_HEALING_RAIN = 280, // Requires an active Healing Rain. + SPELL_CUSTOM_ERROR_ALREADY_COLLECTED_APPEARANCES = 281, // You've already collected these appearances + SPELL_CUSTOM_ERROR_CANNOT_RESURRECT_SURRENDERED_TO_MADNESS = 282, // Cannot resurrect someone who has surrendered to madness + SPELL_CUSTOM_ERROR_YOU_MUST_BE_IN_CAT_FORM = 283, // You must be in Cat Form. + SPELL_CUSTOM_ERROR_YOU_CANNOT_RELEASE_SPIRIT_YET = 284, // You cannot Release Spirit yet. + SPELL_CUSTOM_ERROR_NO_FISHING_NODES_NEARBY = 285, // No fishing nodes nearby. + SPELL_CUSTOM_ERROR_YOU_ARE_NOT_IN_CORRECT_SPEC = 286, // You are not the correct specialization. + SPELL_CUSTOM_ERROR_ULTHALESH_HAS_NO_POWER_WITHOUT_SOULS = 287, // Ulthalesh has no power without souls. + SPELL_CUSTOM_ERROR_CANNOT_CAST_THAT_WITH_VOODOO_TOTEM = 288, // You cannot cast that while talented into Voodoo Totem. + SPELL_CUSTOM_ERROR_ALREADY_COLLECTED_THIS_APPEARANCE = 289, // You've already collected this appearance. + SPELL_CUSTOM_ERROR_YOUR_PET_MAXIMUM_IS_ALREADY_HIGH = 290, // Your total pet maximum is already this high. + SPELL_CUSTOM_ERROR_YOU_DONT_HAVE_ENOUGH_WITHERED = 291, // You do not have enough withered to do that. + SPELL_CUSTOM_ERROR_REQUIRES_NEARBY_SOUL_FRAGMENT = 292, // Requires a nearby Soul Fragment. + SPELL_CUSTOM_ERROR_REQUIRES_AT_LEAST_10_WITHERED = 293, // Requires at least 10 living withered + SPELL_CUSTOM_ERROR_REQUIRES_AT_LEAST_14_WITHERED = 294, // Requires at least 14 living withered + SPELL_CUSTOM_ERROR_REQUIRES_AT_LEAST_18_WITHERED = 295, // Requires at least 18 living withered + SPELL_CUSTOM_ERROR_REQUIRES_2_WITHERED_MANA_RAGERS = 296, // Requires 2 Withered Mana-Ragers + SPELL_CUSTOM_ERROR_REQUIRES_1_WITHERED_BERSERKE = 297, // Requires 1 Withered Berserker + SPELL_CUSTOM_ERROR_REQUIRES_2_WITHERED_BERSERKER = 298, // Requires 2 Withered Berserkers + SPELL_CUSTOM_ERROR_TARGET_HEALTH_IS_TOO_LOW = 299, // Target's health is too low + SPELL_CUSTOM_ERROR_CANNOT_SHAPESHIFT_WHILE_RIDING_STORMTALON = 300, // You cannot shapeshift while riding Stormtalon + SPELL_CUSTOM_ERROR_CANNOT_CHANGE_SPEC_IN_COMBAT_TRAINING = 301, // You can not change specializations while in Combat Training. + SPELL_CUSTOM_ERROR_UNKNOWN_PHENOMENON_PREVENTS_LEYLINE_CONNECTION = 302, // Unknown phenomenon is preventing a connection to the Leyline. + SPELL_CUSTOM_ERROR_THE_NIGHTMARE_OBSCURES_YOUR_VISION = 303, // The Nightmare obscures your vision. + SPELL_CUSTOM_ERROR_YOU_ARE_IN_WRONG_CLASS_SPEC = 304, // You are in the wrong class specialization. + SPELL_CUSTOM_ERROR_THERE_ARE_NO_VALID_CORPSES_NEARBY = 305, // There are no valid corpses nearby. + SPELL_CUSTOM_ERROR_CANT_CAST_THAT_RIGHT_NOW = 306, // Can't cast that right now. + SPELL_CUSTOM_ERROR_NOT_ENOUGH_ANCIENT_MAN = 307, // Not enough Ancient Mana. + SPELL_CUSTOM_ERROR_REQUIRES_SONG_SCROLL = 308, // Requires a Song Scroll to function. + SPELL_CUSTOM_ERROR_MUST_HAVE_ARTIFACT_EQUIPPED = 309, // You must have an artifact weapon equipped. + SPELL_CUSTOM_ERROR_REQUIRES_CAT_FORM = 310, // Requires Cat Form. + SPELL_CUSTOM_ERROR_REQUIRES_BEAR_FORM = 311, // Requires Bear Form. + SPELL_CUSTOM_ERROR_REQUIRES_CONJURED_FOOD = 312, // Requires either a Conjured Mana Pudding or Conjured Mana Fritter. + SPELL_CUSTOM_ERROR_REQUIRES_ARTIFACT_WEAPON = 313, // Requires an artifact weapon. + SPELL_CUSTOM_ERROR_YOU_CANT_CAST_THAT_HERE = 314, // You can't cast that here + SPELL_CUSTOM_ERROR_CANT_DO_THAT_ON_CLASS_TRIAL = 315, // You cannot do that while on a Class Trial. }; enum StealthType diff --git a/src/server/game/Server/Packets/MovementPackets.cpp b/src/server/game/Server/Packets/MovementPackets.cpp index 209aab0af00..fde1b1bf875 100644 --- a/src/server/game/Server/Packets/MovementPackets.cpp +++ b/src/server/game/Server/Packets/MovementPackets.cpp @@ -89,11 +89,11 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo) data >> movementInfo.pitch; data >> movementInfo.splineElevation; - uint32 removeMovementForcesCount = 0; + uint32 removeMovementForcesCount; data >> removeMovementForcesCount; - uint32 int168; - data >> int168; + uint32 moveIndex; + data >> moveIndex; for (uint32 i = 0; i < removeMovementForcesCount; ++i) { diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp index 59d39183cea..36ce28478f0 100644 --- a/src/server/game/Server/Packets/SpellPackets.cpp +++ b/src/server/game/Server/Packets/SpellPackets.cpp @@ -52,7 +52,7 @@ WorldPacket const* WorldPackets::Spells::CategoryCooldown::Write() WorldPacket const* WorldPackets::Spells::SendKnownSpells::Write() { - _worldPacket.reserve(1 + 4 * KnownSpells.size()); + _worldPacket.reserve(1 + 4 * KnownSpells.size() + 4 * FavoriteSpells.size()); _worldPacket.WriteBit(InitialLogin); _worldPacket << uint32(KnownSpells.size()); @@ -102,64 +102,95 @@ void WorldPackets::Spells::SpellCastLogData::Initialize(Unit const* unit) ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData) { - data << spellCastLogData.Health; - data << spellCastLogData.AttackPower; - data << spellCastLogData.SpellPower; - data << int32(spellCastLogData.PowerData.size()); + data << int64(spellCastLogData.Health); + data << int32(spellCastLogData.AttackPower); + data << int32(spellCastLogData.SpellPower); + data.WriteBits(spellCastLogData.PowerData.size(), 9); + data.FlushBits(); + for (WorldPackets::Spells::SpellLogPowerData const& powerData : spellCastLogData.PowerData) { - data << powerData.PowerType; - data << powerData.Amount; + data << int32(powerData.PowerType); + data << int32(powerData.Amount); } - data.WriteBit(false); - // data << float // Unk data if bit is true + + return data; +} + +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& unknown) +{ + data.WriteBits(unknown.Type, 3); + data << int16(unknown.PlayerLevelDelta); + data << uint8(unknown.TargetLevel); + data << uint8(unknown.Expansion); + data << uint8(unknown.Class); + data << uint8(unknown.TargetMinScalingLevel); + data << uint8(unknown.TargetMaxScalingLevel); + data << int8(unknown.TargetScalingLevelDelta); + return data; +} + +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::AuraDataInfo const& auraData) +{ + data << auraData.CastID; + data << int32(auraData.SpellID); + data << int32(auraData.SpellXSpellVisualID); + data << uint8(auraData.Flags); + data << uint32(auraData.ActiveFlags); + data << uint16(auraData.CastLevel); + data << uint8(auraData.Applications); + data.WriteBit(auraData.CastUnit.is_initialized()); + data.WriteBit(auraData.Duration.is_initialized()); + data.WriteBit(auraData.Remaining.is_initialized()); + data.WriteBit(auraData.TimeMod.is_initialized()); + data.WriteBits(auraData.Points.size(), 6); + data.WriteBits(auraData.EstimatedPoints.size(), 6); + data.WriteBit(auraData.SandboxScaling.is_initialized()); + + if (auraData.CastUnit) + data << *auraData.CastUnit; + + if (auraData.Duration) + data << uint32(*auraData.Duration); + + if (auraData.Remaining) + data << uint32(*auraData.Remaining); + + if (auraData.TimeMod) + data << float(*auraData.TimeMod); + + if (!auraData.Points.empty()) + data.append(auraData.Points.data(), auraData.Points.size()); + + if (!auraData.EstimatedPoints.empty()) + data.append(auraData.EstimatedPoints.data(), auraData.EstimatedPoints.size()); + + if (auraData.SandboxScaling) + data << *auraData.SandboxScaling; + + return data; +} + +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::AuraInfo const& aura) +{ + data << aura.Slot; + data.WriteBit(aura.AuraData.is_initialized()); data.FlushBits(); + if (aura.AuraData) + data << *aura.AuraData; + return data; } WorldPacket const* WorldPackets::Spells::AuraUpdate::Write() { _worldPacket.WriteBit(UpdateAll); + _worldPacket.WriteBits(Auras.size(), 9); + for (AuraInfo const& aura : Auras) + _worldPacket << aura; + _worldPacket << UnitGUID; - _worldPacket << uint32(Auras.size()); - for (auto& aura : Auras) - { - _worldPacket << aura.Slot; - if (_worldPacket.WriteBit(aura.AuraData.is_initialized())) - { - AuraDataInfo const& data = *aura.AuraData; - _worldPacket << uint32(data.SpellID); - _worldPacket << uint32(data.SpellXSpellVisualID); - _worldPacket << uint8(data.Flags); - _worldPacket << uint32(data.ActiveFlags); - _worldPacket << uint16(data.CastLevel); - _worldPacket << uint8(data.Applications); - _worldPacket << uint32(data.Points.size()); - _worldPacket << uint32(data.EstimatedPoints.size()); - - if (!data.Points.empty()) - _worldPacket.append(data.Points.data(), data.Points.size()); - - if (!data.EstimatedPoints.empty()) - _worldPacket.append(data.EstimatedPoints.data(), data.EstimatedPoints.size()); - - _worldPacket.WriteBit(data.CastUnit.is_initialized()); - _worldPacket.WriteBit(data.Duration.is_initialized()); - _worldPacket.WriteBit(data.Remaining.is_initialized()); - - if (data.CastUnit) - _worldPacket << *data.CastUnit; - - if (data.Duration) - _worldPacket << uint32(*data.Duration); - - if (data.Remaining) - _worldPacket << uint32(*data.Remaining); - } - - _worldPacket.FlushBits(); - } return &_worldPacket; } @@ -178,10 +209,11 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellTargetData { buffer.ResetBitPos(); - targetData.Flags = buffer.ReadBits(23); - bool const hasSrcLocation = buffer.ReadBit(); - bool const hasDstLocation = buffer.ReadBit(); - bool const hasOrientation = buffer.ReadBit(); + targetData.Flags = buffer.ReadBits(25); + bool hasSrcLocation = buffer.ReadBit(); + bool hasDstLocation = buffer.ReadBit(); + bool hasOrientation = buffer.ReadBit(); + bool hasMapID = buffer.ReadBit(); uint32 nameLength = buffer.ReadBits(7); buffer >> targetData.Unit; @@ -196,6 +228,9 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellTargetData if (hasOrientation) targetData.Orientation = buffer.read(); + if (hasMapID) + targetData.MapID = buffer.read(); + targetData.Name = buffer.ReadString(nameLength); return buffer; @@ -215,20 +250,17 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellCastReques buffer >> request.Misc[1]; buffer >> request.SpellID; buffer >> request.SpellXSpellVisualID; - buffer >> request.Target; buffer >> request.MissileTrajectory; buffer >> request.Charmer; - - buffer.ResetBitPos(); request.SendCastFlags = buffer.ReadBits(5); - bool const hasMoveUpdate = buffer.ReadBit(); + bool hasMoveUpdate = buffer.ReadBit(); request.Weight.resize(buffer.ReadBits(2)); + buffer >> request.Target; if (hasMoveUpdate) { - MovementInfo movementInfo; - buffer >> movementInfo; - request.MoveUpdate = movementInfo; + request.MoveUpdate = boost::in_place(); + buffer >> *request.MoveUpdate; } for (WorldPackets::Spells::SpellWeight& weight : request.Weight) @@ -261,6 +293,14 @@ void WorldPackets::Spells::UseItem::Read() _worldPacket >> Cast; } +WorldPacket const* WorldPackets::Spells::SpellPrepare::Write() +{ + _worldPacket << ClientCastID; + _worldPacket << ServerCastID; + + return &_worldPacket; +} + ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::TargetLocation const& targetLocation) { data << targetLocation.Transport; @@ -272,10 +312,11 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::TargetLocation co ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData const& spellTargetData) { - data.WriteBits(spellTargetData.Flags, 23); + data.WriteBits(spellTargetData.Flags, 25); data.WriteBit(spellTargetData.SrcLocation.is_initialized()); data.WriteBit(spellTargetData.DstLocation.is_initialized()); data.WriteBit(spellTargetData.Orientation.is_initialized()); + data.WriteBit(spellTargetData.MapID.is_initialized()); data.WriteBits(spellTargetData.Name.size(), 7); data.FlushBits(); @@ -291,6 +332,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData c if (spellTargetData.Orientation) data << *spellTargetData.Orientation; + if (spellTargetData.MapID) + data << *spellTargetData.MapID; + data.WriteString(spellTargetData.Name); return data; @@ -299,8 +343,10 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellTargetData c ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellMissStatus const& spellMissStatus) { data.WriteBits(spellMissStatus.Reason, 4); - data.WriteBits(spellMissStatus.ReflectStatus, 4); - // No need to flush bits as we written exactly 8 bits (1 byte) + if (spellMissStatus.Reason == SPELL_MISS_REFLECT) + data.WriteBits(spellMissStatus.ReflectStatus, 4); + + data.FlushBits(); return data; } @@ -315,12 +361,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::RuneData const& r { data << uint8(runeData.Start); data << uint8(runeData.Count); - - data.WriteBits(runeData.Cooldowns.size(), 3); - data.FlushBits(); - - for (uint8 cd : runeData.Cooldowns) - data << cd; + data << uint32(runeData.Cooldowns.size()); + if (!runeData.Cooldowns.empty()) + data.append(runeData.Cooldowns.data(), runeData.Cooldowns.size()); return data; } @@ -359,21 +402,29 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastData con data << spellCastData.CasterGUID; data << spellCastData.CasterUnit; data << spellCastData.CastID; + data << spellCastData.OriginalCastID; data << int32(spellCastData.SpellID); data << uint32(spellCastData.SpellXSpellVisualID); data << uint32(spellCastData.CastFlags); data << uint32(spellCastData.CastTime); - data << uint32(spellCastData.HitTargets.size()); - data << uint32(spellCastData.MissTargets.size()); - data << uint32(spellCastData.MissStatus.size()); - data << spellCastData.Target; - data << uint32(spellCastData.RemainingPower.size()); data << spellCastData.MissileTrajectory; - data << spellCastData.Ammo; + data << int32(spellCastData.Ammo.DisplayID); data << uint8(spellCastData.DestLocSpellCastIndex); - data << uint32(spellCastData.TargetPoints.size()); data << spellCastData.Immunities; data << spellCastData.Predict; + data.WriteBits(spellCastData.CastFlagsEx, 22); + data.WriteBits(spellCastData.HitTargets.size(), 16); + data.WriteBits(spellCastData.MissTargets.size(), 16); + data.WriteBits(spellCastData.MissStatus.size(), 16); + data.WriteBits(spellCastData.RemainingPower.size(), 9); + data.WriteBit(spellCastData.RemainingRunes.is_initialized()); + data.WriteBits(spellCastData.TargetPoints.size(), 16); + data.FlushBits(); + + for (WorldPackets::Spells::SpellMissStatus const& status : spellCastData.MissStatus) + data << status; + + data << spellCastData.Target; for (ObjectGuid const& target : spellCastData.HitTargets) data << target; @@ -381,22 +432,15 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastData con for (ObjectGuid const& target : spellCastData.MissTargets) data << target; - for (WorldPackets::Spells::SpellMissStatus const& status : spellCastData.MissStatus) - data << status; - for (WorldPackets::Spells::SpellPowerData const& power : spellCastData.RemainingPower) data << power; - for (WorldPackets::Spells::TargetLocation const& targetLoc : spellCastData.TargetPoints) - data << targetLoc; - - data.WriteBits(spellCastData.CastFlagsEx, 20); - data.WriteBit(spellCastData.RemainingRunes.is_initialized()); - data.FlushBits(); - if (spellCastData.RemainingRunes) data << *spellCastData.RemainingRunes; + for (WorldPackets::Spells::TargetLocation const& targetLoc : spellCastData.TargetPoints) + data << targetLoc; + return data; } @@ -423,9 +467,13 @@ WorldPacket const* WorldPackets::Spells::SpellGo::Write() WorldPacket const* WorldPackets::Spells::LearnedSpells::Write() { _worldPacket << uint32(SpellID.size()); + _worldPacket << uint32(FavoriteSpellID.size()); for (int32 spell : SpellID) _worldPacket << spell; + for (int32 spell : FavoriteSpellID) + _worldPacket << spell; + _worldPacket.WriteBit(SuppressMessaging); _worldPacket.FlushBits(); @@ -448,6 +496,7 @@ WorldPacket const* WorldPackets::Spells::SpellFailedOther::Write() _worldPacket << CasterUnit; _worldPacket << CastID; _worldPacket << uint32(SpellID); + _worldPacket << uint32(SpelXSpellVisualID); _worldPacket << uint8(Reason); return &_worldPacket; @@ -465,6 +514,17 @@ WorldPacket const* WorldPackets::Spells::CastFailed::Write() return &_worldPacket; } +WorldPacket const* WorldPackets::Spells::PetCastFailed::Write() +{ + _worldPacket << CastID; + _worldPacket << int32(SpellID); + _worldPacket << int32(Reason); + _worldPacket << int32(FailedArg1); + _worldPacket << int32(FailedArg2); + + return &_worldPacket; +} + ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellModifierData const& spellModifierData) { data << float(spellModifierData.ModifierValue); @@ -670,8 +730,8 @@ WorldPacket const* WorldPackets::Spells::PlaySpellVisualKit::Write() void WorldPackets::Spells::CancelCast::Read() { - _worldPacket >> SpellID; _worldPacket >> CastID; + _worldPacket >> SpellID; } void WorldPackets::Spells::OpenItem::Read() @@ -722,15 +782,12 @@ WorldPacket const* WorldPackets::Spells::SpellChannelUpdate::Write() WorldPacket const* WorldPackets::Spells::ResurrectRequest::Write() { _worldPacket << ResurrectOffererGUID; - _worldPacket << ResurrectOffererVirtualRealmAddress; - - _worldPacket << PetNumber; - _worldPacket << SpellID; - + _worldPacket << uint32(ResurrectOffererVirtualRealmAddress); + _worldPacket << uint32(PetNumber); + _worldPacket << int32(SpellID); _worldPacket.WriteBits(Name.length(), 6); _worldPacket.WriteBit(UseTimer); _worldPacket.WriteBit(Sickness); - _worldPacket.FlushBits(); _worldPacket.WriteString(Name); @@ -752,21 +809,21 @@ void WorldPackets::Spells::GetMirrorImageData::Read() WorldPacket const* WorldPackets::Spells::MirrorImageComponentedData::Write() { _worldPacket << UnitGUID; - _worldPacket << DisplayID; - _worldPacket << RaceID; - _worldPacket << Gender; - _worldPacket << ClassID; - _worldPacket << SkinColor; - _worldPacket << FaceVariation; - _worldPacket << HairVariation; - _worldPacket << HairColor; - _worldPacket << BeardVariation; + _worldPacket << int32(DisplayID); + _worldPacket << uint8(RaceID); + _worldPacket << uint8(Gender); + _worldPacket << uint8(ClassID); + _worldPacket << uint8(SkinColor); + _worldPacket << uint8(FaceVariation); + _worldPacket << uint8(HairVariation); + _worldPacket << uint8(HairColor); + _worldPacket << uint8(BeardVariation); + _worldPacket.append(CustomDisplay.data(), CustomDisplay.size()); _worldPacket << GuildGUID; - _worldPacket << uint32(ItemDisplayID.size()); - for (auto const& itemDisplayId : ItemDisplayID) - _worldPacket << itemDisplayId; + for (int32 itemDisplayId : ItemDisplayID) + _worldPacket << int32(itemDisplayId); return &_worldPacket; } @@ -774,7 +831,7 @@ WorldPacket const* WorldPackets::Spells::MirrorImageComponentedData::Write() WorldPacket const* WorldPackets::Spells::MirrorImageCreatureData::Write() { _worldPacket << UnitGUID; - _worldPacket << DisplayID; + _worldPacket << int32(DisplayID); return &_worldPacket; } @@ -787,9 +844,7 @@ void WorldPackets::Spells::SpellClick::Read() WorldPacket const* WorldPackets::Spells::ResyncRunes::Write() { - _worldPacket << uint32(Runes.size()); - if (!Runes.empty()) - _worldPacket.append(Runes.data(), Runes.size()); + _worldPacket << Runes; return &_worldPacket; } @@ -825,9 +880,8 @@ void WorldPackets::Spells::UpdateMissileTrajectory::Read() _worldPacket.ResetBitPos(); if (hasStatus) { - MovementInfo info; - _worldPacket >> info; - Status = info; + Status = boost::in_place(); + _worldPacket >> *Status; } } diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h index 8e9835f4009..901ebdd6b87 100644 --- a/src/server/game/Server/Packets/SpellPackets.h +++ b/src/server/game/Server/Packets/SpellPackets.h @@ -174,7 +174,7 @@ namespace WorldPackets struct SpellCastLogData { - int32 Health = 0; + int64 Health = 0; int32 AttackPower = 0; int32 SpellPower = 0; std::vector PowerData; @@ -182,10 +182,23 @@ namespace WorldPackets void Initialize(Unit const* unit); }; + struct SandboxScalingData + { + uint32 Type = 0; + int16 PlayerLevelDelta = 0; + uint8 TargetLevel = 0; + uint8 Expansion = 0; + uint8 Class = 1; + uint8 TargetMinScalingLevel = 1; + uint8 TargetMaxScalingLevel = 1; + int8 TargetScalingLevelDelta = 1; + }; + struct AuraDataInfo { + ObjectGuid CastID; int32 SpellID = 0; - uint32 SpellXSpellVisualID = 0; + int32 SpellXSpellVisualID = 0; uint8 Flags = 0; uint32 ActiveFlags = 0; uint16 CastLevel = 1; @@ -193,8 +206,10 @@ namespace WorldPackets Optional CastUnit; Optional Duration; Optional Remaining; + Optional TimeMod; std::vector Points; std::vector EstimatedPoints; + Optional SandboxScaling; }; struct AuraInfo @@ -229,6 +244,7 @@ namespace WorldPackets Optional SrcLocation; Optional DstLocation; Optional Orientation; + Optional MapID; std::string Name; }; @@ -293,6 +309,17 @@ namespace WorldPackets SpellCastRequest Cast; }; + class SpellPrepare final : public ServerPacket + { + public: + SpellPrepare() : ServerPacket(SMSG_SPELL_PREPARE, 16 + 16) { } + + WorldPacket const* Write() override; + + ObjectGuid ClientCastID; + ObjectGuid ServerCastID; + }; + struct SpellMissStatus { uint8 Reason = 0; @@ -342,6 +369,7 @@ namespace WorldPackets ObjectGuid CasterGUID; ObjectGuid CasterUnit; ObjectGuid CastID; + ObjectGuid OriginalCastID; int32 SpellID = 0; uint32 SpellXSpellVisualID = 0; uint32 CastFlags = 0; @@ -390,6 +418,7 @@ namespace WorldPackets WorldPacket const* Write() override; std::vector SpellID; + std::vector FavoriteSpellID; bool SuppressMessaging = false; }; @@ -416,6 +445,7 @@ namespace WorldPackets ObjectGuid CasterUnit; uint32 SpellID = 0; + uint32 SpelXSpellVisualID = 0; uint8 Reason = 0; ObjectGuid CastID; }; @@ -423,16 +453,30 @@ namespace WorldPackets class TC_GAME_API CastFailed final : public ServerPacket { public: - CastFailed(OpcodeServer opcode) : ServerPacket(opcode, 4+4+4+4+1) { } + CastFailed() : ServerPacket(SMSG_CAST_FAILED, 4 + 4 + 4 + 4 + 1) { } WorldPacket const* Write() override; ObjectGuid CastID; - int32 Reason = 0; + int32 SpellID = 0; int32 SpellXSpellVisualID = 0; + int32 Reason = 0; int32 FailedArg1 = -1; int32 FailedArg2 = -1; - int32 SpellID = 0; + }; + + class TC_GAME_API PetCastFailed final : public ServerPacket + { + public: + PetCastFailed() : ServerPacket(SMSG_PET_CAST_FAILED, 4 + 4 + 4 + 1) { } + + WorldPacket const* Write() override; + + ObjectGuid CastID; + int32 SpellID = 0; + int32 Reason = 0; + int32 FailedArg1 = -1; + int32 FailedArg2 = -1; }; struct SpellModifierData @@ -765,7 +809,7 @@ namespace WorldPackets WorldPacket const* Write() override; ObjectGuid UnitGUID; - uint32 DisplayID = 0; + int32 DisplayID = 0; uint8 RaceID = 0; uint8 Gender = 0; uint8 ClassID = 0; @@ -774,9 +818,10 @@ namespace WorldPackets uint8 HairVariation = 0; uint8 HairColor = 0; uint8 BeardVariation = 0; + std::array CustomDisplay; ObjectGuid GuildGUID; - std::vector ItemDisplayID; + std::vector ItemDisplayID; }; class MirrorImageCreatureData final : public ServerPacket @@ -787,7 +832,7 @@ namespace WorldPackets WorldPacket const* Write() override; ObjectGuid UnitGUID; - uint32 DisplayID = 0; + int32 DisplayID = 0; }; class SpellClick final : public ClientPacket @@ -804,11 +849,11 @@ namespace WorldPackets class ResyncRunes final : public ServerPacket { public: - ResyncRunes(size_t size) : ServerPacket(SMSG_RESYNC_RUNES, 4 + 2 * size) { } + ResyncRunes(size_t size) : ServerPacket(SMSG_RESYNC_RUNES, 1 + 1 + 4 + size) { } WorldPacket const* Write() override; - std::vector Runes; + RuneData Runes; }; class MissileTrajectoryCollision final : public ClientPacket diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index 0cf2a510660..d04bda1a0d9 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -211,7 +211,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_CALENDAR_UPDATE_EVENT, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Calendar::CalendarUpdateEvent, &WorldSession::HandleCalendarUpdateEvent); DEFINE_HANDLER(CMSG_CANCEL_AURA, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::CancelAura, &WorldSession::HandleCancelAuraOpcode); DEFINE_HANDLER(CMSG_CANCEL_AUTO_REPEAT_SPELL, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::CancelAutoRepeatSpell, &WorldSession::HandleCancelAutoRepeatSpellOpcode); - DEFINE_HANDLER(CMSG_CANCEL_CAST, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Spells::CancelCast, &WorldSession::HandleCancelCastOpcode); + DEFINE_HANDLER(CMSG_CANCEL_CAST, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Spells::CancelCast, &WorldSession::HandleCancelCastOpcode); DEFINE_HANDLER(CMSG_CANCEL_CHANNELLING, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::CancelChannelling, &WorldSession::HandleCancelChanneling); DEFINE_HANDLER(CMSG_CANCEL_GROWTH_AURA, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::CancelGrowthAura, &WorldSession::HandleCancelGrowthAuraOpcode); DEFINE_HANDLER(CMSG_CANCEL_MASTER_LOOT_ROLL, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); @@ -221,7 +221,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_CANCEL_TEMP_ENCHANTMENT, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::CancelTempEnchantment, &WorldSession::HandleCancelTempEnchantmentOpcode); DEFINE_HANDLER(CMSG_CANCEL_TRADE, STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT, PROCESS_THREADUNSAFE, WorldPackets::Trade::CancelTrade, &WorldSession::HandleCancelTradeOpcode); DEFINE_HANDLER(CMSG_CAN_DUEL, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Duel::CanDuel, &WorldSession::HandleCanDuel); - DEFINE_HANDLER(CMSG_CAST_SPELL, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Spells::CastSpell, &WorldSession::HandleCastSpellOpcode); + DEFINE_HANDLER(CMSG_CAST_SPELL, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Spells::CastSpell, &WorldSession::HandleCastSpellOpcode); DEFINE_HANDLER(CMSG_CHALLENGE_MODE_REQUEST_LEADERS, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_CHALLENGE_MODE_REQUEST_MAP_STATS, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_CHANGE_BAG_SLOT_FLAG, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); @@ -473,7 +473,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_MAIL_TAKE_MONEY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Mail::MailTakeMoney, &WorldSession::HandleMailTakeMoney); DEFINE_OPCODE_HANDLER_OLD(CMSG_MASTER_LOOT_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleLootMasterGiveOpcode ); DEFINE_HANDLER(CMSG_MINIMAP_PING, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Party::MinimapPingClient, &WorldSession::HandleMinimapPingOpcode); - DEFINE_HANDLER(CMSG_MISSILE_TRAJECTORY_COLLISION, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Spells::MissileTrajectoryCollision, &WorldSession::HandleMissileTrajectoryCollision); + DEFINE_HANDLER(CMSG_MISSILE_TRAJECTORY_COLLISION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::MissileTrajectoryCollision, &WorldSession::HandleMissileTrajectoryCollision); DEFINE_HANDLER(CMSG_MOUNT_SET_FAVORITE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_MOUNT_SPECIAL_ANIM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Misc::MountSpecial, &WorldSession::HandleMountSpecialAnimOpcode); DEFINE_HANDLER(CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); @@ -568,7 +568,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_PET_BATTLE_REQUEST_WILD, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_PET_BATTLE_SCRIPT_ERROR_NOTIFY, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_PET_CANCEL_AURA, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::PetCancelAura, &WorldSession::HandlePetCancelAuraOpcode); - DEFINE_HANDLER(CMSG_PET_CAST_SPELL, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Spells::PetCastSpell, &WorldSession::HandlePetCastSpellOpcode); + DEFINE_HANDLER(CMSG_PET_CAST_SPELL, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::PetCastSpell, &WorldSession::HandlePetCastSpellOpcode); DEFINE_HANDLER(CMSG_PET_RENAME, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Pet::PetRename, &WorldSession::HandlePetRename); DEFINE_HANDLER(CMSG_PET_SET_ACTION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Pet::PetSetAction, &WorldSession::HandlePetSetAction ); DEFINE_HANDLER(CMSG_PET_SPELL_AUTOCAST, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Pet::PetSpellAutocast, &WorldSession::HandlePetSpellAutocastOpcode); @@ -763,7 +763,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_UNLOCK_VOID_STORAGE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::VoidStorage::UnlockVoidStorage, &WorldSession::HandleVoidStorageUnlock); DEFINE_HANDLER(CMSG_UPDATE_ACCOUNT_DATA, STATUS_AUTHED, PROCESS_THREADUNSAFE, WorldPackets::ClientConfig::UserClientUpdateAccountData, &WorldSession::HandleUpdateAccountData); DEFINE_HANDLER(CMSG_UPDATE_CLIENT_SETTINGS, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_UPDATE_MISSILE_TRAJECTORY, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Spells::UpdateMissileTrajectory, &WorldSession::HandleUpdateMissileTrajectory); + DEFINE_HANDLER(CMSG_UPDATE_MISSILE_TRAJECTORY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::UpdateMissileTrajectory, &WorldSession::HandleUpdateMissileTrajectory); DEFINE_HANDLER(CMSG_UPDATE_RAID_TARGET, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Party::UpdateRaidTarget, &WorldSession::HandleUpdateRaidTargetOpcode); DEFINE_HANDLER(CMSG_UPDATE_VAS_PURCHASE_STATES, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Token::UpdateListedAuctionableTokens, &WorldSession::HandleUpdateListedAuctionableTokens); @@ -773,8 +773,8 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_USED_FOLLOW, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_USE_CRITTER_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::UseCritterItem, &WorldSession::HandleUseCritterItem); DEFINE_HANDLER(CMSG_USE_EQUIPMENT_SET, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::EquipmentSet::UseEquipmentSet, &WorldSession::HandleUseEquipmentSet); - DEFINE_HANDLER(CMSG_USE_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Spells::UseItem, &WorldSession::HandleUseItemOpcode); - DEFINE_HANDLER(CMSG_USE_TOY, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Toy::UseToy, &WorldSession::HandleUseToy); + DEFINE_HANDLER(CMSG_USE_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Spells::UseItem, &WorldSession::HandleUseItemOpcode); + DEFINE_HANDLER(CMSG_USE_TOY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Toy::UseToy, &WorldSession::HandleUseToy); DEFINE_HANDLER(CMSG_VIOLENCE_LEVEL, STATUS_AUTHED, PROCESS_INPLACE, WorldPackets::Misc::ViolenceLevel, &WorldSession::HandleViolenceLevel); DEFINE_HANDLER(CMSG_VOICE_ADD_IGNORE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_VOICE_DEL_IGNORE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); @@ -844,7 +844,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_AUCTION_REPLICATE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AUCTION_WON_NOTIFICATION, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AURA_POINTS_DEPLETED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_AURA_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_AURA_UPDATE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AUTH_CHALLENGE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AUTH_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_AVAILABLE_VOICE_CHANNEL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -941,12 +941,12 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_CAMERA_SHAKE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_AUTO_REPEAT, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_COMBAT, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_ORPHAN_SPELL_VISUAL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_ORPHAN_SPELL_VISUAL, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_SCENE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_SPELL_VISUAL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_SPELL_VISUAL, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CANCEL_SPELL_VISUAL_KIT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CAN_DUEL_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_CAST_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_CAST_FAILED, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CATEGORY_COOLDOWN, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHALLEGE_MODE_REWARDS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_CHALLENGE_MODE_ALL_MAP_STATS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1233,7 +1233,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_PUSH_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_TIME_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_KICK_REASON, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARNED_SPELLS, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARNED_SPELLS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_PVP_TALENT_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_TALENT_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEVEL_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1299,7 +1299,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_MASTER_LOOT_CANDIDATE_LIST, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_MESSAGE_BOX, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_MINIMAP_PING, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_MIRROR_IMAGE_COMPONENTED_DATA, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_MIRROR_IMAGE_COMPONENTED_DATA, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_MIRROR_IMAGE_CREATURE_DATA, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_MISSILE_CANCEL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_MODIFY_COOLDOWN, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); @@ -1390,7 +1390,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_NEW_TAXI_PATH, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_NEW_WORLD, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_DEST_LOC_SPELL_CAST, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_MISSILE_TRAJECTORY_COLLISION, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_MISSILE_TRAJECTORY_COLLISION, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_MONEY, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_RECEIVED_MAIL, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_OFFER_PETITION_ERROR, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1432,7 +1432,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_BATTLE_REQUEST_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_BATTLE_ROUND_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_BATTLE_SLOT_UPDATES, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_CAST_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_CAST_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_CLEAR_SPELLS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_DISMISS_SOUND, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_GOD_MODE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1548,7 +1548,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_RESUME_COMMS, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_RESUME_TOKEN, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_RESURRECT_REQUEST, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_RESYNC_RUNES, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_RESYNC_RUNES, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ROLE_CHANGED_INFORM, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ROLE_CHOSEN, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ROLE_POLL_INFORM, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1626,10 +1626,10 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DELAYED, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DISPELL_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_ENERGIZE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_EXECUTE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILED_OTHER, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILURE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_GO, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_EXECUTE_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILED_OTHER, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILURE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_GO, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_HEAL_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_INSTAKILL_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_INTERRUPT_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); @@ -1637,7 +1637,8 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_NON_MELEE_DAMAGE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_OR_DAMAGE_IMMUNE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_PERIODIC_AURA_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_START, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_PREPARE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_START, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_UPDATE_CHAIN_TARGETS, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPIRIT_HEALER_CONFIRM, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_STAND_STATE_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 9a15ca951e2..571a1473aa1 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1575,6 +1575,7 @@ enum OpcodeServer : uint32 SMSG_SPELL_NON_MELEE_DAMAGE_LOG = 0x2C31, SMSG_SPELL_OR_DAMAGE_IMMUNE = 0x2C2E, SMSG_SPELL_PERIODIC_AURA_LOG = 0x2C1B, + SMSG_SPELL_PREPARE = 0x2C38, SMSG_SPELL_START = 0x2C3A, SMSG_SPELL_UPDATE_CHAIN_TARGETS = 0x2C33, SMSG_SPIRIT_HEALER_CONFIRM = 0x2750, diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index af22d2fa496..ec060f253b9 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -198,9 +198,12 @@ void AuraApplication::BuildUpdatePacket(WorldPackets::Spells::AuraInfo& auraInfo if (remove) return; + auraInfo.AuraData = boost::in_place(); + Aura const* aura = GetBase(); - WorldPackets::Spells::AuraDataInfo auraData; + WorldPackets::Spells::AuraDataInfo& auraData = auraInfo.AuraData.get(); + auraData.CastID = aura->GetCastGUID(); auraData.SpellID = aura->GetId(); auraData.SpellXSpellVisualID = aura->GetSpellInfo()->GetSpellXSpellVisualId(_target->GetMap()->GetDifficultyID()); auraData.Flags = GetFlags(); @@ -232,8 +235,6 @@ void AuraApplication::BuildUpdatePacket(WorldPackets::Spells::AuraInfo& auraInfo if (effect && HasEffect(effect->GetEffIndex())) // Not all of aura's effects have to be applied on every target auraData.Points[effect->GetEffIndex()] = float(effect->GetAmount()); } - - auraInfo.AuraData = auraData; } void AuraApplication::ClientUpdate(bool remove) @@ -279,7 +280,7 @@ uint32 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint32 avalibl return effMask & avalibleEffectMask; } -Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount /*= NULL*/, Item* castItem /*= NULL*/, ObjectGuid casterGUID /*= ObjectGuid::Empty*/, bool* refresh /*= NULL*/, int32 castItemLevel /*= -1*/) +Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, ObjectGuid castId, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount /*= NULL*/, Item* castItem /*= NULL*/, ObjectGuid casterGUID /*= ObjectGuid::Empty*/, bool* refresh /*= NULL*/, int32 castItemLevel /*= -1*/) { ASSERT(spellproto); ASSERT(owner); @@ -303,10 +304,10 @@ Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint32 tryEffMa return foundAura; } else - return Create(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); + return Create(spellproto, castId, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); } -Aura* Aura::TryCreate(SpellInfo const* spellproto, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem /*= NULL*/, ObjectGuid casterGUID /*= ObjectGuid::Empty*/, int32 castItemLevel /*= -1*/) +Aura* Aura::TryCreate(SpellInfo const* spellproto, ObjectGuid castId, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem /*= NULL*/, ObjectGuid casterGUID /*= ObjectGuid::Empty*/, int32 castItemLevel /*= -1*/) { ASSERT(spellproto); ASSERT(owner); @@ -315,10 +316,10 @@ Aura* Aura::TryCreate(SpellInfo const* spellproto, uint32 tryEffMask, WorldObjec uint32 effMask = Aura::BuildEffectMaskForOwner(spellproto, tryEffMask, owner); if (!effMask) return NULL; - return Create(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); + return Create(spellproto, castId, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); } -Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) +Aura* Aura::Create(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) { ASSERT(effMask); ASSERT(spellproto); @@ -348,10 +349,10 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* own { case TYPEID_UNIT: case TYPEID_PLAYER: - aura = new UnitAura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); + aura = new UnitAura(spellproto, castId, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); break; case TYPEID_DYNAMICOBJECT: - aura = new DynObjAura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); + aura = new DynObjAura(spellproto, castId, effMask, owner, caster, baseAmount, castItem, casterGUID, castItemLevel); break; default: ABORT(); @@ -363,8 +364,8 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* own return aura; } -Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) : -m_spellInfo(spellproto), m_casterGuid(!casterGUID.IsEmpty() ? casterGUID : caster->GetGUID()), +Aura::Aura(SpellInfo const* spellproto, ObjectGuid castId, WorldObject* owner, Unit* caster, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) : +m_spellInfo(spellproto), m_castGuid(castId), m_casterGuid(!casterGUID.IsEmpty() ? casterGUID : caster->GetGUID()), m_castItemGuid(castItem ? castItem->GetGUID() : ObjectGuid::Empty), m_castItemLevel(castItemLevel), m_applyTime(time(NULL)), m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0), m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1), @@ -2320,8 +2321,8 @@ void Aura::CallScriptAfterEffectProcHandlers(AuraEffect const* aurEff, AuraAppli } } -UnitAura::UnitAura(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) - : Aura(spellproto, owner, caster, castItem, casterGUID, castItemLevel) +UnitAura::UnitAura(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) + : Aura(spellproto, castId, owner, caster, castItem, casterGUID, castItemLevel) { m_AuraDRGroup = DIMINISHING_NONE; LoadScripts(); @@ -2423,8 +2424,8 @@ void UnitAura::FillTargetMap(std::map & targets, Unit* caster) } } -DynObjAura::DynObjAura(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) - : Aura(spellproto, owner, caster, castItem, casterGUID, castItemLevel) +DynObjAura::DynObjAura(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel) + : Aura(spellproto, castId, owner, caster, castItem, casterGUID, castItemLevel) { LoadScripts(); ASSERT(GetDynobjOwner()); diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 27e2333bd97..253b07768f0 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -120,19 +120,20 @@ class TC_GAME_API Aura typedef std::map ApplicationMap; static uint32 BuildEffectMaskForOwner(SpellInfo const* spellProto, uint32 avalibleEffectMask, WorldObject* owner); - static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, ObjectGuid casterGUID = ObjectGuid::Empty, bool* refresh = NULL, int32 castItemLevel = -1); - static Aura* TryCreate(SpellInfo const* spellproto, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem = NULL, ObjectGuid casterGUID = ObjectGuid::Empty, int32 castItemLevel = -1); - static Aura* Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); - Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, ObjectGuid castId, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, ObjectGuid casterGUID = ObjectGuid::Empty, bool* refresh = NULL, int32 castItemLevel = -1); + static Aura* TryCreate(SpellInfo const* spellproto, ObjectGuid castId, uint32 tryEffMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem = NULL, ObjectGuid casterGUID = ObjectGuid::Empty, int32 castItemLevel = -1); + static Aura* Create(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + Aura(SpellInfo const* spellproto, ObjectGuid castId, WorldObject* owner, Unit* caster, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); void _InitEffects(uint32 effMask, Unit* caster, int32 *baseAmount); virtual ~Aura(); SpellInfo const* GetSpellInfo() const { return m_spellInfo; } uint32 GetId() const{ return GetSpellInfo()->Id; } + ObjectGuid GetCastGUID() const { return m_castGuid; } + ObjectGuid GetCasterGUID() const { return m_casterGuid; } ObjectGuid GetCastItemGUID() const { return m_castItemGuid; } int32 GetCastItemLevel() const { return m_castItemLevel; } - ObjectGuid GetCasterGUID() const { return m_casterGuid; } Unit* GetCaster() const; WorldObject* GetOwner() const { return m_owner; } Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; } @@ -297,6 +298,7 @@ class TC_GAME_API Aura void _DeleteRemovedApplications(); protected: SpellInfo const* const m_spellInfo; + ObjectGuid const m_castGuid; ObjectGuid const m_casterGuid; ObjectGuid const m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted int32 m_castItemLevel; @@ -334,9 +336,9 @@ class TC_GAME_API Aura class TC_GAME_API UnitAura : public Aura { - friend Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + friend Aura* Aura::Create(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); public: - UnitAura(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + UnitAura(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp) override; void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp) override; @@ -355,9 +357,9 @@ class TC_GAME_API UnitAura : public Aura class TC_GAME_API DynObjAura : public Aura { - friend Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + friend Aura* Aura::Create(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); public: - DynObjAura(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); + DynObjAura(SpellInfo const* spellproto, ObjectGuid castId, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) override; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 84cfabf4e8f..c0746016ff1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -589,7 +589,7 @@ m_spellValue(new SpellValue(caster->GetMap()->GetDifficultyID(), m_spellInfo)), m_procVictim = 0; m_procEx = 0; focusObject = NULL; - m_cast_count = ObjectGuid::Empty; + m_castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, m_caster->GetMapId(), m_spellInfo->Id, m_caster->GetMap()->GenerateLowGuid()); memset(m_misc.Raw.Data, 0, sizeof(m_misc.Raw.Data)); m_SpellVisual = m_spellInfo->GetSpellXSpellVisualId(caster->GetMap()->GetDifficultyID()); m_preCastSpell = 0; @@ -616,7 +616,6 @@ m_spellValue(new SpellValue(caster->GetMap()->GetDifficultyID(), m_spellInfo)), && !m_spellInfo->IsPassive() && !m_spellInfo->IsPositive(); CleanupTargetList(); - CleanupExecuteLogList(); for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) m_destTargets[i] = SpellDestination(*m_caster); @@ -645,7 +644,6 @@ Spell::~Spell() ASSERT(m_caster->ToPlayer()->m_spellModTakingSpell != this); delete m_spellValue; - CleanupExecuteLogList(); } void Spell::InitExplicitTargets(SpellCastTargets const& targets) @@ -2619,7 +2617,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA if (m_originalCaster) { bool refresh = false; - m_spellAura = Aura::TryRefreshStackOrCreate(aurSpellInfo, effectMask, unit, + m_spellAura = Aura::TryRefreshStackOrCreate(aurSpellInfo, m_castId, effectMask, unit, m_originalCaster, (aurSpellInfo == m_spellInfo) ? m_spellValue->EffectBasePoints : basePoints, m_CastItem, ObjectGuid::Empty, &refresh, m_castItemLevel); if (m_spellAura) @@ -2925,7 +2923,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered m_caster->m_Events.AddEvent(Event, m_caster->m_Events.CalculateTime(1)); //Prevent casting at cast another spell (ServerSide check) - if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true) && !m_cast_count.IsEmpty()) + if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true) && !m_castId.IsEmpty()) { SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS); finish(false); @@ -3716,39 +3714,10 @@ void Spell::finish(bool ok) m_caster->AttackStop(); } -void Spell::SendCastResult(SpellCastResult result) -{ - if (result == SPELL_CAST_OK) - return; - - if (m_caster->GetTypeId() != TYPEID_PLAYER) - return; - - if (m_caster->ToPlayer()->GetSession()->PlayerLoading()) // don't send cast results at loading time - return; - - SendCastResult(m_caster->ToPlayer(), m_spellInfo, m_cast_count, result, m_customError, SMSG_CAST_FAILED, m_misc.Raw.Data); -} - -void Spell::SendPetCastResult(SpellCastResult result) +template +inline void FillSpellCastFailedArgs(T& packet, ObjectGuid castId, SpellInfo const* spellInfo, SpellCastResult result, SpellCustomErrors customError, uint32* misc, Player* caster) { - if (result == SPELL_CAST_OK) - return; - - Unit* owner = m_caster->GetCharmerOrOwner(); - if (!owner || owner->GetTypeId() != TYPEID_PLAYER) - return; - - SendCastResult(owner->ToPlayer(), m_spellInfo, m_cast_count, result, SPELL_CUSTOM_ERROR_NONE, SMSG_PET_CAST_FAILED, m_misc.Raw.Data); -} - -void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError /*= SPELL_CUSTOM_ERROR_NONE*/, OpcodeServer opcode /*= SMSG_CAST_FAILED*/, uint32* misc /*= nullptr*/) -{ - if (result == SPELL_CAST_OK) - return; - - WorldPackets::Spells::CastFailed packet(opcode); - packet.CastID = cast_count; + packet.CastID = castId; packet.SpellID = spellInfo->Id; packet.Reason = result; @@ -3864,7 +3833,47 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, ObjectGui default: break; } +} + +void Spell::SendCastResult(SpellCastResult result) +{ + if (result == SPELL_CAST_OK) + return; + if (m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + if (m_caster->ToPlayer()->GetSession()->PlayerLoading()) // don't send cast results at loading time + return; + + WorldPackets::Spells::CastFailed castFailed; + castFailed.SpellXSpellVisualID = m_SpellVisual; + FillSpellCastFailedArgs(castFailed, m_castId, m_spellInfo, result, m_customError, m_misc.Raw.Data, m_caster->ToPlayer()); + m_caster->ToPlayer()->SendDirectMessage(castFailed.Write()); +} + +void Spell::SendPetCastResult(SpellCastResult result) +{ + if (result == SPELL_CAST_OK) + return; + + Unit* owner = m_caster->GetCharmerOrOwner(); + if (!owner || owner->GetTypeId() != TYPEID_PLAYER) + return; + + WorldPackets::Spells::PetCastFailed petCastFailed; + FillSpellCastFailedArgs(petCastFailed, m_castId, m_spellInfo, result, SPELL_CUSTOM_ERROR_NONE, m_misc.Raw.Data, owner->ToPlayer()); + owner->ToPlayer()->SendDirectMessage(petCastFailed.Write()); +} + +void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint32 spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError /*= SPELL_CUSTOM_ERROR_NONE*/, uint32* misc /*= nullptr*/) +{ + if (result == SPELL_CAST_OK) + return; + + WorldPackets::Spells::CastFailed packet; + packet.SpellXSpellVisualID = spellVisual; + FillSpellCastFailedArgs(packet, cast_count, spellInfo, result, customError, misc, caster); caster->GetSession()->SendPacket(packet.Write()); } @@ -3904,7 +3913,8 @@ void Spell::SendSpellStart() castData.CasterGUID = m_caster->GetGUID(); castData.CasterUnit = m_caster->GetGUID(); - castData.CastID = m_cast_count; // pending spell cast? + castData.CastID = m_castId; + castData.OriginalCastID = m_originalCastId; castData.SpellID = m_spellInfo->Id; castData.SpellXSpellVisualID = m_SpellVisual; castData.CastFlags = castFlags; @@ -4019,7 +4029,8 @@ void Spell::SendSpellGo() castData.CasterGUID = m_caster->GetGUID(); castData.CasterUnit = m_caster->GetGUID(); - castData.CastID = m_cast_count; // pending spell cast? + castData.CastID = m_castId; + castData.OriginalCastID = m_originalCastId; castData.SpellID = m_spellInfo->Id; castData.SpellXSpellVisualID = m_SpellVisual; castData.CastFlags = castFlags; @@ -4180,41 +4191,30 @@ void Spell::SendSpellExecuteLog() spellExecuteLog.Caster = m_caster->GetGUID(); spellExecuteLog.SpellID = m_spellInfo->Id; - if (_powerDrainTargets->empty() && _extraAttacksTargets->empty() && - _durabilityDamageTargets->empty() && _genericVictimTargets->empty() && - _tradeSkillTargets->empty() && _feedPetTargets->empty()) - return; - for (SpellEffectInfo const* effect : GetEffects()) { WorldPackets::CombatLog::SpellExecuteLog::SpellLogEffect spellLogEffect; if (!effect) continue; - spellLogEffect.Effect = effect->Effect; - - for (SpellLogEffectPowerDrainParams const& powerDrainParam : _powerDrainTargets[effect->EffectIndex]) - spellLogEffect.PowerDrainTargets.push_back(powerDrainParam); - - for (SpellLogEffectExtraAttacksParams const& extraAttacksTarget : _extraAttacksTargets[effect->EffectIndex]) - spellLogEffect.ExtraAttacksTargets.push_back(extraAttacksTarget); - - for (SpellLogEffectDurabilityDamageParams const& durabilityDamageTarget : _durabilityDamageTargets[effect->EffectIndex]) - spellLogEffect.DurabilityDamageTargets.push_back(durabilityDamageTarget); - - for (SpellLogEffectGenericVictimParams const& genericVictimTarget : _genericVictimTargets[effect->EffectIndex]) - spellLogEffect.GenericVictimTargets.push_back(genericVictimTarget); - - for (SpellLogEffectTradeSkillItemParams const& tradeSkillTarget : _tradeSkillTargets[effect->EffectIndex]) - spellLogEffect.TradeSkillTargets.push_back(tradeSkillTarget); + if (_powerDrainTargets[effect->EffectIndex].empty() && _extraAttacksTargets[effect->EffectIndex].empty() && + _durabilityDamageTargets[effect->EffectIndex].empty() && _genericVictimTargets[effect->EffectIndex].empty() && + _tradeSkillTargets[effect->EffectIndex].empty() && _feedPetTargets[effect->EffectIndex].empty()) + continue; - for (SpellLogEffectFeedPetParams const& feedPetTarget : _feedPetTargets[effect->EffectIndex]) - spellLogEffect.FeedPetTargets.push_back(feedPetTarget); + spellLogEffect.Effect = effect->Effect; + spellLogEffect.PowerDrainTargets = std::move(_powerDrainTargets[effect->EffectIndex]); + spellLogEffect.ExtraAttacksTargets = std::move(_extraAttacksTargets[effect->EffectIndex]); + spellLogEffect.DurabilityDamageTargets = std::move(_durabilityDamageTargets[effect->EffectIndex]); + spellLogEffect.GenericVictimTargets = std::move(_genericVictimTargets[effect->EffectIndex]); + spellLogEffect.TradeSkillTargets = std::move(_tradeSkillTargets[effect->EffectIndex]); + spellLogEffect.FeedPetTargets = std::move(_feedPetTargets[effect->EffectIndex]); spellExecuteLog.Effects.push_back(spellLogEffect); } - m_caster->SendCombatLogMessage(&spellExecuteLog); + if (!spellExecuteLog.Effects.empty()) + m_caster->SendCombatLogMessage(&spellExecuteLog); } void Spell::ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit* target, uint32 powerType, uint32 points, float amplitude) @@ -4307,21 +4307,11 @@ void Spell::ExecuteLogEffectResurrect(uint8 effect, Unit* target) _genericVictimTargets[effect].push_back(spellLogEffectGenericVictimParams); } -void Spell::CleanupExecuteLogList() -{ - _durabilityDamageTargets->clear(); - _extraAttacksTargets->clear(); - _feedPetTargets->clear(); - _genericVictimTargets->clear(); - _powerDrainTargets->clear(); - _tradeSkillTargets->clear(); -} - void Spell::SendInterrupted(uint8 result) { WorldPackets::Spells::SpellFailure failurePacket; failurePacket.CasterUnit = m_caster->GetGUID(); - failurePacket.CastID = m_cast_count; + failurePacket.CastID = m_castId; failurePacket.SpellID = m_spellInfo->Id; failurePacket.SpelXSpellVisualID = m_SpellVisual; failurePacket.Reason = result; @@ -4329,7 +4319,7 @@ void Spell::SendInterrupted(uint8 result) WorldPackets::Spells::SpellFailedOther failedPacket; failedPacket.CasterUnit = m_caster->GetGUID(); - failedPacket.CastID = m_cast_count; + failedPacket.CastID = m_castId; failedPacket.SpellID = m_spellInfo->Id; failedPacket.Reason = result; m_caster->SendMessageToSet(failedPacket.Write(), true); diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 7dda7451e48..523796eb56d 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -109,6 +109,17 @@ enum SpellCastFlagsEx CAST_FLAG_EX_UNKNOWN_20 = 0x80000 }; +enum SpellCastSource : uint8 +{ + SPELL_CAST_SOURCE_PLAYER = 2, + SPELL_CAST_SOURCE_NORMAL = 3, + SPELL_CAST_SOURCE_ITEM = 4, + SPELL_CAST_SOURCE_PASSIVE = 7, + SPELL_CAST_SOURCE_PET = 9, + SPELL_CAST_SOURCE_AURA = 13, + SPELL_CAST_SOURCE_SPELL = 16, +}; + enum SpellRangeFlag { SPELL_RANGE_DEFAULT = 0, @@ -522,7 +533,7 @@ class TC_GAME_API Spell void CheckSrc() { if (!m_targets.HasSrc()) m_targets.SetSrc(*m_caster); } void CheckDst() { if (!m_targets.HasDst()) m_targets.SetDst(*m_caster); } - static void SendCastResult(Player* caster, SpellInfo const* spellInfo, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError = SPELL_CUSTOM_ERROR_NONE, OpcodeServer opcode = SMSG_CAST_FAILED, uint32* misc = nullptr); + static void SendCastResult(Player* caster, SpellInfo const* spellInfo, uint32 spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError = SPELL_CUSTOM_ERROR_NONE, uint32* misc = nullptr); void SendCastResult(SpellCastResult result); void SendPetCastResult(SpellCastResult result); void SendSpellStart(); @@ -539,7 +550,6 @@ class TC_GAME_API Spell void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject* obj); void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject* obj); void ExecuteLogEffectResurrect(uint8 effIndex, Unit* target); - void CleanupExecuteLogList(); void SendInterrupted(uint8 result); void SendChannelUpdate(uint32 time); void SendChannelStart(uint32 duration); @@ -553,7 +563,8 @@ class TC_GAME_API Spell ObjectGuid m_castItemGUID; uint32 m_castItemEntry; int32 m_castItemLevel; - ObjectGuid m_cast_count; + ObjectGuid m_castId; + ObjectGuid m_originalCastId; uint32 m_castFlagsEx; union { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 1d9f6fc4c14..d7aa6769b8b 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1552,7 +1552,7 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex) return; } - if (Aura* aura = Aura::TryCreate(m_spellInfo, MAX_EFFECT_MASK, dynObj, caster, &m_spellValue->EffectBasePoints[0], nullptr, ObjectGuid::Empty, m_castItemLevel)) + if (Aura* aura = Aura::TryCreate(m_spellInfo, m_castId, MAX_EFFECT_MASK, dynObj, caster, &m_spellValue->EffectBasePoints[0], nullptr, ObjectGuid::Empty, m_castItemLevel)) { m_spellAura = aura; m_spellAura->_RegisterForTargets(); diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index f0e5ba81f58..0956b25dcdc 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -214,7 +214,7 @@ public: char* fail2 = strtok(NULL, " "); uint8 failArg2 = fail2 ? (uint8)atoi(fail2) : 0; - WorldPackets::Spells::CastFailed castFailed(SMSG_CAST_FAILED); + WorldPackets::Spells::CastFailed castFailed; castFailed.CastID = ObjectGuid::Empty; castFailed.SpellID = 133; castFailed.Reason = failNum; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 0e20efb0eaf..dafe9a214d5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -286,7 +286,10 @@ public: uint32 spellId = handler->extractSpellIdFromLink((char*)args); if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId)) - Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, target, target); + { + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, target->GetMapId(), spellId, target->GetMap()->GenerateLowGuid()); + Aura::TryRefreshStackOrCreate(spellInfo, castId, MAX_EFFECT_MASK, target, target); + } return true; } @@ -918,12 +921,18 @@ public: if (player->IsInFlight() || player->IsInCombat()) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(7355); +#define SPELL_UNSTUCK_ID 7355 +#define SPELL_UNSTUCK_VISUAL 2683 + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_UNSTUCK_ID); if (!spellInfo) return false; if (Player* caster = handler->GetSession()->GetPlayer()) - Spell::SendCastResult(caster, spellInfo, ObjectGuid::Empty, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + { + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, player->GetMapId(), SPELL_UNSTUCK_ID, player->GetMap()->GenerateLowGuid()); + Spell::SendCastResult(caster, spellInfo, SPELL_UNSTUCK_VISUAL, castId, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW); + } return false; } -- cgit v1.2.3 From 737469cfaaaf45fe700ae8a9673015b88afd0b00 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 5 Jun 2016 17:57:19 +0200 Subject: Core/PacketIO: Update movement packets --- src/server/game/Movement/Spline/MoveSpline.cpp | 18 +-- src/server/game/Movement/Spline/MoveSplineFlag.h | 25 ++--- src/server/game/Movement/Spline/MoveSplineInit.cpp | 6 +- src/server/game/Movement/Spline/MoveSplineInit.h | 2 +- .../game/Movement/Spline/MoveSplineInitArgs.h | 4 +- src/server/game/Movement/Spline/MovementUtil.cpp | 24 ++-- src/server/game/Server/Packets/MovementPackets.cpp | 123 +++++++++------------ src/server/game/Server/Packets/MovementPackets.h | 35 ++++-- src/server/game/Server/Protocol/Opcodes.cpp | 110 +++++++++--------- src/server/scripts/Commands/cs_misc.cpp | 8 +- 10 files changed, 178 insertions(+), 177 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index c58cc3d9e55..b16bee6aec0 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -43,11 +43,11 @@ Location MoveSpline::ComputePosition() const else if (splineflags.falling) computeFallElevation(c.z); - if (splineflags.done && splineflags.isFacing()) + if (splineflags.done && facing.type != MONSTER_MOVE_NORMAL) { - if (splineflags.final_angle) + if (facing.type == MONSTER_MOVE_FACING_ANGLE) c.orientation = facing.angle; - else if (splineflags.final_point) + else if (facing.type == MONSTER_MOVE_FACING_SPOT) c.orientation = std::atan2(facing.f.y - c.y, facing.f.x - c.x); //nothing to do for MoveSplineFlag::Final_Target flag } @@ -165,7 +165,7 @@ void MoveSpline::Initialize(MoveSplineInitArgs const& args) time_passed = 0; vertical_acceleration = 0.f; effect_start_time = 0; - splineIsFacingOnly = args.path.size() == 2 && args.flags & MoveSplineFlag::Mask_Final_Facing && ((args.path[1] - args.path[0]).length() < 0.1f); + splineIsFacingOnly = args.path.size() == 2 && args.facing.type != MONSTER_MOVE_NORMAL && ((args.path[1] - args.path[0]).length() < 0.1f); // Check if its a stop spline if (args.flags.done) @@ -178,7 +178,7 @@ void MoveSpline::Initialize(MoveSplineInitArgs const& args) // init parabolic / animation // spline initialized, duration known and i able to compute parabolic acceleration - if (args.flags & (MoveSplineFlag::Parabolic | MoveSplineFlag::Animation)) + if (args.flags & (MoveSplineFlag::Parabolic | MoveSplineFlag::Animation | MoveSplineFlag::Unknown6)) { effect_start_time = Duration() * args.time_perc; if (args.flags.parabolic && effect_start_time < Duration()) @@ -217,7 +217,7 @@ bool MoveSplineInitArgs::Validate(Unit* unit) const // check path lengths - why are we even starting such short movement? bool MoveSplineInitArgs::_checkPathLengths() const { - if (path.size() > 2 || !(flags & MoveSplineFlag::Mask_Final_Facing)) + if (path.size() > 2 || facing.type == MONSTER_MOVE_NORMAL) for (uint32 i = 0; i < path.size() - 1; ++i) if ((path[i + 1] - path[i]).length() < 0.1f) return false; @@ -274,11 +274,11 @@ std::string MoveSpline::ToString() const str << "MoveSpline" << std::endl; str << "spline Id: " << GetId() << std::endl; str << "flags: " << splineflags.ToString() << std::endl; - if (splineflags.final_angle) + if (facing.type == MONSTER_MOVE_FACING_ANGLE) str << "facing angle: " << facing.angle; - else if (splineflags.final_target) + else if (facing.type == MONSTER_MOVE_FACING_TARGET) str << "facing target: " << facing.target.ToString(); - else if (splineflags.final_point) + else if (facing.type == MONSTER_MOVE_FACING_SPOT) str << "facing point: " << facing.f.x << " " << facing.f.y << " " << facing.f.z; str << std::endl; str << "time passed: " << time_passed << std::endl; diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index acd0c94bbf1..94d0b7bc13f 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -56,20 +56,19 @@ namespace Movement Unknown5 = 0x01000000, // NOT VERIFIED Animation = 0x02000000, // Plays animation after some time passed Parabolic = 0x04000000, // Affects elevation computation, can't be combined with Falling flag - Final_Point = 0x08000000, - Final_Target = 0x10000000, - Final_Angle = 0x20000000, - Unknown6 = 0x40000000, // NOT VERIFIED - Unknown7 = 0x80000000, // NOT VERIFIED + Unknown6 = 0x08000000, // NOT VERIFIED + Unknown7 = 0x10000000, // NOT VERIFIED + Unknown8 = 0x20000000, // NOT VERIFIED + Unknown9 = 0x40000000, // NOT VERIFIED + Unknown10 = 0x80000000, // NOT VERIFIED // Masks - Mask_Final_Facing = Final_Point | Final_Target | Final_Angle, // animation ids stored here, see AnimType enum, used with Animation flag Mask_Animations = 0x7, // flags that shouldn't be appended into SMSG_MONSTER_MOVE\SMSG_MONSTER_MOVE_TRANSPORT packet, should be more probably - Mask_No_Monster_Move = Mask_Final_Facing | Mask_Animations | Done, + Mask_No_Monster_Move = Mask_Animations | Done, // Unused, not suported flags - Mask_Unused = No_Spline|Enter_Cycle|Frozen|Unknown0|Unknown1|Unknown2|Unknown3|Unknown4|Unknown5|Unknown6|Unknown7 + Mask_Unused = No_Spline|Enter_Cycle|Frozen|Unknown0|Unknown1|Unknown2|Unknown3|Unknown4|Unknown5|Unknown6|Unknown7|Unknown8|Unknown9|Unknown10 }; inline uint32& raw() { return (uint32&)*this; } @@ -83,7 +82,6 @@ namespace Movement bool isSmooth() const { return (raw() & Catmullrom) != 0; } bool isLinear() const { return !isSmooth(); } - bool isFacing() const { return (raw() & Mask_Final_Facing) != 0; } uint8 getAnimationId() const { return animId; } bool hasAllFlags(uint32 f) const { return (raw() & f) == f; } @@ -102,9 +100,6 @@ namespace Movement void EnableFlying() { raw() = (raw() & ~(Falling)) | Flying; } void EnableFalling() { raw() = (raw() & ~(Mask_Animations | Parabolic | Animation | Flying)) | Falling; } void EnableCatmullRom() { raw() = (raw() & ~SmoothGroundPath) | Catmullrom; } - void EnableFacingPoint() { raw() = (raw() & ~Mask_Final_Facing) | Final_Point; } - void EnableFacingAngle() { raw() = (raw() & ~Mask_Final_Facing) | Final_Angle; } - void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target; } void EnableTransportEnter() { raw() = (raw() & ~TransportExit) | TransportEnter; } void EnableTransportExit() { raw() = (raw() & ~TransportEnter) | TransportExit; } @@ -133,11 +128,11 @@ namespace Movement bool unknown5 : 1; bool animation : 1; bool parabolic : 1; - bool final_point : 1; - bool final_target : 1; - bool final_angle : 1; bool unknown6 : 1; bool unknown7 : 1; + bool unknown8 : 1; + bool unknown9 : 1; + bool unknown10 : 1; }; #pragma pack(pop) } diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index 114f683b601..f4d5a449e57 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -161,6 +161,7 @@ namespace Movement WorldPackets::Movement::MonsterMove packet; packet.MoverGUID = unit->GetGUID(); packet.Pos = loc; + packet.SplineData.StopDistanceTolerance = 2; packet.SplineData.ID = move_spline.GetId(); if (transport) @@ -185,8 +186,9 @@ namespace Movement void MoveSplineInit::SetFacing(const Unit* target) { - args.flags.EnableFacingTarget(); + args.facing.angle = unit->GetAngle(target); args.facing.target = target->GetGUID(); + args.facing.type = MONSTER_MOVE_FACING_TARGET; } void MoveSplineInit::SetFacing(float angle) @@ -200,7 +202,7 @@ namespace Movement } args.facing.angle = G3D::wrap(angle, 0.f, (float)G3D::twoPi()); - args.flags.EnableFacingAngle(); + args.facing.type = MONSTER_MOVE_FACING_ANGLE; } void MoveSplineInit::MoveTo(const Vector3& dest, bool generatePath, bool forceDestination) diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h index 421a8d6b06c..f0b5e9aaac0 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.h +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -200,7 +200,7 @@ namespace Movement args.facing.f.x = finalSpot.x; args.facing.f.y = finalSpot.y; args.facing.f.z = finalSpot.z; - args.flags.EnableFacingPoint(); + args.facing.type = MONSTER_MOVE_FACING_SPOT; } inline void MoveSplineInit::DisableTransportPathTransformations() { args.TransformForTransport = false; } diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h index 0b1851f2a1a..60cb4db8b55 100644 --- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h +++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h @@ -35,7 +35,9 @@ namespace Movement ObjectGuid target; float angle; - FacingInfo() : angle(0.0f) { } + MonsterMoveType type; + + FacingInfo() : angle(0.0f), type(MONSTER_MOVE_NORMAL) { } }; struct MoveSplineInitArgs diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp index a7aa84f3680..745802f0138 100644 --- a/src/server/game/Movement/Spline/MovementUtil.cpp +++ b/src/server/game/Movement/Spline/MovementUtil.cpp @@ -149,7 +149,7 @@ namespace Movement STRINGIZE(Done ), // 0x00000020 STRINGIZE(Falling ), // 0x00000040 // Not Compartible With Trajectory Movement STRINGIZE(No_Spline ), // 0x00000080 - STRINGIZE(Unknown2 ), // 0x00000100 + STRINGIZE(Unknown1 ), // 0x00000100 STRINGIZE(Flying ), // 0x00000200 // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation STRINGIZE(OrientationFixed ), // 0x00000400 // Model Orientation Fixed STRINGIZE(Catmullrom ), // 0x00000800 // Used Catmullrom Interpolation Mode @@ -158,21 +158,21 @@ namespace Movement STRINGIZE(Frozen ), // 0x00004000 STRINGIZE(TransportEnter ), // 0x00008000 STRINGIZE(TransportExit ), // 0x00010000 - STRINGIZE(Unknown3 ), // 0x00020000 - STRINGIZE(Unknown4 ), // 0x00040000 + STRINGIZE(Unknown2 ), // 0x00020000 + STRINGIZE(Unknown3 ), // 0x00040000 STRINGIZE(OrientationInversed), // 0x00080000 // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation STRINGIZE(SmoothGroundPath ), // 0x00100000 STRINGIZE(Walkmode ), // 0x00200000 STRINGIZE(UncompressedPath ), // 0x00400000 - STRINGIZE(Unknown6 ), // 0x00800000 - STRINGIZE(Animation ), // 0x01000000 // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement - STRINGIZE(Parabolic ), // 0x02000000 // Not Compartible With Fall Movement - STRINGIZE(Final_Point ), // 0x04000000 - STRINGIZE(Final_Target ), // 0x08000000 - STRINGIZE(Final_Angle ), // 0x10000000 - STRINGIZE(Unknown7 ), // 0x20000000 - STRINGIZE(Unknown8 ), // 0x40000000 - STRINGIZE(Unknown9 ), // 0x80000000 + STRINGIZE(Unknown4 ), // 0x00800000 + STRINGIZE(Unknown5 ), // 0x01000000 + STRINGIZE(Animation ), // 0x02000000 // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement + STRINGIZE(Parabolic ), // 0x04000000 // Not Compartible With Fall Movement + STRINGIZE(Unknown6 ), // 0x08000000 + STRINGIZE(Unknown7 ), // 0x10000000 + STRINGIZE(Unknown8 ), // 0x20000000 + STRINGIZE(Unknown9 ), // 0x40000000 + STRINGIZE(Unknown10 ), // 0x80000000 }; template diff --git a/src/server/game/Server/Packets/MovementPackets.cpp b/src/server/game/Server/Packets/MovementPackets.cpp index fde1b1bf875..4da78116d90 100644 --- a/src/server/game/Server/Packets/MovementPackets.cpp +++ b/src/server/game/Server/Packets/MovementPackets.cpp @@ -186,8 +186,8 @@ void WorldPackets::Movement::ClientPlayerMovement::Read() ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFilterKey const& monsterSplineFilterKey) { - data << monsterSplineFilterKey.Idx; - data << monsterSplineFilterKey.Speed; + data << int16(monsterSplineFilterKey.Idx); + data << uint16(monsterSplineFilterKey.Speed); return data; } @@ -195,10 +195,10 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFi ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFilter const& monsterSplineFilter) { data << uint32(monsterSplineFilter.FilterKeys.size()); - data << monsterSplineFilter.BaseSpeed; - data << monsterSplineFilter.StartOffset; - data << monsterSplineFilter.DistToPrevFilterKey; - data << monsterSplineFilter.AddedToStart; + data << float(monsterSplineFilter.BaseSpeed); + data << int16(monsterSplineFilter.StartOffset); + data << float(monsterSplineFilter.DistToPrevFilterKey); + data << int16(monsterSplineFilter.AddedToStart); for (WorldPackets::Movement::MonsterSplineFilterKey const& filterKey : monsterSplineFilter.FilterKeys) data << filterKey; data.WriteBits(monsterSplineFilter.FilterFlags, 2); @@ -207,28 +207,38 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFi return data; } +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineSpellEffectExtraData const& spellEffectExtraData) +{ + data << spellEffectExtraData.field_1; + data << uint32(spellEffectExtraData.field_2); + data << uint32(spellEffectExtraData.field_3); + data << uint32(spellEffectExtraData.field_4); + + return data; +} + ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline const& movementSpline) { - data << movementSpline.Flags; - data << movementSpline.AnimTier; - data << movementSpline.TierTransStartTime; - data << movementSpline.Elapsed; - data << movementSpline.MoveTime; - data << movementSpline.JumpGravity; - data << movementSpline.SpecialTime; - data << int32(movementSpline.Points.size()); - data << movementSpline.Mode; - data << movementSpline.VehicleExitVoluntary; + data << uint32(movementSpline.Flags); + data << uint8(movementSpline.AnimTier); + data << uint32(movementSpline.TierTransStartTime); + data << int32(movementSpline.Elapsed); + data << uint32(movementSpline.MoveTime); + data << float(movementSpline.JumpGravity); + data << uint32(movementSpline.SpecialTime); + data << uint32(movementSpline.Points.size()); + data << uint8(movementSpline.Mode); + data << uint8(movementSpline.VehicleExitVoluntary); data << movementSpline.TransportGUID; - data << movementSpline.VehicleSeat; - data << int32(movementSpline.PackedDeltas.size()); + data << int8(movementSpline.VehicleSeat); + data << uint32(movementSpline.PackedDeltas.size()); for (G3D::Vector3 const& pos : movementSpline.Points) data << pos; for (G3D::Vector3 const& pos : movementSpline.PackedDeltas) data.appendPackXYZ(pos.x, pos.y, pos.z); data.WriteBits(movementSpline.Face, 2); data.WriteBit(movementSpline.SplineFilter.is_initialized()); - data.WriteBit(0); // New Legion bit + data.WriteBit(movementSpline.SpellEffectExtraData.is_initialized()); data.FlushBits(); if (movementSpline.SplineFilter) @@ -240,20 +250,16 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline data << movementSpline.FaceSpot; break; case ::Movement::MONSTER_MOVE_FACING_TARGET: - data << movementSpline.FaceDirection; + data << float(movementSpline.FaceDirection); data << movementSpline.FaceGUID; break; case ::Movement::MONSTER_MOVE_FACING_ANGLE: - data << movementSpline.FaceDirection; + data << float(movementSpline.FaceDirection); break; } - // New legion block, controlled by new bit above - // if (false) - // { - // data << ObjectGuid::Empty; - // data << 0 << 0 << 0; - // } + if (movementSpline.SpellEffectExtraData) + data << *movementSpline.SpellEffectExtraData; return data; } @@ -263,9 +269,7 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementMonster data << movementMonsterSpline.ID; data << movementMonsterSpline.Destination; data.WriteBit(movementMonsterSpline.CrzTeleport); - - // Unk bits. 0 if monster is moving, 1 or 2 if stopped - data.WriteBits(movementMonsterSpline.Move.Flags ? 0 : 2, 2); + data.WriteBits(movementMonsterSpline.StopDistanceTolerance, 3); data << movementMonsterSpline.Move; @@ -296,20 +300,12 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(:: data << uint32(moveSpline.getPath().size()); data.append(&moveSpline.getPath()[0], moveSpline.getPath().size()); - uint8 face = ::Movement::MONSTER_MOVE_NORMAL; - if (splineFlags.final_angle) - face = ::Movement::MONSTER_MOVE_FACING_ANGLE; - else if (splineFlags.final_target) - face = ::Movement::MONSTER_MOVE_FACING_TARGET; - else if (splineFlags.final_point) - face = ::Movement::MONSTER_MOVE_FACING_SPOT; - - data.WriteBits(face, 2); // Face + data.WriteBits(moveSpline.facing.type, 2); // Face bool HasJumpGravity = data.WriteBit(moveSpline.splineflags & (::Movement::MoveSplineFlag::Parabolic | ::Movement::MoveSplineFlag::Animation)); // HasJumpGravity bool HasSpecialTime = data.WriteBit((moveSpline.splineflags & ::Movement::MoveSplineFlag::Parabolic) && moveSpline.effect_start_time < moveSpline.Duration()); // HasSpecialTime data.WriteBits(uint8(moveSpline.spline.mode()), 2); // Mode data.WriteBit(0); // HasSplineFilter - data.WriteBit(0); // Unknown_1 + data.WriteBit(0); // HasSpellEffectExtraData data.FlushBits(); //if (HasSplineFilterKey) @@ -325,7 +321,7 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(:: // data.FlushBits(); //} - switch (face) + switch (moveSpline.facing.type) { case ::Movement::MONSTER_MOVE_FACING_SPOT: data << moveSpline.facing.f; // FaceSpot @@ -344,7 +340,7 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(:: if (HasSpecialTime) data << uint32(moveSpline.effect_start_time); // SpecialTime - //if (Unknown_1) + //if (HasSpellEffectExtraData) //{ // data << ObjectGuid(); // data << uint32(); @@ -362,25 +358,10 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS ::Movement::MoveSplineFlag splineFlags = moveSpline.splineflags; splineFlags.enter_cycle = moveSpline.isCyclic(); movementSpline.Flags = uint32(splineFlags & uint32(~::Movement::MoveSplineFlag::Mask_No_Monster_Move)); - - switch (moveSpline.splineflags & ::Movement::MoveSplineFlag::Mask_Final_Facing) - { - case ::Movement::MoveSplineFlag::Final_Point: - movementSpline.Face = ::Movement::MONSTER_MOVE_FACING_SPOT; - movementSpline.FaceSpot = moveSpline.facing.f; - break; - case ::Movement::MoveSplineFlag::Final_Target: - movementSpline.Face = ::Movement::MONSTER_MOVE_FACING_TARGET; - movementSpline.FaceGUID = moveSpline.facing.target; - break; - case ::Movement::MoveSplineFlag::Final_Angle: - movementSpline.Face = ::Movement::MONSTER_MOVE_FACING_ANGLE; - movementSpline.FaceDirection = moveSpline.facing.angle; - break; - default: - movementSpline.Face = ::Movement::MONSTER_MOVE_NORMAL; - break; - } + movementSpline.Face = moveSpline.facing.type; + movementSpline.FaceDirection = moveSpline.facing.angle; + movementSpline.FaceGUID = moveSpline.facing.target; + movementSpline.FaceSpot = moveSpline.facing.f; if (splineFlags.animation) { @@ -396,6 +377,9 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS movementSpline.SpecialTime = moveSpline.effect_start_time; } + if (splineFlags.unknown6) + movementSpline.SpecialTime = moveSpline.effect_start_time; + ::Movement::Spline const& spline = moveSpline.spline; std::vector const& array = spline.getPoints(); @@ -506,6 +490,7 @@ WorldPacket const* WorldPackets::Movement::TransferAborted::Write() { _worldPacket << uint32(MapID); _worldPacket << uint8(Arg); + _worldPacket << int32(MapDifficultyXConditionID); _worldPacket.WriteBits(TransfertAbort, 5); _worldPacket.FlushBits(); return &_worldPacket; @@ -513,22 +498,19 @@ WorldPacket const* WorldPackets::Movement::TransferAborted::Write() WorldPacket const* WorldPackets::Movement::NewWorld::Write() { - _worldPacket << MapID; + _worldPacket << int32(MapID); _worldPacket << Pos.PositionXYZOStream(); - _worldPacket << Reason; - // New in 7.x - Does something movement-related (velocities ???) - _worldPacket << float(0.0f); - _worldPacket << float(0.0f); - _worldPacket << float(0.0f); + _worldPacket << uint32(Reason); + _worldPacket << MovementOffset.PositionXYZStream(); return &_worldPacket; } WorldPacket const* WorldPackets::Movement::MoveTeleport::Write() { _worldPacket << MoverGUID; - _worldPacket << SequenceIndex; + _worldPacket << uint32(SequenceIndex); _worldPacket << Pos.PositionXYZStream(); - _worldPacket << Facing; + _worldPacket << float(Facing); _worldPacket << uint8(0); //! New in 7.x (gets written into movement queue node) _worldPacket.WriteBit(Vehicle.is_initialized()); @@ -537,7 +519,7 @@ WorldPacket const* WorldPackets::Movement::MoveTeleport::Write() if (Vehicle) { - _worldPacket << Vehicle->VehicleSeatIndex; + _worldPacket << uint8(Vehicle->VehicleSeatIndex); _worldPacket.WriteBit(Vehicle->VehicleExitVoluntary); _worldPacket.WriteBit(Vehicle->VehicleExitTeleport); _worldPacket.FlushBits(); @@ -748,6 +730,7 @@ WorldPacket const* WorldPackets::Movement::SummonRequest::Write() _worldPacket << SummonerGUID; _worldPacket << uint32(SummonerVirtualRealmAddress); _worldPacket << int32(AreaID); + _worldPacket << uint8(Reason); _worldPacket.WriteBit(SkipStartingArea); _worldPacket.FlushBits(); diff --git a/src/server/game/Server/Packets/MovementPackets.h b/src/server/game/Server/Packets/MovementPackets.h index 6e1337e2912..8a89dba4c79 100644 --- a/src/server/game/Server/Packets/MovementPackets.h +++ b/src/server/game/Server/Packets/MovementPackets.h @@ -54,8 +54,8 @@ namespace WorldPackets struct MonsterSplineFilterKey { - int16 Idx = 0; - int16 Speed = 0; + int16 Idx = 0; + uint16 Speed = 0; }; struct MonsterSplineFilter @@ -68,13 +68,21 @@ namespace WorldPackets int16 AddedToStart = 0; }; + struct MonsterSplineSpellEffectExtraData + { + ObjectGuid field_1; + uint32 field_2; + uint32 field_3; + uint32 field_4; + }; + struct MovementSpline { uint32 Flags = 0; // Spline flags uint8 Face = 0; // Movement direction (see MonsterMoveType enum) uint8 AnimTier = 0; uint32 TierTransStartTime = 0; - uint32 Elapsed = 0; + int32 Elapsed = 0; uint32 MoveTime = 0; float JumpGravity = 0.0f; uint32 SpecialTime = 0; @@ -82,9 +90,10 @@ namespace WorldPackets uint8 Mode = 0; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags uint8 VehicleExitVoluntary = 0; ObjectGuid TransportGUID; - uint8 VehicleSeat = 255; + int8 VehicleSeat = -1; std::vector PackedDeltas; Optional SplineFilter; + Optional SpellEffectExtraData; float FaceDirection = 0.0f; ObjectGuid FaceGUID; G3D::Vector3 FaceSpot; @@ -95,6 +104,7 @@ namespace WorldPackets uint32 ID = 0; G3D::Vector3 Destination; bool CrzTeleport = false; + uint8 StopDistanceTolerance = 0; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2) MovementSpline Move; }; @@ -194,25 +204,27 @@ namespace WorldPackets class TransferAborted final : public ServerPacket { public: - TransferAborted() : ServerPacket(SMSG_TRANSFER_ABORTED, 4 + 1 + 4) { } + TransferAborted() : ServerPacket(SMSG_TRANSFER_ABORTED, 4 + 1 + 4 + 1) { } WorldPacket const* Write() override; - uint32 TransfertAbort = 0; - uint8 Arg = 0; uint32 MapID = 0; + uint8 Arg = 0; + int32 MapDifficultyXConditionID; + uint32 TransfertAbort = 0; }; class NewWorld final : public ServerPacket { public: - NewWorld() : ServerPacket(SMSG_NEW_WORLD, 24) { } + NewWorld() : ServerPacket(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4) { } WorldPacket const* Write() override; int32 MapID = 0; uint32 Reason = 0; Position Pos; + Position MovementOffset; // Adjusts all pending movement events by this offset }; class WorldPortResponse final : public ClientPacket @@ -475,6 +487,12 @@ namespace WorldPackets class SummonRequest final : public ServerPacket { public: + enum SummonReason : uint8 + { + SPELL = 0, + SCENARIO = 1 + }; + SummonRequest() : ServerPacket(SMSG_SUMMON_REQUEST, 16 + 4 + 4 + 1) { } WorldPacket const* Write() override; @@ -482,6 +500,7 @@ namespace WorldPackets ObjectGuid SummonerGUID; uint32 SummonerVirtualRealmAddress = 0; int32 AreaID = 0; + SummonReason Reason = SPELL; bool SkipStartingArea = false; }; } diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index d04bda1a0d9..6519bd63cf1 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -477,67 +477,67 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_MOUNT_SET_FAVORITE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_MOUNT_SPECIAL_ANIM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Misc::MountSpecial, &WorldSession::HandleMountSpecialAnimOpcode); DEFINE_HANDLER(CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_MOVE_CHANGE_TRANSPORT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_CHANGE_TRANSPORT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); DEFINE_HANDLER(CMSG_MOVE_CHANGE_VEHICLE_SEATS, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Vehicle::MoveChangeVehicleSeats, &WorldSession::HandleMoveChangeVehicleSeats); DEFINE_HANDLER(CMSG_MOVE_CHARM_TELEPORT_CHEAT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_MOVE_DISMISS_VEHICLE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Vehicle::MoveDismissVehicle, &WorldSession::HandleMoveDismissVehicle); - DEFINE_HANDLER(CMSG_MOVE_ENABLE_SWIM_TO_FLY_TRANS_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_FALL_LAND, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_FALL_RESET, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_FEATHER_FALL_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_FLIGHT_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_ROOT_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_FORCE_RUN_BACK_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_RUN_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_SWIM_BACK_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_SWIM_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_TURN_RATE_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_FORCE_UNROOT_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_FORCE_WALK_SPEED_CHANGE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); - DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_HEARTBEAT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_JUMP, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_KNOCK_BACK_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMoveKnockBackAck); + DEFINE_HANDLER(CMSG_MOVE_DISMISS_VEHICLE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Vehicle::MoveDismissVehicle, &WorldSession::HandleMoveDismissVehicle); + DEFINE_HANDLER(CMSG_MOVE_ENABLE_SWIM_TO_FLY_TRANS_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_FALL_LAND, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_FALL_RESET, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_FEATHER_FALL_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_FLIGHT_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_ROOT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_FORCE_RUN_BACK_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_RUN_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_SWIM_BACK_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_SWIM_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_TURN_RATE_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_FORCE_UNROOT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_FORCE_WALK_SPEED_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementSpeedAck, &WorldSession::HandleForceSpeedChangeAck); + DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_HEARTBEAT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_JUMP, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_KNOCK_BACK_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMoveKnockBackAck); DEFINE_HANDLER(CMSG_MOVE_REMOVE_MOVEMENT_FORCES, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_MOVE_REMOVE_MOVEMENT_FORCE_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_MOVE_SET_CAN_FLY_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_SET_CAN_TURN_WHILE_FALLING_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HEIGHT_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MoveSetCollisionHeightAck, &WorldSession::HandleSetCollisionHeightAck); - DEFINE_HANDLER(CMSG_MOVE_SET_FACING, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_SET_FLY, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_SET_IGNORE_MOVEMENT_FORCES_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); - DEFINE_HANDLER(CMSG_MOVE_SET_PITCH, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_SET_CAN_FLY_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_SET_CAN_TURN_WHILE_FALLING_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HEIGHT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MoveSetCollisionHeightAck, &WorldSession::HandleSetCollisionHeightAck); + DEFINE_HANDLER(CMSG_MOVE_SET_FACING, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_SET_FLY, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_SET_IGNORE_MOVEMENT_FORCES_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_SET_PITCH, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); DEFINE_HANDLER(CMSG_MOVE_SET_RELATIVE_POSITION, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_MOVE_SET_RUN_MODE, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_SET_RUN_MODE, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); DEFINE_HANDLER(CMSG_MOVE_SET_VEHICLE_REC_ID_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Vehicle::MoveSetVehicleRecIdAck, &WorldSession::HandleMoveSetVehicleRecAck); - DEFINE_HANDLER(CMSG_MOVE_SET_WALK_MODE, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_SPLINE_DONE, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MoveSplineDone, &WorldSession::HandleMoveSplineDoneOpcode); - DEFINE_HANDLER(CMSG_MOVE_START_ASCEND, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_BACKWARD, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_DESCEND, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_FORWARD, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_PITCH_DOWN, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_PITCH_UP, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_STRAFE_LEFT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_STRAFE_RIGHT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_SWIM, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_TURN_LEFT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_START_TURN_RIGHT, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP_ASCEND, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP_PITCH, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP_STRAFE, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP_SWIM, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_STOP_TURN, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); - DEFINE_HANDLER(CMSG_MOVE_TELEPORT_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MoveTeleportAck, &WorldSession::HandleMoveTeleportAck); + DEFINE_HANDLER(CMSG_MOVE_SET_WALK_MODE, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_SPLINE_DONE, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MoveSplineDone, &WorldSession::HandleMoveSplineDoneOpcode); + DEFINE_HANDLER(CMSG_MOVE_START_ASCEND, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_BACKWARD, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_DESCEND, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_FORWARD, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_PITCH_DOWN, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_PITCH_UP, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_STRAFE_LEFT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_STRAFE_RIGHT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_SWIM, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_TURN_LEFT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_START_TURN_RIGHT, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP_ASCEND, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP_PITCH, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP_STRAFE, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP_SWIM, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_STOP_TURN, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::ClientPlayerMovement, &WorldSession::HandleMovementOpcodes); + DEFINE_HANDLER(CMSG_MOVE_TELEPORT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MoveTeleportAck, &WorldSession::HandleMoveTeleportAck); DEFINE_HANDLER(CMSG_MOVE_TELEPORT_CHEAT, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_MOVE_TIME_SKIPPED, STATUS_LOGGEDIN, PROCESS_INPLACE, WorldPackets::Movement::MoveTimeSkipped, &WorldSession::HandleMoveTimeSkippedOpcode); DEFINE_HANDLER(CMSG_MOVE_TOGGLE_COLLISION_CHEAT, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_MOVE_WATER_WALK_ACK, STATUS_UNHANDLED, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); + DEFINE_HANDLER(CMSG_MOVE_WATER_WALK_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, WorldPackets::Movement::MovementAckMessage, &WorldSession::HandleMovementAckMessage); DEFINE_HANDLER(CMSG_NEUTRAL_PLAYER_SELECT_FACTION, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_NEXT_CINEMATIC_CAMERA, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Misc::NextCinematicCamera, &WorldSession::HandleNextCinematicCamera); DEFINE_HANDLER(CMSG_OBJECT_UPDATE_FAILED, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Misc::ObjectUpdateFailed, &WorldSession::HandleObjectUpdateFailedOpcode); @@ -1395,7 +1395,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_NOTIFY_RECEIVED_MAIL, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_OFFER_PETITION_ERROR, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_ON_MONSTER_MOVE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_ON_MONSTER_MOVE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_OPEN_CONTAINER, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_OPEN_LFG_DUNGEON_FINDER, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_OPEN_SHIPMENT_NPC_FROM_GOSSIP, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1653,7 +1653,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_STREAMING_MOVIES, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUMMON_CANCEL, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUMMON_RAID_MEMBER_VALIDATE_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUMMON_REQUEST, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUMMON_REQUEST, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUPERCEDED_SPELLS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUPPRESS_NPC_GREETINGS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SUSPEND_COMMS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1674,7 +1674,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRADE_UPDATED, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRAINER_BUY_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRAINER_LIST, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRANSFER_ABORTED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRANSFER_ABORTED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRANSFER_PENDING, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRANSMOG_COLLECTION_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_TRIGGER_CINEMATIC, STATUS_NEVER, CONNECTION_TYPE_REALM); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index dafe9a214d5..dd087a63146 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -895,12 +895,15 @@ public: static bool HandleUnstuckCommand(ChatHandler* handler, char const* args) { +#define SPELL_UNSTUCK_ID 7355 +#define SPELL_UNSTUCK_VISUAL 2683 + // No args required for players if (handler->GetSession() && !handler->GetSession()->HasPermission(rbac::RBAC_PERM_COMMANDS_USE_UNSTUCK_WITH_ARGS)) { // 7355: "Stuck" if (Player* player = handler->GetSession()->GetPlayer()) - player->CastSpell(player, 7355, false); + player->CastSpell(player, SPELL_UNSTUCK_ID, false); return true; } @@ -921,9 +924,6 @@ public: if (player->IsInFlight() || player->IsInCombat()) { -#define SPELL_UNSTUCK_ID 7355 -#define SPELL_UNSTUCK_VISUAL 2683 - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_UNSTUCK_ID); if (!spellInfo) return false; -- cgit v1.2.3 From f14c66b5e4c157fa3ba4d18532a274f651d6c741 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 9 Jun 2016 21:33:18 +0200 Subject: Core/Players: Updated talent specializations --- .../2016_xx_xx_xx_characters_legion_06.sql | 9 + .../Database/Implementation/CharacterDatabase.cpp | 14 +- src/server/game/AI/PlayerAI/PlayerAI.cpp | 14 +- src/server/game/Battlegrounds/Battleground.cpp | 2 +- src/server/game/Conditions/ConditionMgr.cpp | 2 +- src/server/game/DataStores/DB2Stores.cpp | 4 +- src/server/game/Entities/Item/ItemTemplate.cpp | 2 +- src/server/game/Entities/Player/Player.cpp | 255 +++++++-------------- src/server/game/Entities/Player/Player.h | 56 ++--- src/server/game/Entities/Unit/StatSystem.cpp | 2 +- src/server/game/Handlers/InspectHandler.cpp | 2 +- src/server/game/Handlers/SkillHandler.cpp | 47 ++-- src/server/game/Server/Packets/TalentPackets.cpp | 43 ++-- src/server/game/Server/Packets/TalentPackets.h | 36 +-- src/server/game/Server/Protocol/Opcodes.cpp | 9 +- src/server/game/Server/Protocol/Opcodes.h | 5 +- src/server/game/Server/WorldSession.h | 2 - src/server/game/Spells/Spell.cpp | 4 + src/server/game/Spells/Spell.h | 4 +- src/server/game/Spells/SpellEffects.cpp | 15 +- src/server/game/Spells/SpellInfo.cpp | 2 +- src/server/scripts/Spells/spell_druid.cpp | 2 +- 22 files changed, 210 insertions(+), 321 deletions(-) create mode 100644 sql/updates/characters/2016_xx_xx_xx_characters_legion_06.sql (limited to 'src/server/scripts') diff --git a/sql/updates/characters/2016_xx_xx_xx_characters_legion_06.sql b/sql/updates/characters/2016_xx_xx_xx_characters_legion_06.sql new file mode 100644 index 00000000000..1b6c28cb328 --- /dev/null +++ b/sql/updates/characters/2016_xx_xx_xx_characters_legion_06.sql @@ -0,0 +1,9 @@ +-- Force reset all specialization data +-- talents +-- spells +-- spec ids in characters table +TRUNCATE `character_talent`; +DELETE FROM `character_spell` WHERE `spell` IN (10,53,116,133,139,348,527,596,674,689,740,755,770,772,871,879,974,980,1038,1064,1079,1160,1329,1449,1454,1535,1680,1719,1822,1943,1949,2060,2120,2565,2782,2812,2912,2944,2948,3045,3674,5143,5217,5308,5740,6117,6343,6353,6572,6807,7302,8042,8092,8190,8936,10400,11129,11366,12042,12043,12051,12294,12323,12328,12472,12712,12846,12950,12975,12982,13046,13750,13877,14117,14161,14183,14190,14914,15286,15407,15473,15487,16196,16213,16282,16511,16864,16931,16949,16974,17007,17073,17364,17877,17962,18562,19387,19434,19574,19596,19623,19750,20113,20154,20164,20243,20473,20711,20782,22570,22812,23588,23881,23922,24858,26573,27243,29000,29144,29722,30108,30146,30451,30455,30482,30814,30823,31220,31223,31589,31661,31687,31801,31821,31842,31850,31868,31884,31935,32379,32546,32645,33206,33605,33745,33757,33763,33873,34026,34483,34861,34914,34954,35110,35551,44425,44448,44549,44572,45243,46584,46915,46917,46953,47515,47517,47536,47540,47585,47788,48181,48438,48484,48500,48505,48982,49020,49028,49143,49184,49206,49222,49509,49530,49572,49868,50029,50034,50371,50385,50392,50887,51128,51160,51271,51490,51505,51522,51530,51533,51564,51667,51690,51701,51713,51723,52127,52610,52798,53184,53209,53253,53260,53270,53301,53351,53385,53478,53480,53482,53490,53497,53503,53551,53563,53576,53592,53595,53600,53651,54637,55090,55233,55453,55610,55709,56222,56315,56835,58423,58875,59057,60103,60188,61295,61329,61336,61684,61685,61688,61882,62099,62606,62618,63458,63560,63733,63900,64044,64843,66192,73510,73680,73685,74434,76547,76613,76657,76658,76659,76669,76671,76672,76803,76806,76808,76838,76856,76857,77130,77215,77219,77220,77223,77226,77472,77484,77485,77486,77492,77493,77495,77513,77514,77515,77756,77767,78203,78674,78675,79134,79140,79147,79152,79206,79577,79684,80240,81099,81127,81136,81164,81206,81208,81209,81333,81662,81700,81749,82326,82327,82692,84601,84608,84617,84654,84714,85043,85101,85222,85256,85288,85948,86093,86096,86097,86099,86100,86101,86102,86103,86104,86108,86110,86113,86121,86535,86536,86537,86539,86629,86659,87138,87336,87935,88423,88625,88747,88766,88821,91023,91107,92364,93399,95649,95740,95860,95861,95862,97462,98008,100130,101545,102342,103103,103958,104315,105174,105424,105805,106732,106733,106734,106735,106785,106839,106952,107428,108280,108299,108558,108647,108683,108853,108869,109145,109151,109784,111240,111546,112071,112857,112858,112859,112965,113043,113656,113858,113860,113861,114050,114051,114052,114192,114592,114635,114664,114866,115069,115070,115151,115175,115176,115180,115181,115288,115294,115295,115308,115310,115313,115315,115451,115460,115636,115768,115869,115921,115939,116092,116095,116346,116645,116670,116680,116740,116781,116849,116852,116858,117197,117198,117216,117896,117906,117907,117967,118038,119072,119582,120224,120225,120227,120451,121152,121196,121253,121278,121783,122098,122351,122470,122509,123099,123766,123980,124146,124502,124682,124913,126060,126086,126135,127663,128595,128938,130735,131086,132157,132158,135288,137006,137007,137008,137010,137011,137012,137013,137015,137016,137017,137019,137020,137021,137023,137024,137025,137027,137028,137029,137031,137032,137033,137035,137036,137037,137039,137040,137041,137043,137044,137046,137048,137049,137050,137384,137639,139598,140333,145205,145518,148040,154436,154555,155522,155783,156843,157444,157445,157447,158298,158920,159195,159232,159362,159374,161608,161797,161798,161800,162697,162698,162699,162700,162701,162702,163201,163952,164856,165201,165357,165359,165360,165362,165363,165365,165367,165368,165370,165372,165374,165375,165376,165378,165379,165380,165381,165383,165386,165387,165389,165390,165391,165392,165393,165394,165395,165396,165397,165398,165399,165462,166142,166163,166221,166916,167105,167187,167188,170374,174597,174926,177851,179333); +UPDATE `characters` SET `talentTree`='0', `at_login`=`at_login`|0x14; +ALTER TABLE `characters` CHANGE `talentTree` `primarySpecialization` int(10) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `characters` DROP `talentGroupsCount`; diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 240337afac8..7d8023fa272 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -77,9 +77,9 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER, "SELECT guid, account, name, race, class, gender, level, xp, money, skin, face, hairStyle, hairColor, facialStyle, customDisplay1, customDisplay2, customDisplay3, bankSlots, restState, playerFlags, " "position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " - "resettalents_time, talentTree, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " + "resettalents_time, primarySpecialization, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " "totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, " - "health, power1, power2, power3, power4, power5, power6, instance_id, talentGroupsCount, activeTalentGroup, lootSpecId, exploredZones, equipmentCache, knownTitles, actionBars, grantableLevels, raidDifficulty, legacyRaidDifficulty " + "health, power1, power2, power3, power4, power5, power6, instance_id, activeTalentGroup, lootSpecId, exploredZones, knownTitles, actionBars, grantableLevels, raidDifficulty, legacyRaidDifficulty " "FROM characters WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?", CONNECTION_BOTH); @@ -391,17 +391,17 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_INS_CHARACTER, "INSERT INTO characters (guid, account, name, race, class, gender, level, xp, money, skin, face, hairStyle, hairColor, facialStyle, customDisplay1, customDisplay2, customDisplay3, bankSlots, restState, playerFlags, " "map, instance_id, dungeonDifficulty, raidDifficulty, legacyRaidDifficulty, position_x, position_y, position_z, orientation, trans_x, trans_y, trans_z, trans_o, transguid, " "taximask, cinematic, " - "totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, talentTree, " + "totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, primarySpecialization, " "extra_flags, stable_slots, at_login, zone, " "death_expire_time, taxi_path, totalKills, " "todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, health, power1, power2, power3, " - "power4, power5, power6, latency, talentGroupsCount, activeTalentGroup, lootSpecId, exploredZones, equipmentCache, knownTitles, actionBars, grantableLevels) VALUES " - "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC); + "power4, power5, power6, latency, activeTalentGroup, lootSpecId, exploredZones, equipmentCache, knownTitles, actionBars, grantableLevels) VALUES " + "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHARACTER, "UPDATE characters SET name=?,race=?,class=?,gender=?,level=?,xp=?,money=?,skin=?,face=?,hairStyle=?,hairColor=?,facialStyle=?,customDisplay1=?,customDisplay2=?,customDisplay3=?,bankSlots=?,restState=?,playerFlags=?," "map=?,instance_id=?,dungeonDifficulty=?,raidDifficulty=?,legacyRaidDifficulty=?,position_x=?,position_y=?,position_z=?,orientation=?,trans_x=?,trans_y=?,trans_z=?,trans_o=?,transguid=?,taximask=?,cinematic=?,totaltime=?,leveltime=?,rest_bonus=?," - "logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,talentTree=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," + "logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,primarySpecialization=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," "totalKills=?,todayKills=?,yesterdayKills=?,chosenTitle=?," - "watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,latency=?,talentGroupsCount=?,activeTalentGroup=?,lootSpecId=?,exploredZones=?," + "watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,latency=?,activeTalentGroup=?,lootSpecId=?,exploredZones=?," "equipmentCache=?,knownTitles=?,actionBars=?,grantableLevels=?,online=? WHERE guid=?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG, "UPDATE characters SET at_login = at_login | ? WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/game/AI/PlayerAI/PlayerAI.cpp b/src/server/game/AI/PlayerAI/PlayerAI.cpp index 006cbd07116..dffc49949a3 100644 --- a/src/server/game/AI/PlayerAI/PlayerAI.cpp +++ b/src/server/game/AI/PlayerAI/PlayerAI.cpp @@ -41,13 +41,13 @@ bool PlayerAI::IsPlayerHealer(Player const* who) default: return false; case CLASS_PALADIN: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_PALADIN_HOLY; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_PALADIN_HOLY; case CLASS_PRIEST: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_PRIEST_DISCIPLINE || who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_PRIEST_HOLY; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_PRIEST_DISCIPLINE || who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_PRIEST_HOLY; case CLASS_SHAMAN: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_SHAMAN_RESTORATION; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_SHAMAN_RESTORATION; case CLASS_DRUID: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_DRUID_RESTORATION; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_DRUID_RESTORATION; } } @@ -74,11 +74,11 @@ bool PlayerAI::IsPlayerRangedAttacker(Player const* who) return false; } case CLASS_PRIEST: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_PRIEST_SHADOW; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_PRIEST_SHADOW; case CLASS_SHAMAN: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_SHAMAN_ELEMENTAL; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_SHAMAN_ELEMENTAL; case CLASS_DRUID: - return who->GetSpecId(who->GetActiveTalentGroup()) == TALENT_SPEC_DRUID_BALANCE; + return who->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == TALENT_SPEC_DRUID_BALANCE; } } diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 8a5cc02bcf6..825a56820f2 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1089,7 +1089,7 @@ void Battleground::AddPlayer(Player* player) BattlegroundPlayer bp; bp.OfflineRemoveTime = 0; bp.Team = team; - bp.ActiveSpec = player->GetSpecId(player->GetActiveTalentGroup()); + bp.ActiveSpec = player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID); // Add to list/maps m_Players[player->GetGUID()] = bp; diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 79d05ecb2bb..a052d4d44d4 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -2397,7 +2397,7 @@ bool ConditionMgr::IsPlayerMeetingCondition(Player* player, PlayerConditionEntry if (condition->ChrSpecializationIndex >= 0 || condition->ChrSpecializationRole >= 0) { - if (ChrSpecializationEntry const* spec = sChrSpecializationStore.LookupEntry(player->GetSpecId(player->GetActiveTalentGroup()))) + if (ChrSpecializationEntry const* spec = sChrSpecializationStore.LookupEntry(player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))) { if (condition->ChrSpecializationIndex >= 0 && spec->OrderIndex != uint32(condition->ChrSpecializationIndex)) return false; diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 2ef4a85c679..ff6fb779650 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -711,8 +711,8 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) for (TalentEntry const* talentInfo : sTalentStore) { ASSERT(talentInfo->ClassID < MAX_CLASSES); - ASSERT(talentInfo->TierID < MAX_TALENT_TIERS, "MAX_TALENT_TIERS must be at least %u", MAX_TALENT_TIERS); - ASSERT(talentInfo->ColumnIndex < MAX_TALENT_COLUMNS, "MAX_TALENT_COLUMNS must be at least %u", MAX_TALENT_COLUMNS); + ASSERT(talentInfo->TierID < MAX_TALENT_TIERS, "MAX_TALENT_TIERS must be at least %u", talentInfo->TierID); + ASSERT(talentInfo->ColumnIndex < MAX_TALENT_COLUMNS, "MAX_TALENT_COLUMNS must be at least %u", talentInfo->ColumnIndex); _talentsByPosition[talentInfo->ClassID][talentInfo->TierID][talentInfo->ColumnIndex].push_back(talentInfo); } diff --git a/src/server/game/Entities/Item/ItemTemplate.cpp b/src/server/game/Entities/Item/ItemTemplate.cpp index 67f683849a9..e33bea37e54 100644 --- a/src/server/game/Entities/Item/ItemTemplate.cpp +++ b/src/server/game/Entities/Item/ItemTemplate.cpp @@ -218,7 +218,7 @@ bool ItemTemplate::CanWinForPlayer(Player const* player) const if (specs.empty()) return true; - uint32 spec = player->GetSpecId(player->GetActiveTalentGroup()); + uint32 spec = player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID); if (!spec) spec = player->GetDefaultSpecId(); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 2f626fc39ea..fd96b65b2cf 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2510,12 +2510,6 @@ void Player::InitTalentForLevel() } else { - if (level < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL) || GetTalentGroupsCount() == 0) - { - SetTalentGroupsCount(1); - SetActiveTalentGroup(0); - } - if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED)) for (uint32 t = talentTiers; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) @@ -3227,7 +3221,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const bool Player::IsCurrentSpecMasterySpell(SpellInfo const* spellInfo) const { - if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) + if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))) return spellInfo->Id == chrSpec->MasterySpellID[0] || spellInfo->Id == chrSpec->MasterySpellID[1]; return false; @@ -13303,8 +13297,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool break; } case GOSSIP_OPTION_LEARNDUALSPEC: - if (!(GetTalentGroupsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))) - canTalk = false; + canTalk = false; break; case GOSSIP_OPTION_UNLEARNTALENTS: if (!creature->isCanTrainingAndResetTalentsOf(this)) @@ -13508,16 +13501,6 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men GetSession()->SendTrainerList(guid); break; case GOSSIP_OPTION_LEARNDUALSPEC: - if (GetTalentGroupsCount() == 1 && getLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)) - { - // Cast spells that teach dual spec - // Both are also ImplicitTarget self and must be cast by player - CastSpell(this, 63680, true, nullptr, nullptr, GetGUID()); - CastSpell(this, 63624, true, nullptr, nullptr, GetGUID()); - - // Should show another Gossip text with "Congratulations..." - PlayerTalkClass->SendCloseGossip(); - } break; case GOSSIP_OPTION_UNLEARNTALENTS: PlayerTalkClass->SendCloseGossip(); @@ -16285,12 +16268,12 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) //"SELECT guid, account, name, race, class, gender, level, xp, money, skin, face, hairStyle, hairColor, facialStyle, customDisplay1, customDisplay2, customDisplay3, bankSlots, restState, playerFlags, " // 20 21 22 23 24 25 26 27 28 29 30 31 32 //"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " - // 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - //"resettalents_time, talentTree, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " + // 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 + //"resettalents_time, primarySpecialization, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " // 48 49 50 51 52 53 //"totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, " - // 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 - //"health, power1, power2, power3, power4, power5, power6, instance_id, talentGroupsCount, activeTalentGroup, lootSpecId, exploredZones, equipmentCache, knownTitles, actionBars, grantableLevels, raidDifficulty, legacyRaidDifficulty " + // 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 + //"health, power1, power2, power3, power4, power5, power6, instance_id, activeTalentGroup, lootSpecId, exploredZones, knownTitles, actionBars, grantableLevels, raidDifficulty, legacyRaidDifficulty " // //"FROM characters WHERE guid = ?", CONNECTION_ASYNC); PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_FROM); @@ -16360,8 +16343,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt8()); SetUInt32Value(PLAYER_XP, fields[7].GetUInt32()); - _LoadIntoDataField(fields[65].GetString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE); - _LoadIntoDataField(fields[67].GetString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE * 2); + _LoadIntoDataField(fields[64].GetString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE); + _LoadIntoDataField(fields[65].GetString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE * 2); SetObjectScale(1.0f); SetFloatValue(UNIT_FIELD_HOVERHEIGHT, 1.0f); @@ -16403,7 +16386,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) } // set which actionbars the client has active - DO NOT REMOVE EVER AGAIN (can be changed though, if it does change fieldwise) - SetByteValue(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_ACTION_BAR_TOGGLES, fields[68].GetUInt8()); + SetByteValue(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTES_OFFSET_ACTION_BAR_TOGGLES, fields[66].GetUInt8()); InitDisplayIds(); @@ -16439,8 +16422,8 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) uint32 instanceId = fields[61].GetUInt32(); SetDungeonDifficultyID(CheckLoadedDungeonDifficultyID(Difficulty(fields[47].GetUInt8()))); - SetRaidDifficultyID(CheckLoadedRaidDifficultyID(Difficulty(fields[70].GetUInt8()))); - SetLegacyRaidDifficultyID(CheckLoadedLegacyRaidDifficultyID(Difficulty(fields[71].GetUInt8()))); + SetRaidDifficultyID(CheckLoadedRaidDifficultyID(Difficulty(fields[68].GetUInt8()))); + SetLegacyRaidDifficultyID(CheckLoadedLegacyRaidDifficultyID(Difficulty(fields[69].GetUInt8()))); std::string taxi_nodes = fields[46].GetString(); @@ -16751,6 +16734,10 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) SetTalentResetCost(fields[32].GetUInt32()); SetTalentResetTime(time_t(fields[33].GetUInt32())); + SetPrimarySpecialization(fields[34].GetUInt32()); + ChrSpecializationEntry const* primarySpec = sChrSpecializationStore.LookupEntry(GetPrimarySpecialization()); + if (!primarySpec || primarySpec->ClassID != getClass()) + SetPrimarySpecialization(0); m_taxi.LoadTaxiMask(fields[25].GetString()); // must be before InitTaxiNodesForLevel @@ -16833,42 +16820,29 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) _LoadSkills(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SKILLS)); UpdateSkillsForLevel(); //update skills after load, to make sure they are correctly update at player load - SetTalentGroupsCount(fields[62].GetUInt8()); - SetActiveTalentGroup(fields[63].GetUInt8()); + SetActiveTalentGroup(fields[62].GetUInt8()); - uint32 lootSpecId = fields[64].GetUInt32(); + uint32 lootSpecId = fields[63].GetUInt32(); if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(lootSpecId)) - { if (chrSpec->ClassID == getClass()) SetLootSpecId(lootSpecId); - } // sanity check - if (GetTalentGroupsCount() > MAX_TALENT_GROUPS || GetActiveTalentGroup() > MAX_TALENT_GROUP || GetTalentGroupsCount() < MIN_TALENT_GROUPS) + if (GetActiveTalentGroup() >= MAX_SPECIALIZATIONS) { - TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player %s (%s) has invalid SpecCount = %u and/or invalid ActiveSpec = %u.", - GetName().c_str(), GetGUID().ToString().c_str(), GetTalentGroupsCount(), GetActiveTalentGroup()); + TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player %s (%s) has invalid invalid ActiveSpec = %u.", + GetName().c_str(), GetGUID().ToString().c_str(), GetActiveTalentGroup()); SetActiveTalentGroup(0); } - // Only load selected specializations, learning mastery spells requires this - Tokenizer talentSpecs(fields[34].GetString(), ' ', MAX_TALENT_GROUPS); - for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) + if (ChrSpecializationEntry const* spec = sDB2Manager.GetChrSpecializationByIndex(getClass(), GetActiveTalentGroup())) { - if (i >= talentSpecs.size()) - break; - - uint32 talentSpec = atoul(talentSpecs[i]); - if (talentSpec) - { - if (sChrSpecializationStore.LookupEntry(talentSpec)) - SetSpecId(i, talentSpec); - else - SetAtLoginFlag(AT_LOGIN_RESET_TALENTS); - } + SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, spec->ID); + if (!GetPrimarySpecialization()) + SetPrimarySpecialization(spec->ID); } - - SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, GetSpecId(GetActiveTalentGroup())); + else + ResetTalentSpecialization(); _LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_TALENTS)); _LoadSpells(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELLS)); @@ -17012,7 +16986,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) } // RaF stuff. - m_grantableLevels = fields[69].GetUInt8(); + m_grantableLevels = fields[67].GetUInt8(); if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0)) SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND); @@ -18598,11 +18572,7 @@ void Player::SaveToDB(bool create /*=false*/) //save, but in tavern/city stmt->setUInt32(index++, GetTalentResetCost()); stmt->setUInt32(index++, GetTalentResetTime()); - - ss.str(""); - for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) - ss << GetSpecId(i) << " "; - stmt->setString(index++, ss.str()); + stmt->setUInt32(index++, GetPrimarySpecialization()); stmt->setUInt16(index++, (uint16)m_ExtraFlags); stmt->setUInt8(index++, m_stableSlots); stmt->setUInt16(index++, (uint16)m_atLoginFlags); @@ -18637,7 +18607,6 @@ void Player::SaveToDB(bool create /*=false*/) stmt->setUInt32(index++, GetSession()->GetLatency()); - stmt->setUInt8(index++, GetTalentGroupsCount()); stmt->setUInt8(index++, GetActiveTalentGroup()); stmt->setUInt32(index++, GetLootSpecId()); @@ -18744,11 +18713,7 @@ void Player::SaveToDB(bool create /*=false*/) //save, but in tavern/city stmt->setUInt32(index++, GetTalentResetCost()); stmt->setUInt32(index++, GetTalentResetTime()); - - ss.str(""); - for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) - ss << GetSpecId(i) << " "; - stmt->setString(index++, ss.str()); + stmt->setUInt32(index++, GetPrimarySpecialization()); stmt->setUInt16(index++, (uint16)m_ExtraFlags); stmt->setUInt8(index++, m_stableSlots); stmt->setUInt16(index++, (uint16)m_atLoginFlags); @@ -18783,7 +18748,6 @@ void Player::SaveToDB(bool create /*=false*/) stmt->setUInt32(index++, GetSession()->GetLatency()); - stmt->setUInt8(index++, GetTalentGroupsCount()); stmt->setUInt8(index++, GetActiveTalentGroup()); stmt->setUInt32(index++, GetLootSpecId()); @@ -24614,22 +24578,33 @@ bool Player::ModifierTreeSatisfied(uint32 modifierTreeId) const return m_achievementMgr->ModifierTreeSatisfied(modifierTreeId); } -bool Player::LearnTalent(uint32 talentId) +TalentLearnResult Player::LearnTalent(uint32 talentId, int32* spellOnCooldown) { + if (IsInCombat()) + return TALENT_FAILED_AFFECTING_COMBAT; + + if (isDead() || GetMap()->IsBattlegroundOrArena()) + return TALENT_FAILED_CANT_DO_THAT_RIGHT_NOW; + + if (!GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID)) + return TALENT_FAILED_NO_PRIMARY_TREE_SELECTED; + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); if (!talentInfo) - return false; + return TALENT_FAILED_UNKNOWN; - if (talentInfo->SpecID && talentInfo->SpecID != GetSpecId(GetActiveTalentGroup())) - return false; + if (talentInfo->SpecID && talentInfo->SpecID != GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID)) + return TALENT_FAILED_UNKNOWN; // prevent learn talent for different class (cheating) if (talentInfo->ClassID != getClass()) - return false; + return TALENT_FAILED_UNKNOWN; // check if we have enough talent points if (talentInfo->TierID >= GetUInt32Value(PLAYER_FIELD_MAX_TALENT_TIERS)) - return false; + return TALENT_FAILED_UNKNOWN; + + // TODO: prevent changing talents that are on cooldown // Check if there is a different talent for us to learn in selected slot // Example situation: @@ -24642,7 +24617,7 @@ bool Player::LearnTalent(uint32 talentId) { if (!talent->SpecID) bestSlotMatch = talent; - else if (talent->SpecID == GetSpecId(GetActiveTalentGroup())) + else if (talent->SpecID == GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID)) { bestSlotMatch = talent; break; @@ -24650,63 +24625,53 @@ bool Player::LearnTalent(uint32 talentId) } if (talentInfo != bestSlotMatch) - return false; + return TALENT_FAILED_UNKNOWN; // Check if player doesn't have any talent in current tier for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) + { for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), talentInfo->TierID, c)) - if (HasTalent(talent->ID, GetActiveTalentGroup())) - return false; + { + if (HasTalent(talent->ID, GetActiveTalentGroup()) && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) + return TALENT_FAILED_REST_AREA; + + if (GetSpellHistory()->HasCooldown(talent->SpellID)) + { + *spellOnCooldown = talent->SpellID; + return TALENT_FAILED_CANT_REMOVE_TALENT; + } + + RemoveTalent(talent); + } + } // spell not set in talent.dbc uint32 spellid = talentInfo->SpellID; if (!spellid) { TC_LOG_ERROR("entities.player", "Player::LearnTalent: Talent.dbc has no spellInfo for talent: %u (spell id = 0)", talentId); - return false; + return TALENT_FAILED_UNKNOWN; } // already known if (HasTalent(talentId, GetActiveTalentGroup()) || HasSpell(spellid)) - return false; + return TALENT_FAILED_UNKNOWN; if (!AddTalent(talentInfo, GetActiveTalentGroup(), true)) - return false; + return TALENT_FAILED_UNKNOWN; LearnSpell(spellid, false); TC_LOG_DEBUG("misc", "Player::LearnTalent: TalentID: %u Spell: %u Group: %u\n", talentId, spellid, GetActiveTalentGroup()); - return true; -} - -void Player::LearnTalentSpecialization(uint32 talentSpec) -{ - if (GetSpecId(GetActiveTalentGroup())) - return; - - SetSpecId(GetActiveTalentGroup(), talentSpec); - SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, talentSpec); - - // Reset only talents that have different spells for each spec - uint32 class_ = getClass(); - for (uint32 t = 0; t < MAX_TALENT_TIERS; ++t) - for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - if (sDB2Manager.GetTalentsByPosition(class_, t, c).size() > 1) - for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(class_, t, c)) - RemoveTalent(talent); - - LearnSpecializationSpells(); - SendTalentsInfoData(); - UpdateItemSetAuras(false); + return TALENT_LEARN_OK; } void Player::ResetTalentSpecialization() { - if (!GetSpecId(GetActiveTalentGroup())) + if (!GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID)) return; - SetSpecId(GetActiveTalentGroup(), 0); SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, 0); // Reset only talents that have different spells for each spec @@ -24791,16 +24756,17 @@ bool Player::CanSeeSpellClickOn(Creature const* c) const void Player::SendTalentsInfoData() { WorldPackets::Talent::UpdateTalentData packet; - + packet.Info.PrimarySpecialization = GetPrimarySpecialization(); packet.Info.ActiveGroup = GetActiveTalentGroup(); - uint8 groupsCount = GetTalentGroupsCount(); - - for (uint8 i = 0; i < groupsCount; ++i) + for (uint8 i = 0; i < MAX_SPECIALIZATIONS; ++i) { - WorldPackets::Talent::TalentGroupInfo groupInfoPkt; + ChrSpecializationEntry const* spec = sDB2Manager.GetChrSpecializationByIndex(getClass(), i); + if (!spec) + continue; - groupInfoPkt.SpecID = GetSpecId(i); + WorldPackets::Talent::TalentGroupInfo groupInfoPkt; + groupInfoPkt.SpecID = spec->ID; groupInfoPkt.TalentIDs.reserve(GetTalentMap(i)->size()); for (PlayerTalentMap::const_iterator itr = GetTalentMap(i)->begin(); itr != GetTalentMap(i)->end(); ++itr) @@ -25048,58 +25014,9 @@ void Player::_SaveTalents(SQLTransaction& trans) } } -void Player::UpdateTalentGroupCount(uint8 count) +void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec) { - uint32 curCount = GetTalentGroupsCount(); - if (curCount == count) - return; - - if (GetActiveTalentGroup() >= count) - ActivateTalentGroup(0); - - SQLTransaction trans = CharacterDatabase.BeginTransaction(); - PreparedStatement* stmt; - - // Copy spec data - if (count > curCount) - { - _SaveActions(trans); // make sure the button list is cleaned up - for (ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); ++itr) - { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACTION); - stmt->setUInt64(0, GetGUID().GetCounter()); - stmt->setUInt8(1, 1); - stmt->setUInt8(2, itr->first); - stmt->setUInt32(3, itr->second.GetAction()); - stmt->setUInt8(4, uint8(itr->second.GetType())); - trans->Append(stmt); - } - } - // Delete spec data for removed spec. - else if (count < curCount) - { - _SaveActions(trans); - - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC); - stmt->setUInt8(0, GetActiveTalentGroup()); - stmt->setUInt64(1, GetGUID().GetCounter()); - trans->Append(stmt); - - } - - CharacterDatabase.CommitTransaction(trans); - - SetTalentGroupsCount(count); - - SendTalentsInfoData(); -} - -void Player::ActivateTalentGroup(uint8 spec) -{ - if (GetActiveTalentGroup() == spec) - return; - - if (spec > GetTalentGroupsCount()) + if (GetActiveTalentGroup() == spec->OrderIndex) return; if (IsNonMeleeSpellCast(false)) @@ -25160,8 +25077,10 @@ void Player::ActivateTalentGroup(uint8 spec) // Remove spec specific spells RemoveSpecializationSpells(); - SetActiveTalentGroup(spec); - SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, GetSpecId(spec)); + SetActiveTalentGroup(spec->OrderIndex); + SetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID, spec->ID); + if (!GetPrimarySpecialization()) + SetPrimarySpecialization(spec->ID); for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) { @@ -25188,10 +25107,9 @@ void Player::ActivateTalentGroup(uint8 spec) LearnSpecializationSpells(); if (CanUseMastery()) - if (ChrSpecializationEntry const* specialization = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) - for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) - if (uint32 mastery = specialization->MasterySpellID[i]) - LearnSpell(mastery, false); + for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) + if (uint32 mastery = spec->MasterySpellID[i]) + LearnSpell(mastery, false); InitTalentForLevel(); @@ -25211,9 +25129,6 @@ void Player::ActivateTalentGroup(uint8 spec) SetPower(pw, 0); UpdateItemSetAuras(false); - - if (!sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) - ResetTalents(true); } void Player::ResetTimeSync() @@ -25850,7 +25765,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy bool Player::CanUseMastery() const { - if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup()))) + if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))) return HasSpell(chrSpec->MasterySpellID[0]) || HasSpell(chrSpec->MasterySpellID[1]); return false; @@ -26068,7 +25983,7 @@ void Player::RemoveOverrideSpell(uint32 overridenSpellId, uint32 newSpellId) void Player::LearnSpecializationSpells() { - if (std::vector const* specSpells = sDB2Manager.GetSpecializationSpells(GetSpecId(GetActiveTalentGroup()))) + if (std::vector const* specSpells = sDB2Manager.GetSpecializationSpells(GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))) { for (size_t j = 0; j < specSpells->size(); ++j) { diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 5bee6c6c117..e46712d0580 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1136,42 +1136,38 @@ struct ResurrectionData uint32 Aura; }; +enum TalentLearnResult +{ + TALENT_LEARN_OK = 0, + TALENT_FAILED_UNKNOWN = 1, + TALENT_FAILED_NOT_ENOUGH_TALENTS_IN_PRIMARY_TREE = 2, + TALENT_FAILED_NO_PRIMARY_TREE_SELECTED = 3, + TALENT_FAILED_CANT_DO_THAT_RIGHT_NOW = 4, + TALENT_FAILED_AFFECTING_COMBAT = 5, + TALENT_FAILED_CANT_REMOVE_TALENT = 6, + TALENT_FAILED_CANT_DO_THAT_CHALLENGE_MODE_ACTIVE = 7, + TALENT_FAILED_REST_AREA = 8 +}; + static uint32 const DefaultTalentRowLevels[MAX_TALENT_TIERS] = { 15, 30, 45, 60, 75, 90, 100 }; static uint32 const DKTalentRowLevels[MAX_TALENT_TIERS] = { 57, 58, 59, 60, 75, 90, 100 }; static uint32 const DHTalentRowLevels[MAX_TALENT_TIERS] = { 99, 100, 102, 104, 106, 108, 110 }; struct TC_GAME_API PlayerTalentInfo { - PlayerTalentInfo() : - ResetTalentsCost(0), ResetTalentsTime(0), - ActiveGroup(0), GroupsCount(1) - { - for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) - { - GroupInfo[i].Talents = new PlayerTalentMap(); - GroupInfo[i].SpecId = 0; - } - } - - ~PlayerTalentInfo() + PlayerTalentInfo() : ResetTalentsCost(0), ResetTalentsTime(0), PrimarySpecialization(0), ActiveGroup(0) { - for (uint8 i = 0; i < MAX_TALENT_GROUPS; ++i) - delete GroupInfo[i].Talents; } - struct TalentGroupInfo - { - PlayerTalentMap* Talents; - uint32 SpecId; - } GroupInfo[MAX_TALENT_GROUPS]; - + PlayerTalentMap Talents[MAX_SPECIALIZATIONS]; uint32 ResetTalentsCost; time_t ResetTalentsTime; + uint32 PrimarySpecialization; uint8 ActiveGroup; - uint8 GroupsCount; private: - PlayerTalentInfo(PlayerTalentInfo const&); + PlayerTalentInfo(PlayerTalentInfo const&) = delete; + PlayerTalentInfo& operator=(PlayerTalentInfo const&) = delete; }; class TC_GAME_API Player : public Unit, public GridObject @@ -1753,32 +1749,28 @@ class TC_GAME_API Player : public Unit, public GridObject void SetTalentResetCost(uint32 cost) { _talentMgr->ResetTalentsCost = cost; } time_t GetTalentResetTime() const { return _talentMgr->ResetTalentsTime; } void SetTalentResetTime(time_t time_) { _talentMgr->ResetTalentsTime = time_; } - uint32 GetSpecId(uint8 group) const { return _talentMgr->GroupInfo[group].SpecId; } - void SetSpecId(uint8 group, uint32 tree) { _talentMgr->GroupInfo[group].SpecId = tree; } + uint32 GetPrimarySpecialization() const { return _talentMgr->PrimarySpecialization; } + void SetPrimarySpecialization(uint32 spec) { _talentMgr->PrimarySpecialization = spec; } uint8 GetActiveTalentGroup() const { return _talentMgr->ActiveGroup; } void SetActiveTalentGroup(uint8 group){ _talentMgr->ActiveGroup = group; } - uint8 GetTalentGroupsCount() const { return _talentMgr->GroupsCount; } - void SetTalentGroupsCount(uint8 count) { _talentMgr->GroupsCount = count; } uint32 GetDefaultSpecId() const; bool ResetTalents(bool noCost = false); uint32 GetNextResetTalentsCost() const; void InitTalentForLevel(); void SendTalentsInfoData(); - bool LearnTalent(uint32 talentId); + TalentLearnResult LearnTalent(uint32 talentId, int32* spellOnCooldown); bool AddTalent(TalentEntry const* talent, uint8 spec, bool learning); bool HasTalent(uint32 spell_id, uint8 spec) const; void RemoveTalent(TalentEntry const* talent); uint32 CalculateTalentsTiers() const; - void LearnTalentSpecialization(uint32 talentSpec); void ResetTalentSpecialization(); // Dual Spec - void UpdateTalentGroupCount(uint8 count); - void ActivateTalentGroup(uint8 group); + void ActivateTalentGroup(ChrSpecializationEntry const* spec); - PlayerTalentMap const* GetTalentMap(uint8 spec) const { return _talentMgr->GroupInfo[spec].Talents; } - PlayerTalentMap* GetTalentMap(uint8 spec) { return _talentMgr->GroupInfo[spec].Talents; } + PlayerTalentMap const* GetTalentMap(uint8 spec) const { return &_talentMgr->Talents[spec]; } + PlayerTalentMap* GetTalentMap(uint8 spec) { return &_talentMgr->Talents[spec]; } ActionButtonList const& GetActionButtons() const { return m_actionButtons; } uint32 GetFreePrimaryProfessionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS); } diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 447169a28d0..c3b8ef8e07e 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -534,7 +534,7 @@ void Player::UpdateMastery() value += GetRatingBonusValue(CR_MASTERY); SetFloatValue(PLAYER_MASTERY, value); - ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetSpecId(GetActiveTalentGroup())); + ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID)); if (!chrSpec) return; diff --git a/src/server/game/Handlers/InspectHandler.cpp b/src/server/game/Handlers/InspectHandler.cpp index 3ac39c2d500..02746109348 100644 --- a/src/server/game/Handlers/InspectHandler.cpp +++ b/src/server/game/Handlers/InspectHandler.cpp @@ -69,7 +69,7 @@ void WorldSession::HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect) } inspectResult.InspecteeGUID = inspect.Target; - inspectResult.SpecializationID = player->GetSpecId(player->GetActiveTalentGroup()); + inspectResult.SpecializationID = player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID); SendPacket(inspectResult.Write()); } diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 3596eee68f6..e9fafac5d1d 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -28,10 +28,23 @@ void WorldSession::HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& packet) { + WorldPackets::Talent::LearnTalentsFailed learnTalentsFailed; bool anythingLearned = false; for (uint32 talentId : packet.Talents) - if (_player->LearnTalent(talentId)) + { + if (TalentLearnResult result = _player->LearnTalent(talentId, &learnTalentsFailed.SpellID)) + { + if (!learnTalentsFailed.Reason) + learnTalentsFailed.Reason = result; + + learnTalentsFailed.Talents.push_back(talentId); + } + else anythingLearned = true; + } + + if (learnTalentsFailed.Reason) + SendPacket(learnTalentsFailed.Write()); if (anythingLearned) _player->SendTalentsInfoData(); @@ -77,35 +90,3 @@ void WorldSession::HandleUnlearnSkillOpcode(WorldPackets::Spells::UnlearnSkill& GetPlayer()->SetSkill(packet.SkillLine, 0, 0, 0); } - -void WorldSession::HandleSetSpecializationOpcode(WorldPackets::Talent::SetSpecialization& packet) -{ - Player* player = GetPlayer(); - - if (packet.SpecGroupIndex >= MAX_SPECIALIZATIONS) - { - TC_LOG_DEBUG("network", "WORLD: HandleSetSpecializationOpcode - specialization index %u out of range", packet.SpecGroupIndex); - return; - } - - ChrSpecializationEntry const* chrSpec = sDB2Manager.GetChrSpecializationByIndex(player->getClass(), packet.SpecGroupIndex); - if (!chrSpec) - { - TC_LOG_DEBUG("network", "WORLD: HandleSetSpecializationOpcode - specialization index %u not found", packet.SpecGroupIndex); - return; - } - - if (chrSpec->ClassID != player->getClass()) - { - TC_LOG_DEBUG("network", "WORLD: HandleSetSpecializationOpcode - specialization %u does not belong to class %u", chrSpec->ID, player->getClass()); - return; - } - - if (player->getLevel() < MIN_SPECIALIZATION_LEVEL) - { - TC_LOG_DEBUG("network", "WORLD: HandleSetSpecializationOpcode - player level too low for specializations"); - return; - } - - player->LearnTalentSpecialization(chrSpec->ID); -} diff --git a/src/server/game/Server/Packets/TalentPackets.cpp b/src/server/game/Server/Packets/TalentPackets.cpp index bc7b6aec20c..1069b8a89f7 100644 --- a/src/server/game/Server/Packets/TalentPackets.cpp +++ b/src/server/game/Server/Packets/TalentPackets.cpp @@ -19,41 +19,31 @@ WorldPacket const* WorldPackets::Talent::UpdateTalentData::Write() { - _worldPacket << Info.ActiveGroup; + _worldPacket << uint8(Info.ActiveGroup); + _worldPacket << uint32(Info.PrimarySpecialization); _worldPacket << uint32(Info.TalentGroups.size()); for (auto& talentGroupInfo : Info.TalentGroups) { - _worldPacket << talentGroupInfo.SpecID; + _worldPacket << uint32(talentGroupInfo.SpecID); _worldPacket << uint32(talentGroupInfo.TalentIDs.size()); - - //for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) - // _worldPacket << talentGroupInfo.GlyphIDs[i]; + _worldPacket << uint32(talentGroupInfo.PvPTalentIDs.size()); for (uint16 talentID : talentGroupInfo.TalentIDs) - _worldPacket << talentID; + _worldPacket << uint16(talentID); + + for (uint16 talentID : talentGroupInfo.PvPTalentIDs) + _worldPacket << uint16(talentID); } return &_worldPacket; } -void WorldPackets::Talent::SetSpecialization::Read() -{ - _worldPacket >> SpecGroupIndex; -} - - void WorldPackets::Talent::LearnTalents::Read() { - uint32 count; - _worldPacket >> count; - - for (uint32 i = 0; i < count; ++i) - { - uint16 talent; - _worldPacket >> talent; - Talents.push_back(talent); - } + Talents.resize(_worldPacket.ReadBits(6)); + for (uint32 i = 0; i < Talents.size(); ++i) + _worldPacket >> Talents[i]; } WorldPacket const* WorldPackets::Talent::RespecWipeConfirm::Write() @@ -69,3 +59,14 @@ void WorldPackets::Talent::ConfirmRespecWipe::Read() _worldPacket >> RespecMaster; _worldPacket >> RespecType; } + +WorldPacket const* WorldPackets::Talent::LearnTalentsFailed::Write() +{ + _worldPacket.WriteBits(Reason, 4); + _worldPacket << int32(SpellID); + _worldPacket << uint32(Talents.size()); + if (!Talents.empty()) + _worldPacket.append(Talents.data(), Talents.size()); + + return &_worldPacket; +} diff --git a/src/server/game/Server/Packets/TalentPackets.h b/src/server/game/Server/Packets/TalentPackets.h index 9e09605b362..57893bb94a4 100644 --- a/src/server/game/Server/Packets/TalentPackets.h +++ b/src/server/game/Server/Packets/TalentPackets.h @@ -19,6 +19,7 @@ #define TalentPackets_h__ #include "Packet.h" +#include "PacketUtilities.h" #include "Player.h" namespace WorldPackets @@ -27,14 +28,15 @@ namespace WorldPackets { struct TalentGroupInfo { - uint32 SpecID; + uint32 SpecID = 0; std::vector TalentIDs; - //uint16 GlyphIDs[MAX_GLYPH_SLOT_INDEX]; + std::vector PvPTalentIDs; }; struct TalentInfoUpdate { - uint8 ActiveGroup; + uint8 ActiveGroup = 0; + uint32 PrimarySpecialization = 0; std::vector TalentGroups; }; @@ -48,26 +50,13 @@ namespace WorldPackets TalentInfoUpdate Info; }; - class SetSpecialization final : public ClientPacket - { - public: - SetSpecialization(WorldPacket&& packet) : ClientPacket(CMSG_SET_SPECIALIZATION, std::move(packet)) { } - - void Read() override; - - uint32 SpecGroupIndex = 0; - }; - class LearnTalents final : public ClientPacket { public: - LearnTalents(WorldPacket&& packet) : ClientPacket(std::move(packet)) - { - ASSERT(packet.GetOpcode() == CMSG_LEARN_TALENTS); - } + LearnTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_TALENTS, std::move(packet)) { } void Read() override; - std::vector Talents; + Array Talents; }; class RespecWipeConfirm final : public ServerPacket @@ -93,6 +82,17 @@ namespace WorldPackets uint8 RespecType = 0; }; + class LearnTalentsFailed final : public ServerPacket + { + public: + LearnTalentsFailed() : ServerPacket(SMSG_LEARN_TALENTS_FAILED, 1 + 4 + 4 + 2 * MAX_TALENT_TIERS) { } + + WorldPacket const* Write() override; + + uint32 Reason = 0; + int32 SpellID = 0; + std::vector Talents; + }; } } diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index ca6f86e8a18..8cd8dd7cd84 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -428,7 +428,7 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_JOIN_RATED_BATTLEGROUND, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_KEEP_ALIVE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPacket, &WorldSession::Handle_EarlyProccess); DEFINE_HANDLER(CMSG_KEYBOUND_OVERRIDE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_LEARN_TALENTS, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Talent::LearnTalents, &WorldSession::HandleLearnTalentsOpcode); + DEFINE_HANDLER(CMSG_LEARN_TALENTS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Talent::LearnTalents, &WorldSession::HandleLearnTalentsOpcode); DEFINE_HANDLER(CMSG_LEAVE_GROUP, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Party::LeaveGroup, &WorldSession::HandleLeaveGroupOpcode); DEFINE_HANDLER(CMSG_LEAVE_PET_BATTLE_QUEUE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_LFG_LIST_APPLY_TO_GROUP, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); @@ -701,7 +701,6 @@ void OpcodeTable::Initialize() DEFINE_HANDLER(CMSG_SET_SELECTION, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Misc::SetSelection, &WorldSession::HandleSetSelectionOpcode); DEFINE_HANDLER(CMSG_SET_SHEATHED, STATUS_LOGGEDIN, PROCESS_INPLACE, WorldPackets::Combat::SetSheathed, &WorldSession::HandleSetSheathedOpcode); DEFINE_HANDLER(CMSG_SET_SORT_BAGS_RIGHT_TO_LEFT, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_SET_SPECIALIZATION, STATUS_LOGGEDIN, PROCESS_INPLACE, WorldPackets::Talent::SetSpecialization, &WorldSession::HandleSetSpecializationOpcode); DEFINE_HANDLER(CMSG_SET_TAXI_BENCHMARK_MODE, STATUS_LOGGEDIN, PROCESS_INPLACE, WorldPackets::Misc::SetTaxiBenchmarkMode, &WorldSession::HandleSetTaxiBenchmark); DEFINE_HANDLER(CMSG_SET_TITLE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Character::SetTitle, &WorldSession::HandleSetTitleOpcode); DEFINE_HANDLER(CMSG_SET_TRADE_CURRENCY, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Trade::SetTradeCurrency, &WorldSession::HandleSetTradeCurrencyOpcode); @@ -1234,8 +1233,8 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_ITEM_TIME_UPDATE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_KICK_REASON, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARNED_SPELLS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_PVP_TALENT_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_TALENT_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_PVP_TALENTS_FAILED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEARN_TALENTS_FAILED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEVEL_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LEVEL_UP_INFO, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_LFG_BOOT_PLAYER, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); @@ -1696,7 +1695,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_INSTANCE_OWNERSHIP, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_LAST_INSTANCE, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_OBJECT, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_TALENT_DATA, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_TALENT_DATA, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_TASK_PROGRESS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_WEEKLY_SPELL_USAGE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_UPDATE_WORLD_STATE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 571a1473aa1..d6ce4971a15 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -736,7 +736,6 @@ enum OpcodeClient : uint32 CMSG_BF_MGR_ENTRY_INVITE_RESPONSE = 0xBADD, CMSG_BF_MGR_QUEUE_INVITE_RESPONSE = 0xBADD, CMSG_BF_MGR_QUEUE_EXIT_REQUEST = 0xBADD, - CMSG_SET_SPECIALIZATION = 0xBADD, }; enum OpcodeServer : uint32 @@ -1174,8 +1173,8 @@ enum OpcodeServer : uint32 SMSG_ITEM_TIME_UPDATE = 0x2793, SMSG_KICK_REASON = 0x2821, SMSG_LEARNED_SPELLS = 0x2C4C, - SMSG_LEARN_PVP_TALENT_FAILED = 0x25E7, - SMSG_LEARN_TALENT_FAILED = 0x25E6, + SMSG_LEARN_PVP_TALENTS_FAILED = 0x25E7, + SMSG_LEARN_TALENTS_FAILED = 0x25E6, SMSG_LEVEL_UPDATE = 0x2587, SMSG_LEVEL_UP_INFO = 0x271C, SMSG_LFG_BOOT_PLAYER = 0x2A36, diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 53119742c4c..5b06c9ce03f 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -613,7 +613,6 @@ namespace WorldPackets namespace Talent { - class SetSpecialization; class LearnTalents; class ConfirmRespecWipe; } @@ -1433,7 +1432,6 @@ class TC_GAME_API WorldSession void HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& packet); void HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRespecWipe& confirmRespecWipe); void HandleUnlearnSkillOpcode(WorldPackets::Spells::UnlearnSkill& packet); - void HandleSetSpecializationOpcode(WorldPackets::Talent::SetSpecialization& packet); void HandleQuestgiverStatusQueryOpcode(WorldPackets::Quest::QuestGiverStatusQuery& packet); void HandleQuestgiverStatusMultipleQuery(WorldPackets::Quest::QuestGiverStatusMultipleQuery& packet); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c0746016ff1..8aa8bfc404d 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5404,6 +5404,10 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_EFFECT_TALENT_SPEC_SELECT: { + ChrSpecializationEntry const* spec = sChrSpecializationStore.LookupEntry(m_misc.SpecializationId); + if (!spec || spec->ClassID != m_caster->getClass()) + return SPELL_FAILED_NO_SPEC; + // can't change during already started arena/battleground if (m_caster->GetTypeId() == TYPEID_PLAYER) if (Battleground const* bg = m_caster->ToPlayer()->GetBattleground()) diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 523796eb56d..5917ed512c3 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -430,7 +430,6 @@ class TC_GAME_API Spell void EffectTitanGrip(SpellEffIndex effIndex); void EffectEnchantItemPrismatic(SpellEffIndex effIndex); void EffectPlayMusic(SpellEffIndex effIndex); - void EffectSpecCount(SpellEffIndex effIndex); void EffectActivateSpec(SpellEffIndex effIndex); void EffectPlaySound(SpellEffIndex effIndex); void EffectRemoveAura(SpellEffIndex effIndex); @@ -572,6 +571,9 @@ class TC_GAME_API Spell uint32 TalentId; uint32 GlyphSlot; + // SPELL_EFFECT_TALENT_SPEC_SELECT + uint32 SpecializationId; + // SPELL_EFFECT_SET_FOLLOWER_QUALITY // SPELL_EFFECT_INCREASE_FOLLOWER_ITEM_LEVEL // SPELL_EFFECT_INCREASE_FOLLOWER_EXPERIENCE diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d7aa6769b8b..3e9dec9f485 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -226,7 +226,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= &Spell::EffectMilling, //158 SPELL_EFFECT_MILLING milling &Spell::EffectRenamePet, //159 SPELL_EFFECT_ALLOW_RENAME_PET allow rename pet once again &Spell::EffectForceCast, //160 SPELL_EFFECT_FORCE_CAST_2 - &Spell::EffectSpecCount, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert) + &Spell::EffectNULL, //161 SPELL_EFFECT_TALENT_SPEC_COUNT second talent spec (learn/revert) &Spell::EffectActivateSpec, //162 SPELL_EFFECT_TALENT_SPEC_SELECT activate primary/secondary spec &Spell::EffectUnused, //163 SPELL_EFFECT_163 unused &Spell::EffectRemoveAura, //164 SPELL_EFFECT_REMOVE_AURA @@ -5357,17 +5357,6 @@ void Spell::EffectPlayMusic(SpellEffIndex /*effIndex*/) unitTarget->ToPlayer()->GetSession()->SendPacket(WorldPackets::Misc::PlayMusic(soundid).Write()); } -void Spell::EffectSpecCount(SpellEffIndex /*effIndex*/) -{ - if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET) - return; - - if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) - return; - - unitTarget->ToPlayer()->UpdateTalentGroupCount(damage); -} - void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/) { if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET) @@ -5376,7 +5365,7 @@ void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - unitTarget->ToPlayer()->ActivateTalentGroup(damage-1); // damage is 1 or 2, spec is 0 or 1 + unitTarget->ToPlayer()->ActivateTalentGroup(sChrSpecializationStore.AssertEntry(m_misc.SpecializationId)); } void Spell::EffectPlaySound(SpellEffIndex /*effIndex*/) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 743237ada6e..6e8db741a3d 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2843,7 +2843,7 @@ float SpellInfo::CalcProcPPM(Unit* caster, int32 itemLevel) const case SPELL_PPM_MOD_SPEC: { if (Player* plrCaster = caster->ToPlayer()) - if (plrCaster->GetSpecId(plrCaster->GetActiveTalentGroup()) == mod->Param) + if (plrCaster->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) == mod->Param) ppm *= 1.0f + mod->Coeff; break; } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index a4665973009..2c941a4f757 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -162,7 +162,7 @@ class spell_dru_eclipse_energize : public SpellScriptLoader Player* caster = GetCaster()->ToPlayer(); // No boomy, no deal. - if (caster->GetSpecId(caster->GetActiveTalentGroup()) != TALENT_SPEC_DRUID_BALANCE) + if (caster->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID) != TALENT_SPEC_DRUID_BALANCE) return; switch (GetSpellInfo()->Id) -- cgit v1.2.3 From d8861342a3a526b94de42fe4f8b7c726d12f509a Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 16 Jun 2016 20:50:27 +0200 Subject: Core/PacketIO: Updated combat log packets --- src/server/game/Entities/Player/Player.cpp | 1 + src/server/game/Entities/Unit/Unit.cpp | 8 +- src/server/game/Entities/Unit/Unit.h | 3 +- .../game/Server/Packets/CombatLogPackets.cpp | 91 +++++++++++++--------- src/server/game/Server/Packets/CombatLogPackets.h | 31 ++++---- src/server/game/Server/Packets/CombatPackets.cpp | 1 + src/server/game/Server/Packets/CombatPackets.h | 3 +- src/server/game/Server/Packets/SpellPackets.cpp | 20 ++--- src/server/game/Server/Packets/SpellPackets.h | 1 + src/server/game/Server/Protocol/Opcodes.cpp | 16 ++-- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 +- src/server/game/Spells/Spell.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 2 +- src/server/scripts/Spells/spell_warlock.cpp | 2 +- 14 files changed, 108 insertions(+), 79 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 6fefd4cb383..c4bd0c0fc3e 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6311,6 +6311,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto // victim_rank [0, 20+] HK: <> WorldPackets::Combat::PvPCredit data; data.Honor = honor; + data.OriginalHonor = honor; data.Target = victim_guid; data.Rank = victim_rank; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ab16b8275c9..551efbca752 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -165,8 +165,8 @@ ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, _damageInfo(damageInfo), _healInfo(healInfo) { } -SpellNonMeleeDamage::SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask) - : target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), schoolMask(_schoolMask), +SpellNonMeleeDamage::SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask, ObjectGuid _castId) + : target(_target), attacker(_attacker), castId(_castId), SpellID(_SpellID), damage(0), schoolMask(_schoolMask), absorb(0), resist(0), periodicLog(false), blocked(0), HitInfo(0), cleanDamage(0), preHitHealth(_target->GetHealth()) { } @@ -1774,7 +1774,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe uint32 split_absorb = 0; DealDamageMods(caster, splitDamage, &split_absorb); - SpellNonMeleeDamage log(this, caster, (*itr)->GetSpellInfo()->Id, schoolMask); + SpellNonMeleeDamage log(this, caster, (*itr)->GetSpellInfo()->Id, schoolMask, (*itr)->GetBase()->GetCastGUID()); CleanDamage cleanDamage = CleanDamage(splitDamage, 0, BASE_ATTACK, MELEE_HIT_NORMAL); DealDamage(caster, splitDamage, &cleanDamage, DIRECT_DAMAGE, schoolMask, (*itr)->GetSpellInfo(), false); log.damage = splitDamage; @@ -4829,6 +4829,7 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const* log) WorldPackets::CombatLog::SpellNonMeleeDamageLog packet; packet.Me = log->target->GetGUID(); packet.CasterGUID = log->attacker->GetGUID(); + packet.CastID = log->castId; packet.SpellID = log->SpellID; packet.Damage = log->damage; if (log->damage > log->preHitHealth) @@ -4874,7 +4875,6 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* info) spellLogEffect.AbsorbedOrAmplitude = info->absorb; spellLogEffect.Resisted = info->resist; spellLogEffect.Crit = info->critical; - spellLogEffect.Multistrike = false; // NYI /// @todo: implement debug info data.Effects.push_back(spellLogEffect); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 15792d4f543..209958f430b 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1051,10 +1051,11 @@ struct CalcDamageInfo // Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode struct TC_GAME_API SpellNonMeleeDamage { - SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask); + SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask, ObjectGuid _castId = ObjectGuid::Empty); Unit *target; Unit *attacker; + ObjectGuid castId; uint32 SpellID; uint32 damage; uint32 schoolMask; diff --git a/src/server/game/Server/Packets/CombatLogPackets.cpp b/src/server/game/Server/Packets/CombatLogPackets.cpp index f431b9b77a5..f1e6ac04d65 100644 --- a/src/server/game/Server/Packets/CombatLogPackets.cpp +++ b/src/server/game/Server/Packets/CombatLogPackets.cpp @@ -22,6 +22,7 @@ WorldPacket const* WorldPackets::CombatLog::SpellNonMeleeDamageLog::Write() { *this << Me; *this << CasterGUID; + *this << CastID; *this << int32(SpellID); *this << int32(Damage); *this << int32(Overkill); @@ -30,11 +31,14 @@ WorldPacket const* WorldPackets::CombatLog::SpellNonMeleeDamageLog::Write() *this << int32(Resisted); *this << int32(Absorbed); WriteBit(Periodic); - WriteBits(Flags, 8); + WriteBits(Flags, 7); WriteBit(false); // Debug info WriteLogDataBit(); + WriteBit(SandboxScaling.is_initialized()); FlushBits(); WriteLogData(); + if (SandboxScaling) + *this << *SandboxScaling; return &_worldPacket; } @@ -117,10 +121,10 @@ WorldPacket const* WorldPackets::CombatLog::SpellHealLog::Write() *this << int32(OverHeal); *this << int32(Absorbed); WriteBit(Crit); - WriteBit(Multistrike); WriteBit(CritRollMade.is_initialized()); WriteBit(CritRollNeeded.is_initialized()); WriteLogDataBit(); + WriteBit(SandboxScaling.is_initialized()); FlushBits(); if (CritRollMade) @@ -131,6 +135,9 @@ WorldPacket const* WorldPackets::CombatLog::SpellHealLog::Write() WriteLogData(); + if (SandboxScaling) + *this << *SandboxScaling; + return &_worldPacket; } @@ -138,27 +145,31 @@ WorldPacket const* WorldPackets::CombatLog::SpellPeriodicAuraLog::Write() { *this << TargetGUID; *this << CasterGUID; - *this << SpellID; + *this << int32(SpellID); *this << uint32(Effects.size()); for (SpellLogEffect const& effect : Effects) { - *this << effect.Effect; + *this << int32(effect.Effect); *this << int32(effect.Amount); *this << int32(effect.OverHealOrKill); *this << int32(effect.SchoolMaskOrPower); *this << int32(effect.AbsorbedOrAmplitude); *this << int32(effect.Resisted); WriteBit(effect.Crit); - WriteBit(effect.Multistrike); + WriteBit(effect.DebugInfo.is_initialized()); + WriteBit(effect.SandboxScaling.is_initialized()); + FlushBits(); - if (WriteBit(effect.DebugInfo.is_initialized())) + if (effect.SandboxScaling) + *this << *effect.SandboxScaling; + + if (effect.DebugInfo) { *this << float(effect.DebugInfo->CritRollMade); *this << float(effect.DebugInfo->CritRollNeeded); } - FlushBits(); } WriteLogDataBit(); @@ -280,49 +291,59 @@ WorldPacket const* WorldPackets::CombatLog::SpellDamageShield::Write() WorldPacket const* WorldPackets::CombatLog::AttackerStateUpdate::Write() { ByteBuffer attackRoundInfo; - attackRoundInfo << HitInfo; + attackRoundInfo << uint32(HitInfo); attackRoundInfo << AttackerGUID; attackRoundInfo << VictimGUID; - attackRoundInfo << Damage; - attackRoundInfo << OverDamage; - - if (attackRoundInfo.WriteBit(SubDmg.is_initialized())) + attackRoundInfo << int32(Damage); + attackRoundInfo << int32(OverDamage); + attackRoundInfo << uint8(SubDmg.is_initialized()); + if (SubDmg) { - attackRoundInfo << SubDmg->SchoolMask; - attackRoundInfo << SubDmg->FDamage; - attackRoundInfo << SubDmg->Damage; + attackRoundInfo << int32(SubDmg->SchoolMask); + attackRoundInfo << float(SubDmg->FDamage); + attackRoundInfo << int32(SubDmg->Damage); if (HitInfo & (HITINFO_FULL_ABSORB | HITINFO_PARTIAL_ABSORB)) - attackRoundInfo << SubDmg->Absorbed; + attackRoundInfo << int32(SubDmg->Absorbed); if (HitInfo & (HITINFO_FULL_RESIST | HITINFO_PARTIAL_RESIST)) - attackRoundInfo << SubDmg->Resisted; + attackRoundInfo << int32(SubDmg->Resisted); } - attackRoundInfo << VictimState; - attackRoundInfo << AttackerState; - attackRoundInfo << MeleeSpellID; + attackRoundInfo << uint8(VictimState); + attackRoundInfo << uint32(AttackerState); + attackRoundInfo << uint32(MeleeSpellID); if (HitInfo & HITINFO_BLOCK) - attackRoundInfo << BlockAmount; + attackRoundInfo << int32(BlockAmount); if (HitInfo & HITINFO_RAGE_GAIN) - attackRoundInfo << RageGained; + attackRoundInfo << int32(RageGained); if (HitInfo & HITINFO_UNK1) { - attackRoundInfo << UnkState.State1; - attackRoundInfo << UnkState.State2; - attackRoundInfo << UnkState.State3; - attackRoundInfo << UnkState.State4; - attackRoundInfo << UnkState.State5; - attackRoundInfo << UnkState.State6; - attackRoundInfo << UnkState.State7; - attackRoundInfo << UnkState.State8; - attackRoundInfo << UnkState.State9; - attackRoundInfo << UnkState.State10; - attackRoundInfo << UnkState.State11; - attackRoundInfo << UnkState.State12; + attackRoundInfo << uint32(UnkState.State1); + attackRoundInfo << float(UnkState.State2); + attackRoundInfo << float(UnkState.State3); + attackRoundInfo << float(UnkState.State4); + attackRoundInfo << float(UnkState.State5); + attackRoundInfo << float(UnkState.State6); + attackRoundInfo << float(UnkState.State7); + attackRoundInfo << float(UnkState.State8); + attackRoundInfo << float(UnkState.State9); + attackRoundInfo << float(UnkState.State10); + attackRoundInfo << float(UnkState.State11); + attackRoundInfo << uint32(UnkState.State12); } + if (HitInfo & (HITINFO_BLOCK | HITINFO_UNK12)) - attackRoundInfo << Unk; + attackRoundInfo << float(Unk); + + attackRoundInfo << uint8(SandboxScaling.Type); + attackRoundInfo << uint8(SandboxScaling.TargetLevel); + attackRoundInfo << uint8(SandboxScaling.Expansion); + attackRoundInfo << uint8(SandboxScaling.Class); + attackRoundInfo << uint8(SandboxScaling.TargetMinScalingLevel); + attackRoundInfo << uint8(SandboxScaling.TargetMaxScalingLevel); + attackRoundInfo << int16(SandboxScaling.PlayerLevelDelta); + attackRoundInfo << int8(SandboxScaling.TargetScalingLevelDelta); WriteLogDataBit(); FlushBits(); diff --git a/src/server/game/Server/Packets/CombatLogPackets.h b/src/server/game/Server/Packets/CombatLogPackets.h index 050c436a770..f4eed7caea5 100644 --- a/src/server/game/Server/Packets/CombatLogPackets.h +++ b/src/server/game/Server/Packets/CombatLogPackets.h @@ -82,18 +82,20 @@ namespace WorldPackets WorldPacket const* Write() override; - int32 Absorbed = 0; - int32 ShieldBlock = 0; ObjectGuid Me; - int32 SpellID = 0; - int32 Resisted = 0; - bool Periodic = 0.0f; - uint8 SchoolMask = 0; ObjectGuid CasterGUID; + ObjectGuid CastID; + int32 SpellID = 0; int32 Damage = 0; - // Optional Debug Info; - int32 Flags = 0; int32 Overkill = 0; + uint8 SchoolMask = 0; + int32 ShieldBlock = 0; + int32 Resisted = 0; + bool Periodic = false; + int32 Absorbed = 0; + int32 Flags = 0; + // Optional Debug Info; + Optional SandboxScaling; }; class EnvironmentalDamageLog final : public CombatLogServerPacket @@ -148,9 +150,9 @@ namespace WorldPackets int32 OverHeal = 0; int32 Absorbed = 0; bool Crit = false; - bool Multistrike = false; Optional CritRollMade; Optional CritRollNeeded; + Optional SandboxScaling; }; class SpellPeriodicAuraLog final : public CombatLogServerPacket @@ -171,8 +173,8 @@ namespace WorldPackets int32 AbsorbedOrAmplitude = 0; int32 Resisted = 0; bool Crit = false; - bool Multistrike = false; Optional DebugInfo; + Optional SandboxScaling; }; SpellPeriodicAuraLog() : CombatLogServerPacket(SMSG_SPELL_PERIODIC_AURA_LOG, 16 + 16 + 4 + 4 + 1) { } @@ -328,7 +330,7 @@ namespace WorldPackets struct UnkAttackerState { - int32 State1 = 0; + uint32 State1 = 0; float State2 = 0.0f; float State3 = 0.0f; float State4 = 0.0f; @@ -339,7 +341,7 @@ namespace WorldPackets float State9 = 0.0f; float State10 = 0.0f; float State11 = 0.0f; - int32 State12 = 0; + uint32 State12 = 0; }; class AttackerStateUpdate final : public CombatLogServerPacket @@ -356,12 +358,13 @@ namespace WorldPackets int32 OverDamage = -1; // (damage - health) or -1 if unit is still alive Optional SubDmg; uint8 VictimState = 0; - int32 AttackerState = -1; - int32 MeleeSpellID = 0; + uint32 AttackerState = 0; + uint32 MeleeSpellID = 0; int32 BlockAmount = 0; int32 RageGained = 0; UnkAttackerState UnkState; float Unk = 0.0f; + Spells::SandboxScalingData SandboxScaling; }; } } diff --git a/src/server/game/Server/Packets/CombatPackets.cpp b/src/server/game/Server/Packets/CombatPackets.cpp index 8f2ea3ac39a..3b3bcc5d19c 100644 --- a/src/server/game/Server/Packets/CombatPackets.cpp +++ b/src/server/game/Server/Packets/CombatPackets.cpp @@ -143,6 +143,7 @@ WorldPacket const* WorldPackets::Combat::ThreatClear::Write() WorldPacket const* WorldPackets::Combat::PvPCredit::Write() { + _worldPacket << int32(OriginalHonor); _worldPacket << int32(Honor); _worldPacket << Target; _worldPacket << int32(Rank); diff --git a/src/server/game/Server/Packets/CombatPackets.h b/src/server/game/Server/Packets/CombatPackets.h index 4a8eddc2562..550fee5fe35 100644 --- a/src/server/game/Server/Packets/CombatPackets.h +++ b/src/server/game/Server/Packets/CombatPackets.h @@ -206,8 +206,9 @@ namespace WorldPackets WorldPacket const* Write() override; - ObjectGuid Target; + int32 OriginalHonor = 0; int32 Honor = 0; + ObjectGuid Target; int32 Rank = 0; }; diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp index 36ce28478f0..599d07e0d87 100644 --- a/src/server/game/Server/Packets/SpellPackets.cpp +++ b/src/server/game/Server/Packets/SpellPackets.cpp @@ -117,16 +117,16 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData return data; } -ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& unknown) -{ - data.WriteBits(unknown.Type, 3); - data << int16(unknown.PlayerLevelDelta); - data << uint8(unknown.TargetLevel); - data << uint8(unknown.Expansion); - data << uint8(unknown.Class); - data << uint8(unknown.TargetMinScalingLevel); - data << uint8(unknown.TargetMaxScalingLevel); - data << int8(unknown.TargetScalingLevelDelta); +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& sandboxScalingData) +{ + data.WriteBits(sandboxScalingData.Type, 3); + data << int16(sandboxScalingData.PlayerLevelDelta); + data << uint8(sandboxScalingData.TargetLevel); + data << uint8(sandboxScalingData.Expansion); + data << uint8(sandboxScalingData.Class); + data << uint8(sandboxScalingData.TargetMinScalingLevel); + data << uint8(sandboxScalingData.TargetMaxScalingLevel); + data << int8(sandboxScalingData.TargetScalingLevelDelta); return data; } diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h index 901ebdd6b87..a3a68c8e194 100644 --- a/src/server/game/Server/Packets/SpellPackets.h +++ b/src/server/game/Server/Packets/SpellPackets.h @@ -926,5 +926,6 @@ namespace WorldPackets ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData); ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Spells::SpellCastRequest& request); +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& sandboxScalingData); #endif // SpellPackets_h__ diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index dd0ec3577c0..7bfbb88e9bd 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -852,7 +852,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_ARTIFACT_FORGE_OPENED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ARTIFACT_POWERS_UPDATED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ARTIFACT_XP_GAIN, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_ATTACKER_STATE_UPDATE, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_ATTACKER_STATE_UPDATE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ATTACK_START, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ATTACK_STOP, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ATTACK_SWING_ERROR, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1076,7 +1076,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_ENCOUNTER_END, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ENCOUNTER_START, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_ENUM_CHARACTERS_RESULT, STATUS_NEVER, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_ENVIRONMENTAL_DAMAGE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_ENVIRONMENTAL_DAMAGE_LOG, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_EQUIPMENT_SET_ID, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_EXPECTED_SPAM_RECORDS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_EXPLORATION_EXPERIENCE, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1498,7 +1498,7 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_PROC_RESIST, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PROPOSE_LEVEL_GRANT, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PUSH_SPELL_TO_ACTION_BAR, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_PVP_CREDIT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_PVP_CREDIT, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PVP_LOG_DATA, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PVP_OPTIONS_ENABLED, STATUS_NEVER, CONNECTION_TYPE_REALM); DEFINE_SERVER_OPCODE_HANDLER(SMSG_PVP_SEASON, STATUS_NEVER, CONNECTION_TYPE_REALM); @@ -1653,21 +1653,21 @@ void OpcodeTable::Initialize() DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_CHANNEL_START, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_CHANNEL_UPDATE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_COOLDOWN, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DAMAGE_SHIELD, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DAMAGE_SHIELD, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DELAYED, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DISPELL_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_ENERGIZE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_ENERGIZE_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_EXECUTE_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILED_OTHER, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_FAILURE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_GO, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_HEAL_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_HEAL_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_INSTAKILL_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_INTERRUPT_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_MISS_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_NON_MELEE_DAMAGE_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_NON_MELEE_DAMAGE_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_OR_DAMAGE_IMMUNE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); - DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_PERIODIC_AURA_LOG, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); + DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_PERIODIC_AURA_LOG, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_PREPARE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_START, STATUS_NEVER, CONNECTION_TYPE_INSTANCE); DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_UPDATE_CHAIN_TARGETS, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 58375e3f0df..a6ab82e2211 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -6055,7 +6055,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c TC_LOG_DEBUG("spells.periodic", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u", GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb); - SpellNonMeleeDamage log(caster, target, GetId(), GetSpellInfo()->GetSchoolMask()); + SpellNonMeleeDamage log(caster, target, GetId(), GetSpellInfo()->GetSchoolMask(), GetBase()->GetCastGUID()); log.damage = damage - absorb - resist; log.absorb = absorb; log.resist = resist; @@ -6359,7 +6359,7 @@ void AuraEffect::HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) con SpellInfo const* spellProto = GetSpellInfo(); // maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG - SpellNonMeleeDamage damageInfo(caster, target, spellProto->Id, spellProto->SchoolMask); + SpellNonMeleeDamage damageInfo(caster, target, spellProto->Id, spellProto->SchoolMask, GetBase()->GetCastGUID()); // no SpellDamageBonus for burn mana caster->CalculateSpellDamageTaken(&damageInfo, int32(gain * dmgMultiplier), spellProto); @@ -6413,7 +6413,7 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv { Unit* target = aurApp->GetTarget(); Unit* triggerTarget = eventInfo.GetProcTarget(); - SpellNonMeleeDamage damageInfo(target, triggerTarget, GetId(), GetSpellInfo()->SchoolMask); + SpellNonMeleeDamage damageInfo(target, triggerTarget, GetId(), GetSpellInfo()->SchoolMask, GetBase()->GetCastGUID()); uint32 damage = target->SpellDamageBonusDone(triggerTarget, GetSpellInfo(), GetAmount(), SPELL_DIRECT_DAMAGE, GetSpellEffectInfo()); damage = triggerTarget->SpellDamageBonusTaken(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE, GetSpellEffectInfo()); target->CalculateSpellDamageTaken(&damageInfo, damage, GetSpellInfo()); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index d109667cd85..a3553f6b762 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2428,7 +2428,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) else if (m_damage > 0) { // Fill base damage struct (unitTarget - is real spell target) - SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask); + SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask, m_castId); // Add bonuses and fill damageInfo struct caster->CalculateSpellDamageTaken(&damageInfo, m_damage, m_spellInfo, m_attackType, target->crit); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 11a92fd67b8..0cca7a27d2c 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -396,7 +396,7 @@ void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/) uint32 resist = 0; m_caster->CalcAbsorbResist(unitTarget, m_spellInfo->GetSchoolMask(), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist, m_spellInfo); - SpellNonMeleeDamage log(m_caster, unitTarget, m_spellInfo->Id, m_spellInfo->GetSchoolMask()); + SpellNonMeleeDamage log(m_caster, unitTarget, m_spellInfo->Id, m_spellInfo->GetSchoolMask(), m_castId); log.damage = damage - absorb - resist; log.absorb = absorb; log.resist = resist; diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 5cc25d87f99..6c6eec993ab 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -793,7 +793,7 @@ class spell_warl_health_funnel : public SpellScriptLoader if (Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(GetId(), SPELLMOD_COST, damage); - SpellNonMeleeDamage damageInfo(caster, caster, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask); + SpellNonMeleeDamage damageInfo(caster, caster, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask, GetAura()->GetCastGUID()); damageInfo.periodicLog = true; damageInfo.damage = damage; caster->DealSpellDamage(&damageInfo, false); -- cgit v1.2.3 From 2056ce4d66cdaf12fe4e35c110508360026f9f7b Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 17 Jul 2016 15:20:56 +0200 Subject: Scripts: Build fix --- src/server/game/Handlers/SpellHandler.cpp | 2 +- src/server/game/Scripting/ScriptMgr.cpp | 4 ++-- src/server/game/Scripting/ScriptMgr.h | 4 ++-- .../IcecrownCitadel/boss_professor_putricide.cpp | 4 ++-- .../IcecrownCitadel/icecrown_citadel_teleport.cpp | 8 ++++++-- .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 2 +- .../SerpentShrine/boss_lady_vashj.cpp | 2 +- .../BloodFurnace/boss_kelidan_the_breaker.cpp | 4 +--- src/server/scripts/World/item_scripts.cpp | 22 +++++++++++----------- 9 files changed, 27 insertions(+), 25 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 4bfada8aab3..184de15af09 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -119,7 +119,7 @@ void WorldSession::HandleUseItemOpcode(WorldPackets::Spells::UseItem& packet) SpellCastTargets targets(user, packet.Cast); // Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state. - if (!sScriptMgr->OnItemUse(user, item, targets)) + if (!sScriptMgr->OnItemUse(user, item, targets, packet.Cast.CastID)) { // no script or script not process request by self user->CastItemUseSpell(item, targets, packet.Cast.CastID, packet.Cast.Misc); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 5fe41518cbc..14a4ea3590e 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1490,13 +1490,13 @@ bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest) return tmpscript->OnQuestAccept(player, item, quest); } -bool ScriptMgr::OnItemUse(Player* player, Item* item, SpellCastTargets const& targets) +bool ScriptMgr::OnItemUse(Player* player, Item* item, SpellCastTargets const& targets, ObjectGuid castId) { ASSERT(player); ASSERT(item); GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false); - return tmpscript->OnUse(player, item, targets); + return tmpscript->OnUse(player, item, targets, castId); } bool ScriptMgr::OnItemExpire(Player* player, ItemTemplate const* proto) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 17583bd9b5e..9acfc28db9c 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -368,7 +368,7 @@ class TC_GAME_API ItemScript : public ScriptObject virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; } // Called when a player uses the item. - virtual bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; } + virtual bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) { return false; } // Called when the item expires (is destroyed). virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; } @@ -940,7 +940,7 @@ class TC_GAME_API ScriptMgr bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Item* target); bool OnQuestAccept(Player* player, Item* item, Quest const* quest); - bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets); + bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets, ObjectGuid castId); bool OnItemExpire(Player* player, ItemTemplate const* proto); bool OnItemRemove(Player* player, Item* item); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index df66d6b32b8..2772402f83f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -1338,7 +1338,7 @@ class spell_putricide_mutation_init : public SpellScriptLoader SpellCastResult result = CheckRequirementInternal(extension); if (result != SPELL_CAST_OK) { - Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension); + Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), GetSpell()->m_SpellVisual, GetSpell()->m_castId, result, extension); return result; } @@ -1435,7 +1435,7 @@ class spell_putricide_mutated_transformation : public SpellScriptLoader if (putricide->AI()->GetData(DATA_ABOMINATION)) { if (Player* player = caster->ToPlayer()) - Spell::SendCastResult(player, GetSpellInfo(), 0, SPELL_FAILED_CUSTOM_ERROR, SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS); + Spell::SendCastResult(player, GetSpellInfo(), GetSpell()->m_SpellVisual, GetSpell()->m_castId, SPELL_FAILED_CUSTOM_ERROR, SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS); return; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 7e5661e5dbc..3fec4db8803 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -60,7 +60,8 @@ class icecrown_citadel_teleport : public GameObjectScript if (player->IsInCombat()) { - Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, player->GetMapId(), spell->Id, player->GetMap()->GenerateLowGuid()); + Spell::SendCastResult(player, spell, 0, castId, SPELL_FAILED_AFFECTING_COMBAT); return true; } @@ -85,7 +86,10 @@ class at_frozen_throne_teleport : public AreaTriggerScript if (player->IsInCombat()) { if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(FROZEN_THRONE_TELEPORT)) - Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); + { + ObjectGuid castId = ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, player->GetMapId(), spell->Id, player->GetMap()->GenerateLowGuid()); + Spell::SendCastResult(player, spell, 0, castId, SPELL_FAILED_AFFECTING_COMBAT); + } return true; } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 0897c7e35e8..b006ee2341a 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -1265,7 +1265,7 @@ class spell_ulduar_teleporter : public SpellScriptLoader if (GetExplTargetUnit()->IsInCombat()) { - Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, SPELL_FAILED_AFFECTING_COMBAT); + Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), GetSpell()->m_SpellVisual, GetSpell()->m_castId, SPELL_FAILED_AFFECTING_COMBAT); return SPELL_FAILED_AFFECTING_COMBAT; } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 8c371c6a244..057f0727526 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -885,7 +885,7 @@ class item_tainted_core : public ItemScript public: item_tainted_core() : ItemScript("item_tainted_core") { } - bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets) override + bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets, ObjectGuid /*castId*/) override { InstanceScript* instance = player->GetInstanceScript(); if (!instance) diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index f191a0c3ad7..f4cb9d3aab0 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -232,10 +232,8 @@ class boss_kelidan_the_breaker : public CreatureScript Talk(SAY_NOVA); if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA)) - { - if (Aura* aura = Aura::TryRefreshStackOrCreate(nova, MAX_EFFECT_MASK, me, me)) + if (Aura* aura = Aura::TryRefreshStackOrCreate(nova, ObjectGuid::Create(SPELL_CAST_SOURCE_NORMAL, me->GetMapId(), nova->Id, me->GetMap()->GenerateLowGuid()), MAX_EFFECT_MASK, me, me)) aura->ApplyForTargets(); - } if (IsHeroic()) DoTeleportAll(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 69376b62048..c86d56a31b2 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -49,7 +49,7 @@ class item_only_for_flight : public ItemScript public: item_only_for_flight() : ItemScript("item_only_for_flight") { } - bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) override + bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid castId) override { uint32 itemId = item->GetEntry(); bool disabled = false; @@ -67,7 +67,7 @@ public: break; case 34475: if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES)) - Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); + Spell::SendCastResult(player, spellInfo, 0, castId, SPELL_FAILED_NOT_ON_GROUND); break; } @@ -90,7 +90,7 @@ class item_nether_wraith_beacon : public ItemScript public: item_nether_wraith_beacon() : ItemScript("item_nether_wraith_beacon") { } - bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/) override + bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE) { @@ -113,7 +113,7 @@ class item_gor_dreks_ointment : public ItemScript public: item_gor_dreks_ointment() : ItemScript("item_gor_dreks_ointment") { } - bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) override + bool OnUse(Player* player, Item* item, SpellCastTargets const& targets, ObjectGuid /*castId*/) override { if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT && targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578)) @@ -133,7 +133,7 @@ class item_incendiary_explosives : public ItemScript public: item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { } - bool OnUse(Player* player, Item* item, SpellCastTargets const & /*targets*/) override + bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15)) return false; @@ -223,7 +223,7 @@ class item_pile_fake_furs : public ItemScript public: item_pile_fake_furs() : ItemScript("item_pile_fake_furs") { } - bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const & /*targets*/) override + bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { GameObject* go = NULL; for (uint8 i = 0; i < CaribouTrapsNum; ++i) @@ -268,7 +268,7 @@ class item_petrov_cluster_bombs : public ItemScript public: item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { } - bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) override + bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/, ObjectGuid castId) override { if (player->GetZoneId() != ZONE_ID_HOWLING) return false; @@ -276,7 +276,7 @@ public: if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS) { if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB)) - Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_HERE); + Spell::SendCastResult(player, spellInfo, 0, castId, SPELL_FAILED_NOT_HERE); return true; } @@ -332,7 +332,7 @@ class item_dehta_trap_smasher : public ItemScript public: item_dehta_trap_smasher() : ItemScript("item_dehta_trap_smasher") { } - bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) override + bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { if (player->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE) return false; @@ -368,7 +368,7 @@ class item_trident_of_nazjan : public ItemScript public: item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { } - bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/) override + bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE) { @@ -395,7 +395,7 @@ class item_captured_frog : public ItemScript public: item_captured_frog() : ItemScript("item_captured_frog") { } - bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) override + bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override { if (player->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE) { -- cgit v1.2.3