That's Abominable for the 3 other quests, and knockbacks for all.

Port From (https://github.com/TrinityCore/TrinityCore/commit/19646a8363310c5371728fa7b50dcd33bb2278e2)
This commit is contained in:
hondacrx
2021-11-18 20:09:33 -05:00
parent 8f85ff9250
commit 24729c13a2
2 changed files with 196 additions and 83 deletions
+169 -83
View File
@@ -132,21 +132,28 @@ namespace Scripts.Spells.Quest
public const uint CreateBearFlank = 56566;
public const uint BearFlankFail = 56569;
//ThatsAbominable
public const uint IcyGhoulCredit = 59591; // Credit for Icy Ghoul
public const uint ViciousGeistsCredit = 60042; // Credit for Vicious Geists
public const uint RisenAllianceSoldiersCredit = 60040; // Credit for Risen Alliance Soldiers
//BurstAtTheSeams
public const uint BloatedAbominationFeignDeath = 52593;
public const uint BurstAtTheSeamsBone = 52516;
public const uint ExplodeAbominationMeat = 52520;
public const uint ExplodeAbominationBloodyMeat = 52523;
public const uint TrollExplosion = 52565;
public const uint ExplodeTrollMeat = 52578;
public const uint ExplodeTrollBloodyMeat = 52580;
//Burstattheseams
public const uint BurstAtTheSeams = 52510; // Burst At The Seams
public const uint BurstAtTheSeamsDmg = 52508; // Damage Spell
public const uint BurstAtTheSeamsDmg2 = 59580; // Abomination Self Damage Spell
public const uint BurstAtTheSeamsBone = 52516; // Burst At The Seams:Bone
public const uint BurstAtTheSeamsMeat = 52520; // Explode Abomination:Meat
public const uint BurstAtTheSeamsBmeat = 52523; // Explode Abomination:Bloody Meat
public const uint DrakkariSkullcrusherCredit = 52590; // Credit For Drakkari Skullcrusher
public const uint SummonDrakkariChieftain = 52616; // Summon Drakkari Chieftain
public const uint DrakkariChieftainkKillCredit = 52620; // Drakkari Chieftain Kill Credit
public const uint BurstAtTheSeams59576 = 59576; //Script/Knockback; That'S Abominable
public const uint BurstAtTheSeams59579 = 59579; //Dummy
public const uint BurstAtTheSeams52510 = 52510; //Script/Knockback; Fuel For The Fire
public const uint BurstAtTheSeams52508 = 52508; //Damage 20000
public const uint BurstAtTheSeams59580 = 59580; //Damage 50000
public const uint AssignGhoulKillCreditToMaster = 59590;
public const uint AssignGeistKillCreditToMaster = 60041;
public const uint AssignSkeletonKillCreditToMaster = 60039;
public const uint DrakkariSkullcrusherCredit = 52590;
public const uint SummonDrakkariChieftain = 52616;
public const uint DrakkariChieftainkKillCredit = 52620;
//Escapefromsilverbrook
public const uint SummonWorgen = 48681;
@@ -253,14 +260,12 @@ namespace Scripts.Spells.Quest
public const uint Skytalon = 31583;
public const uint Decoy = 31578;
//ThatsAbominable
public const uint IcyGhoul = 31142;
public const uint RisenAllianceSoldiers = 31205;
public const uint ViciousGeist = 31147;
public const uint RenimatedAbomination = 31692;
//Burstattheseams
public const uint DrakkariChieftaink = 29099;
public const uint IcyGhoul = 31142;
public const uint ViciousGeist = 31147;
public const uint RisenAllianceSoldiers = 31205;
public const uint RenimatedAbomination = 31692;
//Deathcomesfromonhigh
public const uint NewAvalonForge = 28525;
@@ -292,11 +297,10 @@ namespace Scripts.Spells.Quest
//Quest12372
public const uint WhisperOnHitByForceWhisper = 1;
//ThatsAbominable
public const uint QuestThatsAbominable = 13264;
//BurstAtTheSeams
public const uint QuestIdBurstAtTheSeams = 12690;
public const uint AreaTheBrokenFront = 4507;
public const uint AreaMordRetharTheDeathGate = 4508;
public const uint QuestFuelForTheFire = 12690;
}
// http://www.wowhead.com/quest=55 Morbent Fel
@@ -967,7 +971,7 @@ namespace Scripts.Spells.Quest
OnCast.Add(new CastHandler(HandleCast));
}
}
[Script]
class spell_q14112_14145_chum_the_water : SpellScript
{
@@ -1510,50 +1514,11 @@ namespace Scripts.Spells.Quest
}
[Script]
class spell_q13264_thats_abominable : SpellScript
class spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59576 : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.IcyGhoulCredit, SpellIds.ViciousGeistsCredit, SpellIds.RisenAllianceSoldiersCredit);
}
void HandleKnockBack(uint effIndex)
{
PreventHitDefaultEffect(effIndex);
Creature creature = GetHitCreature();
if (creature != null)
{
Unit charmer = GetCaster().GetCharmerOrOwner();
if (charmer != null)
{
Player player = charmer.ToPlayer();
if (player != null)
if (player.GetQuestStatus(Misc.QuestThatsAbominable) == QuestStatus.Incomplete)
if (GiveCreditIfValid(player, creature))
creature.KillSelf();
}
}
}
bool GiveCreditIfValid(Player player, Creature creature)
{
uint entry = creature.GetEntry();
switch (entry)
{
case CreatureIds.IcyGhoul:
player.CastSpell(player, SpellIds.IcyGhoulCredit, true);
return true;
case CreatureIds.ViciousGeist:
player.CastSpell(player, SpellIds.ViciousGeistsCredit, true);
return true;
case CreatureIds.RisenAllianceSoldiers:
player.CastSpell(player, SpellIds.RisenAllianceSoldiersCredit, true);
return true;
}
return false;
return ValidateSpellInfo(SpellIds.BurstAtTheSeams59576, SpellIds.BloatedAbominationFeignDeath, SpellIds.BurstAtTheSeams59579, SpellIds.BurstAtTheSeamsBone, SpellIds.ExplodeAbominationMeat, SpellIds.ExplodeAbominationBloodyMeat);
}
void HandleScript(uint effIndex)
@@ -1561,53 +1526,174 @@ namespace Scripts.Spells.Quest
Creature creature = GetCaster().ToCreature();
if (creature != null)
{
creature.KillSelf();
creature.DespawnOrUnsummon();
creature.CastSpell(creature, SpellIds.BloatedAbominationFeignDeath, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeams59579, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsBone, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsBone, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsBone, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationMeat, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationBloodyMeat, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationBloodyMeat, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationBloodyMeat, true);
}
}
public override void Register()
{
OnEffectHitTarget.Add(new EffectHandler(HandleKnockBack, 1, SpellEffectName.KnockBack));
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
}
}
[Script]
class spell_q12690_burst_at_the_seams : SpellScript
class spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59579 : AuraScript
{
void HandleApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.CastSpell(target, SpellIds.TrollExplosion, true);
target.CastSpell(target, SpellIds.ExplodeAbominationMeat, true);
target.CastSpell(target, SpellIds.ExplodeTrollMeat, true);
target.CastSpell(target, SpellIds.ExplodeTrollMeat, true);
target.CastSpell(target, SpellIds.ExplodeTrollBloodyMeat, true);
target.CastSpell(target, SpellIds.BurstAtTheSeamsBone, true);
}
void HandleRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
Unit caster = GetCaster();
if (caster != null)
{
switch (target.GetEntry())
{
case CreatureIds.IcyGhoul:
target.CastSpell(caster, SpellIds.AssignGhoulKillCreditToMaster, true);
break;
case CreatureIds.ViciousGeist:
target.CastSpell(caster, SpellIds.AssignGeistKillCreditToMaster, true);
break;
case CreatureIds.RisenAllianceSoldiers:
target.CastSpell(caster, SpellIds.AssignSkeletonKillCreditToMaster, true);
break;
}
}
target.CastSpell(target, SpellIds.BurstAtTheSeams59580, true);
}
public override void Register()
{
AfterEffectApply.Add(new EffectApplyHandler(HandleApply, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
AfterEffectRemove.Add(new EffectApplyHandler(HandleRemove, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
}
}
[Script]
class spell_q13264_q13276_q13288_q13289_bloated_abom_feign_death : AuraScript
{
void HandleApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.AddDynamicFlag(UnitDynFlags.Dead);
target.AddUnitFlag2(UnitFlags2.FeignDeath);
Creature creature = target.ToCreature();
if (creature != null)
creature.SetReactState(ReactStates.Passive);
}
void HandleRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
Creature creature = target.ToCreature();
if (creature != null)
creature.DespawnOrUnsummon();
}
public override void Register()
{
AfterEffectApply.Add(new EffectApplyHandler(HandleApply, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
AfterEffectRemove.Add(new EffectApplyHandler(HandleRemove, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
}
}
[Script]
class spell_q13264_q13276_q13288_q13289_area_restrict_abom : SpellScript
{
void HandleScript(uint effIndex)
{
Creature creature = GetHitCreature();
if (creature != null)
{
uint area = creature.GetAreaId();
if (area != Misc.AreaTheBrokenFront && area != Misc.AreaMordRetharTheDeathGate)
creature.DespawnOrUnsummon();
}
}
public override void Register()
{
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
}
}
[Script]
class spell_q13264_q13276_q13288_q13289_assign_credit_to_master : SpellScript
{
void HandleScript(uint effIndex)
{
Unit target = GetHitUnit();
if (target != null)
{
Unit owner = target.GetOwner();
if (owner != null)
{
owner.CastSpell(owner, (uint)GetEffectValue(), true);
}
}
}
public override void Register()
{
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
}
}
[Script]
class spell_q12690_burst_at_the_seams_52510 : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.BurstAtTheSeams, SpellIds.BurstAtTheSeamsDmg, SpellIds.BurstAtTheSeamsDmg2,
SpellIds.BurstAtTheSeamsBone, SpellIds.BurstAtTheSeamsMeat, SpellIds.BurstAtTheSeamsBmeat);
return ValidateSpellInfo(SpellIds.BurstAtTheSeams52510, SpellIds.BurstAtTheSeams52508, SpellIds.BurstAtTheSeams59580,
SpellIds.BurstAtTheSeamsBone, SpellIds.ExplodeAbominationMeat, SpellIds.ExplodeAbominationBloodyMeat);
}
public override bool Load()
{
return GetCaster().IsTypeId(TypeId.Unit);
return GetCaster().GetTypeId() == TypeId.Unit;
}
void HandleKnockBack(uint effIndex)
{
Unit creature = GetHitCreature();
if (creature)
if (creature != null)
{
Unit charmer = GetCaster().GetCharmerOrOwner();
if (charmer)
if (charmer != null)
{
Player player = charmer.ToPlayer();
if (player)
if (player != null)
{
if (player.GetQuestStatus(Misc.QuestIdBurstAtTheSeams) == QuestStatus.Incomplete)
if (player.GetQuestStatus(Misc.QuestFuelForTheFire) == QuestStatus.Incomplete)
{
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsBone, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsMeat, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsBmeat, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsDmg, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeamsDmg2, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationMeat, true);
creature.CastSpell(creature, SpellIds.ExplodeAbominationBloodyMeat, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeams52508, true);
creature.CastSpell(creature, SpellIds.BurstAtTheSeams59580, true);
player.CastSpell(player, SpellIds.DrakkariSkullcrusherCredit, true);
ushort count = player.GetReqKillOrCastCurrentCount(Misc.QuestIdBurstAtTheSeams, (int)CreatureIds.DrakkariChieftaink);
ushort count = player.GetReqKillOrCastCurrentCount(Misc.QuestFuelForTheFire, (int)CreatureIds.DrakkariChieftaink);
if ((count % 20) == 0)
player.CastSpell(player, SpellIds.SummonDrakkariChieftain, true);
}
@@ -0,0 +1,27 @@
UPDATE `spell_script_names` SET `ScriptName`='spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59576' WHERE `spell_id` = 59576;
UPDATE `spell_script_names` SET `ScriptName`='spell_q12690_burst_at_the_seams_52510' WHERE `spell_id` = 52510;
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_q13264_q13276_q13288_q13289_bloated_abom_feign_death', 'spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59579', 'spell_q13264_q13276_q13288_q13289_area_restrict_abom', 'spell_q13264_q13276_q13288_q13289_assign_credit_to_master');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(52593, 'spell_q13264_q13276_q13288_q13289_bloated_abom_feign_death'),
(59579, 'spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59579'),
(76245, 'spell_q13264_q13276_q13288_q13289_area_restrict_abom'),
(59590, 'spell_q13264_q13276_q13288_q13289_assign_credit_to_master'),
(60039, 'spell_q13264_q13276_q13288_q13289_assign_credit_to_master'),
(60041, 'spell_q13264_q13276_q13288_q13289_assign_credit_to_master');
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (31692);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (31692) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(31692,0,0,0, 54,0,100,0,0,0,0,0, 11,76244,2,0,0,0,0, 1,0,0,0,0,0,0,0, 'Reanimated Abomination - On Summoned - Cast "Reanimated Abomination Script"');
DELETE FROM `conditions` WHERE `SourceEntry` IN (59576,59579) AND `SourceTypeOrReferenceId` = 13;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 2, 59576, 0, 0, 31, 0, 3, 31142, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Icy Ghoul'),
(13, 2, 59576, 0, 1, 31, 0, 3, 31147, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Vicious Geist'),
(13, 2, 59576, 0, 2, 31, 0, 3, 31205, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Risen Alliance Soldier'),
(13, 2, 59576, 0, 3, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Players'),
(13, 1, 59579, 0, 0, 31, 0, 3, 31142, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Icy Ghoul'),
(13, 1, 59579, 0, 1, 31, 0, 3, 31147, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Vicious Geist'),
(13, 1, 59579, 0, 2, 31, 0, 3, 31205, 0, 0, 0, 0, '', 'Spell "Burst at the Seams" targets Risen Alliance Soldier');