Skip to content

Commit

Permalink
Will of Shahram and Holy Strength should have separate aura slot per …
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed Dec 5, 2023
1 parent b772fc4 commit 2c4ec61
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
21 changes: 21 additions & 0 deletions sql/migrations/20231205020742_world.sql
Original file line number Diff line number Diff line change
@@ -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;
8 changes: 4 additions & 4 deletions src/game/Objects/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]);

Expand Down
1 change: 1 addition & 0 deletions src/game/Spells/SpellDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c4ec61

Please sign in to comment.