mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Scripts/HowlingFjord): Fix Falcon vs Hawk quest credit being gran… (#22778)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 44407);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(17, 0, 44407, 0, 0, 31, 1, 3, 24747, 0, 0, 0, 0, '', 'Hawk Hunting must target Fjord Hawk');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 24747;
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24747) AND (`source_type` = 0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_hawk_hunting';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(44407, 'spell_hawk_hunting');
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
class npc_attracted_reef_bull : public CreatureScript
|
||||
{
|
||||
@@ -393,6 +394,36 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum HawkHunting
|
||||
{
|
||||
SPELL_HAWK_HUNTING_ITEM = 44408
|
||||
};
|
||||
|
||||
// 44407 - Spell hawk Hunting
|
||||
class spell_hawk_hunting : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hawk_hunting);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_HAWK_HUNTING_ITEM });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (!GetCaster())
|
||||
return;
|
||||
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_HAWK_HUNTING_ITEM, true);
|
||||
GetHitUnit()->ToCreature()->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_hawk_hunting::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_howling_fjord()
|
||||
{
|
||||
new npc_attracted_reef_bull();
|
||||
@@ -400,4 +431,5 @@ void AddSC_howling_fjord()
|
||||
new npc_apothecary_hanes();
|
||||
new npc_plaguehound_tracker();
|
||||
new npc_razael_and_lyana();
|
||||
RegisterSpellScript(spell_hawk_hunting);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user