/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright
information
*
* 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 <[Link]
*/
#include "DummyData.h"
#include "AchievementMgr.h"
#include "ItemDefines.h"
#include "ItemTemplate.h"
#include "ObjectMgr.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
/*static*/ ItemTemplate& UnitTestDataLoader::GetItemTemplate(uint32 itemId,
std::string_view name)
{
ItemTemplate& t = sObjectMgr->_itemTemplateStore[itemId];
t = {};
[Link] = itemId;
[Link] = ItemClass::ITEM_CLASS_MISC;
[Link] = -1;
t.Name1 = name;
[Link] = ItemQualities::ITEM_QUALITY_ARTIFACT;
[Link] = 1;
[Link] = static_cast<uint32>(-1);
[Link] = static_cast<uint32>(-1);
[Link] = 1;
[Link] = 1;
[Link] = static_cast<uint32>(-1);
[Link] = static_cast<uint32>(-1);
return t;
}
/*static*/ void UnitTestDataLoader::SetItemLocale(uint32 id, LocaleConstant locale,
std::string_view name)
{
size_t const i = static_cast<size_t>(locale);
ItemLocale& localeData = sObjectMgr->_itemLocaleStore[id];
if ([Link]() <= i)
[Link](i + 1);
[Link][i] = name;
}
static UnitTestDataLoader::DBC<ItemRandomPropertiesEntry,
&ItemRandomPropertiesEntry::ID> randomProperties(sItemRandomPropertiesStore);
static UnitTestDataLoader::DBC<ItemRandomSuffixEntry, &ItemRandomSuffixEntry::ID>
randomSuffixes(sItemRandomSuffixStore);
/*static*/ void UnitTestDataLoader::LoadItemTemplates()
{
if (!sObjectMgr->_itemTemplateStore.empty())
return;
ItemTemplate& hearthstone = GetItemTemplate(6948, "Hearthstone");
[Link] = 6418;
[Link] = ItemQualities::ITEM_QUALITY_NORMAL;
[Link] = ItemFlags::ITEM_FLAG_PLAYERCAST;
[Link] = 1;
[Link][0].SpellId = 8690;
[Link] = ItemBondingType::BIND_WHEN_PICKED_UP;
SetItemLocale(6948, LocaleConstant::LOCALE_esES, "Piedra de hogar");
ItemTemplate& niceHat = GetItemTemplate(10250, "Master's Hat");
[Link] = ItemClass::ITEM_CLASS_ARMOR;
[Link] = ItemSubclassArmor::ITEM_SUBCLASS_ARMOR_CLOTH;
[Link] = 27824;
[Link] = ItemQualities::ITEM_QUALITY_UNCOMMON;
[Link] = 1;
[Link] = 66902;
[Link] = 13380;
[Link] = InventoryType::INVTYPE_HEAD;
[Link] = 63;
[Link] = 58;
[Link] = 66;
[Link] = ItemBondingType::BIND_WHEN_EQUIPED;
[Link] = 7;
[Link] = 639;
[Link] = 45;
[Link] = 225;
[Link] = 11;
SetItemLocale(10250, LocaleConstant::LOCALE_esES, "Sombrero de maestro");
ItemTemplate& vikingShield = GetItemTemplate(36449, "Vrykul Shield");
[Link] = ItemClass::ITEM_CLASS_ARMOR;
[Link] = ItemSubclassArmor::ITEM_SUBCLASS_ARMOR_SHIELD;
[Link] = 52191;
[Link] = ItemQualities::ITEM_QUALITY_UNCOMMON;
[Link] = 1;
[Link] = 300510;
[Link] = 60102;
[Link] = InventoryType::INVTYPE_SHIELD;
[Link] = 146;
[Link] = 71;
[Link] = 4476;
[Link] = ItemBondingType::BIND_WHEN_EQUIPED;
[Link] = 1;
[Link] = 4;
[Link] = 82;
[Link] = 138;
[Link] = 85;
[Link] = 325;
[Link] = 34;
SetItemLocale(36449, LOCALE_esES, "Escudo vrykul");
for (auto& [id, data] : sObjectMgr->_itemTemplateStore)
[Link]();
auto propLoader = [Link]();
ItemRandomPropertiesEntry& fieryWrath = [Link]();
[Link] = 1902;
[Link] = {};
[Link][0] = 2182;
[Link]("");
[Link][LOCALE_enUS] = "of Fiery Wrath";
[Link][LOCALE_esES] = "de c\xc3\xb3lera \xc3\xadgnea";
auto suffixLoader = [Link]();
ItemRandomSuffixEntry& champion = [Link]();
[Link] = 45;
[Link]("");
[Link][LOCALE_enUS] = "of the Champion";
[Link][LOCALE_esES] = "del Campe\xc3\xb3n";
[Link][0] = 2805;
[Link][1] = 2803;
[Link][2] = 2813;
[Link][0] = 5259;
[Link][1] = 7889;
[Link][2] = 5259;
}
static UnitTestDataLoader::DBC<AchievementEntry, &AchievementEntry::ID>
achievements(sAchievementStore);
/*static*/ void UnitTestDataLoader::LoadAchievementTemplates()
{
if (![Link]())
return;
auto loader = [Link]();
AchievementEntry& toc5 = [Link]();
toc5 = {};
[Link] = 4298;
[Link] = 1;
[Link] = 650;
[Link]("");
[Link][LOCALE_enUS] = "Heroic: Trial of the Champion";
[Link][LOCALE_esES] = "Heroico: Prueba del Campe\xc3\xb3n";
[Link] = 14921;
[Link] = 10;
}
static UnitTestDataLoader::DBC<SpellEntry, &SpellEntry::ID> spells(sSpellStore);
static UnitTestDataLoader::DBC<TalentEntry, &TalentEntry::ID>
talents(sTalentStore);
/*static*/ void UnitTestDataLoader::LoadSpellInfo()
{
if (!sSpellMgr->[Link]())
return;
{
auto spellLoader = [Link]();
SpellEntry& tidalWaves1 = [Link]();
tidalWaves1 = {};
[Link] = 51562;
[Link] = 464;
[Link] = 524288;
[Link] = 1;
[Link] = 17408;
[Link] = 20;
[Link] = 1;
[Link] = 1;
[Link] = -1;
[Link] = { 6,6,6 };
[Link] = { 1,1,1 };
[Link] = { 19,3,1 };
[Link] = { 1,1,1 };
[Link] = { 42, 107, 107 };
[Link] = { 7,24,24 };
[Link] = { 53390 };
[Link] = { { { 192, 8192, 0}, { 64, 0, 0 },
{ 128, 0, 0 } } };
[Link] = 3057;
[Link] = 50;
[Link]("");
[Link][LOCALE_enUS] = "Tidal Waves";
[Link][LOCALE_esES] = "Maremotos";
[Link]("");
[Link][LOCALE_enUS] = "Rank 1";
[Link][LOCALE_esES] = "Rango 1";
[Link] = 11;
[Link](1.0);
[Link] = 1;
SpellEntry& tidalWaves2 = [Link]();
tidalWaves2 = tidalWaves1;
[Link] = 51563;
[Link] = 40;
[Link] = { 39,7,3 };
[Link][LOCALE_enUS] = "Rank 2";
[Link][LOCALE_esES] = "Rango 2";
SpellEntry& tidalWaves3 = [Link]();
tidalWaves3 = tidalWaves1;
[Link] = 51564;
[Link] = 60;
[Link] = { 59, 11, 5 };
[Link][LOCALE_enUS] = "Rank 3";
[Link][LOCALE_esES] = "Rango 3";
SpellEntry& tidalWaves4 = [Link]();
tidalWaves4 = tidalWaves1;
[Link] = 51565;
[Link] = 80;
[Link] = { 79, 15, 7 };
[Link][LOCALE_enUS] = "Rank 4";
[Link][LOCALE_esES] = "Rango 4";
SpellEntry& tidalWaves5 = [Link]();
tidalWaves5 = tidalWaves1;
[Link] = 51566;
[Link] = 100;
[Link] = { 99, 19, 9 };
[Link][LOCALE_enUS] = "Rank 5";
[Link][LOCALE_esES] = "Rango 5";
SpellEntry& earthShield1 = [Link]();
earthShield1 = {};
[Link] = 974;
[Link] = 1195;
[Link] = 1;
[Link] = 327680;
[Link] = 524288;
[Link] = 32;
[Link] = 67108864;
[Link] = 1073742848;
[Link] = 1;
[Link] = 524288;
[Link] = 172712;
[Link] = 100;
[Link] = 6;
[Link] = 59;
[Link] = 50;
[Link] = 50;
[Link] = 6;
[Link] = 5;
[Link] = { 6,6,0 };
[Link] = { 1,1,0 };
[Link] = { 149,29,0 };
[Link] = { 21,21,0 };
[Link] = { 4,149,0 };
[Link] = { 0,126,0 };
[Link] = { 7362,0 };
[Link] = 2015;
[Link]("");
[Link][LOCALE_enUS] = "Earth Shield";
[Link][LOCALE_esES] = "Escudo de tierra";
[Link] = [Link];
[Link] = 15;
[Link] = 133;
[Link] = 1500;
[Link] = 11;
[Link] = { 0, 1024, 0 };
[Link] = 1;
[Link] = 1;
[Link](1.0);
[Link] = 8;
[Link] = { 1.0, 0.0, 1.0 };
SpellEntry& impEarthShield1 = [Link]();
impEarthShield1 = {};
[Link] = 51560;
[Link] = 464;
[Link] = 1;
[Link] = 101;
[Link] = 1;
[Link] = -1;
[Link] = { 6,6,0 };
[Link] = { 1,1,0 };
[Link] = { 0,4,0 };
[Link] = { 1,1,0 };
[Link] = { 107,108,0 };
[Link] = { 4,3,0 };
[Link] = { 3,0,0 };
[Link] = { { {0,1024,0}, {0,1024,0},
{0,0,0} } };
[Link] = 2015;
[Link]("");
[Link][LOCALE_enUS] = "Improved Earth Shield";
[Link][LOCALE_esES] = "Escudo de tierra mejorado";
[Link] = [Link];
[Link] = 11;
[Link](1.0);
[Link] = 1;
[Link] = { 0.0, 0.0, 1.0 };
SpellEntry& impEarthShield2 = [Link]();
impEarthShield2 = impEarthShield1;
[Link] = 51561;
[Link] = { 1,9,0 };
[Link] = [Link];
auto talentLoader = [Link]();
TalentEntry& tidalWaves = [Link]();
[Link] = 2063;
[Link] = 262;
[Link] = 9;
[Link] = 1;
[Link] = { 51562, 51563, 51564, 51565, 51566 };
[Link] = 0;
[Link] = 0;
TalentEntry& earthShield = [Link]();
[Link] = 1698;
[Link] = 262;
[Link] = 8;
[Link] = 1;
[Link] = { 974,0,0,0,0 };
[Link] = 0;
[Link] = 2;
TalentEntry& impEarthShield = [Link]();
[Link] = 2059;
[Link] = 262;
[Link] = 8;
[Link] = 2;
[Link] = { 51560, 51561, 0, 0, 0 };
[Link] = 1698;
[Link] = 0;
}
// this needs to be after the loader destructors
sSpellMgr->LoadSpellInfoStore();
}