Removed all instance scripts so we can have script project back and spells will work again.
This commit is contained in:
@@ -300,7 +300,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_dk_death_and_decay_AuraScript: AuraScript
|
||||
class spell_dk_death_and_decay_AuraScript : AuraScript
|
||||
{
|
||||
void HandleDummyTick(AuraEffect aurEff)
|
||||
{
|
||||
@@ -429,7 +429,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
void HandleHeal(uint effIndex)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
//TODO: heal = std::min(10% health, 20% of all damage taken in last 5 seconds)
|
||||
//TODO: heal = Math.Min(10% health, 20% of all damage taken in last 5 seconds)
|
||||
int heal = (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), GetSpellInfo().GetEffect(4).CalcValue());
|
||||
caster.CastCustomSpell(SpellIds.DeathStrikeHeal, SpellValueMod.BasePoint0, heal, caster, true);
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ namespace Scripts.Spells.Druid
|
||||
|
||||
void AfterRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
// No need to check remove mode, it's safe for auras to remove each other in AfterRemove hook.
|
||||
// No need to check Remove mode, it's safe for auras to Remove each other in AfterRemove hook.
|
||||
GetTarget().RemoveAura(SpellIds.FormStag);
|
||||
GetTarget().RemoveAura(SpellIds.FormAquatic);
|
||||
GetTarget().RemoveAura(SpellIds.FormFlight);
|
||||
@@ -782,7 +782,7 @@ namespace Scripts.Spells.Druid
|
||||
|
||||
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
// If it stays 0, it removes Travel Form dummy in AfterRemove.
|
||||
// If it stays 0, it Removes Travel Form dummy in AfterRemove.
|
||||
triggeredSpellId = 0;
|
||||
|
||||
// We should only handle aura interrupts.
|
||||
@@ -798,7 +798,7 @@ namespace Scripts.Spells.Druid
|
||||
else if (CheckLocationForForm(SpellIds.FormStag) == SpellCastResult.SpellCastOk) // Stag form
|
||||
triggeredSpellId = SpellIds.FormStag;
|
||||
|
||||
// If chosen form is current aura, just don't remove it.
|
||||
// If chosen form is current aura, just don't Remove it.
|
||||
if (triggeredSpellId == m_scriptSpellId)
|
||||
PreventDefaultAction();
|
||||
}
|
||||
@@ -809,7 +809,7 @@ namespace Scripts.Spells.Druid
|
||||
|
||||
if (triggeredSpellId != 0) // Apply new form
|
||||
player.AddAura(triggeredSpellId, player);
|
||||
else // If not set, simply remove Travel Form dummy
|
||||
else // If not set, simply Remove Travel Form dummy
|
||||
player.RemoveAura(SpellIds.TravelForm);
|
||||
}
|
||||
|
||||
@@ -1004,8 +1004,8 @@ namespace Scripts.Spells.Druid
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
SpellEffectInfo effect2 = spellInfo.GetEffect(2);
|
||||
if (effect2 == null || effect2.IsEffect() || effect2.CalcValue() <= 0)
|
||||
SpellEffectInfo effectInfo = spellInfo.GetEffect(2);
|
||||
if (effectInfo == null || effectInfo.IsEffect() || effectInfo.CalcValue() <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ namespace Scripts.Spells.Generic
|
||||
public const uint Damage45k = 64591;
|
||||
|
||||
public const uint ChargingEffect8k5 = 63661;
|
||||
public const uint ChargingEffect20k1 = 68284;
|
||||
public const uint ChargingEffect20k2 = 68501;
|
||||
public const uint Charging20k1 = 68284;
|
||||
public const uint Charging20k2 = 68501;
|
||||
public const uint ChargingEffect45k1 = 62563;
|
||||
public const uint ChargingEffect45k2 = 66481;
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace Scripts.Spells.Generic
|
||||
public const uint MarkOfKazrogalHellfire = 189512;
|
||||
public const uint MarkOfKazrogalDamageHellfire = 189515;
|
||||
|
||||
// Auraprocremovespells
|
||||
// AuraprocRemovespells
|
||||
public const uint FaceRage = 99947;
|
||||
public const uint ImpatientMind = 187213;
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ namespace Scripts.Spells.Generic
|
||||
if (spell.GetEffect(2).ApplyAuraName == AuraType.ModDamagePercentTaken)
|
||||
OnEffectRemove.Add(new EffectApplyHandler(RemoveDummyFromDriver, 2, AuraType.ModDamagePercentTaken, AuraEffectHandleModes.Real));
|
||||
|
||||
// Defend spells cast by players (add/remove visuals)
|
||||
// Defend spells cast by players (add/Remove visuals)
|
||||
if (spell.GetEffect(1).ApplyAuraName == AuraType.Dummy)
|
||||
{
|
||||
AfterEffectApply.Add(new EffectApplyHandler(RefreshVisualShields, 1, AuraType.Dummy, AuraEffectHandleModes.RealOrReapplyMask));
|
||||
@@ -1550,7 +1550,7 @@ namespace Scripts.Spells.Generic
|
||||
switch (GetSpellInfo().Id)
|
||||
{
|
||||
case SpellIds.TriggerTrialChampion:
|
||||
spellId = SpellIds.ChargingEffect20k1;
|
||||
spellId = SpellIds.Charging20k1;
|
||||
break;
|
||||
case SpellIds.TriggerFactionMounts:
|
||||
spellId = SpellIds.ChargingEffect8k5;
|
||||
@@ -1608,8 +1608,8 @@ namespace Scripts.Spells.Generic
|
||||
case SpellIds.ChargingEffect8k5:
|
||||
spellId = SpellIds.Damage8k5;
|
||||
break;
|
||||
case SpellIds.ChargingEffect20k1:
|
||||
case SpellIds.ChargingEffect20k2:
|
||||
case SpellIds.Charging20k1:
|
||||
case SpellIds.Charging20k2:
|
||||
spellId = SpellIds.Damage20k;
|
||||
break;
|
||||
case SpellIds.ChargingEffect45k1:
|
||||
@@ -1662,7 +1662,7 @@ namespace Scripts.Spells.Generic
|
||||
|
||||
// triggered spells are 28703 to 28707
|
||||
// Note: some sources say, that there was the possibility of
|
||||
// receiving a debuff. However, this seems to be removed by a patch.
|
||||
// receiving a debuff. However, this seems to be Removed by a patch.
|
||||
|
||||
// don't overwrite an existing aura
|
||||
for (byte i = 0; i < 5; ++i)
|
||||
@@ -1762,155 +1762,6 @@ namespace Scripts.Spells.Generic
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_gen_on_tournament_mount : AuraScript
|
||||
{
|
||||
uint _pennantSpellId;
|
||||
|
||||
public override bool Load()
|
||||
{
|
||||
_pennantSpellId = 0;
|
||||
return GetCaster() && GetCaster().IsTypeId(TypeId.Player);
|
||||
}
|
||||
|
||||
void HandleApplyEffect(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
if (caster)
|
||||
{
|
||||
Unit vehicle = caster.GetVehicleBase();
|
||||
if (vehicle)
|
||||
{
|
||||
_pennantSpellId = GetPennatSpellId(caster.ToPlayer(), vehicle);
|
||||
caster.CastSpell(caster, _pennantSpellId, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HandleRemoveEffect(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
Unit caster = GetCaster();
|
||||
if (caster)
|
||||
caster.RemoveAurasDueToSpell(_pennantSpellId);
|
||||
}
|
||||
|
||||
uint GetPennatSpellId(Player player, Unit mount)
|
||||
{
|
||||
switch (mount.GetEntry())
|
||||
{
|
||||
case CreatureIds.ArgentSteedAspirant:
|
||||
case CreatureIds.StormwindSteed:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionStormwind))
|
||||
return SpellIds.StormwindChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfStormwind) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfStormwind))
|
||||
return SpellIds.StormwindValiant;
|
||||
else
|
||||
return SpellIds.StormwindAspirant;
|
||||
}
|
||||
case CreatureIds.GnomereganMechanostrider:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionGnomeregan))
|
||||
return SpellIds.GnomereganChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfGnomeregan) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfGnomeregan))
|
||||
return SpellIds.GnomereganValiant;
|
||||
else
|
||||
return SpellIds.GnomereganAspirant;
|
||||
}
|
||||
case CreatureIds.DarkSpearRaptor:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionSenJin))
|
||||
return SpellIds.SenjinChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfSenJin) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfSenJin))
|
||||
return SpellIds.SenjinValiant;
|
||||
else
|
||||
return SpellIds.SenjinAspirant;
|
||||
}
|
||||
case CreatureIds.ArgentHawkstriderAspirant:
|
||||
case CreatureIds.SilvermoonHawkstrider:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionSilvermoon))
|
||||
return SpellIds.SilvermoonChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfSilvermoon) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfSilvermoon))
|
||||
return SpellIds.SilvermoonValiant;
|
||||
else
|
||||
return SpellIds.SilvermoonAspirant;
|
||||
}
|
||||
case CreatureIds.DarnassianNightsaber:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionDarnassus))
|
||||
return SpellIds.DarnassusChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfDarnassus) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfDarnassus))
|
||||
return SpellIds.DarnassusValiant;
|
||||
else
|
||||
return SpellIds.DarnassusAspirant;
|
||||
}
|
||||
case CreatureIds.ExodarElekk:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionTheExodar))
|
||||
return SpellIds.ExodarChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfTheExodar) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfTheExodar))
|
||||
return SpellIds.ExodarValiant;
|
||||
else
|
||||
return SpellIds.ExodarAspirant;
|
||||
}
|
||||
case CreatureIds.IronforgeRam:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionIronforge))
|
||||
return SpellIds.IronforgeChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfIronforge) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfIronforge))
|
||||
return SpellIds.IronforgeValiant;
|
||||
else
|
||||
return SpellIds.IronforgeAspirant;
|
||||
}
|
||||
case CreatureIds.ForsakenWarhorse:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionUndercity))
|
||||
return SpellIds.UndercityChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfUndercity) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfUndercity))
|
||||
return SpellIds.UndercityValiant;
|
||||
else
|
||||
return SpellIds.UndercityAspirant;
|
||||
}
|
||||
case CreatureIds.OrgrimmarWolf:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionOrgrimmar))
|
||||
return SpellIds.OrgrimmarChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfOrgrimmar) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfOrgrimmar))
|
||||
return SpellIds.OrgrimmarValiant;
|
||||
else
|
||||
return SpellIds.OrgrimmarAspirant;
|
||||
}
|
||||
case CreatureIds.ThunderBluffKodo:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionThunderBluff))
|
||||
return SpellIds.ThunderbluffChampion;
|
||||
else if (player.GetQuestRewardStatus(QuestIds.ValiantOfThunderBluff) || player.GetQuestRewardStatus(QuestIds.A_ValiantOfThunderBluff))
|
||||
return SpellIds.ThunderbluffValiant;
|
||||
else
|
||||
return SpellIds.ThunderbluffAspirant;
|
||||
}
|
||||
case CreatureIds.ArgentWarhorse:
|
||||
{
|
||||
if (player.HasAchieved(AchievementIds.ChampionAlliance) || player.HasAchieved(AchievementIds.ChampionHorde))
|
||||
return player.GetClass() == Class.Deathknight ? SpellIds.EbonbladeChampion : SpellIds.ArgentcrusadeChampion;
|
||||
else if (player.HasAchieved(AchievementIds.ArgentValor))
|
||||
return player.GetClass() == Class.Deathknight ? SpellIds.EbonbladeValiant : SpellIds.ArgentcrusadeValiant;
|
||||
else
|
||||
return player.GetClass() == Class.Deathknight ? SpellIds.EbonbladeAspirant : SpellIds.ArgentcrusadeAspirant;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
AfterEffectApply.Add(new EffectApplyHandler(HandleApplyEffect, 0, AuraType.Dummy, AuraEffectHandleModes.RealOrReapplyMask));
|
||||
OnEffectRemove.Add(new EffectApplyHandler(HandleRemoveEffect, 0, AuraType.Dummy, AuraEffectHandleModes.RealOrReapplyMask));
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_gen_oracle_wolvar_reputation : SpellScript
|
||||
{
|
||||
@@ -2875,7 +2726,7 @@ namespace Scripts.Spells.Generic
|
||||
player.InterruptNonMeleeSpells(true);
|
||||
player.AddUnitFlag(UnitFlags.NonAttackable);
|
||||
|
||||
// if player class = hunter || warlock remove pet if alive
|
||||
// if player class = hunter || warlock Remove pet if alive
|
||||
if ((player.GetClass() == Class.Hunter) || (player.GetClass() == Class.Warlock))
|
||||
{
|
||||
Pet pet = player.GetPet();
|
||||
|
||||
@@ -159,9 +159,6 @@ namespace Scripts.Spells.Holiday
|
||||
{
|
||||
public const uint RibbonPole = 181605;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Script] // 45102 Romantic Picnic
|
||||
class spell_love_is_in_the_air_romantic_picnic : AuraScript
|
||||
{
|
||||
@@ -178,7 +175,7 @@ namespace Scripts.Spells.Holiday
|
||||
Unit target = GetTarget();
|
||||
Unit caster = GetCaster();
|
||||
|
||||
// If our player is no longer sit, remove all auras
|
||||
// If our player is no longer sit, Remove all auras
|
||||
if (target.GetStandState() != UnitStandStateType.Sit)
|
||||
{
|
||||
target.RemoveAura(SpellIds.RomanticPicnicAchiev);
|
||||
@@ -756,7 +753,7 @@ namespace Scripts.Spells.Holiday
|
||||
{
|
||||
Unit target = GetTarget();
|
||||
|
||||
// check if aura needs to be removed
|
||||
// check if aura needs to be Removed
|
||||
if (!target.FindNearestGameObject(GameobjectIds.RibbonPole, 8.0f) || !target.HasUnitState(UnitState.Casting))
|
||||
{
|
||||
target.InterruptNonMeleeSpells(false);
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace Scripts.Spells.Hunter
|
||||
{
|
||||
if (GetTargetApplication().GetRemoveMode() == AuraRemoveMode.Default || GetTargetApplication().GetRemoveMode() == AuraRemoveMode.Interrupt)
|
||||
return;
|
||||
|
||||
|
||||
if (!GetTarget().HasAura(SpellIds.MisdirectionProc))
|
||||
GetTarget().ResetRedirectThreat();
|
||||
}
|
||||
@@ -524,7 +524,7 @@ namespace Scripts.Spells.Hunter
|
||||
void HandleDummy(uint effIndex)
|
||||
{
|
||||
Player caster = GetCaster().ToPlayer();
|
||||
// break Auto Shot and autohit
|
||||
// break auto Shot and varhit
|
||||
caster.InterruptSpell(CurrentSpellTypes.AutoRepeat);
|
||||
caster.AttackStop();
|
||||
caster.SendAttackSwingCancelAttack();
|
||||
|
||||
@@ -368,7 +368,7 @@ namespace Scripts.Spells.Items
|
||||
public const uint UnstablePowerAuraStack = 24659;
|
||||
public const uint RestlessStrengthAuraStack = 24662;
|
||||
|
||||
// Auraprocremovespells
|
||||
// AuraprocRemovespells
|
||||
public const uint TalismanOfAscendance = 28200;
|
||||
public const uint JomGabbar = 29602;
|
||||
public const uint BattleTrance = 45040;
|
||||
@@ -655,27 +655,27 @@ namespace Scripts.Spells.Items
|
||||
//CLASS_NONE
|
||||
new uint[] { },
|
||||
//CLASS_WARRIOR
|
||||
new uint[] { SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
new uint[] {SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
//CLASS_PALADIN
|
||||
new uint[]{ SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_HUNTER
|
||||
new uint[]{ SpellIds.Delusional, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Delusional, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_ROGUE
|
||||
new uint[]{ SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
new uint[] {SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
//CLASS_PRIEST
|
||||
new uint[]{ SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_DEATH_KNIGHT
|
||||
new uint[]{ SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
new uint[] {SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.MartyrComplex },
|
||||
//CLASS_SHAMAN
|
||||
new uint[] { SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_MAGE
|
||||
new uint[]{ SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_WARLOCK
|
||||
new uint[]{ SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
new uint[] {SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia },
|
||||
//CLASS_UNK
|
||||
new uint[]{ },
|
||||
//CLASS_DRUID
|
||||
new uint[]{ SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia }
|
||||
new uint[] {SpellIds.Sociopath, SpellIds.Delusional, SpellIds.Kleptomania, SpellIds.Megalomania, SpellIds.Paranoia, SpellIds.Manic, SpellIds.Narcissism, SpellIds.MartyrComplex, SpellIds.Dementia }
|
||||
};
|
||||
|
||||
PreventDefaultAction();
|
||||
@@ -820,19 +820,19 @@ namespace Scripts.Spells.Items
|
||||
//CLASS_NONE
|
||||
new uint[] { },
|
||||
//CLASS_WARRIOR
|
||||
new uint[] { _strengthSpellId, _criticalSpellId, _hasteSpellId },
|
||||
new uint[] {_strengthSpellId, _criticalSpellId, _hasteSpellId },
|
||||
//CLASS_PALADIN
|
||||
new uint[] { _strengthSpellId, _criticalSpellId, _hasteSpellId },
|
||||
//CLASS_HUNTER
|
||||
new uint[] { _agilitySpellId, _criticalSpellId, _apSpellId },
|
||||
new uint[] {_agilitySpellId, _criticalSpellId, _apSpellId },
|
||||
//CLASS_ROGUE
|
||||
new uint[] { _agilitySpellId, _hasteSpellId, _apSpellId },
|
||||
new uint[] {_agilitySpellId, _hasteSpellId, _apSpellId },
|
||||
//CLASS_PRIEST
|
||||
new uint[] { },
|
||||
//CLASS_DEATH_KNIGHT
|
||||
new uint[] { _strengthSpellId, _criticalSpellId, _hasteSpellId },
|
||||
new uint[] {_strengthSpellId, _criticalSpellId, _hasteSpellId },
|
||||
//CLASS_SHAMAN
|
||||
new uint[] { _agilitySpellId, _hasteSpellId, _apSpellId },
|
||||
new uint[] {_agilitySpellId, _hasteSpellId, _apSpellId },
|
||||
//CLASS_MAGE
|
||||
new uint[] { },
|
||||
//CLASS_WARLOCK
|
||||
@@ -840,7 +840,7 @@ namespace Scripts.Spells.Items
|
||||
//CLASS_UNK
|
||||
new uint[] { },
|
||||
//CLASS_DRUID
|
||||
new uint[] { _strengthSpellId, _agilitySpellId, _hasteSpellId }
|
||||
new uint[] {_strengthSpellId, _agilitySpellId, _hasteSpellId }
|
||||
};
|
||||
|
||||
PreventDefaultAction();
|
||||
@@ -1984,7 +1984,7 @@ namespace Scripts.Spells.Items
|
||||
Player target = GetHitPlayer();
|
||||
if (target)
|
||||
{
|
||||
uint[] items = { ItemIds.HeartCandy1, ItemIds.HeartCandy2, ItemIds.HeartCandy3, ItemIds.HeartCandy4, ItemIds.HeartCandy5, ItemIds.HeartCandy6, ItemIds.HeartCandy7, ItemIds.HeartCandy8 };
|
||||
uint[] items = new uint[] { ItemIds.HeartCandy1, ItemIds.HeartCandy2, ItemIds.HeartCandy3, ItemIds.HeartCandy4, ItemIds.HeartCandy5, ItemIds.HeartCandy6, ItemIds.HeartCandy7, ItemIds.HeartCandy8 };
|
||||
target.AddItem(items[RandomHelper.IRand(0, 7)], 1);
|
||||
}
|
||||
}
|
||||
@@ -2112,7 +2112,7 @@ namespace Scripts.Spells.Items
|
||||
uint sound_id = RandomHelper.RAND(SoundIds.Ashbringer1, SoundIds.Ashbringer2, SoundIds.Ashbringer3, SoundIds.Ashbringer4, SoundIds.Ashbringer5, SoundIds.Ashbringer6,
|
||||
SoundIds.Ashbringer7, SoundIds.Ashbringer8, SoundIds.Ashbringer9, SoundIds.Ashbringer10, SoundIds.Ashbringer11, SoundIds.Ashbringer12);
|
||||
|
||||
// Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
|
||||
// Ashbringers effect (SpellIds.ID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
|
||||
if (RandomHelper.URand(0, 60) < 1)
|
||||
player.PlayDirectSound(sound_id, player);
|
||||
}
|
||||
@@ -2557,7 +2557,7 @@ namespace Scripts.Spells.Items
|
||||
|
||||
float lastZ = MapConst.InvalidHeight;
|
||||
}
|
||||
|
||||
|
||||
[Script]
|
||||
class spell_item_teach_language : SpellScript
|
||||
{
|
||||
@@ -2972,7 +2972,7 @@ namespace Scripts.Spells.Items
|
||||
if (dummy == null || dummy.GetStackAmount() < aurEff.GetAmount())
|
||||
return;
|
||||
|
||||
// if right amount, remove the aura and cast real trigger
|
||||
// if right amount, Remove the aura and cast real trigger
|
||||
caster.RemoveAurasDueToSpell(_stackSpell);
|
||||
Unit target = eventInfo.GetActionTarget();
|
||||
if (target)
|
||||
@@ -3392,7 +3392,7 @@ namespace Scripts.Spells.Items
|
||||
}
|
||||
|
||||
[Script]// 45051 - Mad Alchemist's Potion (34440)
|
||||
class mad_alchemists_potion_SpellScript : SpellScript
|
||||
class spell_item_mad_alchemists_potion : SpellScript
|
||||
{
|
||||
void SecondaryEffect()
|
||||
{
|
||||
@@ -3461,7 +3461,7 @@ namespace Scripts.Spells.Items
|
||||
}
|
||||
|
||||
[Script]// 53750 - Crazy Alchemist's Potion (40077)
|
||||
class crazy_alchemists_potion_SpellScript : SpellScript
|
||||
class spell_item_crazy_alchemists_potion : SpellScript
|
||||
{
|
||||
void SecondaryEffect()
|
||||
{
|
||||
|
||||
@@ -138,8 +138,8 @@ namespace Scripts.Spells.Mage
|
||||
|
||||
void HandleAbsorb(AuraEffect aurEff, DamageInfo dmgInfo, ref uint absorbAmount)
|
||||
{
|
||||
AuraEffect effect1 = GetEffect(1);
|
||||
if (effect1 == null || !GetTargetApplication().HasEffect(1) ||
|
||||
AuraEffect effectInfo = GetEffect(1);
|
||||
if (effectInfo == null || !GetTargetApplication().HasEffect(1) ||
|
||||
dmgInfo.GetDamage() < GetTarget().GetHealth() ||
|
||||
dmgInfo.GetDamage() > GetTarget().GetMaxHealth() * 2 ||
|
||||
GetTarget().HasAura(SpellIds.Cauterized))
|
||||
@@ -148,7 +148,7 @@ namespace Scripts.Spells.Mage
|
||||
return;
|
||||
}
|
||||
|
||||
GetTarget().SetHealth(GetTarget().CountPctFromMaxHealth(effect1.GetAmount()));
|
||||
GetTarget().SetHealth(GetTarget().CountPctFromMaxHealth(effectInfo.GetAmount()));
|
||||
GetTarget().CastSpell(GetTarget(), GetSpellInfo().GetEffect(2).TriggerSpell, TriggerCastFlags.FullMask);
|
||||
GetTarget().CastSpell(GetTarget(), SpellIds.CauterizeDot, TriggerCastFlags.FullMask);
|
||||
GetTarget().CastSpell(GetTarget(), SpellIds.Cauterized, TriggerCastFlags.FullMask);
|
||||
@@ -303,7 +303,7 @@ namespace Scripts.Spells.Mage
|
||||
}
|
||||
}
|
||||
|
||||
// 37447 - Improved Mana Gems
|
||||
// 37447 - Improved Mana Gems
|
||||
[Script] // 61062 - Improved Mana Gems
|
||||
class spell_mage_imp_mana_gems : AuraScript
|
||||
{
|
||||
@@ -501,7 +501,7 @@ namespace Scripts.Spells.Mage
|
||||
|
||||
ObjectGuid _ringOfFrostGUID;
|
||||
}
|
||||
|
||||
|
||||
[Script] // 82691 - Ring of Frost (freeze efect)
|
||||
class spell_mage_ring_of_frost_freeze : SpellScript
|
||||
{
|
||||
@@ -552,7 +552,7 @@ namespace Scripts.Spells.Mage
|
||||
AfterEffectRemove.Add(new EffectApplyHandler(OnRemove, 0, AuraType.ModStun, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Script] // 80353 - Time Warp
|
||||
class spell_mage_time_warp : SpellScript
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace Scripts.Spells.Paladin
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Forbearance) //, SPELL_PALADIN_IMMUNE_SHIELD_MARKER) // uncomment when we have serverside only spells
|
||||
return ValidateSpellInfo(SpellIds.Forbearance) //, SpellIds._PALADIN_IMMUNE_SHIELD_MARKER) // uncomment when we have serverside only spells
|
||||
&& spellInfo.ExcludeTargetAuraSpell == SpellIds.ImmuneShieldMarker;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace Scripts.Spells.Paladin
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.FinalStand, SpellIds.FinalStandEffect, SpellIds.Forbearance) //, SPELL_PALADIN_IMMUNE_SHIELD_MARKER // uncomment when we have serverside only spells
|
||||
return ValidateSpellInfo(SpellIds.FinalStand, SpellIds.FinalStandEffect, SpellIds.Forbearance) //, SpellIds._PALADIN_IMMUNE_SHIELD_MARKER // uncomment when we have serverside only spells
|
||||
&& spellInfo.ExcludeCasterAuraSpell == SpellIds.ImmuneShieldMarker;
|
||||
}
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ namespace Scripts.Spells.Priest
|
||||
return;
|
||||
|
||||
int healAmount = (int)target.CountPctFromMaxHealth((int)healPct);
|
||||
// remove the aura now, we don't want 40% healing bonus
|
||||
// Remove the aura now, we don't want 40% healing bonus
|
||||
Remove(AuraRemoveMode.EnemySpell);
|
||||
target.CastCustomSpell(target, SpellIds.GuardianSpiritHeal, healAmount, 0, 0, true);
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
|
||||
@@ -284,12 +284,11 @@ namespace Scripts.Spells.Quest
|
||||
// 34665 Administer Antidote
|
||||
// http://www.wowhead.com/quest=11515 Blood for Blood
|
||||
// 44936 Quest - Fel Siphon Dummy
|
||||
[Script("spell_q55_sacred_cleansing", SpellEffectName.Dummy, 1u, CreatureIds.Morbent, CreatureIds.WeakenedMorbent, true)]
|
||||
[Script("spell_q10255_administer_antidote", SpellEffectName.Dummy, 0u, CreatureIds.Helboar, CreatureIds.Dreadtusk, true)]
|
||||
[Script("spell_q11515_fel_siphon_dummy", SpellEffectName.Dummy, 0u, CreatureIds.FelbloodInitiate, CreatureIds.EmaciatedFelblood, true)]
|
||||
[Script("spell_q55_sacred_cleansing", SpellEffectName.Dummy, 1u, CreatureIds.Morbent, CreatureIds.WeakenedMorbent, true, 0)]
|
||||
[Script("spell_q10255_administer_antidote", SpellEffectName.Dummy, 0u, CreatureIds.Helboar, CreatureIds.Dreadtusk, true, 0)]
|
||||
[Script("spell_q11515_fel_siphon_dummy", SpellEffectName.Dummy, 0u, CreatureIds.FelbloodInitiate, CreatureIds.EmaciatedFelblood, true, 0)]
|
||||
class spell_generic_quest_update_entry : SpellScript
|
||||
{
|
||||
public spell_generic_quest_update_entry(SpellEffectName spellEffect, uint effIndex, uint originalEntry, uint newEntry, bool shouldAttack) : this(spellEffect, effIndex, originalEntry, newEntry, shouldAttack, 0) { }
|
||||
public spell_generic_quest_update_entry(SpellEffectName spellEffect, uint effIndex, uint originalEntry, uint newEntry, bool shouldAttack, uint despawnTime)
|
||||
{
|
||||
_spellEffect = spellEffect;
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Scripts.Spells.Warlock
|
||||
Unit target = GetHitUnit();
|
||||
if (target)
|
||||
{
|
||||
// Casting Banish on a banished target will remove applied aura
|
||||
// Casting Banish on a banished target will Remove applied aura
|
||||
Aura banishAura = target.GetAura(GetSpellInfo().Id, GetCaster().GetGUID());
|
||||
if (banishAura != null)
|
||||
banishAura.Remove();
|
||||
@@ -119,7 +119,7 @@ namespace Scripts.Spells.Warlock
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
//OnEffectHitTarget.Add(new EffectHandler(spell_warl_conflagrate_SpellScript::HandleHit, 0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
//OnEffectHitTarget.Add(new EffectHandler(spell_warl_conflagrate_SpellScript::HandleHit, 0, SpellIds._EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,15 +128,15 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
void HandleAbsorb(AuraEffect aurEff, DamageInfo dmgInfo, ref uint absorbAmount)
|
||||
{
|
||||
AuraEffect effect1 = GetEffect(1);
|
||||
if (effect1 == null || !GetTargetApplication().HasEffect(1))
|
||||
AuraEffect auraEffect = GetEffect(1);
|
||||
if (auraEffect == null || !GetTargetApplication().HasEffect(1))
|
||||
{
|
||||
PreventDefaultAction();
|
||||
return;
|
||||
}
|
||||
|
||||
// You take ${$s2/3}% reduced damage
|
||||
float damageReductionPct = (float)effect1.GetAmount() / 3;
|
||||
float damageReductionPct = (float)auraEffect.GetAmount() / 3;
|
||||
// plus a random amount of up to ${$s2/3}% additional reduced damage
|
||||
damageReductionPct += RandomHelper.FRand(0.0f, damageReductionPct);
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
void HandleRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
// If effect is removed by expire remove the summoned demonic circle too.
|
||||
// If effect is Removed by expire Remove the summoned demonic circle too.
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.Reapply))
|
||||
GetTarget().RemoveGameObject(GetId(), true);
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
// Here we check if player is in demonic circle teleport range, if so add
|
||||
// WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST; allowing him to cast the WARLOCK_DEMONIC_CIRCLE_TELEPORT.
|
||||
// If not in range remove the WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST.
|
||||
// If not in range Remove the WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST.
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.DemonicCircleTeleport, GetCastDifficulty());
|
||||
|
||||
@@ -646,7 +646,7 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
if (caster.GetOwner() && caster.GetOwner().HasAura(SpellIds.GlyphOfSuccubus))
|
||||
{
|
||||
target.RemoveAurasByType(AuraType.PeriodicDamage, ObjectGuid.Empty, target.GetAura(SpellIds.PriestShadowWordDeath)); // SW:D shall not be removed.
|
||||
target.RemoveAurasByType(AuraType.PeriodicDamage, ObjectGuid.Empty, target.GetAura(SpellIds.PriestShadowWordDeath)); // SW:D shall not be Removed.
|
||||
target.RemoveAurasByType(AuraType.PeriodicDamagePercent);
|
||||
target.RemoveAurasByType(AuraType.PeriodicLeech);
|
||||
}
|
||||
@@ -828,8 +828,6 @@ namespace Scripts.Spells.Warlock
|
||||
public List<uint> GetDotList() { return _dotList; }
|
||||
public Unit GetOriginalSwapSource() { return _swapCaster; }
|
||||
public void SetOriginalSwapSource(Unit victim) { _swapCaster = victim; }
|
||||
|
||||
|
||||
List<uint> _dotList = new List<uint>();
|
||||
Unit _swapCaster;
|
||||
}
|
||||
|
||||
@@ -483,8 +483,6 @@ namespace Scripts.Spells.Warrior
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleEffect, 0, SpellEffectName.Any));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Script] // 97462 - Rallying Cry
|
||||
class spell_warr_rallying_cry : SpellScript
|
||||
{
|
||||
@@ -574,7 +572,7 @@ namespace Scripts.Spells.Warrior
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
|
||||
// remove shields, will still display immune to damage part
|
||||
// Remove shields, will still display immune to damage part
|
||||
Unit target = GetHitUnit();
|
||||
if (target)
|
||||
target.RemoveAurasWithMechanic(1 << (int)Mechanics.ImmuneShield, AuraRemoveMode.EnemySpell);
|
||||
|
||||
Reference in New Issue
Block a user