Scripts/Spells: Correctly implement Murmur's Touch & Dire Brew
Port From (https://github.com/TrinityCore/TrinityCore/commit/496eba4e8d579816895c11060f896faa4523623e)
This commit is contained in:
@@ -3240,7 +3240,9 @@ namespace Game.Entities
|
|||||||
38762, // Force of Neltharaku
|
38762, // Force of Neltharaku
|
||||||
51122, // Fierce Lightning Stike
|
51122, // Fierce Lightning Stike
|
||||||
71848, // Toxic Wasteling Find Target
|
71848, // Toxic Wasteling Find Target
|
||||||
36146 // Chains of Naberius
|
36146, // Chains of Naberius
|
||||||
|
33711, // Murmur's Touch
|
||||||
|
38794 // Murmur's Touch
|
||||||
}, spellInfo =>
|
}, spellInfo =>
|
||||||
{
|
{
|
||||||
spellInfo.MaxAffectedTargets = 1;
|
spellInfo.MaxAffectedTargets = 1;
|
||||||
@@ -3315,16 +3317,6 @@ namespace Game.Entities
|
|||||||
spellInfo.MaxAffectedTargets = 15;
|
spellInfo.MaxAffectedTargets = 15;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Murmur's Touch
|
|
||||||
ApplySpellFix(new[] { 33711, 38794 }, spellInfo =>
|
|
||||||
{
|
|
||||||
spellInfo.MaxAffectedTargets = 1;
|
|
||||||
ApplySpellEffectFix(spellInfo, 0, spellEffectInfo =>
|
|
||||||
{
|
|
||||||
spellEffectInfo.TriggerSpell = 33760;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fingers of Frost
|
// Fingers of Frost
|
||||||
ApplySpellFix(new[] { 44544 }, spellInfo =>
|
ApplySpellFix(new[] { 44544 }, spellInfo =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -518,6 +518,19 @@ namespace Scripts.Spells.Items
|
|||||||
public const uint Ashbringer12 = 8928; // "Kill Them All!"
|
public const uint Ashbringer12 = 8928; // "Kill Them All!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct ModelIds
|
||||||
|
{
|
||||||
|
//DireBrew
|
||||||
|
public const uint ClassClothMale = 25229;
|
||||||
|
public const uint ClassClothFemale = 25233;
|
||||||
|
public const uint ClassLeatherMale = 25230;
|
||||||
|
public const uint ClassLeatherFemale = 25234;
|
||||||
|
public const uint ClassMailMale = 25231;
|
||||||
|
public const uint ClassMailFemale = 25235;
|
||||||
|
public const uint ClassPlateMale = 25232;
|
||||||
|
public const uint ClassPlateFemale = 25236;
|
||||||
|
}
|
||||||
|
|
||||||
// 23074 Arcanite Dragonling
|
// 23074 Arcanite Dragonling
|
||||||
// 23133 Gnomish Battle Chicken
|
// 23133 Gnomish Battle Chicken
|
||||||
// 23076 Mechanical Dragonling
|
// 23076 Mechanical Dragonling
|
||||||
@@ -1224,6 +1237,35 @@ namespace Scripts.Spells.Items
|
|||||||
OnEffectApply.Add(new EffectApplyHandler(HandleEffectApply, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
|
OnEffectApply.Add(new EffectApplyHandler(HandleEffectApply, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 51010 - Dire Brew
|
||||||
|
class spell_item_dire_brew : AuraScript
|
||||||
|
{
|
||||||
|
void AfterApply(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||||
|
{
|
||||||
|
Unit target = GetTarget();
|
||||||
|
|
||||||
|
uint model = 0;
|
||||||
|
var gender = target.GetGender();
|
||||||
|
var chrClass = CliDB.ChrClassesStorage.LookupByKey(target.GetClass());
|
||||||
|
if ((chrClass.ArmorTypeMask & (1 << (int)ItemSubClassArmor.Plate)) != 0)
|
||||||
|
model = gender == Gender.Male ? ModelIds.ClassPlateMale : ModelIds.ClassPlateFemale;
|
||||||
|
else if ((chrClass.ArmorTypeMask & (1 << (int)ItemSubClassArmor.Mail)) != 0)
|
||||||
|
model = gender == Gender.Male ? ModelIds.ClassMailMale : ModelIds.ClassMailFemale;
|
||||||
|
else if ((chrClass.ArmorTypeMask & (1 << (int)ItemSubClassArmor.Leather)) != 0)
|
||||||
|
model = gender == Gender.Male ? ModelIds.ClassLeatherMale : ModelIds.ClassLeatherFemale;
|
||||||
|
else if ((chrClass.ArmorTypeMask & (1 << (int)ItemSubClassArmor.Cloth)) != 0)
|
||||||
|
model = gender == Gender.Male ? ModelIds.ClassClothMale : ModelIds.ClassClothFemale;
|
||||||
|
|
||||||
|
if (model != 0)
|
||||||
|
target.SetDisplayId(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
AfterEffectApply.Add(new EffectApplyHandler(AfterApply, 0, AuraType.Transform, AuraEffectHandleModes.Real));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 59915 - Discerning Eye of the Beast Dummy
|
[Script] // 59915 - Discerning Eye of the Beast Dummy
|
||||||
class spell_item_discerning_eye_beast_dummy : AuraScript
|
class spell_item_discerning_eye_beast_dummy : AuraScript
|
||||||
|
|||||||
Reference in New Issue
Block a user