Professional Documents
Culture Documents
Boss Drakos
Boss Drakos
Boss Drakos
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright
information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "oculus.h"
enum Spells
{
SPELL_MAGIC_PULL = 51336,
SPELL_THUNDERING_STOMP_N = 50774,
SPELL_THUNDERING_STOMP_H = 59370,
SPELL_UNSTABLE_SPHERE_PASSIVE = 50756,
SPELL_UNSTABLE_SPHERE_PULSE = 50757,
SPELL_UNSTABLE_SPHERE_TIMER = 50758,
SPELL_TELEPORT_VISUAL = 52096,
};
enum DrakosNPCs
{
NPC_UNSTABLE_SPHERE = 28166,
};
enum Events
{
EVENT_MAGIC_PULL = 1,
EVENT_THUNDERING_STOMP = 2,
EVENT_SUMMON = 3,
EVENT_SUMMON_x4 = 4,
};
enum Yells
{
SAY_AGGRO = 0,
SAY_KILL = 1,
SAY_DEATH = 2,
SAY_PULL = 3,
SAY_STOMP = 4
};
class boss_drakos : public CreatureScript
{
public:
boss_drakos() : CreatureScript("boss_drakos") { }
InstanceScript* pInstance;
EventMap events;
events.Reset();
}
if (pInstance)
pInstance->SetData(DATA_DRAKOS, IN_PROGRESS);
me->SetInCombatWithZone();
if (pInstance)
{
pInstance->SetData(DATA_DRAKOS, DONE);
for( uint8 i = 0; i < 3; ++i )
if( ObjectGuid guid = pInstance->GetGuidData(DATA_DCD_1 + i) )
if( GameObject* pGo = ObjectAccessor::GetGameObject(*me,
guid) )
if( pGo->GetGoState() != GO_STATE_ACTIVE )
{
pGo->SetLootState(GO_READY);
pGo->UseDoorOrButton(0, false);
}
}
}
events.Update(diff);
if( me->HasUnitState(UNIT_STATE_CASTING) )
return;
DoMeleeAttackIfReady();
switch( events.ExecuteEvent() )
{
case 0:
break;
case EVENT_MAGIC_PULL:
{
Talk(SAY_PULL);
//me->TextEmote(TEXT_MAGIC_PULL, nullptr, true);
break;
}
}
};
};
uint32 timer;
bool located, gonext;
void PickNewLocation()
{
float dist = rand_norm() * 40.0f;
float angle = rand_norm() * 2 * M_PI;
me->GetMotionMaster()->MovePoint(1, 961.29f + dist * cos(angle),
1049.0f + dist * std::sin(angle), 360.0f);
}
if( !located )
gonext = true;
}
PickNewLocation();
}
void AttackStart(Unit* /*who*/) override {}
void MoveInLineOfSight(Unit* /*who*/) override {}
timer += diff;
void AddSC_boss_drakos()
{
new boss_drakos();
new npc_oculus_unstable_sphere();
}