Scripts/Transitus Shield: Warmages (#24082)

* Scripts/Transitus Shield: Warmage

* Scripts/Transitus Shield: SQL fix

* Scripts/Transitus Shield: improve SQL

* Rename 9999_99_99_99_world.sql to 2020_01_19_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Sorikoff
2020-01-19 17:35:28 +02:00
committed by Giacomo Pozzoni
parent b9353be089
commit f20b147c71
2 changed files with 6 additions and 114 deletions

View File

@@ -0,0 +1,6 @@
UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry` IN (27306,27906,27173,27904);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (27906,27173,27904) 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
(27906,0,0,0,25,0,100,0,0,0,0,0,0,11,48310,0,0,0,0,0,10,123746,27306,0,0,0,0,0,0,'Warmage Hollister - On Reset - Cast \'Transitus Shield Beam\''),
(27173,0,0,0,25,0,100,0,0,0,0,0,0,11,48310,0,0,0,0,0,10,123745,27306,0,0,0,0,0,0,'Warmage Calandra - On Reset - Cast \'Transitus Shield Beam\''),
(27904,0,0,0,25,0,100,0,0,0,0,0,0,11,48310,0,0,0,0,0,10,123744,27306,0,0,0,0,0,0,'Warmage Watkins - On Reset - Cast \'Transitus Shield Beam\'');

View File

@@ -2043,119 +2043,6 @@ public:
}
};
/*******************************************************
* npc_warmage_coldarra
*******************************************************/
enum Spells
{
SPELL_TRANSITUS_SHIELD_BEAM = 48310
};
enum NPCs
{
NPC_TRANSITUS_SHIELD_DUMMY = 27306,
NPC_WARMAGE_HOLLISTER = 27906,
NPC_WARMAGE_CALANDRA = 27173,
NPC_WARMAGE_WATKINS = 27904
};
class npc_warmage_coldarra : public CreatureScript
{
public:
npc_warmage_coldarra() : CreatureScript("npc_warmage_coldarra") { }
struct npc_warmage_coldarraAI : public ScriptedAI
{
npc_warmage_coldarraAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
}
void Initialize()
{
m_uiTimer = 0;
}
uint32 m_uiTimer; //Timer until recast
void Reset() override
{
Initialize();
}
void JustEngagedWith(Unit* /*who*/) override { }
void AttackStart(Unit* /*who*/) override { }
void UpdateAI(uint32 uiDiff) override
{
if (m_uiTimer <= uiDiff)
{
std::list<Creature*> orbList;
GetCreatureListWithEntryInGrid(orbList, me, NPC_TRANSITUS_SHIELD_DUMMY, 32.0f);
switch (me->GetEntry())
{
case NPC_WARMAGE_HOLLISTER:
{
if (!orbList.empty())
{
for (std::list<Creature*>::const_iterator itr = orbList.begin(); itr != orbList.end(); ++itr)
{
if (Creature* pOrb = *itr)
if (pOrb->GetPositionY() > 6680)
DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM);
}
}
m_uiTimer = urand(90000, 120000);
}
break;
case NPC_WARMAGE_CALANDRA:
{
if (!orbList.empty())
{
for (std::list<Creature*>::const_iterator itr = orbList.begin(); itr != orbList.end(); ++itr)
{
if (Creature* pOrb = *itr)
if ((pOrb->GetPositionY() < 6680) && (pOrb->GetPositionY() > 6630))
DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM);
}
}
m_uiTimer = urand(90000, 120000);
}
break;
case NPC_WARMAGE_WATKINS:
{
if (!orbList.empty())
{
for (std::list<Creature*>::const_iterator itr = orbList.begin(); itr != orbList.end(); ++itr)
{
if (Creature* pOrb = *itr)
if (pOrb->GetPositionY() < 6630)
DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM);
}
}
m_uiTimer = urand(90000, 120000);
}
break;
}
}
else m_uiTimer -= uiDiff;
ScriptedAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_warmage_coldarraAI(creature);
}
};
/*######
## npc_hidden_cultist
######*/
@@ -2604,7 +2491,6 @@ void AddSC_borean_tundra()
new npc_bonker_togglevolt();
new npc_trapped_mammoth_calf();
new npc_valiance_keep_cannoneer();
new npc_warmage_coldarra();
new npc_hidden_cultist();
new spell_windsoul_totem_aura();
new spell_q11719_bloodspore_ruination_45997();