Core/Unit: Big cleanup in Unit::CalcAbsorbResist

Core/AuraScript:
	Fix compile time check for AuraScript functions
	Remove AuraApplication from hook functions parameter list, use GetTarget() and GetTargetApplication() instead
	Add OnEffectAbsorb hook
Scripts: move handlers of Spell Deflection, Savage Defense, Primal Tenacity, Nerves of Steel, Astral shift from core to scripts.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-12-27 20:14:54 +01:00
parent da8d794f4b
commit ef968f4b15
30 changed files with 791 additions and 438 deletions

View File

@@ -219,16 +219,16 @@ public:
class spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript : public AuraScript
{
PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript)
void HandleEffectApply(AuraEffect const * /*aurEff*/, AuraApplication const * aurApp, AuraEffectHandleModes /*mode*/)
void HandleEffectApply(AuraEffect const * /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* pTarget = aurApp->GetTarget();
Unit* pTarget = GetTarget();
pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
pTarget->AddUnitState(UNIT_STAT_ROOT);
}
void HandleEffectRemove(AuraEffect const * /*aurEff*/, AuraApplication const * aurApp, AuraEffectHandleModes /*mode*/)
void HandleEffectRemove(AuraEffect const * /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
aurApp->GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}
void Register()