Core/Spells: Change low level bool triggered with bitmask TriggerCastFlags to better manipulate the behaviour of certain triggered spells.

This commit is contained in:
Machiavelli
2011-07-31 21:58:25 +02:00
parent 8753a18263
commit 58f10c74f7
11 changed files with 132 additions and 96 deletions
+3 -3
View File
@@ -8343,7 +8343,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
return;
}
Spell* spell = new Spell(this, spellInfo, false);
Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE);
spell->m_CastItem = item;
spell->m_cast_count = cast_count; //set count of casts
spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id);
@@ -8374,7 +8374,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
continue;
}
Spell* spell = new Spell(this, spellInfo, (count > 0));
Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
spell->m_CastItem = item;
spell->m_cast_count = cast_count; // set count of casts
spell->m_glyphIndex = glyphIndex; // glyph index
@@ -8402,7 +8402,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
continue;
}
Spell* spell = new Spell(this, spellInfo, (count > 0));
Spell* spell = new Spell(this, spellInfo, (count > 0) ? TRIGGERED_FULL_MASK : TRIGGERED_NONE);
spell->m_CastItem = item;
spell->m_cast_count = cast_count; // set count of casts
spell->m_glyphIndex = glyphIndex; // glyph index