Big re-organization of repository [W.I.P]

This commit is contained in:
Yehonal
2016-08-11 20:25:27 +02:00
parent c62a72c0a8
commit 0f85ce1c54
3016 changed files with 1271 additions and 1 deletions

View File

@@ -1,182 +0,0 @@
/*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells
{
SPELL_CHARGE = 22911,
SPELL_CLEAVE = 40504,
SPELL_DEMORALIZING_SHOUT = 23511,
SPELL_ENRAGE = 8599,
SPELL_WHIRLWIND = 13736,
SPELL_NORTH_MARSHAL = 45828,
SPELL_SOUTH_MARSHAL = 45829,
SPELL_STONEHEARTH_MARSHAL = 45830,
SPELL_ICEWING_MARSHAL = 45831,
SPELL_ICEBLOOD_WARMASTER = 45822,
SPELL_TOWER_POINT_WARMASTER = 45823,
SPELL_WEST_FROSTWOLF_WARMASTER = 45824,
SPELL_EAST_FROSTWOLF_WARMASTER = 45826
};
enum Creatures
{
NPC_NORTH_MARSHAL = 14762,
NPC_SOUTH_MARSHAL = 14763,
NPC_ICEWING_MARSHAL = 14764,
NPC_STONEHEARTH_MARSHAL = 14765,
NPC_EAST_FROSTWOLF_WARMASTER = 14772,
NPC_ICEBLOOD_WARMASTER = 14773,
NPC_TOWER_POINT_WARMASTER = 14776,
NPC_WEST_FROSTWOLF_WARMASTER = 14777
};
enum Events
{
EVENT_CHARGE_TARGET = 1,
EVENT_CLEAVE = 2,
EVENT_DEMORALIZING_SHOUT = 3,
EVENT_WHIRLWIND = 4,
EVENT_ENRAGE = 5,
EVENT_CHECK_RESET = 6
};
struct SpellPair
{
uint32 npcEntry;
uint32 spellId;
};
uint8 const MAX_SPELL_PAIRS = 8;
SpellPair const _auraPairs[MAX_SPELL_PAIRS] =
{
{ NPC_NORTH_MARSHAL, SPELL_NORTH_MARSHAL },
{ NPC_SOUTH_MARSHAL, SPELL_SOUTH_MARSHAL },
{ NPC_STONEHEARTH_MARSHAL, SPELL_STONEHEARTH_MARSHAL },
{ NPC_ICEWING_MARSHAL, SPELL_ICEWING_MARSHAL },
{ NPC_EAST_FROSTWOLF_WARMASTER, SPELL_EAST_FROSTWOLF_WARMASTER },
{ NPC_WEST_FROSTWOLF_WARMASTER, SPELL_WEST_FROSTWOLF_WARMASTER },
{ NPC_TOWER_POINT_WARMASTER, SPELL_TOWER_POINT_WARMASTER },
{ NPC_ICEBLOOD_WARMASTER, SPELL_ICEBLOOD_WARMASTER }
};
class npc_av_marshal_or_warmaster : public CreatureScript
{
public:
npc_av_marshal_or_warmaster() : CreatureScript("npc_av_marshal_or_warmaster") { }
struct npc_av_marshal_or_warmasterAI : public ScriptedAI
{
npc_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
events.Reset();
events.ScheduleEvent(EVENT_CHARGE_TARGET, urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_CLEAVE, urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, 2000);
events.ScheduleEvent(EVENT_WHIRLWIND, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_ENRAGE, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
_hasAura = false;
}
void JustRespawned()
{
Reset();
}
void UpdateAI(uint32 diff)
{
// I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up.
if (!_hasAura)
{
for (uint8 i = 0; i < MAX_SPELL_PAIRS; ++i)
if (_auraPairs[i].npcEntry == me->GetEntry())
DoCast(me, _auraPairs[i].spellId);
_hasAura = true;
}
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_CHARGE_TARGET:
DoCastVictim(SPELL_CHARGE);
events.ScheduleEvent(EVENT_CHARGE, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS));
break;
case EVENT_DEMORALIZING_SHOUT:
DoCast(me, SPELL_DEMORALIZING_SHOUT);
events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
break;
case EVENT_WHIRLWIND:
DoCast(me, SPELL_WHIRLWIND);
events.ScheduleEvent(EVENT_WHIRLWIND, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE);
events.ScheduleEvent(EVENT_ENRAGE, urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS));
break;
case EVENT_CHECK_RESET:
{
Position const& _homePosition = me->GetHomePosition();
if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f)
{
EnterEvadeMode();
return;
}
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
break;
}
}
}
DoMeleeAttackIfReady();
}
private:
EventMap events;
bool _hasAura;
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_av_marshal_or_warmasterAI(creature);
}
};
void AddSC_alterac_valley()
{
new npc_av_marshal_or_warmaster();
}

View File

@@ -1,210 +0,0 @@
/*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells
{
SPELL_ARCANE_EXPLOSION = 46608,
SPELL_CONE_OF_COLD = 38384,
SPELL_FIREBALL = 46988,
SPELL_FROSTBOLT = 46987
};
enum Yells
{
YELL_AGGRO = 0,
YELL_EVADE = 1,
YELL_SALVATION = 2,
};
enum Creatures
{
NPC_WATER_ELEMENTAL = 25040
};
enum WaterElementalSpells
{
SPELL_WATERBOLT = 46983
};
class npc_water_elemental : public CreatureScript
{
public:
npc_water_elemental() : CreatureScript("npc_water_elemental") { }
struct npc_water_elementalAI : public ScriptedAI
{
npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
uint32 waterBoltTimer;
uint64 balindaGUID;
uint32 resetTimer;
void Reset()
{
waterBoltTimer = 3 * IN_MILLISECONDS;
resetTimer = 5 * IN_MILLISECONDS;
balindaGUID = 0;
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (waterBoltTimer < diff)
{
DoCastVictim(SPELL_WATERBOLT);
waterBoltTimer = 5 * IN_MILLISECONDS;
} else waterBoltTimer -= diff;
// check if creature is not outside of building
if (resetTimer < diff)
{
if (Creature* pBalinda = ObjectAccessor::GetCreature(*me, balindaGUID))
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
resetTimer = 5 * IN_MILLISECONDS;
} else resetTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_water_elementalAI(creature);
}
};
class boss_balinda : public CreatureScript
{
public:
boss_balinda() : CreatureScript("boss_balinda") { }
struct boss_balindaAI : public ScriptedAI
{
boss_balindaAI(Creature* creature) : ScriptedAI(creature), summons(me) { }
uint32 arcaneExplosionTimer;
uint32 coneOfColdTimer;
uint32 fireBoltTimer;
uint32 frostboltTimer;
uint32 resetTimer;
uint32 waterElementalTimer;
SummonList summons;
void Reset()
{
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
coneOfColdTimer = 8 * IN_MILLISECONDS;
fireBoltTimer = 1 * IN_MILLISECONDS;
frostboltTimer = 4 * IN_MILLISECONDS;
resetTimer = 5 * IN_MILLISECONDS;
waterElementalTimer = 0;
summons.DespawnAll();
}
void EnterCombat(Unit* /*who*/)
{
Talk(YELL_AGGRO);
}
void JustRespawned()
{
Reset();
}
void JustSummoned(Creature* summoned)
{
CAST_AI(npc_water_elemental::npc_water_elementalAI, summoned->AI())->balindaGUID = me->GetGUID();
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
summoned->setFaction(me->getFaction());
summons.Summon(summoned);
}
void JustDied(Unit* /*killer*/)
{
summons.DespawnAll();
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (waterElementalTimer < diff)
{
if (summons.empty())
me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45 * IN_MILLISECONDS);
waterElementalTimer = 50 * IN_MILLISECONDS;
} else waterElementalTimer -= diff;
if (arcaneExplosionTimer < diff)
{
DoCastVictim(SPELL_ARCANE_EXPLOSION);
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else arcaneExplosionTimer -= diff;
if (coneOfColdTimer < diff)
{
DoCastVictim(SPELL_CONE_OF_COLD);
coneOfColdTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else coneOfColdTimer -= diff;
if (fireBoltTimer < diff)
{
DoCastVictim(SPELL_FIREBALL);
fireBoltTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
} else fireBoltTimer -= diff;
if (frostboltTimer < diff)
{
DoCastVictim(SPELL_FROSTBOLT);
frostboltTimer = urand(4 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
} else frostboltTimer -= diff;
// check if creature is not outside of building
if (resetTimer < diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
Talk(YELL_EVADE);
}
resetTimer = 5 * IN_MILLISECONDS;
} else resetTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_balindaAI(creature);
}
};
void AddSC_boss_balinda()
{
new boss_balinda;
new npc_water_elemental;
};

View File

@@ -1,137 +0,0 @@
/*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells
{
SPELL_WHIRLWIND = 15589,
SPELL_WHIRLWIND2 = 13736,
SPELL_KNOCKDOWN = 19128,
SPELL_FRENZY = 8269,
SPELL_SWEEPING_STRIKES = 18765, // not sure
SPELL_CLEAVE = 20677, // not sure
SPELL_WINDFURY = 35886, // not sure
SPELL_STORMPIKE = 51876 // not sure
};
enum Yells
{
YELL_AGGRO = 0,
YELL_EVADE = 1,
YELL_RESPAWN = 2,
YELL_RANDOM = 3
};
class boss_drekthar : public CreatureScript
{
public:
boss_drekthar() : CreatureScript("boss_drekthar") { }
struct boss_drektharAI : public ScriptedAI
{
boss_drektharAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WhirlwindTimer;
uint32 Whirlwind2Timer;
uint32 KnockdownTimer;
uint32 FrenzyTimer;
uint32 YellTimer;
uint32 ResetTimer;
void Reset()
{
WhirlwindTimer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
Whirlwind2Timer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
KnockdownTimer = 12 * IN_MILLISECONDS;
FrenzyTimer = 6 * IN_MILLISECONDS;
ResetTimer = 5 * IN_MILLISECONDS;
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
}
void EnterCombat(Unit* /*who*/)
{
Talk(YELL_AGGRO);
}
void JustRespawned()
{
Reset();
Talk(YELL_RESPAWN);
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (WhirlwindTimer <= diff)
{
DoCastVictim(SPELL_WHIRLWIND);
WhirlwindTimer = urand(8 * IN_MILLISECONDS, 18 * IN_MILLISECONDS);
} else WhirlwindTimer -= diff;
if (Whirlwind2Timer <= diff)
{
DoCastVictim(SPELL_WHIRLWIND2);
Whirlwind2Timer = urand(7 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else Whirlwind2Timer -= diff;
if (KnockdownTimer <= diff)
{
DoCastVictim(SPELL_KNOCKDOWN);
KnockdownTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else KnockdownTimer -= diff;
if (FrenzyTimer <= diff)
{
DoCastVictim(SPELL_FRENZY);
FrenzyTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else FrenzyTimer -= diff;
if (YellTimer <= diff)
{
Talk(YELL_RANDOM);
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
} else YellTimer -= diff;
// check if creature is not outside of building
if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
Talk(YELL_EVADE);
}
ResetTimer = 5 * IN_MILLISECONDS;
} else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_drektharAI(creature);
}
};
void AddSC_boss_drekthar()
{
new boss_drekthar;
}

View File

@@ -1,131 +0,0 @@
/*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells
{
SPELL_CLEAVE = 15284,
SPELL_FRIGHTENING_SHOUT = 19134,
SPELL_WHIRLWIND1 = 15589,
SPELL_WHIRLWIND2 = 13736,
SPELL_MORTAL_STRIKE = 16856
};
enum Yells
{
YELL_AGGRO = 0,
YELL_EVADE = 1
};
class boss_galvangar : public CreatureScript
{
public:
boss_galvangar() : CreatureScript("boss_galvangar") { }
struct boss_galvangarAI : public ScriptedAI
{
boss_galvangarAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CleaveTimer;
uint32 FrighteningShoutTimer;
uint32 Whirlwind1Timer;
uint32 Whirlwind2Timer;
uint32 MortalStrikeTimer;
uint32 ResetTimer;
void Reset()
{
CleaveTimer = urand(1 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
FrighteningShoutTimer = urand(2 * IN_MILLISECONDS, 19 * IN_MILLISECONDS);
Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 13 * IN_MILLISECONDS);
Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
MortalStrikeTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
ResetTimer = 5 * IN_MILLISECONDS;
}
void EnterCombat(Unit* /*who*/)
{
Talk(YELL_AGGRO);
}
void JustRespawned()
{
Reset();
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (CleaveTimer <= diff)
{
DoCastVictim(SPELL_CLEAVE);
CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
} else CleaveTimer -= diff;
if (FrighteningShoutTimer <= diff)
{
DoCastVictim(SPELL_FRIGHTENING_SHOUT);
FrighteningShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else FrighteningShoutTimer -= diff;
if (Whirlwind1Timer <= diff)
{
DoCastVictim(SPELL_WHIRLWIND1);
Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 10 * IN_MILLISECONDS);
} else Whirlwind1Timer -= diff;
if (Whirlwind2Timer <= diff)
{
DoCastVictim(SPELL_WHIRLWIND2);
Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else Whirlwind2Timer -= diff;
if (MortalStrikeTimer <= diff)
{
DoCastVictim(SPELL_MORTAL_STRIKE);
MortalStrikeTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else MortalStrikeTimer -= diff;
// check if creature is not outside of building
if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
Talk(YELL_EVADE);
}
ResetTimer = 5 * IN_MILLISECONDS;
} else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_galvangarAI(creature);
}
};
void AddSC_boss_galvangar()
{
new boss_galvangar;
}

View File

@@ -1,120 +0,0 @@
/*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 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 "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Yells
{
YELL_AGGRO = 0,
YELL_EVADE = 1,
//YELL_RESPAWN1 = -1810010, // Missing in database
//YELL_RESPAWN2 = -1810011, // Missing in database
YELL_RANDOM = 2,
YELL_SPELL = 3,
};
enum Spells
{
SPELL_AVATAR = 19135,
SPELL_THUNDERCLAP = 15588,
SPELL_STORMBOLT = 20685 // not sure
};
class boss_vanndar : public CreatureScript
{
public:
boss_vanndar() : CreatureScript("boss_vanndar") { }
struct boss_vanndarAI : public ScriptedAI
{
boss_vanndarAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AvatarTimer;
uint32 ThunderclapTimer;
uint32 StormboltTimer;
uint32 ResetTimer;
uint32 YellTimer;
void Reset()
{
AvatarTimer = 3 * IN_MILLISECONDS;
ThunderclapTimer = 4 * IN_MILLISECONDS;
StormboltTimer = 6 * IN_MILLISECONDS;
ResetTimer = 5 * IN_MILLISECONDS;
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
}
void EnterCombat(Unit* /*who*/)
{
Talk(YELL_AGGRO);
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (AvatarTimer <= diff)
{
DoCastVictim(SPELL_AVATAR);
AvatarTimer = urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else AvatarTimer -= diff;
if (ThunderclapTimer <= diff)
{
DoCastVictim(SPELL_THUNDERCLAP);
ThunderclapTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else ThunderclapTimer -= diff;
if (StormboltTimer <= diff)
{
DoCastVictim(SPELL_STORMBOLT);
StormboltTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else StormboltTimer -= diff;
if (YellTimer <= diff)
{
Talk(YELL_RANDOM);
YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
} else YellTimer -= diff;
// check if creature is not outside of building
if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
Talk(YELL_EVADE);
}
ResetTimer = 5 * IN_MILLISECONDS;
} else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_vanndarAI(creature);
}
};
void AddSC_boss_vanndar()
{
new boss_vanndar;
}