mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
fix(Scripts/MagisterTerrace): Rescript Kael's intro (#21278)
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |134217728 WHERE `entry` IN (24698, 24684, 24697, 24696, 24683, 24686);
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96841) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96841, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Coilskar Witch - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96781) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96781, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Sunblade Blood Knight - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96809) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96809, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Sunblade Warlock - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96770) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96770, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Sunblade Mage Guard - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96850) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96850, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Ethereum Smuggler - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -96847) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `event_param6`, `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
|
||||||
|
(-96847, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 205, 3, 1, 0, 0, 0, 0, 0, 0, 'Sister of Torment - On Just Died - Felblood Kaeltas Do Action ID 0');
|
||||||
@@ -67,10 +67,7 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_felblood_kaelthas : public BossAI
|
struct boss_felblood_kaelthas : public BossAI
|
||||||
{
|
{
|
||||||
boss_felblood_kaelthas(Creature* creature) : BossAI(creature, DATA_KAELTHAS)
|
boss_felblood_kaelthas(Creature* creature) : BossAI(creature, DATA_KAELTHAS) { }
|
||||||
{
|
|
||||||
_hasDoneIntro = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -78,7 +75,6 @@ struct boss_felblood_kaelthas : public BossAI
|
|||||||
_OOCScheduler.CancelAll();
|
_OOCScheduler.CancelAll();
|
||||||
_gravityLapseCounter = 0;
|
_gravityLapseCounter = 0;
|
||||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false);
|
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false);
|
||||||
me->SetImmuneToAll(false);
|
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(50, [&]{
|
ScheduleHealthCheckEvent(50, [&]{
|
||||||
me->CastStop();
|
me->CastStop();
|
||||||
@@ -125,12 +121,6 @@ struct boss_felblood_kaelthas : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeAI() override
|
|
||||||
{
|
|
||||||
BossAI::InitializeAI();
|
|
||||||
me->SetImmuneToAll(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
{
|
{
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
@@ -161,20 +151,31 @@ struct boss_felblood_kaelthas : public BossAI
|
|||||||
}, 50s);
|
}, 50s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void DoAction(int32 actionId) override
|
||||||
{
|
{
|
||||||
if (!_hasDoneIntro && me->IsWithinDistInMap(who, 40.0f) && who->IsPlayer())
|
if (actionId == DATA_KAEL_INTRO)
|
||||||
{
|
{
|
||||||
Talk(SAY_AGGRO);
|
uint32 counter = instance->GetPersistentData(DATA_KAEL_INTRO);
|
||||||
Talk(SAY_AGGRO_2, 20s);
|
instance->StorePersistentData(DATA_KAEL_INTRO, ++counter);
|
||||||
_hasDoneIntro = true;
|
|
||||||
_OOCScheduler.Schedule(35s, [this](TaskContext){
|
if (counter == 6 && !me->IsInCombat())
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
{
|
||||||
me->SetImmuneToAll(false);
|
me->SetEmoteState(EMOTE_STATE_TALK);
|
||||||
me->SetInCombatWithZone();
|
Talk(SAY_AGGRO);
|
||||||
});
|
|
||||||
|
me->m_Events.AddEventAtOffset([&] {
|
||||||
|
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH_NO_SHEATHE);
|
||||||
|
}, 15s);
|
||||||
|
|
||||||
|
Talk(SAY_AGGRO_2, 20s);
|
||||||
|
me->SetImmuneToAll(true);
|
||||||
|
_OOCScheduler.Schedule(35s, [this](TaskContext) {
|
||||||
|
me->ClearEmoteState();
|
||||||
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
me->SetImmuneToAll(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BossAI::MoveInLineOfSight(who);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
|
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
|
||||||
@@ -229,7 +230,6 @@ struct boss_felblood_kaelthas : public BossAI
|
|||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
TaskScheduler _OOCScheduler;
|
TaskScheduler _OOCScheduler;
|
||||||
bool _hasDoneIntro;
|
|
||||||
uint8 _gravityLapseCounter;
|
uint8 _gravityLapseCounter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public:
|
|||||||
{
|
{
|
||||||
SetHeaders(DataHeader);
|
SetHeaders(DataHeader);
|
||||||
SetBossNumber(MAX_ENCOUNTER);
|
SetBossNumber(MAX_ENCOUNTER);
|
||||||
|
SetPersistentDataCount(MAX_PERSISTENT_DATA);
|
||||||
LoadObjectData(creatureData, gameobjectData);
|
LoadObjectData(creatureData, gameobjectData);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
LoadSummonData(summonerData);
|
LoadSummonData(summonerData);
|
||||||
|
|||||||
@@ -32,7 +32,11 @@ enum MTData
|
|||||||
MAX_ENCOUNTER = 4,
|
MAX_ENCOUNTER = 4,
|
||||||
|
|
||||||
DATA_KALECGOS = 5,
|
DATA_KALECGOS = 5,
|
||||||
DATA_ESCAPE_ORB = 6
|
DATA_ESCAPE_ORB = 6,
|
||||||
|
|
||||||
|
// Persistent data
|
||||||
|
DATA_KAEL_INTRO = 0,
|
||||||
|
MAX_PERSISTENT_DATA = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MTCreatures
|
enum MTCreatures
|
||||||
|
|||||||
Reference in New Issue
Block a user