Core/Scripts: Added possibility to disable default aura effects for the whole duration of aura (PreventDefaultAction works per script call, PreventDefaultEffect is global)

Scripts/Icecrown Citadel: Corrected aura scripts for new PreventDefaultEffect, thx QAston for pointing it out
SQL: Corrected name for 9599 vehicle accessory
SQL: Fixed import errors in 9600_world_script_texts.sql by Supabad

--HG--
branch : trunk
rename : sql/updates/9599_vehicle_accessory.sql => sql/updates/9599_world_vehicle_accessory.sql
This commit is contained in:
Shauren
2010-08-26 15:32:08 +02:00
parent 73d3f210a9
commit 692779f283
5 changed files with 19 additions and 13 deletions
+9 -3
View File
@@ -280,11 +280,17 @@ class AuraScript : public _SpellScript
public:
bool _Validate(SpellEntry const * entry, const char * scriptname);
bool _Load(Aura * aura);
void _ResetDefault() { m_defaultPreventedEffectsMask = 0; }
bool _IsDefaultActionPrevented(SpellEffIndex effIndex) { return m_defaultPreventedEffectsMask & (1 << effIndex); }
void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; }
void _ResetDefault() { m_defaultPreventedActionsMask = 0; }
bool _IsDefaultActionPrevented(SpellEffIndex effIndex)
{
uint8 effIndexMask = 1 << effIndex;
return (m_defaultPreventedActionsMask & effIndexMask) || (m_defaultPreventedEffectsMask & effIndexMask);
}
void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedActionsMask |= 1 << effIndex; }
void PreventDefaultEffect(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; }
private:
Aura * m_aura;
uint8 m_defaultPreventedActionsMask;
uint8 m_defaultPreventedEffectsMask;
public:
//