Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts

This commit is contained in:
Spp-
2011-06-30 14:24:56 +02:00
parent d12bb4a657
commit 6fd41ae50e
372 changed files with 1974 additions and 1968 deletions
+10 -10
View File
@@ -12,21 +12,22 @@ set(scripts_STAT_SRCS
${scripts_STAT_SRCS}
Commands/cs_account.cpp
Commands/cs_achievement.cpp
Commands/cs_debug.cpp
Commands/cs_event.cpp
Commands/cs_gm.cpp
Commands/cs_npc.cpp
Commands/cs_go.cpp
Commands/cs_gobject.cpp
Commands/cs_gps.cpp
Commands/cs_honor.cpp
Commands/cs_learn.cpp
Commands/cs_modify.cpp
Commands/cs_debug.cpp
Commands/cs_tele.cpp
# Commands/cs_character.cpp
Commands/cs_event.cpp
Commands/cs_gobject.cpp
Commands/cs_honor.cpp
Commands/cs_wp.cpp
Commands/cs_titles.cpp
Commands/cs_npc.cpp
Commands/cs_quest.cpp
Commands/cs_reload.cpp
Commands/cs_tele.cpp
Commands/cs_titles.cpp
Commands/cs_wp.cpp
# Commands/cs_character.cpp
# Commands/cs_list.cpp
# Commands/cs_lookup.cpp
# Commands/cs_pdump.cpp
@@ -54,7 +55,6 @@ set(scripts_STAT_SRCS
# Commands/cs_die.cpp
# Commands/cs_revive.cpp
# Commands/cs_dismount.cpp
Commands/cs_gps.cpp
# Commands/cs_guid.cpp
# Commands/cs_help.cpp
# Commands/cs_itemmove.cpp
+13 -13
View File
@@ -249,7 +249,7 @@ public:
static bool HandleDebugSendOpcodeCommand(ChatHandler* handler, const char* /*args*/)
{
Unit *unit = handler->getSelectedUnit();
Unit* unit = handler->getSelectedUnit();
Player* player = NULL;
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
player = handler->GetSession()->GetPlayer();
@@ -320,7 +320,7 @@ public:
}
else if (type == "appgoguid")
{
GameObject *obj = handler->GetNearbyGameObject();
GameObject* obj = handler->GetNearbyGameObject();
if (!obj)
{
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
@@ -332,7 +332,7 @@ public:
}
else if (type == "goguid")
{
GameObject *obj = handler->GetNearbyGameObject();
GameObject* obj = handler->GetNearbyGameObject();
if (!obj)
{
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
@@ -489,7 +489,7 @@ public:
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
continue;
if (Item *item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
if (Bag* bag = item->ToBag())
{
@@ -509,7 +509,7 @@ public:
std::vector<Item *> &updateQueue = player->GetItemUpdateQueue();
for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item *item = updateQueue[i];
Item* item = updateQueue[i];
if (!item) continue;
Bag *container = item->GetContainer();
@@ -539,7 +539,7 @@ public:
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
continue;
Item *item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (!item) continue;
if (item->GetSlot() != i)
@@ -651,7 +651,7 @@ public:
for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item *item = updateQueue[i];
Item* item = updateQueue[i];
if (!item) continue;
if (item->GetOwnerGUID() != player->GetGUID())
@@ -667,7 +667,7 @@ public:
}
if (item->GetState() == ITEM_REMOVED) continue;
Item *test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
if (test == NULL)
{
@@ -784,7 +784,7 @@ public:
handler->GetSession()->GetPlayer()->EnterVehicle(target, seatId);
else
{
Creature *passenger = NULL;
Creature* passenger = NULL;
Trinity::AllCreaturesOfEntryInRange check(handler->GetSession()->GetPlayer(), entry, 20.0f);
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(handler->GetSession()->GetPlayer(), passenger, check);
handler->GetSession()->GetPlayer()->VisitNearbyObject(30.0f, searcher);
@@ -828,7 +828,7 @@ public:
if (!ve)
return false;
Creature *v = new Creature;
Creature* v = new Creature;
Map *map = handler->GetSession()->GetPlayer()->GetMap();
@@ -877,7 +877,7 @@ public:
uint32 guid = (uint32)atoi(e);
uint32 index = (uint32)atoi(f);
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
if (!i)
return false;
@@ -908,7 +908,7 @@ public:
uint32 index = (uint32)atoi(f);
uint32 value = (uint32)atoi(g);
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
if (!i)
return false;
@@ -932,7 +932,7 @@ public:
uint32 guid = (uint32)atoi(e);
Item *i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
if (!i)
return false;
+1 -1
View File
@@ -89,7 +89,7 @@ public:
if (!*args)
return false;
Player *target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
target = handler->GetSession()->GetPlayer();
+4 -4
View File
@@ -139,7 +139,7 @@ public:
return false;
}
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
float x = float(chr->GetPositionX());
float y = float(chr->GetPositionY());
float z = float(chr->GetPositionZ());
@@ -190,7 +190,7 @@ public:
if (!charID)
return false;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
char* spawntime = strtok(NULL, " ");
uint32 spawntm = 300;
@@ -411,7 +411,7 @@ public:
}
else
{
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
o = chr->GetOrientation();
}
@@ -459,7 +459,7 @@ public:
if (!px)
{
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
obj->DestroyForNearbyPlayers();
obj->UpdateObjectVisibility();
+2 -2
View File
@@ -57,7 +57,7 @@ public:
if (!*args)
return false;
Player *target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
@@ -92,7 +92,7 @@ public:
}
static bool HandleHonorUpdateCommand(ChatHandler* handler, const char* /*args*/)
{
Player *target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
+6 -6
View File
@@ -440,7 +440,7 @@ public:
}
else if (target->ToCreature()->isPet())
{
Unit *owner = target->GetOwner();
Unit* owner = target->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)target)->IsPermanentPetFor(owner->ToPlayer()))
{
// check online security
@@ -698,15 +698,15 @@ public:
return false;
}
if (target->GetTypeId()==TYPEID_PLAYER)
if (Player* plr = target->ToPlayer())
{
// check online security
if (handler->HasLowerSecurity((Player*)target, 0))
if (handler->HasLowerSecurity(plr, 0))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink((Player*)target).c_str());
if (handler->needReportToTarget((Player*)target))
(ChatHandler((Player*)target)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(plr).c_str());
if (handler->needReportToTarget(plr))
(ChatHandler(plr)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
}
target->SetFloatValue(OBJECT_FIELD_SCALE_X, Scale);
+11 -11
View File
@@ -119,7 +119,7 @@ public:
uint32 id = atoi(charID);
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
float x = chr->GetPositionX();
float y = chr->GetPositionY();
float z = chr->GetPositionZ();
@@ -495,7 +495,7 @@ public:
static bool HandleNpcFollowCommand(ChatHandler* handler, const char* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
Creature *creature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
@@ -667,7 +667,7 @@ public:
uint32 displayId = (uint32) atoi((char*)args);
Creature *pCreature = handler->getSelectedCreature();
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature || pCreature->isPet())
{
@@ -878,7 +878,7 @@ public:
if (option >0.0f)
mtype = RANDOM_MOTION_TYPE;
Creature *pCreature = handler->getSelectedCreature();
Creature* pCreature = handler->getSelectedCreature();
uint32 u_guidlow = 0;
if (pCreature)
@@ -920,7 +920,7 @@ public:
return false;
}
Creature *pCreature = handler->getSelectedCreature();
Creature* pCreature = handler->getSelectedCreature();
uint32 u_guidlow = 0;
if (pCreature)
@@ -986,7 +986,7 @@ public:
static bool HandleNpcUnFollowCommand(ChatHandler* handler, const char* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
Creature *creature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
@@ -1078,7 +1078,7 @@ public:
if (!charID)
return false;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
uint32 id = atoi(charID);
if (!id)
@@ -1092,7 +1092,7 @@ public:
//npc tame handling
static bool HandleNpcTameCommand(ChatHandler* handler, const char* /*args*/)
{
Creature *creatureTarget = handler->getSelectedCreature ();
Creature* creatureTarget = handler->getSelectedCreature ();
if (!creatureTarget || creatureTarget->isPet ())
{
handler->PSendSysMessage (LANG_SELECT_CREATURE);
@@ -1162,7 +1162,7 @@ public:
return false;
uint32 leaderGUID = (uint32) atoi((char*)args);
Creature *pCreature = handler->getSelectedCreature();
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature || !pCreature->GetDBTableGUIDLow())
{
@@ -1181,7 +1181,7 @@ public:
if (!lowguid)
return false;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
FormationInfo *group_member;
group_member = new FormationInfo;
@@ -1248,7 +1248,7 @@ public:
return true;
}
Creature *pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
Creature* pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
if (!pCreature)
{
+1 -1
View File
@@ -228,7 +228,7 @@ public:
for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pl = itr->getSource();
Player* pl = itr->getSource();
if (!pl || !pl->GetSession())
continue;
+1 -1
View File
@@ -210,7 +210,7 @@ public:
sscanf((char*)args, UI64FMTD, &titles);
Player *target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
{
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
+4 -4
View File
@@ -569,7 +569,7 @@ public:
{
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff%u|r", pathid);
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
Map *map = chr->GetMap();
{
// wpCreature
@@ -776,7 +776,7 @@ public:
uint32 id = VISUAL_WAYPOINT;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
Map *map = chr->GetMap();
float o = chr->GetOrientation();
@@ -827,7 +827,7 @@ public:
float z = fields[2].GetFloat();
uint32 id = VISUAL_WAYPOINT;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
float o = chr->GetOrientation();
Map *map = chr->GetMap();
@@ -875,7 +875,7 @@ public:
float z = fields[2].GetFloat();
uint32 id = VISUAL_WAYPOINT;
Player *chr = handler->GetSession()->GetPlayer();
Player* chr = handler->GetSession()->GetPlayer();
float o = chr->GetOrientation();
Map *map = chr->GetMap();
@@ -58,7 +58,7 @@ class mob_av_marshal_or_warmaster : public CreatureScript
struct mob_av_marshal_or_warmasterAI : public ScriptedAI
{
mob_av_marshal_or_warmasterAI(Creature *c) : ScriptedAI(c) {}
mob_av_marshal_or_warmasterAI(Creature* c) : ScriptedAI(c) {}
uint32 uiChargeTimer;
uint32 uiCleaveTimer;
@@ -48,7 +48,7 @@ public:
struct mob_water_elementalAI : public ScriptedAI
{
mob_water_elementalAI(Creature *c) : ScriptedAI(c) {}
mob_water_elementalAI(Creature* c) : ScriptedAI(c) {}
uint32 uiWaterBoltTimer;
uint64 uiBalindaGUID;
@@ -74,7 +74,7 @@ public:
// check if creature is not outside of building
if (uiResetTimer < diff)
{
if (Creature *pBalinda = Unit::GetCreature(*me, uiBalindaGUID))
if (Creature* pBalinda = Unit::GetCreature(*me, uiBalindaGUID))
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
uiResetTimer = 5*IN_MILLISECONDS;
@@ -84,7 +84,7 @@ public:
}
};
CreatureAI *GetAI(Creature *creature) const
CreatureAI *GetAI(Creature* creature) const
{
return new mob_water_elementalAI(creature);
}
@@ -97,7 +97,7 @@ public:
struct boss_balindaAI : public ScriptedAI
{
boss_balindaAI(Creature *c) : ScriptedAI(c), Summons(me) {}
boss_balindaAI(Creature* c) : ScriptedAI(c), Summons(me) {}
uint32 uiArcaneExplosionTimer;
uint32 uiConeOfColdTimer;
@@ -194,7 +194,7 @@ public:
}
};
CreatureAI *GetAI(Creature *creature) const
CreatureAI *GetAI(Creature* creature) const
{
return new boss_balindaAI(creature);
}
@@ -48,7 +48,7 @@ public:
struct boss_drektharAI : public ScriptedAI
{
boss_drektharAI(Creature *c) : ScriptedAI(c) {}
boss_drektharAI(Creature* c) : ScriptedAI(c) {}
uint32 uiWhirlwindTimer;
uint32 uiWhirlwind2Timer;
@@ -128,7 +128,7 @@ public:
}
};
CreatureAI *GetAI(Creature *creature) const
CreatureAI *GetAI(Creature* creature) const
{
return new boss_drektharAI(creature);
}
@@ -39,7 +39,7 @@ public:
struct boss_galvangarAI : public ScriptedAI
{
boss_galvangarAI(Creature *c) : ScriptedAI(c) {}
boss_galvangarAI(Creature* c) : ScriptedAI(c) {}
uint32 uiCleaveTimer;
uint32 uiFrighteningShoutTimer;
@@ -118,7 +118,7 @@ public:
}
};
CreatureAI *GetAI(Creature *creature) const
CreatureAI *GetAI(Creature* creature) const
{
return new boss_galvangarAI(creature);
}
@@ -46,7 +46,7 @@ public:
struct boss_vanndarAI : public ScriptedAI
{
boss_vanndarAI(Creature *c) : ScriptedAI(c) {}
boss_vanndarAI(Creature* c) : ScriptedAI(c) {}
uint32 uiAvatarTimer;
uint32 uiThunderclapTimer;
@@ -118,7 +118,7 @@ public:
}
};
CreatureAI *GetAI(Creature *creature) const
CreatureAI *GetAI(Creature* creature) const
{
return new boss_vanndarAI(creature);
}
@@ -150,7 +150,7 @@ public:
struct npc_grimstoneAI : public npc_escortAI
{
npc_grimstoneAI(Creature *c) : npc_escortAI(c)
npc_grimstoneAI(Creature* c) : npc_escortAI(c)
{
pInstance = c->GetInstanceScript();
MobSpawnId = rand()%6;
@@ -263,7 +263,7 @@ public:
if (RingBossGUID)
{
Creature *boss = Unit::GetCreature(*me, RingBossGUID);
Creature* boss = Unit::GetCreature(*me, RingBossGUID);
if (boss && !boss->isAlive() && boss->isDead())
{
RingBossGUID = 0;
@@ -276,7 +276,7 @@ public:
for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
{
Creature *mob = Unit::GetCreature(*me, RingMobGUID[i]);
Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]);
if (mob && !mob->isAlive() && mob->isDead())
{
RingMobGUID[i] = 0;
@@ -391,7 +391,7 @@ public:
struct mob_phalanxAI : public ScriptedAI
{
mob_phalanxAI(Creature *c) : ScriptedAI(c) {}
mob_phalanxAI(Creature* c) : ScriptedAI(c) {}
uint32 ThunderClap_Timer;
uint32 FireballVolley_Timer;
@@ -658,7 +658,7 @@ public:
struct npc_dughal_stormwingAI : public npc_escortAI
{
npc_dughal_stormwingAI(Creature *c) : npc_escortAI(c) {}
npc_dughal_stormwingAI(Creature* c) : npc_escortAI(c) {}
void WaypointReached(uint32 i)
{
@@ -778,7 +778,7 @@ public:
struct npc_marshal_windsorAI : public npc_escortAI
{
npc_marshal_windsorAI(Creature *c) : npc_escortAI(c)
npc_marshal_windsorAI(Creature* c) : npc_escortAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -840,7 +840,7 @@ public:
void Reset() {}
void JustDied(Unit *slayer)
void JustDied(Unit* slayer)
{
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
}
@@ -952,7 +952,7 @@ public:
struct npc_marshal_reginald_windsorAI : public npc_escortAI
{
npc_marshal_reginald_windsorAI(Creature *c) : npc_escortAI(c)
npc_marshal_reginald_windsorAI(Creature* c) : npc_escortAI(c)
{
}
@@ -1014,7 +1014,7 @@ public:
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -1044,7 +1044,7 @@ public:
}
void Reset() {}
void JustDied(Unit *slayer)
void JustDied(Unit* slayer)
{
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
}
@@ -1148,7 +1148,7 @@ public:
struct npc_tobias_seecherAI : public npc_escortAI
{
npc_tobias_seecherAI(Creature *c) :npc_escortAI(c) {}
npc_tobias_seecherAI(Creature* c) :npc_escortAI(c) {}
void EnterCombat(Unit* who) {}
void Reset() {}
@@ -1263,7 +1263,7 @@ public:
struct npc_rocknotAI : public npc_escortAI
{
npc_rocknotAI(Creature *c) : npc_escortAI(c)
npc_rocknotAI(Creature* c) : npc_escortAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -1337,7 +1337,7 @@ public:
DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future
//spell by trap has effect61, this indicate the bar go hostile
if (Unit *tmp = Unit::GetUnit(*me, pInstance->GetData64(DATA_PHALANX)))
if (Unit* tmp = Unit::GetUnit(*me, pInstance->GetData64(DATA_PHALANX)))
tmp->setFaction(14);
//for later, this event(s) has alot more to it.
@@ -42,7 +42,7 @@ public:
struct boss_ambassador_flamelashAI : public ScriptedAI
{
boss_ambassador_flamelashAI(Creature *c) : ScriptedAI(c) {}
boss_ambassador_flamelashAI(Creature* c) : ScriptedAI(c) {}
uint32 FireBlast_Timer;
uint32 Spirit_Timer;
@@ -57,7 +57,7 @@ public:
void SummonSpirits(Unit* victim)
{
if (Creature *Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
if (Creature* Spirit = DoSpawnCreature(9178, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
Spirit->AI()->AttackStart(victim);
}
@@ -46,7 +46,7 @@ public:
struct boss_anubshiahAI : public ScriptedAI
{
boss_anubshiahAI(Creature *c) : ScriptedAI(c) {}
boss_anubshiahAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowBolt_Timer;
uint32 CurseOfTongues_Timer;
@@ -83,7 +83,7 @@ public:
//CurseOfTongues_Timer
if (CurseOfTongues_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_CURSEOFTONGUES);
CurseOfTongues_Timer = 18000;
} else CurseOfTongues_Timer -= diff;
@@ -105,7 +105,7 @@ public:
//EnvelopingWeb_Timer
if (EnvelopingWeb_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_ENVELOPINGWEB);
EnvelopingWeb_Timer = 12000;
} else EnvelopingWeb_Timer -= diff;
@@ -49,7 +49,7 @@ public:
struct boss_draganthaurissanAI : public ScriptedAI
{
boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {}
boss_draganthaurissanAI(Creature* c) : ScriptedAI(c) {}
uint32 HandOfThaurissan_Timer;
uint32 AvatarOfFlame_Timer;
@@ -81,7 +81,7 @@ public:
if (HandOfThaurissan_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_HANDOFTHAURISSAN);
//3 Hands of Thaurissan will be casted
@@ -44,7 +44,7 @@ public:
struct boss_general_angerforgeAI : public ScriptedAI
{
boss_general_angerforgeAI(Creature *c) : ScriptedAI(c) {}
boss_general_angerforgeAI(Creature* c) : ScriptedAI(c) {}
uint32 MightyBlow_Timer;
uint32 HamString_Timer;
@@ -67,13 +67,13 @@ public:
void SummonAdds(Unit* victim)
{
if (Creature *SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
SummonedAdd->AI()->AttackStart(victim);
}
void SummonMedics(Unit* victim)
{
if (Creature *SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
SummonedMedic->AI()->AttackStart(victim);
}
@@ -43,7 +43,7 @@ public:
struct boss_gorosh_the_dervishAI : public ScriptedAI
{
boss_gorosh_the_dervishAI(Creature *c) : ScriptedAI(c) {}
boss_gorosh_the_dervishAI(Creature* c) : ScriptedAI(c) {}
uint32 WhirlWind_Timer;
uint32 MortalStrike_Timer;
@@ -43,7 +43,7 @@ public:
struct boss_grizzleAI : public ScriptedAI
{
boss_grizzleAI(Creature *c) : ScriptedAI(c) {}
boss_grizzleAI(Creature* c) : ScriptedAI(c) {}
uint32 GroundTremor_Timer;
uint32 Frenzy_Timer;
@@ -45,7 +45,7 @@ public:
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
{
boss_high_interrogator_gerstahnAI(Creature *c) : ScriptedAI(c) {}
boss_high_interrogator_gerstahnAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowWordPain_Timer;
uint32 ManaBurn_Timer;
@@ -73,7 +73,7 @@ public:
//ShadowWordPain_Timer
if (ShadowWordPain_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_SHADOWWORDPAIN);
ShadowWordPain_Timer = 7000;
} else ShadowWordPain_Timer -= diff;
@@ -81,7 +81,7 @@ public:
//ManaBurn_Timer
if (ManaBurn_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_MANABURN);
ManaBurn_Timer = 10000;
} else ManaBurn_Timer -= diff;
@@ -48,7 +48,7 @@ public:
struct boss_magmusAI : public ScriptedAI
{
boss_magmusAI(Creature *c) : ScriptedAI(c) {}
boss_magmusAI(Creature* c) : ScriptedAI(c) {}
uint32 FieryBurst_Timer;
uint32 WarStomp_Timer;
@@ -89,7 +89,7 @@ public:
DoMeleeAttackIfReady();
}
// When he die open door to last chamber
void JustDied(Unit *who)
void JustDied(Unit* who)
{
if (InstanceScript* pInstance = who->GetInstanceScript())
pInstance->HandleGameObject(pInstance->GetData64(DATA_THRONE_DOOR), true);
@@ -47,7 +47,7 @@ public:
struct boss_moira_bronzebeardAI : public ScriptedAI
{
boss_moira_bronzebeardAI(Creature *c) : ScriptedAI(c) {}
boss_moira_bronzebeardAI(Creature* c) : ScriptedAI(c) {}
uint32 Heal_Timer;
uint32 MindBlast_Timer;
@@ -150,7 +150,7 @@ public:
struct boss_doomrelAI : public ScriptedAI
{
boss_doomrelAI(Creature *c) : ScriptedAI(c)
boss_doomrelAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -222,7 +222,7 @@ public:
//Immolate_Timer
if (Immolate_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_IMMOLATE);
Immolate_Timer = 25000;
@@ -378,7 +378,7 @@ public:
{
boss->setFaction(FACTION_HOSTILE);
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
if (Unit *pTarget = boss->SelectNearestTarget(500))
if (Unit* pTarget = boss->SelectNearestTarget(500))
boss->AI()->AttackStart(pTarget);
}
}
@@ -86,7 +86,7 @@ public:
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45*IN_MILLISECONDS);
break;
case EVENT_HEX:
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_HEX);
events.ScheduleEvent(EVENT_HEX, 15*IN_MILLISECONDS);
break;
@@ -45,7 +45,7 @@ public:
struct boss_broodlordAI : public ScriptedAI
{
boss_broodlordAI(Creature *c) : ScriptedAI(c) {}
boss_broodlordAI(Creature* c) : ScriptedAI(c) {}
uint32 Cleave_Timer;
uint32 BlastWave_Timer;
@@ -71,7 +71,7 @@ public:
struct boss_chromaggusAI : public ScriptedAI
{
boss_chromaggusAI(Creature *c) : ScriptedAI(c)
boss_chromaggusAI(Creature* c) : ScriptedAI(c)
{
//Select the 2 breaths that we are going to use until despawned
//5 possiblities for the first breath, 4 for the second, 20 total possiblites
@@ -42,7 +42,7 @@ public:
struct boss_ebonrocAI : public ScriptedAI
{
boss_ebonrocAI(Creature *c) : ScriptedAI(c) {}
boss_ebonrocAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -41,7 +41,7 @@ public:
struct boss_firemawAI : public ScriptedAI
{
boss_firemawAI(Creature *c) : ScriptedAI(c) {}
boss_firemawAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -43,7 +43,7 @@ public:
struct boss_flamegorAI : public ScriptedAI
{
boss_flamegorAI(Creature *c) : ScriptedAI(c) {}
boss_flamegorAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -72,7 +72,7 @@ public:
struct boss_nefarianAI : public ScriptedAI
{
boss_nefarianAI(Creature *c) : ScriptedAI(c) {}
boss_nefarianAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowFlame_Timer;
uint32 BellowingRoar_Timer;
@@ -49,7 +49,7 @@ public:
struct boss_razorgoreAI : public ScriptedAI
{
boss_razorgoreAI(Creature *c) : ScriptedAI(c) {}
boss_razorgoreAI(Creature* c) : ScriptedAI(c) {}
uint32 Cleave_Timer;
uint32 WarStomp_Timer;
@@ -114,7 +114,7 @@ public:
// Aura Check. If the gamer is affected by confliguration we attack a random gamer.
if (me->getVictim() && me->getVictim()->HasAura(SPELL_CONFLAGRATION))
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
me->TauntApply(pTarget);
DoMeleeAttackIfReady();
@@ -81,7 +81,7 @@ public:
struct boss_vaelAI : public ScriptedAI
{
boss_vaelAI(Creature *c) : ScriptedAI(c)
boss_vaelAI(Creature* c) : ScriptedAI(c)
{
c->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
c->setFaction(35);
@@ -115,7 +115,7 @@ public:
DoingSpeech = false;
}
void BeginSpeech(Unit *pTarget)
void BeginSpeech(Unit* pTarget)
{
//Stand up and begin speach
PlayerGUID = pTarget->GetGUID();
@@ -208,7 +208,7 @@ public:
//BurningAdrenalineCaster_Timer
if (BurningAdrenalineCaster_Timer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
uint8 i = 0;
while (i < 3) // max 3 tries to get a random target with power_mana
@@ -110,7 +110,7 @@ public:
struct boss_victor_nefariusAI : public ScriptedAI
{
boss_victor_nefariusAI(Creature *c) : ScriptedAI(c)
boss_victor_nefariusAI(Creature* c) : ScriptedAI(c)
{
NefarianGUID = 0;
switch (urand(0, 19))
@@ -224,7 +224,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void BeginEvent(Player *pTarget)
void BeginEvent(Player* pTarget)
{
DoScriptText(SAY_GAMESBEGIN_2, me);
@@ -247,7 +247,7 @@ public:
{
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
//We simply use this function to find players until we can use pMap->GetPlayers()
@@ -269,7 +269,7 @@ public:
//ShadowBoltTimer
if (ShadowBoltTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_SHADOWBOLT);
ShadowBoltTimer = urand(3000, 10000);
@@ -278,7 +278,7 @@ public:
//FearTimer
if (FearTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_FEAR);
FearTimer = 10000 + (rand()%10000);
@@ -290,7 +290,7 @@ public:
//Spawn 2 random types of creatures at the 2 locations
uint32 CreatureID;
Creature* Spawned = NULL;
Unit *pTarget = NULL;
Unit* pTarget = NULL;
//1 in 3 chance it will be a chromatic
if (urand(0, 2) == 0)
@@ -174,9 +174,9 @@ public:
{
if (pGo)
{
if (Creature *trigger = pGo->SummonTrigger(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 1))
if (Creature* trigger = pGo->SummonTrigger(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 1))
{
//visual effects are not working! ¬¬
//visual effects are not working!
trigger->CastSpell(trigger, 11542, true);
trigger->CastSpell(trigger, 35470, true);
}
@@ -55,7 +55,7 @@ public:
struct boss_curatorAI : public ScriptedAI
{
boss_curatorAI(Creature *c) : ScriptedAI(c) {}
boss_curatorAI(Creature* c) : ScriptedAI(c) {}
uint32 AddTimer;
uint32 HatefulBoltTimer;
@@ -132,7 +132,7 @@ public:
{
//Summon Astral Flare
Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (AstralFlare && pTarget)
@@ -184,7 +184,7 @@ public:
else
HatefulBoltTimer = 15000;
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
DoCast(pTarget, SPELL_HATEFUL_BOLT);
} else HatefulBoltTimer -= diff;
@@ -51,7 +51,7 @@ public:
struct boss_maiden_of_virtueAI : public ScriptedAI
{
boss_maiden_of_virtueAI(Creature *c) : ScriptedAI(c) {}
boss_maiden_of_virtueAI(Creature* c) : ScriptedAI(c) {}
uint32 Repentance_Timer;
uint32 Holyfire_Timer;
@@ -115,7 +115,7 @@ public:
if (Holyfire_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_HOLYFIRE);
Holyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row!
@@ -123,7 +123,7 @@ public:
if (Holywrath_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_HOLYWRATH);
Holywrath_Timer = urand(20000, 25000); //20-30 secs sounds nice
@@ -58,7 +58,7 @@ public:
struct boss_attumenAI : public ScriptedAI
{
boss_attumenAI(Creature *c) : ScriptedAI(c)
boss_attumenAI(Creature* c) : ScriptedAI(c)
{
Phase = 1;
@@ -92,7 +92,7 @@ public:
void JustDied(Unit* /*victim*/)
{
DoScriptText(SAY_DEATH, me);
if (Unit *pMidnight = Unit::GetUnit(*me, Midnight))
if (Unit* pMidnight = Unit::GetUnit(*me, Midnight))
pMidnight->Kill(pMidnight);
}
@@ -119,7 +119,7 @@ public:
struct boss_midnightAI : public ScriptedAI
{
boss_midnightAI(Creature *c) : ScriptedAI(c) {}
boss_midnightAI(Creature* c) : ScriptedAI(c) {}
uint64 Attumen;
uint8 Phase;
@@ -141,7 +141,7 @@ public:
{
if (Phase == 2)
{
if (Unit *pUnit = Unit::GetUnit(*me, Attumen))
if (Unit* pUnit = Unit::GetUnit(*me, Attumen))
DoScriptText(SAY_MIDNIGHT_KILL, pUnit);
}
}
@@ -164,7 +164,7 @@ public:
}
else if (Phase == 2 && HealthBelowPct(25))
{
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
Mount(pAttumen);
}
else if (Phase == 3)
@@ -176,7 +176,7 @@ public:
Mount_Timer = 0;
me->SetVisible(false);
me->GetMotionMaster()->MoveIdle();
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
{
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -195,7 +195,7 @@ public:
DoMeleeAttackIfReady();
}
void Mount(Unit *pAttumen)
void Mount(Unit* pAttumen)
{
DoScriptText(SAY_MOUNT, pAttumen);
Phase = 3;
@@ -220,7 +220,7 @@ public:
Mount_Timer = 1000;
}
void SetMidnight(Creature *pAttumen, uint64 value)
void SetMidnight(Creature* pAttumen, uint64 value)
{
CAST_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;
}
@@ -235,7 +235,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
if (ResetTimer <= diff)
{
ResetTimer = 0;
Unit *pMidnight = Unit::GetUnit(*me, Midnight);
Unit* pMidnight = Unit::GetUnit(*me, Midnight);
if (pMidnight)
{
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -276,9 +276,9 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
{
if (ChargeTimer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
std::vector<Unit* > target_list;
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
@@ -297,7 +297,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
{
if (HealthBelowPct(25))
{
Creature *pMidnight = Unit::GetCreature(*me, Midnight);
Creature* pMidnight = Unit::GetCreature(*me, Midnight);
if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
{
CAST_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me);
@@ -72,7 +72,7 @@ public:
struct boss_moroesAI : public ScriptedAI
{
boss_moroesAI(Creature *c) : ScriptedAI(c)
boss_moroesAI(Creature* c) : ScriptedAI(c)
{
for (uint8 i = 0; i < 4; ++i)
{
@@ -155,7 +155,7 @@ public:
DeSpawnAdds();
if (isAddlistEmpty())
{
Creature *pCreature = NULL;
Creature* pCreature = NULL;
std::vector<uint32> AddList;
for (uint8 i = 0; i < 6; ++i)
@@ -181,7 +181,7 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
Creature *pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
Creature* pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (pCreature)
{
AddGUID[i] = pCreature->GetGUID();
@@ -302,7 +302,7 @@ public:
{
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
pTarget->CastSpell(pTarget, SPELL_GARROTE, true);
InVanish = false;
@@ -417,7 +417,7 @@ public:
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
{
//Shadow Priest
boss_baroness_dorothea_millstipeAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_baroness_dorothea_millstipeAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 ManaBurn_Timer;
uint32 MindFlay_Timer;
@@ -449,7 +449,7 @@ public:
if (ManaBurn_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (pTarget->getPowerType() == POWER_MANA)
DoCast(pTarget, SPELL_MANABURN);
ManaBurn_Timer = 5000; // 3 sec cast
@@ -457,7 +457,7 @@ public:
if (ShadowWordPain_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoCast(pTarget, SPELL_SWPAIN);
ShadowWordPain_Timer = 7000;
@@ -481,7 +481,7 @@ public:
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
{
//Retr Pally
boss_baron_rafe_dreugerAI(Creature *c) : boss_moroes_guestAI(c){}
boss_baron_rafe_dreugerAI(Creature* c) : boss_moroes_guestAI(c){}
uint32 HammerOfJustice_Timer;
uint32 SealOfCommand_Timer;
@@ -539,7 +539,7 @@ public:
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
{
//Holy Priest
boss_lady_catriona_von_indiAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lady_catriona_von_indiAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 DispelMagic_Timer;
uint32 GreaterHeal_Timer;
@@ -573,7 +573,7 @@ public:
if (GreaterHeal_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_GREATERHEAL);
GreaterHeal_Timer = 17000;
@@ -587,7 +587,7 @@ public:
if (DispelMagic_Timer <= diff)
{
if (Unit *pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
if (Unit* pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
DoCast(pTarget, SPELL_DISPELMAGIC);
DispelMagic_Timer = 25000;
@@ -610,7 +610,7 @@ public:
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
{
//Holy Pally
boss_lady_keira_berrybuckAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lady_keira_berrybuckAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Cleanse_Timer;
uint32 GreaterBless_Timer;
@@ -644,7 +644,7 @@ public:
if (HolyLight_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_HOLYLIGHT);
HolyLight_Timer = 10000;
@@ -652,7 +652,7 @@ public:
if (GreaterBless_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_GREATERBLESSOFMIGHT);
@@ -661,7 +661,7 @@ public:
if (Cleanse_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_CLEANSE);
@@ -685,7 +685,7 @@ public:
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
{
//Arms Warr
boss_lord_robin_darisAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lord_robin_darisAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Hamstring_Timer;
uint32 MortalStrike_Timer;
@@ -742,7 +742,7 @@ public:
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
{
//Arms Warr
boss_lord_crispin_ferenceAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lord_crispin_ferenceAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Disarm_Timer;
uint32 HeroicStrike_Timer;
@@ -63,7 +63,7 @@ class boss_netherspite : public CreatureScript
public:
boss_netherspite() : CreatureScript("boss_netherspite") { }
CreatureAI* GetAI(Creature *pCreature) const
CreatureAI* GetAI(Creature* pCreature) const
{
return new boss_netherspiteAI(pCreature);
}
@@ -141,7 +141,7 @@ public:
pos[BLUE_PORTAL] = (r>1 ? 1: 2); // Blue Portal not on the left side (0)
for (int i=0; i<3; ++i)
if (Creature *portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
PortalGUID[i] = portal->GetGUID();
portal->AddAura(PortalVisual[i], portal);
@@ -152,9 +152,9 @@ public:
{
for (int i=0; i<3; ++i)
{
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[i]))
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[i]))
portal->DisappearAndDie();
if (Creature *portal = Unit::GetCreature(*me, BeamerGUID[i]))
if (Creature* portal = Unit::GetCreature(*me, BeamerGUID[i]))
portal->DisappearAndDie();
PortalGUID[i] = 0;
BeamTarget[i] = 0;
@@ -164,12 +164,12 @@ public:
void UpdatePortals() // Here we handle the beams' behavior
{
for (int j=0; j<3; ++j) // j = color
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[j]))
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[j]))
{
// the one who's been casted upon before
Unit *current = Unit::GetUnit(*portal, BeamTarget[j]);
Unit* current = Unit::GetUnit(*portal, BeamTarget[j]);
// temporary store for the best suitable beam reciever
Unit *pTarget = me;
Unit* pTarget = me;
if (Map* map = me->GetMap())
{
@@ -199,14 +199,14 @@ public:
{
BeamTarget[j] = pTarget->GetGUID();
// remove currently beaming portal
if (Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
if (Creature* beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
beamer->DisappearAndDie();
BeamerGUID[j] = 0;
}
// create new one and start beaming on the target
if (Creature *beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
BeamerGUID[j] = beamer->GetGUID();
@@ -247,7 +247,7 @@ public:
void HandleDoors(bool open) // Massive Door switcher
{
if (GameObject *Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
if (GameObject* Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
@@ -314,7 +314,7 @@ public:
// Netherbreath
if (NetherbreathTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
DoCast(pTarget, SPELL_NETHERBREATH);
NetherbreathTimer = urand(5000, 7000);
} else NetherbreathTimer -= diff;
@@ -177,7 +177,7 @@ public:
HandleTerraceDoors(true);
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!Intro && !Flying)
ScriptedAI::MoveInLineOfSight(who);
@@ -229,7 +229,7 @@ public:
}
}
void JustSummoned(Creature *summoned)
void JustSummoned(Creature* summoned)
{
summoned->AI()->AttackStart(me->getVictim());
}
@@ -321,14 +321,14 @@ public:
if (CharredEarthTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_CHARRED_EARTH);
CharredEarthTimer = 20000;
} else CharredEarthTimer -= diff;
if (TailSweepTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (!me->HasInArc(M_PI, pTarget))
DoCast(pTarget, SPELL_TAIL_SWEEP);
TailSweepTimer = 15000;
@@ -336,7 +336,7 @@ public:
if (SearingCindersTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_SEARING_CINDERS);
SearingCindersTimer = 10000;
} else SearingCindersTimer -= diff;
@@ -378,7 +378,7 @@ public:
if (DistractingAshTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_DISTRACTING_ASH);
DistractingAshTimer = 2000; //timer wrong
} else DistractingAshTimer -= diff;
@@ -395,7 +395,7 @@ public:
if (FireballBarrageTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
DoCast(pTarget, SPELL_FIREBALL_BARRAGE);
FireballBarrageTimer = 20000;
} else FireballBarrageTimer -= diff;
@@ -108,7 +108,7 @@ public:
struct netherspite_infernalAI : public ScriptedAI
{
netherspite_infernalAI(Creature *c) : ScriptedAI(c) ,
netherspite_infernalAI(Creature* c) : ScriptedAI(c) ,
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
uint32 HellfireTimer;
@@ -142,9 +142,9 @@ public:
}
}
void KilledUnit(Unit *who)
void KilledUnit(Unit* who)
{
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
if (pMalchezaar)
CAST_CRE(pMalchezaar)->AI()->KilledUnit(who);
}
@@ -160,7 +160,7 @@ public:
}
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (done_by->GetGUID() != malchezaar)
damage = 0;
@@ -183,7 +183,7 @@ public:
struct boss_malchezaarAI : public ScriptedAI
{
boss_malchezaarAI(Creature *c) : ScriptedAI(c)
boss_malchezaarAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -271,7 +271,7 @@ public:
{
//Infernal Cleanup
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
if (Unit *pInfernal = Unit::GetUnit(*me, *itr))
if (Unit* pInfernal = Unit::GetUnit(*me, *itr))
if (pInfernal->isAlive())
{
pInfernal->SetVisible(false);
@@ -285,7 +285,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
Unit *axe = Unit::GetUnit(*me, axes[i]);
Unit* axe = Unit::GetUnit(*me, axes[i]);
if (axe && axe->isAlive())
axe->Kill(axe);
axes[i] = 0;
@@ -310,7 +310,7 @@ public:
return;
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
std::vector<Unit *> targets;
std::vector<Unit* > targets;
if (!t_list.size())
return;
@@ -319,7 +319,7 @@ public:
std::list<HostileReference *>::const_iterator itr = t_list.begin();
std::advance(itr, 1);
for (; itr != t_list.end(); ++itr) //store the threat list in a different container
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
targets.push_back(pTarget);
@@ -328,8 +328,8 @@ public:
targets.erase(targets.begin()+rand()%targets.size());
uint32 i = 0;
for (std::vector<Unit *>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
if (Unit *pTarget = *iter)
for (std::vector<Unit* >::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
if (Unit* pTarget = *iter)
{
enfeeble_targets[i] = pTarget->GetGUID();
enfeeble_health[i] = pTarget->GetHealth();
@@ -343,7 +343,7 @@ public:
{
for (uint8 i = 0; i < 5; ++i)
{
Unit *pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
Unit* pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
if (pTarget && pTarget->isAlive())
pTarget->SetHealth(enfeeble_health[i]);
enfeeble_targets[i] = 0;
@@ -365,7 +365,7 @@ public:
pos.Relocate(point->x, point->y, INFERNAL_Z);
}
Creature *Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
Creature* Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
if (Infernal)
{
@@ -449,10 +449,10 @@ public:
DoScriptText(SAY_AXE_TOSS2, me);
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
for (uint8 i = 0; i < 2; ++i)
{
Creature *axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
Creature* axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
if (axe)
{
axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -494,11 +494,11 @@ public:
{
AxesTargetSwitchTimer = urand(7500, 20000);
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
for (uint8 i = 0; i < 2; ++i)
{
if (Unit *axe = Unit::GetUnit(*me, axes[i]))
if (Unit* axe = Unit::GetUnit(*me, axes[i]))
{
if (axe->getVictim())
DoModifyThreatPercent(axe->getVictim(), -100);
@@ -513,7 +513,7 @@ public:
if (AmplifyDamageTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_AMPLIFY_DAMAGE);
AmplifyDamageTimer = urand(20000, 30000);
} else AmplifyDamageTimer -= diff;
@@ -536,7 +536,7 @@ public:
{
if (SWPainTimer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
if (phase == 1)
pTarget = me->getVictim(); // the tank
else // anyone but the tank
@@ -585,7 +585,7 @@ public:
}
}
void Cleanup(Creature *infernal, InfernalPoint *point)
void Cleanup(Creature* infernal, InfernalPoint *point)
{
for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
if (*itr == infernal->GetGUID())
@@ -602,7 +602,7 @@ public:
void netherspite_infernal::netherspite_infernalAI::Cleanup()
{
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
if (pMalchezaar && pMalchezaar->isAlive())
CAST_AI(boss_malchezaar::boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(me, point);
@@ -93,7 +93,7 @@ public:
struct boss_aranAI : public ScriptedAI
{
boss_aranAI(Creature *c) : ScriptedAI(c)
boss_aranAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -195,7 +195,7 @@ public:
//store the threat list in a different container
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
//only on alive players
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
targets.push_back(pTarget);
@@ -309,7 +309,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (!pTarget)
return;
@@ -523,7 +523,7 @@ public:
struct water_elementalAI : public ScriptedAI
{
water_elementalAI(Creature *c) : ScriptedAI(c) {}
water_elementalAI(Creature* c) : ScriptedAI(c) {}
uint32 CastTimer;
@@ -68,7 +68,7 @@ public:
struct mob_kilrekAI : public ScriptedAI
{
mob_kilrekAI(Creature *c) : ScriptedAI(c)
mob_kilrekAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -140,7 +140,7 @@ public:
struct mob_demon_chainAI : public ScriptedAI
{
mob_demon_chainAI(Creature *c) : ScriptedAI(c) {}
mob_demon_chainAI(Creature* c) : ScriptedAI(c) {}
uint64 SacrificeGUID;
@@ -178,7 +178,7 @@ public:
struct mob_fiendish_portalAI : public PassiveAI
{
mob_fiendish_portalAI(Creature *c) : PassiveAI(c), summons(me){}
mob_fiendish_portalAI(Creature* c) : PassiveAI(c), summons(me){}
SummonList summons;
@@ -215,7 +215,7 @@ public:
struct mob_fiendish_impAI : public ScriptedAI
{
mob_fiendish_impAI(Creature *c) : ScriptedAI(c) {}
mob_fiendish_impAI(Creature* c) : ScriptedAI(c) {}
uint32 FireboltTimer;
@@ -258,7 +258,7 @@ public:
struct boss_terestianAI : public ScriptedAI
{
boss_terestianAI(Creature *c) : ScriptedAI(c)
boss_terestianAI(Creature* c) : ScriptedAI(c)
{
for (uint8 i = 0; i < 2; ++i)
PortalGUID[i] = 0;
@@ -370,7 +370,7 @@ public:
if (SacrificeTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (pTarget && pTarget->isAlive())
{
DoCast(pTarget, SPELL_SACRIFICE, true);
@@ -388,7 +388,7 @@ public:
if (BrainWipeTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_BRAIN_WIPE);
BrainWipeTimer = 20000;
} else BrainWipeTimer -= diff;
@@ -869,7 +869,7 @@ public:
{
if (!IsChasing)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoScriptText(SAY_WOLF_HOOD, me);
DoCast(pTarget, SPELL_LITTLE_RED_RIDING_HOOD, true);
@@ -886,7 +886,7 @@ public:
{
IsChasing = false;
if (Unit *pTarget = Unit::GetUnit((*me), HoodGUID))
if (Unit* pTarget = Unit::GetUnit((*me), HoodGUID))
{
HoodGUID = 0;
if (DoGetThreat(pTarget))
@@ -977,7 +977,7 @@ void PretendToDie(Creature* pCreature)
pCreature->SetStandState(UNIT_STAND_STATE_DEAD);
};
void Resurrect(Creature *pTarget)
void Resurrect(Creature* pTarget)
{
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pTarget->SetFullHealth();
@@ -1289,7 +1289,7 @@ public:
if (BackwardLungeTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (pTarget && !me->HasInArc(M_PI, pTarget))
{
DoCast(pTarget, SPELL_BACKWARD_LUNGE);
@@ -1305,7 +1305,7 @@ public:
if (DeadlySwatheTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_DEADLY_SWATHE);
DeadlySwatheTimer = urand(15000, 25000);
} else DeadlySwatheTimer -= diff;
@@ -1410,7 +1410,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
if (BlindingPassionTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_BLINDING_PASSION);
BlindingPassionTimer = urand(30000, 45000);
} else BlindingPassionTimer -= diff;
@@ -173,7 +173,7 @@ public:
//Close the encounter door, open it in JustDied/Reset
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!HasTaunted && me->IsWithinDistInMap(who, 40.0f))
{
@@ -302,7 +302,7 @@ public:
if (PhoenixTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
uint8 random = urand(1, 2);
float x = KaelLocations[random][0];
@@ -323,7 +323,7 @@ public:
if (FlameStrikeTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
me->InterruptSpell(CURRENT_GENERIC_SPELL);
@@ -395,7 +395,7 @@ public:
for (uint8 i = 0; i < 3; ++i)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
@@ -441,7 +441,7 @@ public:
struct mob_felkael_flamestrikeAI : public ScriptedAI
{
mob_felkael_flamestrikeAI(Creature *c) : ScriptedAI(c)
mob_felkael_flamestrikeAI(Creature* c) : ScriptedAI(c)
{
}
@@ -603,7 +603,7 @@ public:
struct mob_felkael_phoenix_eggAI : public ScriptedAI
{
mob_felkael_phoenix_eggAI(Creature *c) : ScriptedAI(c) {}
mob_felkael_phoenix_eggAI(Creature* c) : ScriptedAI(c) {}
uint32 HatchTimer;
@@ -640,7 +640,7 @@ public:
struct mob_arcane_sphereAI : public ScriptedAI
{
mob_arcane_sphereAI(Creature *c) : ScriptedAI(c) { Reset(); }
mob_arcane_sphereAI(Creature* c) : ScriptedAI(c) { Reset(); }
uint32 DespawnTimer;
uint32 ChangeTargetTimer;
@@ -671,7 +671,7 @@ public:
if (ChangeTargetTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
me->AddThreat(pTarget, 1.0f);
me->TauntApply(pTarget);
@@ -256,7 +256,7 @@ public:
if (HealTimer <= diff)
{
uint32 health = me->GetHealth();
Unit *pTarget = me;
Unit* pTarget = me;
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
@@ -272,7 +272,7 @@ public:
if (RenewTimer <= diff)
{
Unit *pTarget = me;
Unit* pTarget = me;
if (urand(0, 1))
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
@@ -285,7 +285,7 @@ public:
if (ShieldTimer <= diff)
{
Unit *pTarget = me;
Unit* pTarget = me;
if (urand(0, 1))
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
@@ -298,7 +298,7 @@ public:
if (DispelTimer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
if (urand(0, 1))
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
@@ -494,7 +494,7 @@ public:
struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
{
//Rogue
boss_kagani_nightstrikeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_kagani_nightstrikeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Gouge_Timer;
uint32 Kick_Timer;
@@ -599,7 +599,7 @@ public:
struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
{
//Warlock
boss_ellris_duskhallowAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_ellris_duskhallowAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Immolate_Timer;
uint32 Shadow_Bolt_Timer;
@@ -691,7 +691,7 @@ public:
struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
{
//Monk
boss_eramas_brightblazeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_eramas_brightblazeAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Knockdown_Timer;
uint32 Snap_Kick_Timer;
@@ -753,7 +753,7 @@ public:
struct boss_yazzaiAI : public boss_priestess_lackey_commonAI
{
//Mage
boss_yazzaiAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_yazzaiAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
bool HasIceBlocked;
@@ -791,7 +791,7 @@ public:
if (Polymorph_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_POLYMORPH);
Polymorph_Timer = 20000;
@@ -836,7 +836,7 @@ public:
std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
{
//if in melee range
if (pTarget->IsWithinDistInMap(me, 5))
@@ -884,7 +884,7 @@ public:
struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
{
//Warrior
boss_warlord_salarisAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_warlord_salarisAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Intercept_Stun_Timer;
uint32 Disarm_Timer;
@@ -923,7 +923,7 @@ public:
std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
{
//if in melee range
if (pTarget->IsWithinDistInMap(me, ATTACK_DISTANCE))
@@ -1005,7 +1005,7 @@ public:
struct boss_garaxxasAI : public boss_priestess_lackey_commonAI
{
//Hunter
boss_garaxxasAI(Creature *c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
boss_garaxxasAI(Creature* c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
uint64 m_uiPetGUID;
@@ -1125,7 +1125,7 @@ public:
struct boss_apokoAI : public boss_priestess_lackey_commonAI
{
//Shaman
boss_apokoAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_apokoAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Totem_Timer;
uint8 Totem_Amount;
@@ -1224,7 +1224,7 @@ public:
struct boss_zelfanAI : public boss_priestess_lackey_commonAI
{
//Engineer
boss_zelfanAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
boss_zelfanAI(Creature* c) : boss_priestess_lackey_commonAI(c) {}
uint32 Goblin_Dragon_Gun_Timer;
uint32 Rocket_Launch_Timer;
@@ -333,7 +333,7 @@ public:
struct mob_fel_crystalAI : public ScriptedAI
{
mob_fel_crystalAI(Creature *c) : ScriptedAI(c) {}
mob_fel_crystalAI(Creature* c) : ScriptedAI(c) {}
void Reset() {}
void EnterCombat(Unit* /*who*/) {}
@@ -71,7 +71,7 @@ public:
struct boss_vexallusAI : public ScriptedAI
{
boss_vexallusAI(Creature *c) : ScriptedAI(c)
boss_vexallusAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -115,9 +115,9 @@ public:
pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
}
void JustSummoned(Creature *summoned)
void JustSummoned(Creature* summoned)
{
if (Unit *temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->GetMotionMaster()->MoveFollow(temp, 0, 0);
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
@@ -163,7 +163,7 @@ public:
if (ChainLightningTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
ChainLightningTimer = 8000;
@@ -171,7 +171,7 @@ public:
if (ArcaneShockTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (pTarget)
DoCast(pTarget, SPELL_ARCANE_SHOCK);
@@ -206,13 +206,13 @@ public:
struct mob_pure_energyAI : public ScriptedAI
{
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {}
mob_pure_energyAI(Creature* c) : ScriptedAI(c) {}
void Reset() {}
void JustDied(Unit* slayer)
{
if (Unit *temp = me->GetOwner())
if (Unit* temp = me->GetOwner())
{
if (temp && temp->isAlive())
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
@@ -52,7 +52,7 @@ class boss_baron_geddon : public CreatureScript
struct boss_baron_geddonAI : public BossAI
{
boss_baron_geddonAI(Creature *pCreature) : BossAI(pCreature, BOSS_BARON_GEDDON)
boss_baron_geddonAI(Creature* pCreature) : BossAI(pCreature, BOSS_BARON_GEDDON)
{
}
@@ -55,7 +55,7 @@ class boss_magmadar : public CreatureScript
struct boss_magmadarAI : public BossAI
{
boss_magmadarAI(Creature *pCreature) : BossAI(pCreature, BOSS_MAGMADAR)
boss_magmadarAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAGMADAR)
{
}
@@ -76,7 +76,7 @@ class boss_majordomo : public CreatureScript
struct boss_majordomoAI : public BossAI
{
boss_majordomoAI(Creature *pCreature) : BossAI(pCreature, BOSS_MAJORDOMO_EXECUTUS)
boss_majordomoAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAJORDOMO_EXECUTUS)
{
}
@@ -79,7 +79,7 @@ class boss_ragnaros : public CreatureScript
struct boss_ragnarosAI : public BossAI
{
boss_ragnarosAI(Creature *pCreature) : BossAI(pCreature, BOSS_RAGNAROS)
boss_ragnarosAI(Creature* pCreature) : BossAI(pCreature, BOSS_RAGNAROS)
{
_introState = 0;
me->SetReactState(REACT_PASSIVE);
@@ -316,7 +316,7 @@ class mob_son_of_flame : public CreatureScript
struct mob_son_of_flameAI : public ScriptedAI //didnt work correctly in EAI for me...
{
mob_son_of_flameAI(Creature *c) : ScriptedAI(c)
mob_son_of_flameAI(Creature* c) : ScriptedAI(c)
{
instance = me->GetInstanceScript();
}
@@ -102,7 +102,7 @@ public:
struct npc_unworthy_initiateAI : public ScriptedAI
{
npc_unworthy_initiateAI(Creature *c) : ScriptedAI(c)
npc_unworthy_initiateAI(Creature* c) : ScriptedAI(c)
{
me->SetReactState(REACT_PASSIVE);
if (!me->GetEquipmentId())
@@ -155,7 +155,7 @@ public:
}
}
void EventStart(Creature* anchor, Player *pTarget)
void EventStart(Creature* anchor, Player* pTarget)
{
wait_timer = 5000;
phase = PHASE_TO_EQUIP;
@@ -178,7 +178,7 @@ public:
case PHASE_CHAINED:
if (!anchorGUID)
{
if (Creature *anchor = me->FindNearestCreature(29521, 30))
if (Creature* anchor = me->FindNearestCreature(29521, 30))
{
anchor->AI()->SetGUID(me->GetGUID());
anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
@@ -188,7 +188,7 @@ public:
sLog->outError("npc_unworthy_initiateAI: unable to find anchor!");
float dist = 99.0f;
GameObject *prison = NULL;
GameObject* prison = NULL;
for (uint8 i = 0; i < 12; ++i)
{
@@ -233,7 +233,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
phase = PHASE_ATTACKING;
if (Player *pTarget = Unit::GetPlayer(*me, playerGUID))
if (Player* pTarget = Unit::GetPlayer(*me, playerGUID))
me->AI()->AttackStart(pTarget);
wait_timer = 0;
}
@@ -293,7 +293,7 @@ public:
struct npc_unworthy_initiate_anchorAI : public PassiveAI
{
npc_unworthy_initiate_anchorAI(Creature *c) : PassiveAI(c), prisonerGUID(0) {}
npc_unworthy_initiate_anchorAI(Creature* c) : PassiveAI(c), prisonerGUID(0) {}
uint64 prisonerGUID;
@@ -315,7 +315,7 @@ public:
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
{
if (Creature *anchor = pGo->FindNearestCreature(29521, 15))
if (Creature* anchor = pGo->FindNearestCreature(29521, 15))
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
if (Creature* prisoner = Creature::GetCreature(*pPlayer, prisonerGUID))
CAST_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, pPlayer);
@@ -531,7 +531,7 @@ public:
struct npc_dark_rider_of_acherusAI : public ScriptedAI
{
npc_dark_rider_of_acherusAI(Creature *c) : ScriptedAI(c) {}
npc_dark_rider_of_acherusAI(Creature* c) : ScriptedAI(c) {}
uint32 PhaseTimer;
uint32 Phase;
@@ -561,7 +561,7 @@ public:
Phase = 1;
break;
case 1:
if (Unit *pTarget = Unit::GetUnit(*me, TargetGUID))
if (Unit* pTarget = Unit::GetUnit(*me, TargetGUID))
DoCast(pTarget, DESPAWN_HORSE, true);
PhaseTimer = 3000;
Phase = 2;
@@ -581,7 +581,7 @@ public:
}
void InitDespawnHorse(Unit *who)
void InitDespawnHorse(Unit* who)
{
if (!who)
return;
@@ -623,15 +623,15 @@ public:
struct npc_salanar_the_horsemanAI : public ScriptedAI
{
npc_salanar_the_horsemanAI(Creature *c) : ScriptedAI(c) {}
npc_salanar_the_horsemanAI(Creature* c) : ScriptedAI(c) {}
void SpellHit(Unit *caster, const SpellEntry *spell)
void SpellHit(Unit* caster, const SpellEntry *spell)
{
if (spell->Id == DELIVER_STOLEN_HORSE)
{
if (caster->GetTypeId() == TYPEID_UNIT && caster->IsVehicle())
{
if (Unit *charmer = caster->GetCharmer())
if (Unit* charmer = caster->GetCharmer())
{
if (charmer->HasAura(EFFECT_STOLEN_HORSE))
{
@@ -647,13 +647,13 @@ public:
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
ScriptedAI::MoveInLineOfSight(who);
if (who->GetTypeId() == TYPEID_UNIT && who->IsVehicle() && me->IsWithinDistInMap(who, 5.0f))
{
if (Unit *charmer = who->GetCharmer())
if (Unit* charmer = who->GetCharmer())
{
if (charmer->GetTypeId() == TYPEID_PLAYER)
{
@@ -692,7 +692,7 @@ public:
struct npc_ros_dark_riderAI : public ScriptedAI
{
npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {}
npc_ros_dark_riderAI(Creature* c) : ScriptedAI(c) {}
void EnterCombat(Unit* /*who*/)
{
@@ -743,15 +743,15 @@ public:
struct npc_dkc1_gothikAI : public ScriptedAI
{
npc_dkc1_gothikAI(Creature *c) : ScriptedAI(c) {}
npc_dkc1_gothikAI(Creature* c) : ScriptedAI(c) {}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
ScriptedAI::MoveInLineOfSight(who);
if (who->GetEntry() == GHOULS && me->IsWithinDistInMap(who, 10.0f))
{
if (Unit *owner = who->GetOwner())
if (Unit* owner = who->GetOwner())
{
if (owner->GetTypeId() == TYPEID_PLAYER)
{
@@ -785,7 +785,7 @@ public:
struct npc_scarlet_ghoulAI : public ScriptedAI
{
npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c)
npc_scarlet_ghoulAI(Creature* c) : ScriptedAI(c)
{
// Ghouls should display their Birth Animation
// Crawling out of the ground
@@ -794,7 +794,7 @@ public:
me->SetReactState(REACT_DEFENSIVE);
}
void FindMinions(Unit *owner)
void FindMinions(Unit* owner)
{
std::list<Creature*> MinionList;
owner->GetAllMinionsByEntry(MinionList, GHOULS);
@@ -818,7 +818,7 @@ public:
{
if (!me->isInCombat())
{
if (Unit *owner = me->GetOwner())
if (Unit* owner = me->GetOwner())
{
if (owner->GetTypeId() == TYPEID_PLAYER && CAST_PLR(owner)->isInCombat())
{
@@ -868,14 +868,14 @@ class npc_scarlet_miner_cart : public CreatureScript
public:
npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
CreatureAI* GetAI(Creature *_Creature) const
CreatureAI* GetAI(Creature* _Creature) const
{
return new npc_scarlet_miner_cartAI(_Creature);
}
struct npc_scarlet_miner_cartAI : public PassiveAI
{
npc_scarlet_miner_cartAI(Creature *c) : PassiveAI(c), minerGUID(0)
npc_scarlet_miner_cartAI(Creature* c) : PassiveAI(c), minerGUID(0)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
me->SetDisplayId(me->GetCreatureInfo()->Modelid1); // Modelid2 is a horse.
@@ -890,7 +890,7 @@ public:
void DoAction(const int32 /*param*/)
{
if (Creature *miner = Unit::GetCreature(*me, minerGUID))
if (Creature* miner = Unit::GetCreature(*me, minerGUID))
{
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
@@ -905,7 +905,7 @@ public:
void PassengerBoarded(Unit* /*who*/, int8 /*seatId*/, bool apply)
{
if (!apply)
if (Creature *miner = Unit::GetCreature(*me, minerGUID))
if (Creature* miner = Unit::GetCreature(*me, minerGUID))
miner->DisappearAndDie();
}
};
@@ -924,14 +924,14 @@ class npc_scarlet_miner : public CreatureScript
public:
npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { }
CreatureAI* GetAI(Creature *_Creature) const
CreatureAI* GetAI(Creature* _Creature) const
{
return new npc_scarlet_minerAI(_Creature);
}
struct npc_scarlet_minerAI : public npc_escortAI
{
npc_scarlet_minerAI(Creature *c) : npc_escortAI(c)
npc_scarlet_minerAI(Creature* c) : npc_escortAI(c)
{
me->SetReactState(REACT_PASSIVE);
}
@@ -980,7 +980,7 @@ public:
}
}
void InitCartQuest(Player *who)
void InitCartQuest(Player* who)
{
carGUID = who->GetVehicleBase()->GetGUID();
InitWaypoint();
@@ -993,7 +993,7 @@ public:
switch (i)
{
case 1:
if (Unit *car = Unit::GetCreature(*me, carGUID))
if (Unit* car = Unit::GetCreature(*me, carGUID))
{
me->SetInFront(car);
me->SendMovementFlagUpdate();
@@ -1004,7 +1004,7 @@ public:
IntroPhase = 1;
break;
case 17:
if (Unit *car = Unit::GetCreature(*me, carGUID))
if (Unit* car = Unit::GetCreature(*me, carGUID))
{
me->SetInFront(car);
me->SendMovementFlagUpdate();
@@ -1027,14 +1027,14 @@ public:
{
if (IntroPhase == 1)
{
if (Creature *car = Unit::GetCreature(*me, carGUID))
if (Creature* car = Unit::GetCreature(*me, carGUID))
DoCast(car, SPELL_CART_DRAG);
IntroTimer = 800;
IntroPhase = 2;
}
else
{
if (Creature *car = Unit::GetCreature(*me, carGUID))
if (Creature* car = Unit::GetCreature(*me, carGUID))
car->AI()->DoAction(0);
IntroPhase = 0;
}
@@ -1062,10 +1062,10 @@ public:
if (pPlayer->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
{
// Hack Why Trinity Dont Support Custom Summon Location
if (Creature *miner = pPlayer->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, pPlayer->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
if (Creature* miner = pPlayer->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, pPlayer->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
{
pPlayer->CastSpell(pPlayer, SPELL_CART_SUMM, true);
if (Creature *car = pPlayer->GetVehicleCreatureBase())
if (Creature* car = pPlayer->GetVehicleCreatureBase())
{
if (car->GetEntry() == 28817)
{
@@ -56,7 +56,7 @@ public:
struct npc_crusade_persuadedAI : public ScriptedAI
{
npc_crusade_persuadedAI(Creature *pCreature) : ScriptedAI(pCreature) {}
npc_crusade_persuadedAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 uiSpeech_timer;
uint32 uiSpeech_counter;
@@ -71,7 +71,7 @@ public:
me->RestoreFaction();
}
void SpellHit(Unit *caster, const SpellEntry *spell)
void SpellHit(Unit* caster, const SpellEntry *spell)
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter)
{
@@ -196,7 +196,7 @@ public:
struct npc_koltira_deathweaverAI : public npc_escortAI
{
npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature)
npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature)
{
me->SetReactState(REACT_DEFENSIVE);
}
@@ -363,7 +363,7 @@ public:
struct mob_scarlet_courierAI : public ScriptedAI
{
mob_scarlet_courierAI(Creature *pCreature) : ScriptedAI(pCreature) {}
mob_scarlet_courierAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 uiStage;
uint32 uiStage_timer;
@@ -411,7 +411,7 @@ public:
break;
case 2:
if (GameObject* tree = me->FindNearestGameObject(GO_INCONSPICUOUS_TREE, 40.0f))
if (Unit *unit = tree->GetOwner())
if (Unit* unit = tree->GetOwner())
AttackStart(unit);
break;
}
@@ -457,7 +457,7 @@ public:
struct mob_high_inquisitor_valrothAI : public ScriptedAI
{
mob_high_inquisitor_valrothAI(Creature *pCreature) : ScriptedAI(pCreature) {}
mob_high_inquisitor_valrothAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 uiRenew_timer;
uint32 uiInquisitor_Penance_timer;
@@ -593,7 +593,7 @@ public:
struct npc_a_special_surpriseAI : public ScriptedAI
{
npc_a_special_surpriseAI(Creature *pCreature) : ScriptedAI(pCreature) {}
npc_a_special_surpriseAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 ExecuteSpeech_Timer;
uint32 ExecuteSpeech_Counter;
@@ -321,7 +321,7 @@ public:
struct npc_highlord_darion_mograineAI : public npc_escortAI
{
npc_highlord_darion_mograineAI(Creature *pCreature) : npc_escortAI(pCreature)
npc_highlord_darion_mograineAI(Creature* pCreature) : npc_escortAI(pCreature)
{
Reset();
}
@@ -35,7 +35,7 @@ public:
struct npc_valkyr_battle_maidenAI : public PassiveAI
{
npc_valkyr_battle_maidenAI(Creature *c) : PassiveAI(c) {}
npc_valkyr_battle_maidenAI(Creature* c) : PassiveAI(c) {}
uint32 FlyBackTimer;
float x, y, z;
@@ -60,9 +60,9 @@ public:
{
if (FlyBackTimer <= diff)
{
Player *plr = NULL;
Player* plr = NULL;
if (me->isSummon())
if (Unit *summoner = me->ToTempSummon()->GetSummoner())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
if (summoner->GetTypeId() == TYPEID_PLAYER)
plr = CAST_PLR(summoner);
@@ -49,7 +49,7 @@ public:
struct boss_arcanist_doanAI : public ScriptedAI
{
boss_arcanist_doanAI(Creature *c) : ScriptedAI(c) {}
boss_arcanist_doanAI(Creature* c) : ScriptedAI(c) {}
uint32 Polymorph_Timer;
uint32 AoESilence_Timer;
@@ -101,7 +101,7 @@ public:
if (Polymorph_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(pTarget, SPELL_POLYMORPH);
Polymorph_Timer = 20000;
@@ -41,7 +41,7 @@ public:
struct boss_azshir_the_sleeplessAI : public ScriptedAI
{
boss_azshir_the_sleeplessAI(Creature *c) : ScriptedAI(c) {}
boss_azshir_the_sleeplessAI(Creature* c) : ScriptedAI(c) {}
uint32 SoulSiphon_Timer;
uint32 CallOftheGrave_Timer;
@@ -49,7 +49,7 @@ public:
struct boss_bloodmage_thalnosAI : public ScriptedAI
{
boss_bloodmage_thalnosAI(Creature *c) : ScriptedAI(c) {}
boss_bloodmage_thalnosAI(Creature* c) : ScriptedAI(c) {}
bool HpYell;
uint32 FlameShock_Timer;
@@ -140,7 +140,7 @@ public:
struct mob_wisp_invisAI : public ScriptedAI
{
mob_wisp_invisAI(Creature *c) : ScriptedAI(c)
mob_wisp_invisAI(Creature* c) : ScriptedAI(c)
{
Creaturetype = delay = spell = spell2 = 0;
//that's hack but there are no info about range of this spells in dbc
@@ -189,7 +189,7 @@ public:
me->SetDisplayId(2027);
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!who || Creaturetype != 1 || !who->isTargetableForAttack())
return;
@@ -227,7 +227,7 @@ public:
struct mob_headAI : public ScriptedAI
{
mob_headAI(Creature *c) : ScriptedAI(c) {}
mob_headAI(Creature* c) : ScriptedAI(c) {}
uint64 bodyGUID;
@@ -249,11 +249,11 @@ public:
}
void EnterCombat(Unit* /*who*/) {}
void SaySound(int32 textEntry, Unit *pTarget = 0)
void SaySound(int32 textEntry, Unit* pTarget = 0)
{
DoScriptText(textEntry, me, pTarget);
//DoCast(me, SPELL_HEAD_SPEAKS, true);
Creature *speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
if (speaker)
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
laugh += 3000;
@@ -290,7 +290,7 @@ public:
}
}
void SpellHit(Unit *caster, const SpellEntry* spell)
void SpellHit(Unit* caster, const SpellEntry* spell)
{
if (!withbody)
return;
@@ -330,7 +330,7 @@ public:
laugh = urand(15000, 30000);
DoPlaySoundToSet(me, RandomLaugh[urand(0, 2)]);
//DoCast(me, SPELL_HEAD_SPEAKS, true); //this spell remove buff "head"
Creature *speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
if (speaker)
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
@@ -343,7 +343,7 @@ public:
if (wait <= diff)
{
die = false;
if (Unit *body = Unit::GetUnit((*me), bodyGUID))
if (Unit* body = Unit::GetUnit((*me), bodyGUID))
body->Kill(body);
me->Kill(me);
} else wait -= diff;
@@ -366,7 +366,7 @@ public:
struct boss_headless_horsemanAI : public ScriptedAI
{
boss_headless_horsemanAI(Creature *c) : ScriptedAI(c)
boss_headless_horsemanAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -451,7 +451,7 @@ public:
break;
case 1:
{
if (Creature *smoke = me->SummonCreature(HELPER, Spawn[1].x, Spawn[1].y, Spawn[1].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
if (Creature* smoke = me->SummonCreature(HELPER, Spawn[1].x, Spawn[1].y, Spawn[1].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, smoke->AI())->SetType(3);
DoCast(me, SPELL_RHYME_BIG);
break;
@@ -470,7 +470,7 @@ public:
wp_reached = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
SaySound(SAY_ENTRANCE);
if (Unit *plr = Unit::GetUnit((*me), PlayerGUID))
if (Unit* plr = Unit::GetUnit((*me), PlayerGUID))
DoStartMovement(plr);
break;
}
@@ -485,24 +485,24 @@ public:
DoZoneInCombat();
}
void AttackStart(Unit* who) {ScriptedAI::AttackStart(who);}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (withhead && Phase != 0)
ScriptedAI::MoveInLineOfSight(who);
}
void KilledUnit(Unit *plr)
void KilledUnit(Unit* plr)
{
if (plr->GetTypeId() == TYPEID_PLAYER)
{
if (withhead)
SaySound(SAY_PLAYER_DEATH);
//maybe possible when player dies from conflagration
else if (Creature *Head = Unit::GetCreature((*me), headGUID))
else if (Creature* Head = Unit::GetCreature((*me), headGUID))
CAST_AI(mob_head::mob_headAI, Head->AI())->SaySound(SAY_PLAYER_DEATH);
}
}
void SaySound(int32 textEntry, Unit *pTarget = 0)
void SaySound(int32 textEntry, Unit* pTarget = 0)
{
DoScriptText(textEntry, me, pTarget);
laugh += 4000;
@@ -545,15 +545,15 @@ public:
me->StopMoving();
//me->GetMotionMaster()->MoveIdle();
SaySound(SAY_DEATH);
if (Creature *flame = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* flame = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
flame->CastSpell(flame, SPELL_BODY_FLAME, false);
if (Creature *wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* wisp = DoSpawnCreature(WISP_INVIS, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, wisp->AI())->SetType(4);
if (pInstance)
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
}
void SpellHit(Unit *caster, const SpellEntry* spell)
void SpellHit(Unit* caster, const SpellEntry* spell)
{
if (withhead)
return;
@@ -583,7 +583,7 @@ public:
}
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (damage >= me->GetHealth() && withhead)
{
@@ -625,7 +625,7 @@ public:
if (say_timer <= diff)
{
say_timer = 3000;
Player *plr = SelectRandomPlayer(100.0f, false);
Player* plr = SelectRandomPlayer(100.0f, false);
if (count < 3)
{
if (plr)
@@ -663,7 +663,7 @@ public:
break;
if (burn <= diff)
{
if (Creature *flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
if (Creature* flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, flame->AI())->SetType(2);
burned = true;
} else burn -= diff;
@@ -671,7 +671,7 @@ public:
case 2:
if (conflagrate <= diff)
{
if (Unit *plr = SelectRandomPlayer(30.0f))
if (Unit* plr = SelectRandomPlayer(30.0f))
DoCast(plr, SPELL_CONFLAGRATION, false);
conflagrate = urand(10000, 16000);
} else conflagrate -= diff;
@@ -755,7 +755,7 @@ public:
struct mob_pulsing_pumpkinAI : public ScriptedAI
{
mob_pulsing_pumpkinAI(Creature *c) : ScriptedAI(c) {}
mob_pulsing_pumpkinAI(Creature* c) : ScriptedAI(c) {}
bool sprouted;
uint64 debuffGUID;
@@ -766,7 +766,7 @@ public:
me->GetPosition(x, y, z); //this visual aura some under ground
me->GetMap()->CreatureRelocation(me, x, y, z + 0.35f, 0.0f);
Despawn();
Creature *debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
if (debuff)
{
debuff->SetDisplayId(me->GetDisplayId());
@@ -798,7 +798,7 @@ public:
void Despawn()
{
if (!debuffGUID) return;
Unit *debuff = Unit::GetUnit((*me), debuffGUID);
Unit* debuff = Unit::GetUnit((*me), debuffGUID);
if (debuff)
debuff->SetVisible(false);
debuffGUID = 0;
@@ -806,7 +806,7 @@ public:
void JustDied(Unit* /*killer*/) { if (!sprouted) Despawn(); }
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!who || !who->isTargetableForAttack() || !me->IsHostileTo(who) || me->getVictim())
return;
@@ -847,7 +847,7 @@ public:
if (plr->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && plr->getLevel() > 64)
{ */
pPlayer->AreaExploredOrEventHappens(11405);
if (Creature *horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
if (Creature* horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0))
{
CAST_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->PlayerGUID = pPlayer->GetGUID();
CAST_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->FlyMode();
@@ -864,7 +864,7 @@ void mob_head::mob_headAI::Disappear()
return;
if (bodyGUID)
{
Creature *body = Unit::GetCreature((*me), bodyGUID);
Creature* body = Unit::GetCreature((*me), bodyGUID);
if (body && body->isAlive())
{
withbody = true;
@@ -52,7 +52,7 @@ public:
struct boss_herodAI : public ScriptedAI
{
boss_herodAI(Creature *c) : ScriptedAI(c) {}
boss_herodAI(Creature* c) : ScriptedAI(c) {}
bool Enrage;
@@ -130,7 +130,7 @@ public:
struct mob_scarlet_traineeAI : public npc_escortAI
{
mob_scarlet_traineeAI(Creature *c) : npc_escortAI(c)
mob_scarlet_traineeAI(Creature* c) : npc_escortAI(c)
{
Start_Timer = urand(1000, 6000);
}
@@ -47,7 +47,7 @@ public:
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI
{
boss_high_inquisitor_fairbanksAI(Creature *c) : ScriptedAI(c) {}
boss_high_inquisitor_fairbanksAI(Creature* c) : ScriptedAI(c) {}
uint32 CurseOfBlood_Timer;
uint32 DispelMagic_Timer;
@@ -87,7 +87,7 @@ public:
//Fear_Timer
if (Fear_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(pTarget, SPELL_FEAR);
Fear_Timer = 40000;
@@ -96,7 +96,7 @@ public:
//Sleep_Timer
if (Sleep_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
DoCast(pTarget, SPELL_SLEEP);
Sleep_Timer = 30000;
@@ -112,7 +112,7 @@ public:
//Dispel_Timer
if (Dispel_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_DISPELMAGIC);
DispelMagic_Timer = 30000;
@@ -44,7 +44,7 @@ public:
struct boss_houndmaster_lokseyAI : public ScriptedAI
{
boss_houndmaster_lokseyAI(Creature *c) : ScriptedAI(c) {}
boss_houndmaster_lokseyAI(Creature* c) : ScriptedAI(c) {}
uint32 BloodLust_Timer;
@@ -49,7 +49,7 @@ public:
struct boss_interrogator_vishasAI : public ScriptedAI
{
boss_interrogator_vishasAI(Creature *c) : ScriptedAI(c)
boss_interrogator_vishasAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -81,7 +81,7 @@ public:
return;
//Any other actions to do with vorrel? setStandState?
if (Unit *vorrel = Unit::GetUnit(*me, pInstance->GetData64(DATA_VORREL)))
if (Unit* vorrel = Unit::GetUnit(*me, pInstance->GetData64(DATA_VORREL)))
DoScriptText(SAY_TRIGGER_VORREL, vorrel);
}
@@ -42,7 +42,7 @@ public:
struct boss_scornAI : public ScriptedAI
{
boss_scornAI(Creature *c) : ScriptedAI(c) {}
boss_scornAI(Creature* c) : ScriptedAI(c) {}
uint32 LichSlap_Timer;
uint32 FrostboltVolley_Timer;
@@ -62,7 +62,7 @@ public:
struct boss_darkmaster_gandlingAI : public ScriptedAI
{
boss_darkmaster_gandlingAI(Creature *c) : ScriptedAI(c)
boss_darkmaster_gandlingAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -124,14 +124,14 @@ public:
{
if (Teleport_Timer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
if (DoGetThreat(pTarget))
DoModifyThreatPercent(pTarget, -100);
Creature *Summoned = NULL;
Creature* Summoned = NULL;
switch(rand()%6)
{
case 0:
@@ -37,7 +37,7 @@ public:
struct boss_death_knight_darkreaverAI : public ScriptedAI
{
boss_death_knight_darkreaverAI(Creature *c) : ScriptedAI(c) {}
boss_death_knight_darkreaverAI(Creature* c) : ScriptedAI(c) {}
void Reset()
{
@@ -45,7 +45,7 @@ public:
struct boss_theolenkrastinovAI : public ScriptedAI
{
boss_theolenkrastinovAI(Creature *c) : ScriptedAI(c) {}
boss_theolenkrastinovAI(Creature* c) : ScriptedAI(c) {}
uint32 m_uiRend_Timer;
uint32 m_uiBackhand_Timer;
@@ -43,7 +43,7 @@ public:
struct boss_illuciabarovAI : public ScriptedAI
{
boss_illuciabarovAI(Creature *c) : ScriptedAI(c) {}
boss_illuciabarovAI(Creature* c) : ScriptedAI(c) {}
uint32 CurseOfAgony_Timer;
uint32 ShadowShock_Timer;
@@ -89,7 +89,7 @@ public:
//ShadowShock_Timer
if (ShadowShock_Timer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget) DoCast(pTarget, SPELL_SHADOWSHOCK);
@@ -44,7 +44,7 @@ public:
struct boss_instructormaliciaAI : public ScriptedAI
{
boss_instructormaliciaAI(Creature *c) : ScriptedAI(c) {}
boss_instructormaliciaAI(Creature* c) : ScriptedAI(c) {}
uint32 CallOfGraves_Timer;
uint32 Corruption_Timer;
@@ -96,7 +96,7 @@ public:
//Corruption_Timer
if (Corruption_Timer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget) DoCast(pTarget, SPELL_CORRUPTION);
@@ -43,7 +43,7 @@ public:
struct boss_jandicebarovAI : public ScriptedAI
{
boss_jandicebarovAI(Creature *c) : ScriptedAI(c) {}
boss_jandicebarovAI(Creature* c) : ScriptedAI(c) {}
uint32 CurseOfBlood_Timer;
uint32 Illusion_Timer;
@@ -65,7 +65,7 @@ public:
void SummonIllusions(Unit* victim)
{
if (Creature *Illusion = DoSpawnCreature(11439, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
if (Creature* Illusion = DoSpawnCreature(11439, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
Illusion->AI()->AttackStart(victim);
}
@@ -111,7 +111,7 @@ public:
DoModifyThreatPercent(me->getVictim(), -99);
//Summon 10 Illusions attacking random gamers
Unit *pTarget = NULL;
Unit* pTarget = NULL;
for (uint8 i = 0; i < 10; ++i)
{
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
@@ -165,7 +165,7 @@ public:
struct mob_illusionofjandicebarovAI : public ScriptedAI
{
mob_illusionofjandicebarovAI(Creature *c) : ScriptedAI(c) {}
mob_illusionofjandicebarovAI(Creature* c) : ScriptedAI(c) {}
uint32 Cleave_Timer;
@@ -40,7 +40,7 @@ public:
struct boss_kormokAI : public ScriptedAI
{
boss_kormokAI(Creature *c) : ScriptedAI(c) {}
boss_kormokAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowVolley_Timer;
uint32 BoneShield_Timer;
@@ -63,13 +63,13 @@ public:
void SummonMinions(Unit* victim)
{
if (Creature *SummonedMinion = DoSpawnCreature(16119, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
if (Creature* SummonedMinion = DoSpawnCreature(16119, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
SummonedMinion->AI()->AttackStart(victim);
}
void SummonMages(Unit* victim)
{
if (Creature *SummonedMage = DoSpawnCreature(16120, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
if (Creature* SummonedMage = DoSpawnCreature(16120, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
SummonedMage->AI()->AttackStart(victim);
}
@@ -41,7 +41,7 @@ public:
struct boss_lordalexeibarovAI : public ScriptedAI
{
boss_lordalexeibarovAI(Creature *c) : ScriptedAI(c) {}
boss_lordalexeibarovAI(Creature* c) : ScriptedAI(c) {}
uint32 Immolate_Timer;
uint32 VeilofShadow_Timer;
@@ -78,7 +78,7 @@ public:
//Immolate_Timer
if (Immolate_Timer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget) DoCast(pTarget, SPELL_IMMOLATE);
@@ -43,7 +43,7 @@ public:
struct boss_lorekeeperpolkeltAI : public ScriptedAI
{
boss_lorekeeperpolkeltAI(Creature *c) : ScriptedAI(c) {}
boss_lorekeeperpolkeltAI(Creature* c) : ScriptedAI(c) {}
uint32 VolatileInfection_Timer;
uint32 Darkplague_Timer;
@@ -44,7 +44,7 @@ public:
struct boss_rasfrostAI : public ScriptedAI
{
boss_rasfrostAI(Creature *c) : ScriptedAI(c) {}
boss_rasfrostAI(Creature* c) : ScriptedAI(c) {}
uint32 IceArmor_Timer;
uint32 Frostbolt_Timer;
@@ -82,7 +82,7 @@ public:
//Frostbolt_Timer
if (Frostbolt_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_FROSTBOLT);
Frostbolt_Timer = 8000;
@@ -43,7 +43,7 @@ public:
struct boss_theravenianAI : public ScriptedAI
{
boss_theravenianAI(Creature *c) : ScriptedAI(c) {}
boss_theravenianAI(Creature* c) : ScriptedAI(c) {}
uint32 Trample_Timer;
uint32 Cleave_Timer;
@@ -45,7 +45,7 @@ public:
struct boss_vectusAI : public ScriptedAI
{
boss_vectusAI(Creature *c) : ScriptedAI(c) {}
boss_vectusAI(Creature* c) : ScriptedAI(c) {}
uint32 m_uiFireShield_Timer;
uint32 m_uiBlastWave_Timer;
@@ -90,7 +90,7 @@ public:
struct npc_shadowfang_prisonerAI : public npc_escortAI
{
npc_shadowfang_prisonerAI(Creature *c) : npc_escortAI(c)
npc_shadowfang_prisonerAI(Creature* c) : npc_escortAI(c)
{
pInstance = c->GetInstanceScript();
uiNpcEntry = c->GetEntry();
@@ -89,7 +89,7 @@ public:
struct boss_baron_rivendareAI : public ScriptedAI
{
boss_baron_rivendareAI(Creature *c) : ScriptedAI(c)
boss_baron_rivendareAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -122,7 +122,7 @@ public:
void JustSummoned(Creature* summoned)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->AI()->AttackStart(pTarget);
}
@@ -43,7 +43,7 @@ public:
struct boss_baroness_anastariAI : public ScriptedAI
{
boss_baroness_anastariAI(Creature *c) : ScriptedAI(c)
boss_baroness_anastariAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -111,7 +111,7 @@ public:
//Cast
if (rand()%100 < 65)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)DoCast(pTarget, SPELL_POSSESS);
}
@@ -88,7 +88,7 @@ public:
struct boss_cannon_master_willeyAI : public ScriptedAI
{
boss_cannon_master_willeyAI(Creature *c) : ScriptedAI(c) {}
boss_cannon_master_willeyAI(Creature* c) : ScriptedAI(c) {}
uint32 KnockAway_Timer;
uint32 Pummel_Timer;
@@ -77,7 +77,7 @@ public:
struct boss_dathrohan_balnazzarAI : public ScriptedAI
{
boss_dathrohan_balnazzarAI(Creature *c) : ScriptedAI(c) {}
boss_dathrohan_balnazzarAI(Creature* c) : ScriptedAI(c) {}
uint32 m_uiCrusadersHammer_Timer;
uint32 m_uiCrusaderStrike_Timer;
@@ -195,7 +195,7 @@ public:
//DeepSleep
if (m_uiDeepSleep_Timer <= uiDiff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SLEEP);
m_uiDeepSleep_Timer = 15000;
@@ -46,7 +46,7 @@ public:
struct boss_magistrate_barthilasAI : public ScriptedAI
{
boss_magistrate_barthilasAI(Creature *c) : ScriptedAI(c) {}
boss_magistrate_barthilasAI(Creature* c) : ScriptedAI(c) {}
uint32 DrainingBlow_Timer;
uint32 CrowdPummel_Timer;
@@ -68,7 +68,7 @@ public:
me->SetDisplayId(MODEL_HUMAN);
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
//nothing to see here yet
@@ -43,7 +43,7 @@ public:
struct boss_maleki_the_pallidAI : public ScriptedAI
{
boss_maleki_the_pallidAI(Creature *c) : ScriptedAI(c)
boss_maleki_the_pallidAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -43,7 +43,7 @@ public:
struct boss_nerubenkanAI : public ScriptedAI
{
boss_nerubenkanAI(Creature *c) : ScriptedAI(c)
boss_nerubenkanAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -48,7 +48,7 @@ public:
struct boss_postmaster_malownAI : public ScriptedAI
{
boss_postmaster_malownAI(Creature *c) : ScriptedAI(c) {}
boss_postmaster_malownAI(Creature* c) : ScriptedAI(c) {}
uint32 WailingDead_Timer;
uint32 Backhand_Timer;
@@ -43,7 +43,7 @@ public:
struct boss_ramstein_the_gorgerAI : public ScriptedAI
{
boss_ramstein_the_gorgerAI(Creature *c) : ScriptedAI(c)
boss_ramstein_the_gorgerAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -41,7 +41,7 @@ public:
struct boss_timmy_the_cruelAI : public ScriptedAI
{
boss_timmy_the_cruelAI(Creature *c) : ScriptedAI(c) {}
boss_timmy_the_cruelAI(Creature* c) : ScriptedAI(c) {}
uint32 RavenousClaw_Timer;
bool HasYelled;
@@ -99,7 +99,7 @@ public:
struct mob_freed_soulAI : public ScriptedAI
{
mob_freed_soulAI(Creature *c) : ScriptedAI(c) {}
mob_freed_soulAI(Creature* c) : ScriptedAI(c) {}
void Reset()
{
@@ -133,7 +133,7 @@ public:
struct mob_restless_soulAI : public ScriptedAI
{
mob_restless_soulAI(Creature *c) : ScriptedAI(c) {}
mob_restless_soulAI(Creature* c) : ScriptedAI(c) {}
uint64 Tagger;
uint32 Die_Timer;
@@ -148,7 +148,7 @@ public:
void EnterCombat(Unit* /*who*/) {}
void SpellHit(Unit *caster, const SpellEntry *spell)
void SpellHit(Unit* caster, const SpellEntry *spell)
{
if (caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -160,7 +160,7 @@ public:
}
}
void JustSummoned(Creature *summoned)
void JustSummoned(Creature* summoned)
{
summoned->CastSpell(summoned, SPELL_SOUL_FREED, false);
}
@@ -211,7 +211,7 @@ public:
struct mobs_spectral_ghostly_citizenAI : public ScriptedAI
{
mobs_spectral_ghostly_citizenAI(Creature *c) : ScriptedAI(c) {}
mobs_spectral_ghostly_citizenAI(Creature* c) : ScriptedAI(c) {}
uint32 Die_Timer;
bool Tagged;
@@ -78,7 +78,7 @@ public:
struct boss_brutallusAI : public ScriptedAI
{
boss_brutallusAI(Creature *c) : ScriptedAI(c)
boss_brutallusAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
Intro = true;
@@ -155,7 +155,7 @@ public:
{
if (!Intro || IsIntro)
return;
Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
Creature* Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
if (Madrigosa)
{
Madrigosa->Respawn();
@@ -191,7 +191,7 @@ public:
void DoIntro()
{
Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
Creature* Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
if (!Madrigosa)
return;
@@ -267,7 +267,7 @@ public:
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!who->isTargetableForAttack() || !me->IsHostileTo(who))
return;
@@ -292,7 +292,7 @@ public:
{
if (IntroFrostBoltTimer <= diff)
{
if (Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0))
if (Creature* Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0))
{
Madrigosa->CastSpell(me, SPELL_INTRO_FROSTBOLT, true);
IntroFrostBoltTimer = 2000;
@@ -97,7 +97,7 @@ public:
struct boss_sacrolashAI : public ScriptedAI
{
boss_sacrolashAI(Creature *c) : ScriptedAI(c)
boss_sacrolashAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -181,7 +181,7 @@ public:
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
void SpellHitTarget(Unit* pTarget, const SpellEntry* spell)
{
switch(spell->Id)
{
@@ -197,7 +197,7 @@ public:
}
}
void HandleTouchedSpells(Unit *pTarget, uint32 TouchedType)
void HandleTouchedSpells(Unit* pTarget, uint32 TouchedType)
{
switch(TouchedType)
{
@@ -252,7 +252,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFLAGRATION);
@@ -266,7 +266,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_SHADOW_NOVA);
@@ -286,7 +286,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFOUNDING_BLOW);
@@ -296,7 +296,7 @@ public:
if (ShadowimageTimer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
Creature* temp = NULL;
for (uint8 i = 0; i<3; ++i)
{
@@ -355,7 +355,7 @@ public:
struct boss_alythessAI : public Scripted_NoMovementAI
{
boss_alythessAI(Creature *c) : Scripted_NoMovementAI(c)
boss_alythessAI(Creature* c) : Scripted_NoMovementAI(c)
{
pInstance = c->GetInstanceScript();
IntroStepCounter = 10;
@@ -424,7 +424,7 @@ public:
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
}
void AttackStart(Unit *who)
void AttackStart(Unit* who)
{
if (!me->isInCombat())
{
@@ -432,7 +432,7 @@ public:
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!who || me->getVictim())
return;
@@ -476,7 +476,7 @@ public:
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
void SpellHitTarget(Unit* pTarget, const SpellEntry* spell)
{
switch(spell->Id)
{
@@ -493,7 +493,7 @@ public:
}
}
void HandleTouchedSpells(Unit *pTarget, uint32 TouchedType)
void HandleTouchedSpells(Unit* pTarget, uint32 TouchedType)
{
switch(TouchedType)
{
@@ -601,7 +601,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_SHADOW_NOVA);
@@ -616,7 +616,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFLAGRATION);
@@ -685,7 +685,7 @@ public:
struct mob_shadow_imageAI : public ScriptedAI
{
mob_shadow_imageAI(Creature *c) : ScriptedAI(c) {}
mob_shadow_imageAI(Creature* c) : ScriptedAI(c) {}
uint32 ShadowfuryTimer;
uint32 KillTimer;
@@ -701,7 +701,7 @@ public:
void EnterCombat(Unit* /*who*/){}
void SpellHitTarget(Unit *pTarget, const SpellEntry* spell)
void SpellHitTarget(Unit* pTarget, const SpellEntry* spell)
{
switch(spell->Id)
{
@@ -115,7 +115,7 @@ public:
struct boss_felmystAI : public ScriptedAI
{
boss_felmystAI(Creature *c) : ScriptedAI(c)
boss_felmystAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
@@ -173,13 +173,13 @@ public:
pInstance->SetData(DATA_FELMYST_EVENT, IN_PROGRESS);
}
void AttackStart(Unit *who)
void AttackStart(Unit* who)
{
if (phase != PHASE_FLIGHT)
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (phase != PHASE_FLIGHT)
ScriptedAI::MoveInLineOfSight(who);
@@ -203,7 +203,7 @@ public:
pInstance->SetData(DATA_FELMYST_EVENT, DONE);
}
void SpellHit(Unit *caster, const SpellEntry *spell)
void SpellHit(Unit* caster, const SpellEntry *spell)
{
// workaround for linked aura
/*if (spell->Id == SPELL_VAPOR_FORCE)
@@ -226,7 +226,7 @@ public:
}
}
void JustSummoned(Creature *summon)
void JustSummoned(Creature* summon)
{
if (summon->GetEntry() == MOB_DEAD)
{
@@ -293,7 +293,7 @@ public:
break;
case 2:
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!pTarget)
pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
@@ -320,7 +320,7 @@ public:
DespawnSummons(MOB_VAPOR_TRAIL);
//DoCast(me, SPELL_VAPOR_SELECT); need core support
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!pTarget)
pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
@@ -350,7 +350,7 @@ public:
break;
case 5:
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!pTarget)
pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
@@ -393,7 +393,7 @@ public:
uiFlightCount = 4;
break;
case 9:
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO))
DoStartMovement(pTarget);
else
{
@@ -447,7 +447,7 @@ public:
events.ScheduleEvent(EVENT_GAS_NOVA, urand(20000, 25000));
break;
case EVENT_ENCAPSULATE:
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true))
DoCast(pTarget, SPELL_ENCAPSULATE_CHANNEL, false);
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(25000, 30000));
break;
@@ -476,7 +476,7 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
me->UpdateGroundPositionZ(x, y, z);
if (Creature *Fog = me->SummonCreature(MOB_VAPOR_TRAIL, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
if (Creature* Fog = me->SummonCreature(MOB_VAPOR_TRAIL, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
Fog->RemoveAurasDueToSpell(SPELL_TRAIL_TRIGGER);
Fog->CastSpell(Fog, SPELL_FOG_TRIGGER, true);
@@ -534,7 +534,7 @@ public:
struct mob_felmyst_vaporAI : public ScriptedAI
{
mob_felmyst_vaporAI(Creature *c) : ScriptedAI(c)
mob_felmyst_vaporAI(Creature* c) : ScriptedAI(c)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetSpeed(MOVE_RUN, 0.8f);
@@ -548,7 +548,7 @@ public:
void UpdateAI(const uint32 /*diff*/)
{
if (!me->getVictim())
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
AttackStart(pTarget);
}
};
@@ -567,7 +567,7 @@ public:
struct mob_felmyst_trailAI : public ScriptedAI
{
mob_felmyst_trailAI(Creature *c) : ScriptedAI(c)
mob_felmyst_trailAI(Creature* c) : ScriptedAI(c)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_TRAIL_TRIGGER, true);
@@ -115,7 +115,7 @@ public:
struct boss_kalecgosAI : public ScriptedAI
{
boss_kalecgosAI(Creature *c) : ScriptedAI(c)
boss_kalecgosAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
SathGUID = 0;
@@ -155,7 +155,7 @@ public:
pInstance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
}
if (Creature *Sath = Unit::GetCreature(*me, SathGUID))
if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
Sath->AI()->EnterEvadeMode();
me->setFaction(14);
@@ -329,7 +329,7 @@ public:
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (bJustReset)//boss is invisible, don't attack
return;
@@ -342,7 +342,7 @@ public:
}
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (damage >= me->GetHealth() && done_by != me)
damage = 0;
@@ -459,7 +459,7 @@ public:
bool isEnraged; // if demon is enraged
boss_kalecAI(Creature *c) : ScriptedAI(c)
boss_kalecAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -477,7 +477,7 @@ public:
isEnraged = false;
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (done_by->GetGUID() != SathGUID)
damage = 0;
@@ -578,7 +578,7 @@ public:
struct boss_sathrovarrAI : public ScriptedAI
{
boss_sathrovarrAI(Creature *c) : ScriptedAI(c)
boss_sathrovarrAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
KalecGUID = 0;
@@ -629,7 +629,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
if (Creature *Kalec = me->SummonCreature(MOB_KALEC, me->GetPositionX() + 10, me->GetPositionY() + 5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
if (Creature* Kalec = me->SummonCreature(MOB_KALEC, me->GetPositionX() + 10, me->GetPositionY() + 5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
{
KalecGUID = Kalec->GetGUID();
me->CombatStart(Kalec);
@@ -639,18 +639,18 @@ public:
DoScriptText(SAY_SATH_AGGRO, me);
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (damage >= me->GetHealth() && done_by != me)
damage = 0;
}
void KilledUnit(Unit *pTarget)
void KilledUnit(Unit* pTarget)
{
if (pTarget->GetGUID() == KalecGUID)
{
TeleportAllPlayersBack();
if (Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
{
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = false;
@@ -666,7 +666,7 @@ public:
DoScriptText(SAY_SATH_DEATH, me);
me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
TeleportAllPlayersBack();
if (Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
{
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
@@ -715,10 +715,10 @@ public:
if (CheckTimer <= diff)
{
Creature *Kalec = Unit::GetCreature(*me, KalecGUID);
Creature* Kalec = Unit::GetCreature(*me, KalecGUID);
if (!Kalec || (Kalec && !Kalec->isAlive()))
{
if (Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
Kalecgos->AI()->EnterEvadeMode();
return;
}
@@ -728,7 +728,7 @@ public:
Kalecgos->AI()->DoAction(DO_ENRAGE);
DoAction(DO_ENRAGE);
}
Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID);
Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID);
if (Kalecgos)
{
if (!Kalecgos->isInCombat())
@@ -783,7 +783,7 @@ public:
if (AgonyCurseTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget) pTarget = me->getVictim();
DoCast(pTarget, SPELL_AGONY_CURSE);
AgonyCurseTimer = 20000;
@@ -661,7 +661,7 @@ public:
for (uint8 i = 0; i < 4; ++i)
{
float x, y, z;
Unit *pTarget = NULL;
Unit* pTarget = NULL;
for (uint8 z = 0; z < 6; ++z)
{
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
@@ -842,7 +842,7 @@ public:
TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true;
break;
case TIMER_ARMAGEDDON: //Phase 4
Unit *pTarget = NULL;
Unit* pTarget = NULL;
for (uint8 z = 0; z < 6; ++z)
{
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
@@ -113,7 +113,7 @@ public:
struct boss_entropiusAI : public ScriptedAI
{
boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(me)
boss_entropiusAI(Creature* c) : ScriptedAI(c), Summons(me)
{
pInstance = c->GetInstanceScript();
}
@@ -213,7 +213,7 @@ public:
struct boss_muruAI : public Scripted_NoMovementAI
{
boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(me)
boss_muruAI(Creature* c) : Scripted_NoMovementAI(c), Summons(me)
{
pInstance = c->GetInstanceScript();
}
@@ -378,7 +378,7 @@ public:
struct npc_muru_portalAI : public Scripted_NoMovementAI
{
npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(me)
npc_muru_portalAI(Creature* c) : Scripted_NoMovementAI(c), Summons(me)
{
pInstance = c->GetInstanceScript();
}
@@ -462,7 +462,7 @@ public:
struct npc_dark_fiendAI : public ScriptedAI
{
npc_dark_fiendAI(Creature *c) : ScriptedAI(c) {}
npc_dark_fiendAI(Creature* c) : ScriptedAI(c) {}
uint32 WaitTimer;
bool InAction;
@@ -525,7 +525,7 @@ public:
struct npc_void_sentinelAI : public ScriptedAI
{
npc_void_sentinelAI(Creature *c) : ScriptedAI(c){}
npc_void_sentinelAI(Creature* c) : ScriptedAI(c){}
uint32 PulseTimer;
uint32 VoidBlastTimer;
@@ -581,7 +581,7 @@ public:
struct npc_blackholeAI : public ScriptedAI
{
npc_blackholeAI(Creature *c) : ScriptedAI(c)
npc_blackholeAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -232,7 +232,7 @@ class mob_archaedas_minions : public CreatureScript
struct mob_archaedas_minionsAI : public ScriptedAI
{
mob_archaedas_minionsAI(Creature *c) : ScriptedAI(c)
mob_archaedas_minionsAI(Creature* c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
@@ -276,7 +276,7 @@ class mob_archaedas_minions : public CreatureScript
}
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (bAmIAwake)
ScriptedAI::MoveInLineOfSight(who);

Some files were not shown because too many files have changed in this diff Show More