Misc fixes

This commit is contained in:
hondacrx
2022-07-04 15:29:08 -04:00
parent 03247f0f20
commit 101b5ae6aa
2 changed files with 171 additions and 76 deletions
+71 -76
View File
@@ -87,6 +87,71 @@ namespace Scripts.Spells.Priest
public const uint GenReplenishment = 57669;
}
[Script] // 121536 - Angelic Feather talent
class spell_pri_angelic_feather_trigger : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.AngelicFeatherAreatrigger);
}
void HandleEffectDummy(uint effIndex)
{
Position destPos = GetHitDest().GetPosition();
float radius = GetEffectInfo().CalcRadius();
// Caster is prioritary
if (GetCaster().IsWithinDist2d(destPos, radius))
{
GetCaster().CastSpell(GetCaster(), SpellIds.AngelicFeatherAura, true);
}
else
{
CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
args.CastDifficulty = GetCastDifficulty();
GetCaster().CastSpell(destPos, SpellIds.AngelicFeatherAreatrigger, args);
}
}
public override void Register()
{
OnEffectHit.Add(new EffectHandler(HandleEffectDummy, 0, SpellEffectName.Dummy));
}
}
[Script] // Angelic Feather areatrigger - created by SPELL_PRIEST_ANGELIC_FEATHER_AREATRIGGER
class areatrigger_pri_angelic_feather : AreaTriggerAI
{
public areatrigger_pri_angelic_feather(AreaTrigger areatrigger) : base(areatrigger) { }
// Called when the AreaTrigger has just been initialized, just before added to map
public override void OnInitialize()
{
Unit caster = at.GetCaster();
if (caster)
{
List<AreaTrigger> areaTriggers = caster.GetAreaTriggers(SpellIds.AngelicFeatherAreatrigger);
if (areaTriggers.Count >= 3)
areaTriggers.First().SetDuration(0);
}
}
public override void OnUnitEnter(Unit unit)
{
Unit caster = at.GetCaster();
if (caster)
{
if (caster.IsFriendlyTo(unit))
{
// If target already has aura, increase duration to max 130% of initial duration
caster.CastSpell(unit, SpellIds.AngelicFeatherAura, true);
at.SetDuration(0);
}
}
}
}
[Script] // 26169 - Oracle Healing Bonus
class spell_pri_aq_3p_bonus : AuraScript
{
@@ -213,8 +278,7 @@ namespace Scripts.Spells.Priest
}
}
// 64844 - Divine Hymn
[Script]
[Script] // 64844 - Divine Hymn
class spell_pri_divine_hymn : SpellScript
{
void FilterTargets(List<WorldObject> targets)
@@ -243,8 +307,7 @@ namespace Scripts.Spells.Priest
}
}
// 47788 - Guardian Spirit
[Script]
[Script] // 47788 - Guardian Spirit
class spell_pri_guardian_spirit : AuraScript
{
uint healPct;
@@ -368,8 +431,7 @@ namespace Scripts.Spells.Priest
}
}
// 92833 - Leap of Faith
[Script]
[Script] // 92833 - Leap of Faith
class spell_pri_leap_of_faith_effect_trigger : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
@@ -582,7 +644,7 @@ namespace Scripts.Spells.Priest
}
}
[Script] // 17 - Power Word: Shield
[Script] // 17 - Power Word: Shield Aura
class spell_pri_power_word_shield_aura : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
@@ -1090,8 +1152,7 @@ namespace Scripts.Spells.Priest
}
}
// 15290 - Vampiric Embrace (heal)
[Script]
[Script] // 15290 - Vampiric Embrace (heal)
class spell_pri_vampiric_embrace_target : SpellScript
{
void FilterTargets(List<WorldObject> unitList)
@@ -1105,8 +1166,7 @@ namespace Scripts.Spells.Priest
}
}
// 34914 - Vampiric Touch
[Script]
[Script] // 34914 - Vampiric Touch
class spell_pri_vampiric_touch : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
@@ -1152,69 +1212,4 @@ namespace Scripts.Spells.Priest
OnEffectProc.Add(new EffectProcHandler(HandleEffectProc, 2, AuraType.Dummy));
}
}
[Script] // 121536 - Angelic Feather talent
class spell_pri_angelic_feather_trigger : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.AngelicFeatherAreatrigger);
}
void HandleEffectDummy(uint effIndex)
{
Position destPos = GetHitDest().GetPosition();
float radius = GetEffectInfo().CalcRadius();
// Caster is prioritary
if (GetCaster().IsWithinDist2d(destPos, radius))
{
GetCaster().CastSpell(GetCaster(), SpellIds.AngelicFeatherAura, true);
}
else
{
CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
args.CastDifficulty = GetCastDifficulty();
GetCaster().CastSpell(destPos, SpellIds.AngelicFeatherAreatrigger, args);
}
}
public override void Register()
{
OnEffectHit.Add(new EffectHandler(HandleEffectDummy, 0, SpellEffectName.Dummy));
}
}
[Script] // Angelic Feather areatrigger - created by SPELL_PRIEST_ANGELIC_FEATHER_AREATRIGGER
class areatrigger_pri_angelic_feather : AreaTriggerAI
{
public areatrigger_pri_angelic_feather(AreaTrigger areatrigger) : base(areatrigger) { }
// Called when the AreaTrigger has just been initialized, just before added to map
public override void OnInitialize()
{
Unit caster = at.GetCaster();
if (caster)
{
List<AreaTrigger> areaTriggers = caster.GetAreaTriggers(SpellIds.AngelicFeatherAreatrigger);
if (areaTriggers.Count >= 3)
areaTriggers.First().SetDuration(0);
}
}
public override void OnUnitEnter(Unit unit)
{
Unit caster = at.GetCaster();
if (caster)
{
if (caster.IsFriendlyTo(unit))
{
// If target already has aura, increase duration to max 130% of initial duration
caster.CastSpell(unit, SpellIds.AngelicFeatherAura, true);
at.SetDuration(0);
}
}
}
}
}
@@ -0,0 +1,100 @@
-- Selina Dourman
UPDATE `creature_template` SET `AIName`='', `ScriptName`='npc_selina_dourman' WHERE `entry`=10445;
UPDATE `gossip_menu_option` SET `VerifiedBuild`=44127 WHERE `MenuID`=13076;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=13075;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=13113;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14,13075,18362,0,0,22,1,974,0,0,1,0,0,'','Show gossip text 18362 if creature is not located in Darkmoon Faire'),
(14,13075,18372,0,0,22,1,974,0,0,0,0,0,'','Show gossip text 18372 if creature is located in Darkmoon Faire'),
(15,13113,0,0,0,2,0,71634,1,1,1,0,0,'','Show gossip option if player does not have has Darkmoon Adventurer''s Guide'),
(15,13113,0,0,0,47,0,7905,64,0,0,0,0,'','Show gossip option if quest 7905 is rewarded'),
(15,13113,0,0,1,2,0,71634,1,1,1,0,0,'','Show gossip option if player does not have has Darkmoon Adventurer''s Guide'),
(15,13113,0,0,1,47,0,7926,64,0,0,0,0,'','Show gossip option if quest 7926 is rewarded');
DELETE FROM `creature_text` WHERE `CreatureID`=10445;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `SoundPlayType`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(10445, 0, 0, 'Welcome to the Darkmoon Faire, $c!', 12, 0, 100, 70, 0, 0, 0, 53804, 0, 'Selina Dourman - Welcome Random text'),
(10445, 0, 1, 'Welcome to the Darkmoon Faire!', 12, 0, 100, 70, 0, 0, 0, 53805, 0, 'Selina Dourman - Welcome Random text'),
(10445, 0, 2, 'Welcome!', 12, 0, 100, 70, 0, 0, 0, 53806, 0, 'Selina Dourman - Welcome Random text'),
(10445, 0, 3, 'Greetings!', 12, 0, 100, 70, 0, 0, 0, 53808, 0, 'Selina Dourman - Welcome Random text');
DELETE FROM `smart_scripts` WHERE `entryorguid`=10445;
DELETE FROM `areatrigger_scripts` WHERE `entry`=7016;
INSERT INTO `areatrigger_scripts` VALUES
(7016, 'at_darkmoon_faire_entrance');
DELETE FROM `points_of_interest` WHERE `ID` BETWEEN 10463 AND 10468;
DELETE FROM `points_of_interest` WHERE `ID` BETWEEN 2716 AND 2721;
INSERT INTO `points_of_interest` (`ID`, `PositionX`, `PositionY`, `PositionZ`, `Icon`, `Flags`, `Importance`, `Name`, `Unknown905`, `VerifiedBuild`) VALUES
(2716, -3998.494873046875, 6280.140625, 13.06377983093261718, 7, 99, 0, 'AAA Whack-a-Gnoll', 0, 44127),
(2717, -4018.01904296875, 6292.56103515625, 13.03492259979248046, 7, 99, 0, 'AAA Cannon', 0, 44127),
(2718, -4076.423583984375, 6351.39599609375, 13.00009632110595703, 7, 99, 0, 'AAA Shooting Gallery', 0, 44127),
(2719, -4128.34033203125, 6324.9287109375, 13.11676025390625, 7, 99, 0, 'AAA Tonk Arena', 0, 44127),
(2720, -4263.24853515625, 6281.23095703125, 13.11678886413574218, 7, 99, 0, 'AAA Fortune Teller', 0, 44127),
(2721, -4290.15625, 6308.5537109375, 13.11675357818603515, 7, 99, 0, 'AAA Ring Toss', 0, 44127);
DELETE FROM `points_of_interest_locale` WHERE `ID` BETWEEN 2716 AND 2721;
INSERT INTO `points_of_interest_locale` (`ID`, `locale`, `Name`, `VerifiedBuild`) VALUES
(2716, 'deDE', 'Hau-den-Gnoll', 44127),
(2716, 'esES', 'AAA Whack-a-Gnoll', 44127),
(2716, 'esMX', 'AAA Whack-a-Gnoll', 44127),
(2716, 'frFR', 'AAA Cogne-Gnoll', 44127),
(2716, 'itIT', 'AAA Pesta-lo-Gnoll', 44127),
(2716, 'koKR', 'AAA ', 44127),
(2716, 'ptBR', 'AAA Pancada-no-Gnoll', 44127),
(2716, 'ruRU', 'ААА Гноллобой', 44127),
(2716, 'zhCN', '3A级打豺狼人', 44127),
(2716, 'zhTW', 'AAA痛扁豺狼人', 44127),
(2717, 'deDE', 'Kanone', 44127),
(2717, 'esES', 'AAA Cannon', 44127),
(2717, 'esMX', 'AAA Cannon', 44127),
(2717, 'frFR', 'AAA Canon', 44127),
(2717, 'itIT', 'AAA Cannone', 44127),
(2717, 'koKR', 'AAA ', 44127),
(2717, 'ptBR', 'AAA Canhão', 44127),
(2717, 'ruRU', 'ААА Пушка', 44127),
(2717, 'zhCN', '3A级暗月大炮', 44127),
(2717, 'zhTW', 'AAA火砲', 44127),
(2718, 'deDE', 'Schießbude', 44127),
(2718, 'esES', 'AAA Shooting Gallery', 44127),
(2718, 'esMX', 'AAA Shooting Gallery', 44127),
(2718, 'frFR', 'AAA Stand de tir', 44127),
(2718, 'itIT', 'AAA Tiro a Segno', 44127),
(2718, 'koKR', 'AAA ', 44127),
(2718, 'ptBR', 'AAA Galeria de Tiro', 44127),
(2718, 'ruRU', 'ААА Тир', 44127),
(2718, 'zhCN', '3A级射击场', 44127),
(2718, 'zhTW', 'AAA打靶場', 44127),
(2719, 'deDE', 'Panzerarena', 44127),
(2719, 'esES', 'AAA Tonk Arena', 44127),
(2719, 'esMX', 'AAA Tonk Arena', 44127),
(2719, 'frFR', 'AAA Arène à chariottes', 44127),
(2719, 'itIT', 'AAA Arena dei Carri Giocattoli', 44127),
(2719, 'koKR', 'AAA ', 44127),
(2719, 'ptBR', 'AAA Arena de Tonques', 44127),
(2719, 'ruRU', 'ААА Танковая арена', 44127),
(2719, 'zhCN', '3A级蒸汽坦克竞技场', 44127),
(2719, 'zhTW', 'AAA坦克競技場', 44127),
(2720, 'deDE', 'Wahrsager', 44127),
(2720, 'esES', 'AAA Fortune Teller', 44127),
(2720, 'esMX', 'AAA Fortune Teller', 44127),
(2720, 'frFR', 'AAA Diseuse de bonne aventure', 44127),
(2720, 'itIT', 'AAA Indovina', 44127),
(2720, 'koKR', 'AAA ', 44127),
(2720, 'ptBR', 'AAA Cartomante', 44127),
(2720, 'ruRU', 'ААА Предсказание судьбы', 44127),
(2720, 'zhCN', '3A级占卜师', 44127),
(2720, 'zhTW', 'AAA占卜師', 44127),
(2721, 'deDE', 'Ringwurf', 44127),
(2721, 'esES', 'AAA Ring Toss', 44127),
(2721, 'esMX', 'AAA Ring Toss', 44127),
(2721, 'frFR', 'AAA Lancer d\anneaux', 44127),
(2721, 'itIT', 'AAA Lancio degli Anelli', 44127),
(2721, 'koKR', 'AAA ', 44127),
(2721, 'ptBR', 'AAA Arremesso de Argolas', 44127),
(2721, 'ruRU', 'ААА Метание колец', 44127),
(2721, 'zhCN', '3A级套圈圈', 44127),
(2721, 'zhTW', 'AAA丟圈圈', 44127);