mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/Quest): improve Path of Conquest (#16353)
* fix(DB/Quest): improve Path of Conquest * update * Update rev_1684800494817311100.sql * . * .
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_calling_korkron_or_wildhammer';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(38249, 'spell_calling_korkron_or_wildhammer'),
|
||||||
|
(38119, 'spell_calling_korkron_or_wildhammer');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_korkron_or_wildhammer' WHERE `entry` IN (22059, 21998);
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `speed_run` = 2.28571 WHERE `entry` IN (22059, 21998);
|
||||||
|
|
||||||
|
SET @NPC_WILDHAMMER_GRYPHON_RIDER := 22059;
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_WILDHAMMER_GRYPHON_RIDER;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||||
|
(@NPC_WILDHAMMER_GRYPHON_RIDER, 0, 0, 'What is it, $r? Have you gathered some new information?', 12, 0, 100, 0, 0, 0, 19742, 0, 'SAY_LAND');
|
||||||
|
|
||||||
|
SET @NPC_KORKRON_WIND_RIDER := 21998;
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID`=@NPC_KORKRON_WIND_RIDER;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||||
|
(@NPC_KORKRON_WIND_RIDER, 0, 0, 'Speak quickly, $n. We haven\'t much time!', 12, 0, 100, 0, 0, 0, 19675, 0, 'SAY_LAND');
|
||||||
@@ -1734,6 +1734,71 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum KorWild
|
||||||
|
{
|
||||||
|
SAY_LAND = 0,
|
||||||
|
POINT_LAND = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_korkron_or_wildhammer : public ScriptedAI
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_korkron_or_wildhammer(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
creature->SetDisableGravity(true);
|
||||||
|
creature->SetHover(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
me->SetReactState(REACT_PASSIVE);
|
||||||
|
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustDied(Unit* /*killer*/) override
|
||||||
|
{
|
||||||
|
me->DespawnOrUnsummon(3s, 0s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsSummonedBy(WorldObject* summoner) override
|
||||||
|
{
|
||||||
|
_playerGUID = summoner->GetGUID();
|
||||||
|
me->SetFacingToObject(summoner);
|
||||||
|
Position pos = summoner->GetPosition();
|
||||||
|
me->GetMotionMaster()->MovePoint(POINT_LAND, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MovementInform(uint32 type, uint32 id) override
|
||||||
|
{
|
||||||
|
if (type == POINT_MOTION_TYPE && id == POINT_LAND)
|
||||||
|
{
|
||||||
|
if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
|
||||||
|
Talk(SAY_LAND, player);
|
||||||
|
|
||||||
|
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
ObjectGuid _playerGUID;
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_calling_korkron_or_wildhammer : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_calling_korkron_or_wildhammer);
|
||||||
|
|
||||||
|
void SetDest(SpellDestination& dest)
|
||||||
|
{
|
||||||
|
// Adjust effect summon position
|
||||||
|
Position const offset = { -14.0f, -14.0f, 16.0f, 0.0f };
|
||||||
|
dest.RelocateOffset(offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_calling_korkron_or_wildhammer::SetDest, EFFECT_0, TARGET_DEST_CASTER);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_shadowmoon_valley()
|
void AddSC_shadowmoon_valley()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -1755,4 +1820,6 @@ void AddSC_shadowmoon_valley()
|
|||||||
new npc_torloth_the_magnificent();
|
new npc_torloth_the_magnificent();
|
||||||
new npc_enraged_spirit();
|
new npc_enraged_spirit();
|
||||||
new npc_shadowmoon_tuber_node();
|
new npc_shadowmoon_tuber_node();
|
||||||
|
RegisterCreatureAI(npc_korkron_or_wildhammer);
|
||||||
|
RegisterSpellScript(spell_calling_korkron_or_wildhammer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user