Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/Entities/Unit/Unit.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_paladin.cpp
	src/server/scripts/Spells/spell_priest.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/scripts/Spells/spell_warlock.cpp
	src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
Vincent-Michael
2013-07-24 03:21:25 +02:00
7 changed files with 119 additions and 96 deletions

View File

@@ -0,0 +1 @@
UPDATE `creature_template` SET `InhabitType` = 5 WHERE `entry` = 10184;

View File

@@ -0,0 +1,11 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (63310,50421,23780,33896,37594,37705,23551,23552,23572);
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
(63310,'spell_warl_glyph_of_shadowflame'),
(50421,'spell_dk_scent_of_blood'),
(23780,'spell_item_aegis_of_preservation'),
(33896,'spell_item_desperate_defense'),
(37594,'spell_pri_item_greater_heal_refund'),
(37705,'spell_pal_item_healing_discount'),
(23551,'spell_sha_item_lightning_shield'),
(23552,'spell_sha_item_lightning_shield_trigger'),
(23572,'spell_sha_item_mana_surge');

View File

@@ -413,7 +413,7 @@ public:
}
break;
case EVENT_MOVEMENT: // Phase PHASE_BREATH
if (!IsMoving)
if (!IsMoving && !(me->HasUnitState(UNIT_STATE_CASTING)))
{
SetNextRandomPoint();
PointData = GetMoveData();

View File

@@ -73,6 +73,46 @@ class spell_item_trigger_spell : public SpellScriptLoader
}
};
enum AegisOfPreservation
{
SPELL_AEGIS_HEAL = 23781
};
// 23780 - Aegis of Preservation
class spell_item_aegis_of_preservation : public SpellScriptLoader
{
public:
spell_item_aegis_of_preservation() : SpellScriptLoader("spell_item_aegis_of_preservation") { }
class spell_item_aegis_of_preservation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_aegis_of_preservation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_AEGIS_HEAL))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_AEGIS_HEAL, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_item_aegis_of_preservation_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_item_aegis_of_preservation_AuraScript();
}
};
// 26400 - Arcane Shroud
class spell_item_arcane_shroud : public SpellScriptLoader
{
@@ -217,6 +257,46 @@ class spell_item_defibrillate : public SpellScriptLoader
uint32 _failSpell;
};
enum DesperateDefense
{
SPELL_DESPERATE_RAGE = 33898
};
// 33896 - Desperate Defense
class spell_item_desperate_defense : public SpellScriptLoader
{
public:
spell_item_desperate_defense() : SpellScriptLoader("spell_item_desperate_defense") { }
class spell_item_desperate_defense_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_desperate_defense_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DESPERATE_RAGE))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_DESPERATE_RAGE, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_item_desperate_defense_AuraScript::HandleProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_item_desperate_defense_AuraScript();
}
};
// http://www.wowhead.com/item=6522 Deviate Fish
// 8063 Deviate Fish
enum DeviateFishSpells
@@ -523,15 +603,21 @@ class spell_item_necrotic_touch : public SpellScriptLoader
return true;
}
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive();
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 bp = CalculatePct(int32(eventInfo.GetDamageInfo()->GetDamage()), aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_ITEM_NECROTIC_TOUCH_PROC, SPELLVALUE_BASE_POINT0, bp, GetTarget(), true, NULL, aurEff);
GetTarget()->CastCustomSpell(SPELL_ITEM_NECROTIC_TOUCH_PROC, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register() OVERRIDE
{
DoCheckProc += AuraCheckProcFn(spell_item_necrotic_touch_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_item_necrotic_touch_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -2421,86 +2507,6 @@ public:
}
};
enum AegisOfPreservation
{
SPELL_AEGIS_HEAL = 23781
};
// 23780 - Blazing Speed
class spell_item_aegis_of_preservation : public SpellScriptLoader
{
public:
spell_item_aegis_of_preservation() : SpellScriptLoader("spell_item_aegis_of_preservation") { }
class spell_item_aegis_of_preservation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_aegis_of_preservation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_AEGIS_HEAL))
return false;
return true;
}
void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_AEGIS_HEAL, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_item_aegis_of_preservation_AuraScript::OnProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_item_aegis_of_preservation_AuraScript();
}
};
enum DesperateDefense
{
SPELL_DESPERATE_RAGE = 33898
};
// 33896 - Desperate Defense
class spell_item_desperate_defense : public SpellScriptLoader
{
public:
spell_item_desperate_defense() : SpellScriptLoader("spell_item_desperate_defense") { }
class spell_item_desperate_defense_AuraScript : public AuraScript
{
PrepareAuraScript(spell_item_desperate_defense_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DESPERATE_RAGE))
return false;
return true;
}
void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_DESPERATE_RAGE, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_item_desperate_defense_AuraScript::OnProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_item_desperate_defense_AuraScript();
}
};
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling
@@ -2512,11 +2518,13 @@ void AddSC_item_spell_scripts()
// 23075 Mithril Mechanical Dragonling
new spell_item_trigger_spell("spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
new spell_item_aegis_of_preservation();
new spell_item_arcane_shroud();
new spell_item_blessing_of_ancient_kings();
new spell_item_defibrillate("spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
new spell_item_defibrillate("spell_item_goblin_jumper_cables_xl", 50, SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL);
new spell_item_defibrillate("spell_item_gnomish_army_knife", 33);
new spell_item_desperate_defense();
new spell_item_deviate_fish();
new spell_item_flask_of_the_north();
new spell_item_gnomish_death_ray();
@@ -2564,6 +2572,4 @@ void AddSC_item_spell_scripts()
new spell_item_chicken_cover();
new spell_item_muisek_vessel();
new spell_item_greatmothers_soulcatcher();
new spell_item_aegis_of_preservation();
new spell_item_desperate_defense();
}

View File

@@ -769,12 +769,11 @@ class spell_pri_power_word_shield : public SpellScriptLoader
if (dmgInfo.GetAttacker() == target)
return;
if (Unit* caster = GetCaster())
if (AuraEffect* talentAurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
{
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
}
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
{
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
}
}
void Register() OVERRIDE

View File

@@ -279,17 +279,22 @@ class spell_sha_earth_shield : public SpellScriptLoader
}
}
bool CheckProc(ProcEventInfo& /*eventInfo*/)
{
//! HACK due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
if (player->HasSpellCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
//! HACK due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
if (player->HasSpellCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL))
return;
GetTarget()->CastCustomSpell(SPELL_SHAMAN_EARTH_SHIELD_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, NULL, aurEff, GetCasterGUID());
/// @hack: due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
player->AddSpellCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL, 0, time(NULL) + 3);
}
@@ -297,6 +302,7 @@ class spell_sha_earth_shield : public SpellScriptLoader
void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_earth_shield_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc += AuraCheckProcFn(spell_sha_earth_shield_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_sha_earth_shield_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};

View File

@@ -70,7 +70,7 @@ enum MiscSpells
enum WarriorSpellIcons
{
WARRIOR_ICON_ID_SUDDEN_DEATH = 1989,
WARRIOR_ICON_ID_SUDDEN_DEATH = 1989
};
/// Updated 4.3.4