mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 08:46:09 +00:00
fix(DB/Creature): Gizrul the Slavener (#7414)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1629238721796812800');
|
||||
|
||||
-- Set the waypoint to the NPC
|
||||
UPDATE `creature_template_addon` SET `path_id` = 402450 WHERE (`entry` = 10268);
|
||||
|
||||
-- Remove C++ script, add SAI and Waypoint based movement
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `MovementType` = 2, `ScriptName` = '' WHERE (`entry` = 10268);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10268);
|
||||
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(10268, 0, 0, 0, 0, 0, 100, 0, 17000, 20000, 8000, 10000, 0, 11, 16495, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gizrul the Slavener - In Combat - Cast \'Fatal Bite\''),
|
||||
(10268, 0, 1, 0, 0, 0, 100, 0, 10000, 12000, 8000, 10000, 0, 11, 16128, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gizrul the Slavener - In Combat - Cast \'Infected Bite\''),
|
||||
(10268, 0, 2, 0, 2, 0, 100, 1, 0, 40, 300, 300, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gizrul the Slavener - Between 0-40% Health - Cast \'Frenzy\' (No Repeat)');
|
||||
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "blackrock_spire.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FATAL_BITE = 16495,
|
||||
SPELL_INFECTED_BITE = 16128,
|
||||
SPELL_FRENZY = 8269
|
||||
};
|
||||
|
||||
enum Paths
|
||||
{
|
||||
GIZRUL_PATH = 402450
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_FATAL_BITE = 1,
|
||||
EVENT_INFECTED_BITE = 2,
|
||||
EVENT_FRENZY = 3
|
||||
};
|
||||
|
||||
class boss_gizrul_the_slavener : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_gizrul_the_slavener() : CreatureScript("boss_gizrul_the_slavener") { }
|
||||
|
||||
struct boss_gizrul_the_slavenerAI : public BossAI
|
||||
{
|
||||
boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(GIZRUL_PATH, false);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000, 20000));
|
||||
events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000, 12000));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FATAL_BITE:
|
||||
DoCastVictim(SPELL_FATAL_BITE);
|
||||
events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000, 10000));
|
||||
break;
|
||||
case EVENT_INFECTED_BITE:
|
||||
DoCast(me, SPELL_INFECTED_BITE);
|
||||
events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000, 10000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetBlackrockSpireAI<boss_gizrul_the_slavenerAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_gizrul_the_slavener()
|
||||
{
|
||||
new boss_gizrul_the_slavener();
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
|
||||
Talk(EMOTE_DEATH);
|
||||
|
||||
Summoned = true;
|
||||
|
||||
@@ -32,7 +32,6 @@ void AddSC_boss_pyroguard_emberseer();
|
||||
void AddSC_boss_gyth();
|
||||
void AddSC_boss_rend_blackhand();
|
||||
void AddSC_boss_urok_doomhowl();
|
||||
void AddSC_boss_gizrul_the_slavener();
|
||||
void AddSC_instance_blackrock_spire();
|
||||
void AddSC_boss_razorgore(); //Blackwing lair
|
||||
void AddSC_boss_vaelastrasz();
|
||||
@@ -168,7 +167,6 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_boss_gyth();
|
||||
AddSC_boss_rend_blackhand();
|
||||
AddSC_boss_urok_doomhowl();
|
||||
AddSC_boss_gizrul_the_slavener();
|
||||
AddSC_instance_blackrock_spire();
|
||||
AddSC_boss_razorgore(); //Blackwing lair
|
||||
AddSC_boss_vaelastrasz();
|
||||
|
||||
Reference in New Issue
Block a user