mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(DB/Core): Mother Smolderweb (#1886)
* moved cpp script to SAI for boss "Mother Smolderweb" * add "Summon Spire Spiderlings" on death
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1558797300881954502');
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 10596;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 10596 AND `source_type` = 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`, `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
|
||||
(10596,0,0,0,0,0,100,2,10000,10000,5000,12500,0,11,16468,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Mother Smolderweb - In Combat - Cast ''Mother''s Milk'''),
|
||||
(10596,0,1,0,0,0,100,2,20000,20000,15000,15000,0,11,16104,0,0,0,0,0,2,0,0,0,0,0,0,0,0,'Mother Smolderweb - In Combat - Cast ''Crystallize'''),
|
||||
(10596,0,2,0,6,0,100,2,0,0,0,0,0,11,16103,3,0,0,0,0,1,0,0,0,0,0,0,0,0,'Mother Smolderweb - On Death - Cast ''Summon Spire Spiderling''');
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "blackrock_spire.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CRYSTALIZE = 16104,
|
||||
SPELL_MOTHERSMILK = 16468,
|
||||
SPELL_SUMMON_SPIRE_SPIDERLING = 16103,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_CRYSTALIZE = 1,
|
||||
EVENT_MOTHERS_MILK = 2,
|
||||
};
|
||||
|
||||
class boss_mother_smolderweb : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_mother_smolderweb() : CreatureScript("boss_mother_smolderweb") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_mothersmolderwebAI(creature);
|
||||
}
|
||||
|
||||
struct boss_mothersmolderwebAI : public BossAI
|
||||
{
|
||||
boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (me->GetHealth() <= damage)
|
||||
DoCast(me, SPELL_SUMMON_SPIRE_SPIDERLING, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CRYSTALIZE:
|
||||
DoCast(me, SPELL_CRYSTALIZE);
|
||||
events.ScheduleEvent(EVENT_CRYSTALIZE, 15 * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_MOTHERS_MILK:
|
||||
DoCast(me, SPELL_MOTHERSMILK);
|
||||
events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5 * IN_MILLISECONDS, 12500));
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_mothersmolderweb()
|
||||
{
|
||||
new boss_mother_smolderweb();
|
||||
}
|
||||
@@ -43,7 +43,6 @@ set(scripts_STAT_SRCS
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
|
||||
${AC_SCRIPTS_DIR}/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
|
||||
|
||||
@@ -108,7 +108,6 @@ void AddSC_instance_blackrock_depths();
|
||||
void AddSC_boss_drakkisath(); //Blackrock Spire
|
||||
void AddSC_boss_halycon();
|
||||
void AddSC_boss_highlordomokk();
|
||||
void AddSC_boss_mothersmolderweb();
|
||||
void AddSC_boss_overlordwyrmthalak();
|
||||
void AddSC_boss_shadowvosh();
|
||||
void AddSC_boss_thebeast();
|
||||
@@ -698,7 +697,6 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_boss_drakkisath(); //Blackrock Spire
|
||||
AddSC_boss_halycon();
|
||||
AddSC_boss_highlordomokk();
|
||||
AddSC_boss_mothersmolderweb();
|
||||
AddSC_boss_overlordwyrmthalak();
|
||||
AddSC_boss_shadowvosh();
|
||||
AddSC_boss_thebeast();
|
||||
|
||||
Reference in New Issue
Block a user