fix(Core/Spells): Implement SPELL_EFFECT_ACTIVATE_OBJECT (#11648)

Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
Nefertumm
2022-06-13 21:10:31 -03:00
committed by GitHub
parent 16d27f3449
commit 396fd35ed5
9 changed files with 182 additions and 39 deletions

View File

@@ -7183,8 +7183,8 @@ void ObjectMgr::LoadGameObjectTemplateAddons()
{
uint32 oldMSTime = getMSTime();
// 0 1 2 3 4
QueryResult result = WorldDatabase.Query("SELECT entry, faction, flags, mingold, maxgold FROM gameobject_template_addon");
// 0 1 2 3 4 5 6 7 8
QueryResult result = WorldDatabase.Query("SELECT entry, faction, flags, mingold, maxgold, artkit0, artkit1, artkit2, artkit3 FROM gameobject_template_addon");
if (!result)
{
@@ -7215,6 +7215,21 @@ void ObjectMgr::LoadGameObjectTemplateAddons()
gameObjectAddon.mingold = fields[3].Get<uint32>();
gameObjectAddon.maxgold = fields[4].Get<uint32>();
for (uint32 i = 0; i < gameObjectAddon.artKits.size(); i++)
{
uint32 artKitID = fields[5 + i].Get<uint32>();
if (!artKitID)
continue;
if (!sGameObjectArtKitStore.LookupEntry(artKitID))
{
LOG_ERROR("sql.sql", "GameObject (Entry: {}) has invalid `artkit{}` {} defined, set to zero instead.", entry, i, artKitID);
continue;
}
gameObjectAddon.artKits[i] = artKitID;
}
// checks
if (gameObjectAddon.faction && !sFactionTemplateStore.LookupEntry(gameObjectAddon.faction))
LOG_ERROR("sql.sql",