aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGooyeth <Gooyeth@users.noreply.github.com>2018-04-01 20:56:08 -0600
committerShauren <shauren.trinity@gmail.com>2021-09-23 23:23:06 +0200
commit2bea816bbec6ba9d50f7bd6725806e81c6cafaae (patch)
treea26699790593d6e7f1e05c4f26163b477b97a413 /src
parent765987a9f5fa0007fd3efeca9e8566f76ec0f45c (diff)
Core/Auras: Don't save liquid auras
(cherry picked from commit 8001c5ead1aa27671aea20336c7eb2194b89d8ac)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.h2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 27571f997e9..11679e3f5d0 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -207,7 +207,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_NEEDS_AMMO_DATA = 0x00080000,
SPELL_ATTR0_CU_BINARY_SPELL = 0x00100000,
SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC = 0x00200000,
- SPELL_ATTR0_CU_LIQUID_AURA = 0x00400000,
+ SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA = 0x00400000, // DO NOT REUSE
SPELL_ATTR0_CU_IS_TALENT = 0x00800000,
SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED = 0x01000000,
};
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 2de1a9f63de..aaa2369f6d7 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3232,6 +3232,14 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
}
+ // add custom attribute to liquid auras
+ for (LiquidTypeEntry const* liquid : sLiquidTypeStore)
+ {
+ if (liquid->SpellID)
+ for (SpellInfo const& spellInfo : _GetSpellInfo(liquid->SpellID))
+ const_cast<SpellInfo&>(spellInfo).AttributesCu |= SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED;
+ }
+
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
}