diff --git a/sql/migrations/20231205020742_world.sql b/sql/migrations/20231205020742_world.sql new file mode 100644 index 00000000000..29df625cf35 --- /dev/null +++ b/sql/migrations/20231205020742_world.sql @@ -0,0 +1,21 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20231205020742'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20231205020742'); +-- Add your query below. + + +-- Will of Shahram and Holy Strength should have separate aura slot per caster. +UPDATE `spell_template` SET `customFlags` = (`customFlags` | 4096) WHERE `entry` IN (16598, 20007); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Objects/Unit.cpp b/src/game/Objects/Unit.cpp index 0997dd4eff9..651f5ff70c2 100644 --- a/src/game/Objects/Unit.cpp +++ b/src/game/Objects/Unit.cpp @@ -3235,6 +3235,10 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder) // Skip channeled spells (Arcane missile, ...) so two casters can channel at the same time if (aurSpellInfo->IsChanneledSpell()) continue; + + if (aurSpellInfo->Custom & SPELL_CUSTOM_SEPARATE_AURA_PER_CASTER) + continue; + bool stop = false; for (int32 i = 0; i < MAX_EFFECT_INDEX && !stop; ++i) @@ -3243,10 +3247,6 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder) if (!foundHolder->m_auras[i] || !holder->m_auras[i]) continue; - // Croise - if (aurSpellInfo->Id == 20007) - break; - // m_auraname can be modified to SPELL_AURA_NONE for area auras, use original AuraType aurNameReal = AuraType(aurSpellInfo->EffectApplyAuraName[i]); diff --git a/src/game/Spells/SpellDefines.h b/src/game/Spells/SpellDefines.h index 810305acfaa..f9186973bd4 100644 --- a/src/game/Spells/SpellDefines.h +++ b/src/game/Spells/SpellDefines.h @@ -886,6 +886,7 @@ enum SpellAttributesCustom SPELL_CUSTOM_AURA_APPLY_BREAKS_STEALTH = 0x200, // Stealth is removed when this aura is applied SPELL_CUSTOM_NOT_REMOVED_ON_EVADE = 0x400, // Aura persists after creature evades SPELL_CUSTOM_SEND_CHANNEL_VISUAL = 0x800, // Will periodically send the channeling spell visual kit + SPELL_CUSTOM_SEPARATE_AURA_PER_CASTER = 0x1000, // Each caster has his own aura slot, instead of replacing others }; // Custom flags assigned by the core based on spell template data