Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/AI/EventAI/CreatureEventAI.cpp
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Transport/Transport.cpp
	src/server/game/Entities/Unit/StatSystem.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Handlers/BattleGroundHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/ItemHandler.cpp
	src/server/game/Handlers/NPCHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/SpellHandler.cpp
	src/server/game/Instances/InstanceScript.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
	src/server/scripts/EasternKingdoms/boss_kruul.cpp
	src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
	src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
	src/server/scripts/EasternKingdoms/zone_ironforge.cpp
	src/server/scripts/EasternKingdoms/zone_loch_modan.cpp
	src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_felwood.cpp
	src/server/scripts/Kalimdor/zone_feralas.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/scripts/Kalimdor/zone_tanaris.cpp
	src/server/scripts/Kalimdor/zone_thousand_needles.cpp
	src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Northrend/zone_dalaran.cpp
	src/server/scripts/Spells/spell_pet.cpp
	src/server/scripts/Spells/spell_shaman.cpp
This commit is contained in:
Vincent-Michael committed 2013-06-13 19:35:01 +02:00
commit 87d9d1d705
490 files changed
+3524 -2995

No files matched your search

+2 -2
View File
@@ -230,7 +230,7 @@ public:
return false;
}
if (!caster->getVictim())
if (!caster->GetVictim())
{
handler->SendSysMessage(LANG_SELECTED_TARGET_NOT_HAVE_VICTIM);
handler->SetSentErrorMessage(true);
@@ -256,7 +256,7 @@ public:
bool triggered = (triggeredStr != NULL);
caster->CastSpell(caster->getVictim(), spellId, triggered);
caster->CastSpell(caster->GetVictim(), spellId, triggered);
return true;
}
+2 -2
View File
@@ -797,7 +797,7 @@ public:
static bool HandleDebugThreatListCommand(ChatHandler* handler, char const* /*args*/)
{
Creature* target = handler->getSelectedCreature();
if (!target || target->isTotem() || target->isPet())
if (!target || target->IsTotem() || target->IsPet())
return false;
ThreatContainer::StorageType const &threatList = target->getThreatManager().getThreatList();
@@ -826,7 +826,7 @@ public:
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
while (ref)
{
if (Unit* unit = ref->getSource()->getOwner())
if (Unit* unit = ref->GetSource()->GetOwner())
{
++count;
handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), ref->getThreat());
+2 -2
View File
@@ -131,7 +131,7 @@ public:
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
AccountTypes itrSec = itr->second->GetSession()->GetSecurity();
if ((itr->second->isGameMaster() ||
if ((itr->second->IsGameMaster() ||
(itr->second->GetSession()->HasPermission(RBAC_PERM_COMMANDS_APPEAR_IN_GM_LIST) &&
itrSec <= AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
(!handler->GetSession() || itr->second->IsVisibleGloballyFor(handler->GetSession()->GetPlayer())))
@@ -241,7 +241,7 @@ public:
{
if (!*args)
{
if (handler->GetSession()->GetPlayer()->isGameMaster())
if (handler->GetSession()->GetPlayer()->IsGameMaster())
handler->GetSession()->SendNotification(LANG_GM_ON);
else
handler->GetSession()->SendNotification(LANG_GM_OFF);
+9 -9
View File
@@ -154,7 +154,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -199,7 +199,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -241,7 +241,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -301,7 +301,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -346,7 +346,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -391,7 +391,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -461,7 +461,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -522,7 +522,7 @@ public:
}
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -556,7 +556,7 @@ public:
}
Player* player = handler->GetSession()->GetPlayer();
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
+1 -1
View File
@@ -92,7 +92,7 @@ public:
state.c_str(), sLFGMgr->GetDungeon(guid));
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
GetPlayerInfo(handler, itr->getSource());
GetPlayerInfo(handler, itr->GetSource());
return true;
}
+19 -19
View File
@@ -318,7 +318,7 @@ public:
if (map->IsBattlegroundOrArena())
{
// only allow if gm mode is on
if (!_player->isGameMaster())
if (!_player->IsGameMaster())
{
handler->PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, chrNameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -353,7 +353,7 @@ public:
else
{
// we are not in group, let's verify our GM mode
if (!_player->isGameMaster())
if (!_player->IsGameMaster())
{
handler->PSendSysMessage(LANG_CANNOT_GO_TO_INST_GM, chrNameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -383,7 +383,7 @@ public:
handler->PSendSysMessage(LANG_APPEARING_AT, chrNameLink.c_str());
// stop flight if need
if (_player->isInFlight())
if (_player->IsInFlight())
{
_player->GetMotionMaster()->MovementExpired();
_player->CleanupAfterTaxiFlight();
@@ -417,7 +417,7 @@ public:
return false;
// stop flight if need
if (_player->isInFlight())
if (_player->IsInFlight())
{
_player->GetMotionMaster()->MovementExpired();
_player->CleanupAfterTaxiFlight();
@@ -467,7 +467,7 @@ public:
if (map->IsBattlegroundOrArena())
{
// only allow if gm mode is on
if (!_player->isGameMaster())
if (!_player->IsGameMaster())
{
handler->PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -508,7 +508,7 @@ public:
ChatHandler(target->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
// stop flight if need
if (target->isInFlight())
if (target->IsInFlight())
{
target->GetMotionMaster()->MovementExpired();
target->CleanupAfterTaxiFlight();
@@ -583,7 +583,7 @@ public:
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* player = itr->getSource();
Player* player = itr->GetSource();
if (!player || player == handler->GetSession()->GetPlayer() || !player->GetSession())
continue;
@@ -619,7 +619,7 @@ public:
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -660,7 +660,7 @@ public:
return false;
}
if (target->isAlive())
if (target->IsAlive())
{
if (sWorld->getBoolConfig(CONFIG_DIE_COMMAND_MODE))
handler->GetSession()->GetPlayer()->Kill(target);
@@ -703,7 +703,7 @@ public:
return false;
}
if (player->isInFlight())
if (player->IsInFlight())
{
handler->SendSysMessage(LANG_YOU_IN_FLIGHT);
handler->SetSentErrorMessage(true);
@@ -868,7 +868,7 @@ public:
}
// stop flight if need
if (target->isInFlight())
if (target->IsInFlight())
{
target->GetMotionMaster()->MovementExpired();
target->CleanupAfterTaxiFlight();
@@ -964,7 +964,7 @@ public:
if (!handler->extractPlayerTarget(player_str, &player))
return false;
if (player->isInFlight() || player->isInCombat())
if (player->IsInFlight() || player->IsInCombat())
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(7355);
if (!spellInfo)
@@ -1611,7 +1611,7 @@ public:
muteTime = target->GetSession()->m_muteTime;
mapId = target->GetMapId();
areaId = target->GetAreaId();
alive = target->isAlive() ? "Yes" : "No";
alive = target->IsAlive() ? "Yes" : "No";
gender = target->getGender();
phase = target->GetPhaseMask();
}
@@ -1765,7 +1765,7 @@ public:
handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), lowguid);
// Output II. LANG_PINFO_GM_ACTIVE
if (target && target->isGameMaster())
if (target && target->IsGameMaster())
handler->PSendSysMessage(LANG_PINFO_GM_ACTIVE);
// Output III. LANG_PINFO_BANNED if ban exists and is applied
@@ -1803,7 +1803,7 @@ public:
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
// Output XIII. LANG_PINFO_CHR_PHASE if player is not in GM mode (GM is in every phase)
if (target && !target->isGameMaster()) // IsInWorld() returns false on loadingscreen, so it's more
if (target && !target->IsGameMaster()) // IsInWorld() returns false on loadingscreen, so it's more
handler->PSendSysMessage(LANG_PINFO_CHR_PHASE, phase); // precise than just target (safer ?).
// However, as we usually just require a target here, we use target instead.
// Output XIV. LANG_PINFO_CHR_MONEY
@@ -1876,7 +1876,7 @@ public:
Unit* target = handler->getSelectedUnit();
if (player->GetSelection() && target)
{
if (target->GetTypeId() != TYPEID_UNIT || target->isPet())
if (target->GetTypeId() != TYPEID_UNIT || target->IsPet())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
@@ -2232,7 +2232,7 @@ public:
return false;
}
if (!target->isAlive())
if (!target->IsAlive())
return true;
char* damageStr = strtok((char*)args, " ");
@@ -2587,7 +2587,7 @@ public:
Player* player = handler->GetSession()->GetPlayer();
Creature* creatureTarget = handler->getSelectedCreature();
if (!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER)
if (!creatureTarget || creatureTarget->IsPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER)
{
handler->PSendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
@@ -2773,7 +2773,7 @@ public:
{
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
// not let dismiss dead pet
if (pet->isAlive())
if (pet->IsAlive())
player->RemovePet(pet, PET_SAVE_NOT_IN_SLOT);
}
}
+1 -1
View File
@@ -108,7 +108,7 @@ public:
handler->PSendSysMessage("EndPosition (%.3f, %.3f, %.3f)", end.x, end.y, end.z);
handler->PSendSysMessage("ActualEndPosition (%.3f, %.3f, %.3f)", actualEnd.x, actualEnd.y, actualEnd.z);
if (!player->isGameMaster())
if (!player->IsGameMaster())
handler->PSendSysMessage("Enable GM mode to see the path points.");
for (uint32 i = 0; i < pointPath.size(); ++i)
+5 -5
View File
@@ -443,7 +443,7 @@ public:
target->ToPlayer()->SendTalentsInfoData(false);
return true;
}
else if (target->ToCreature()->isPet())
else if (target->ToCreature()->IsPet())
{
Unit* owner = target->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet*)target)->IsPermanentPetFor(owner->ToPlayer()))
@@ -491,7 +491,7 @@ public:
std::string targetNameLink = handler->GetNameLink(target);
if (target->isInFlight())
if (target->IsInFlight())
{
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -539,7 +539,7 @@ public:
std::string targetNameLink = handler->GetNameLink(target);
if (target->isInFlight())
if (target->IsInFlight())
{
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -584,7 +584,7 @@ public:
std::string targetNameLink = handler->GetNameLink(target);
if (target->isInFlight())
if (target->IsInFlight())
{
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
handler->SetSentErrorMessage(true);
@@ -629,7 +629,7 @@ public:
std::string targetNameLink = handler->GetNameLink(target);
if (target->isInFlight())
if (target->IsInFlight())
{
handler->PSendSysMessage(LANG_CHAR_IN_FLIGHT, targetNameLink.c_str());
handler->SetSentErrorMessage(true);
+12 -12
View File
@@ -322,7 +322,7 @@ public:
{
creature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
if (creature->IsAlive()) // dead creature will reset movement generator at respawn
{
creature->setDeathState(JUST_DIED);
creature->Respawn(true);
@@ -396,7 +396,7 @@ public:
return false;
}
if (creature->isPet())
if (creature->IsPet())
{
if (((Pet*)creature)->getPetType() == HUNTER_PET)
{
@@ -437,7 +437,7 @@ public:
else
unit = handler->getSelectedCreature();
if (!unit || unit->isPet() || unit->isTotem())
if (!unit || unit->IsPet() || unit->IsTotem())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
@@ -461,7 +461,7 @@ public:
return false;
Creature* vendor = handler->getSelectedCreature();
if (!vendor || !vendor->isVendor())
if (!vendor || !vendor->IsVendor())
{
handler->SendSysMessage(LANG_COMMAND_VENDORSELECTION);
handler->SetSentErrorMessage(true);
@@ -780,7 +780,7 @@ public:
}
creature->SetPosition(x, y, z, o);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
if (creature->IsAlive()) // dead creature will reset movement generator at respawn
{
creature->setDeathState(JUST_DIED);
creature->Respawn();
@@ -840,7 +840,7 @@ public:
Creature* creature = handler->getSelectedCreature();
if (!creature || creature->isPet())
if (!creature || creature->IsPet())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
@@ -924,7 +924,7 @@ public:
{
type_str = guid_str;
creature = handler->getSelectedCreature();
if (!creature || creature->isPet())
if (!creature || creature->IsPet())
return false;
lowguid = creature->GetDBTableGUIDLow();
}
@@ -982,7 +982,7 @@ public:
creature->SetDefaultMovementType(move_type);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
if (creature->IsAlive()) // dead creature will reset movement generator at respawn
{
creature->setDeathState(JUST_DIED);
creature->Respawn();
@@ -1026,7 +1026,7 @@ public:
creature->SetPhaseMask(phasemask, true);
if (!creature->isPet())
if (!creature->IsPet())
creature->SaveToDB();
return true;
@@ -1060,7 +1060,7 @@ public:
creature->SetRespawnRadius((float)option);
creature->SetDefaultMovementType(mtype);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
if (creature->IsAlive()) // dead creature will reset movement generator at respawn
{
creature->setDeathState(JUST_DIED);
creature->Respawn();
@@ -1276,7 +1276,7 @@ public:
static bool HandleNpcTameCommand(ChatHandler* handler, char const* /*args*/)
{
Creature* creatureTarget = handler->getSelectedCreature();
if (!creatureTarget || creatureTarget->isPet())
if (!creatureTarget || creatureTarget->IsPet())
{
handler->PSendSysMessage (LANG_SELECT_CREATURE);
handler->SetSentErrorMessage (true);
@@ -1294,7 +1294,7 @@ public:
CreatureTemplate const* cInfo = creatureTarget->GetCreatureTemplate();
if (!cInfo->isTameable (player->CanTameExoticPets()))
if (!cInfo->IsTameable (player->CanTameExoticPets()))
{
handler->PSendSysMessage (LANG_CREATURE_NON_TAMEABLE, cInfo->Entry);
handler->SetSentErrorMessage (true);
+1 -1
View File
@@ -208,7 +208,7 @@ public:
{
// Try reset talents as Hunter Pet
Creature* creature = handler->getSelectedCreature();
if (!*args && creature && creature->isPet())
if (!*args && creature && creature->IsPet())
{
Unit* owner = creature->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer()))
+5 -5
View File
@@ -183,7 +183,7 @@ public:
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
// stop flight if need
if (target->isInFlight())
if (target->IsInFlight())
{
target->GetMotionMaster()->MovementExpired();
target->CleanupAfterTaxiFlight();
@@ -257,7 +257,7 @@ public:
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* player = itr->getSource();
Player* player = itr->GetSource();
if (!player || !player->GetSession())
continue;
@@ -279,7 +279,7 @@ public:
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
// stop flight if need
if (player->isInFlight())
if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
@@ -311,7 +311,7 @@ public:
return false;
}
if (me->isInCombat())
if (me->IsInCombat())
{
handler->SendSysMessage(LANG_YOU_IN_COMBAT);
handler->SetSentErrorMessage(true);
@@ -327,7 +327,7 @@ public:
}
// stop flight if need
if (me->isInFlight())
if (me->IsInFlight())
{
me->GetMotionMaster()->MovementExpired();
me->CleanupAfterTaxiFlight();
@@ -129,11 +129,11 @@ class mob_av_marshal_or_warmaster : public CreatureScript
switch (eventId)
{
case EVENT_CHARGE_TARGET:
DoCast(me->getVictim(), SPELL_CHARGE);
DoCast(me->GetVictim(), SPELL_CHARGE);
events.ScheduleEvent(EVENT_CHARGE, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS));
break;
case EVENT_DEMORALIZING_SHOUT:
@@ -69,7 +69,7 @@ public:
if (waterBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_WATERBOLT);
DoCast(me->GetVictim(), SPELL_WATERBOLT);
waterBoltTimer = 5 * IN_MILLISECONDS;
} else waterBoltTimer -= diff;
@@ -159,25 +159,25 @@ public:
if (arcaneExplosionTimer < diff)
{
DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
DoCast(me->GetVictim(), SPELL_ARCANE_EXPLOSION);
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else arcaneExplosionTimer -= diff;
if (coneOfColdTimer < diff)
{
DoCast(me->getVictim(), SPELL_CONE_OF_COLD);
DoCast(me->GetVictim(), SPELL_CONE_OF_COLD);
coneOfColdTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else coneOfColdTimer -= diff;
if (fireBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FIREBALL);
DoCast(me->GetVictim(), SPELL_FIREBALL);
fireBoltTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
} else fireBoltTimer -= diff;
if (frostboltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLT);
DoCast(me->GetVictim(), SPELL_FROSTBOLT);
frostboltTimer = urand(4 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
} else frostboltTimer -= diff;
@@ -82,25 +82,25 @@ public:
if (WhirlwindTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND);
DoCast(me->GetVictim(), SPELL_WHIRLWIND);
WhirlwindTimer = urand(8 * IN_MILLISECONDS, 18 * IN_MILLISECONDS);
} else WhirlwindTimer -= diff;
if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
DoCast(me->GetVictim(), SPELL_WHIRLWIND2);
Whirlwind2Timer = urand(7 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else Whirlwind2Timer -= diff;
if (KnockdownTimer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKDOWN);
DoCast(me->GetVictim(), SPELL_KNOCKDOWN);
KnockdownTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else KnockdownTimer -= diff;
if (FrenzyTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRENZY);
DoCast(me->GetVictim(), SPELL_FRENZY);
FrenzyTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else FrenzyTimer -= diff;
@@ -76,31 +76,31 @@ public:
if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
} else CleaveTimer -= diff;
if (FrighteningShoutTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
DoCast(me->GetVictim(), SPELL_FRIGHTENING_SHOUT);
FrighteningShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else FrighteningShoutTimer -= diff;
if (Whirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
DoCast(me->GetVictim(), SPELL_WHIRLWIND1);
Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 10 * IN_MILLISECONDS);
} else Whirlwind1Timer -= diff;
if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
DoCast(me->GetVictim(), SPELL_WHIRLWIND2);
Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else Whirlwind2Timer -= diff;
if (MortalStrikeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
DoCast(me->GetVictim(), SPELL_MORTAL_STRIKE);
MortalStrikeTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
} else MortalStrikeTimer -= diff;
@@ -71,19 +71,19 @@ public:
if (AvatarTimer <= diff)
{
DoCast(me->getVictim(), SPELL_AVATAR);
DoCast(me->GetVictim(), SPELL_AVATAR);
AvatarTimer = urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else AvatarTimer -= diff;
if (ThunderclapTimer <= diff)
{
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
DoCast(me->GetVictim(), SPELL_THUNDERCLAP);
ThunderclapTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else ThunderclapTimer -= diff;
if (StormboltTimer <= diff)
{
DoCast(me->getVictim(), SPELL_STORMBOLT);
DoCast(me->GetVictim(), SPELL_STORMBOLT);
StormboltTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else StormboltTimer -= diff;
@@ -244,7 +244,7 @@ class boss_alizabal : public CreatureScript
me->RemoveAura(SPELL_BLADE_DANCE_DUMMY);
me->SetSpeed(MOVE_WALK, 1.0f);
me->SetSpeed(MOVE_RUN, 1.14f);
me->GetMotionMaster()->MoveChase(me->getVictim());
me->GetMotionMaster()->MoveChase(me->GetVictim());
Hate = false;
Skewer = false;
break;
@@ -236,7 +236,7 @@ public:
if (RingBossGUID)
{
Creature* boss = Unit::GetCreature(*me, RingBossGUID);
if (boss && !boss->isAlive() && boss->isDead())
if (boss && !boss->IsAlive() && boss->isDead())
{
RingBossGUID = 0;
Event_Timer = 5000;
@@ -249,7 +249,7 @@ public:
for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
{
Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]);
if (mob && !mob->isAlive() && mob->isDead())
if (mob && !mob->IsAlive() && mob->isDead())
{
RingMobGUID[i] = 0;
--MobCount;
@@ -381,7 +381,7 @@ public:
//ThunderClap_Timer
if (ThunderClap_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
DoCast(me->GetVictim(), SPELL_THUNDERCLAP);
ThunderClap_Timer = 10000;
} else ThunderClap_Timer -= diff;
@@ -390,7 +390,7 @@ public:
{
if (FireballVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIREBALLVOLLEY);
DoCast(me->GetVictim(), SPELL_FIREBALLVOLLEY);
FireballVolley_Timer = 15000;
} else FireballVolley_Timer -= diff;
}
@@ -398,7 +398,7 @@ public:
//MightyBlow_Timer
if (MightyBlow_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
DoCast(me->GetVictim(), SPELL_MIGHTYBLOW);
MightyBlow_Timer = 10000;
} else MightyBlow_Timer -= diff;
@@ -481,7 +481,7 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
if (player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE)
@@ -540,10 +540,10 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
if (creature->isVendor() && player->GetReputationRank(59) >= REP_FRIENDLY)
if (creature->IsVendor() && player->GetReputationRank(59) >= REP_FRIENDLY)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 &&
@@ -64,17 +64,17 @@ public:
//FireBlast_Timer
if (FireBlast_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIREBLAST);
DoCast(me->GetVictim(), SPELL_FIREBLAST);
FireBlast_Timer = 7000;
} else FireBlast_Timer -= diff;
//Spirit_Timer
if (Spirit_Timer <= diff)
{
SummonSpirits(me->getVictim());
SummonSpirits(me->getVictim());
SummonSpirits(me->getVictim());
SummonSpirits(me->getVictim());
SummonSpirits(me->GetVictim());
SummonSpirits(me->GetVictim());
SummonSpirits(me->GetVictim());
SummonSpirits(me->GetVictim());
Spirit_Timer = 30000;
} else Spirit_Timer -= diff;
@@ -68,7 +68,7 @@ public:
//ShadowBolt_Timer
if (ShadowBolt_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
DoCast(me->GetVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 7000;
} else ShadowBolt_Timer -= diff;
@@ -83,7 +83,7 @@ public:
//CurseOfWeakness_Timer
if (CurseOfWeakness_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
DoCast(me->GetVictim(), SPELL_CURSEOFWEAKNESS);
CurseOfWeakness_Timer = 45000;
} else CurseOfWeakness_Timer -= diff;
@@ -108,7 +108,7 @@ public:
//AvatarOfFlame_Timer
if (AvatarOfFlame_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_AVATAROFFLAME);
DoCast(me->GetVictim(), SPELL_AVATAROFFLAME);
AvatarOfFlame_Timer = 18000;
} else AvatarOfFlame_Timer -= diff;
@@ -78,21 +78,21 @@ public:
//MightyBlow_Timer
if (MightyBlow_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
DoCast(me->GetVictim(), SPELL_MIGHTYBLOW);
MightyBlow_Timer = 18000;
} else MightyBlow_Timer -= diff;
//HamString_Timer
if (HamString_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMSTRING);
DoCast(me->GetVictim(), SPELL_HAMSTRING);
HamString_Timer = 15000;
} else HamString_Timer -= diff;
//Cleave_Timer
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = 9000;
} else Cleave_Timer -= diff;
@@ -102,9 +102,9 @@ public:
if (Adds_Timer <= diff)
{
// summon 3 Adds every 25s
SummonAdds(me->getVictim());
SummonAdds(me->getVictim());
SummonAdds(me->getVictim());
SummonAdds(me->GetVictim());
SummonAdds(me->GetVictim());
SummonAdds(me->GetVictim());
Adds_Timer = 25000;
} else Adds_Timer -= diff;
@@ -113,8 +113,8 @@ public:
//Summon Medics
if (!Medics && HealthBelowPct(21))
{
SummonMedics(me->getVictim());
SummonMedics(me->getVictim());
SummonMedics(me->GetVictim());
SummonMedics(me->GetVictim());
Medics = true;
}
@@ -68,7 +68,7 @@ public:
//MortalStrike_Timer
if (MortalStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
DoCast(me->GetVictim(), SPELL_MORTALSTRIKE);
MortalStrike_Timer = 15000;
} else MortalStrike_Timer -= diff;
@@ -60,7 +60,7 @@ public:
//GroundTremor_Timer
if (GroundTremor_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
DoCast(me->GetVictim(), SPELL_GROUNDTREMOR);
GroundTremor_Timer = 8000;
} else GroundTremor_Timer -= diff;
@@ -81,7 +81,7 @@ public:
//PsychicScream_Timer
if (PsychicScream_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_PSYCHICSCREAM);
DoCast(me->GetVictim(), SPELL_PSYCHICSCREAM);
PsychicScream_Timer = 30000;
} else PsychicScream_Timer -= diff;
@@ -64,7 +64,7 @@ public:
//FieryBurst_Timer
if (FieryBurst_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIERYBURST);
DoCast(me->GetVictim(), SPELL_FIERYBURST);
FieryBurst_Timer = 6000;
} else FieryBurst_Timer -= diff;
@@ -73,7 +73,7 @@ public:
{
if (WarStomp_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WARSTOMP);
DoCast(me->GetVictim(), SPELL_WARSTOMP);
WarStomp_Timer = 8000;
} else WarStomp_Timer -= diff;
}
@@ -67,21 +67,21 @@ public:
//MindBlast_Timer
if (MindBlast_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MINDBLAST);
DoCast(me->GetVictim(), SPELL_MINDBLAST);
MindBlast_Timer = 14000;
} else MindBlast_Timer -= diff;
//ShadowWordPain_Timer
if (ShadowWordPain_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
DoCast(me->GetVictim(), SPELL_SHADOWWORDPAIN);
ShadowWordPain_Timer = 18000;
} else ShadowWordPain_Timer -= diff;
//Smite_Timer
if (Smite_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SMITE);
DoCast(me->GetVictim(), SPELL_SMITE);
Smite_Timer = 10000;
} else Smite_Timer -= diff;
}
@@ -189,7 +189,7 @@ public:
me->DeleteThreatList();
me->CombatStop(true);
me->LoadCreaturesAddon();
if (me->isAlive())
if (me->IsAlive())
me->GetMotionMaster()->MoveTargetedHome();
me->SetLootRecipient(NULL);
if (instance)
@@ -210,7 +210,7 @@ public:
//ShadowVolley_Timer
if (ShadowVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
DoCast(me->GetVictim(), SPELL_SHADOWBOLTVOLLEY);
ShadowVolley_Timer = 12000;
} else ShadowVolley_Timer -= diff;
@@ -226,7 +226,7 @@ public:
//CurseOfWeakness_Timer
if (CurseOfWeakness_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
DoCast(me->GetVictim(), SPELL_CURSEOFWEAKNESS);
CurseOfWeakness_Timer = 45000;
} else CurseOfWeakness_Timer -= diff;
@@ -240,7 +240,7 @@ public:
//Summon Voidwalkers
if (!Voidwalkers && HealthBelowPct(51))
{
DoCast(me->getVictim(), SPELL_SUMMON_VOIDWALKERS, true);
DoCast(me->GetVictim(), SPELL_SUMMON_VOIDWALKERS, true);
Voidwalkers = true;
}
@@ -170,7 +170,7 @@ public:
case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break;
case NPC_MAGMUS:
MagmusGUID = creature->GetGUID();
if (!creature->isAlive())
if (!creature->IsAlive())
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
break;
}
@@ -392,7 +392,7 @@ public:
{
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
{
if (!boss->isAlive())
if (!boss->IsAlive())
{//do not call EnterEvadeMode(), it will create infinit loops
boss->Respawn();
boss->RemoveAllAuras();
@@ -441,7 +441,7 @@ public:
{
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
{
if (!boss->isAlive())
if (!boss->IsAlive())
{
GhostKillCount = i+1;
}
@@ -84,19 +84,19 @@ public:
switch (eventId)
{
case EVENT_FIRE_NOVA:
DoCast(me->getVictim(), SPELL_FIRENOVA);
DoCast(me->GetVictim(), SPELL_FIRENOVA);
events.ScheduleEvent(EVENT_FIRE_NOVA, 10 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
break;
case EVENT_CONFLIGURATION:
DoCast(me->getVictim(), SPELL_CONFLIGURATION);
DoCast(me->GetVictim(), SPELL_CONFLIGURATION);
events.ScheduleEvent(EVENT_CONFLIGURATION, 18 * IN_MILLISECONDS);
break;
case EVENT_THUNDERCLAP:
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
DoCast(me->GetVictim(), SPELL_THUNDERCLAP);
events.ScheduleEvent(EVENT_THUNDERCLAP, 20 * IN_MILLISECONDS);
break;
}
@@ -151,15 +151,15 @@ public:
events.CancelEvent(EVENT_SUMMON_ORC_PACK);
break;
case EVENT_CORROSIVE_ACID:
DoCast(me->getVictim(), SPELL_CORROSIVE_ACID);
DoCast(me->GetVictim(), SPELL_CORROSIVE_ACID);
events.ScheduleEvent(EVENT_CORROSIVE_ACID, 7 * IN_MILLISECONDS);
break;
case EVENT_FREEZE:
DoCast(me->getVictim(), SPELL_FREEZE);
DoCast(me->GetVictim(), SPELL_FREEZE);
events.ScheduleEvent(EVENT_FREEZE, 16 * IN_MILLISECONDS);
break;
case EVENT_FLAME_BREATH:
DoCast(me->getVictim(), SPELL_FLAMEBREATH);
DoCast(me->GetVictim(), SPELL_FLAMEBREATH);
events.ScheduleEvent(EVENT_FLAME_BREATH, 10500);
break;
}
@@ -90,11 +90,11 @@ public:
switch (eventId)
{
case EVENT_CROWD_PUMMEL:
DoCast(me->getVictim(), SPELL_CROWDPUMMEL);
DoCast(me->GetVictim(), SPELL_CROWDPUMMEL);
events.ScheduleEvent(EVENT_CROWD_PUMMEL, 14 * IN_MILLISECONDS);
break;
case EVENT_MIGHTY_BLOW:
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
DoCast(me->GetVictim(), SPELL_MIGHTYBLOW);
events.ScheduleEvent(EVENT_MIGHTY_BLOW, 10 * IN_MILLISECONDS);
break;
}
@@ -93,31 +93,31 @@ public:
switch (eventId)
{
case EVENT_WARSTOMP:
DoCast(me->getVictim(), SPELL_WARSTOMP);
DoCast(me->GetVictim(), SPELL_WARSTOMP);
events.ScheduleEvent(EVENT_WARSTOMP, 14 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
break;
case EVENT_STRIKE:
DoCast(me->getVictim(), SPELL_STRIKE);
DoCast(me->GetVictim(), SPELL_STRIKE);
events.ScheduleEvent(EVENT_STRIKE, 10 * IN_MILLISECONDS);
break;
case EVENT_REND:
DoCast(me->getVictim(), SPELL_REND);
DoCast(me->GetVictim(), SPELL_REND);
events.ScheduleEvent(EVENT_REND, 18 * IN_MILLISECONDS);
break;
case EVENT_SUNDER_ARMOR:
DoCast(me->getVictim(), SPELL_SUNDERARMOR);
DoCast(me->GetVictim(), SPELL_SUNDERARMOR);
events.ScheduleEvent(EVENT_SUNDER_ARMOR, 25 * IN_MILLISECONDS);
break;
case EVENT_KNOCK_AWAY:
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
DoCast(me->GetVictim(), SPELL_KNOCKAWAY);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS);
break;
case EVENT_SLOW:
DoCast(me->getVictim(), SPELL_SLOW);
DoCast(me->GetVictim(), SPELL_SLOW);
events.ScheduleEvent(EVENT_SLOW, 18 * IN_MILLISECONDS);
break;
}
@@ -108,19 +108,19 @@ public:
switch (eventId)
{
case EVENT_BLAST_WAVE:
DoCast(me->getVictim(), SPELL_BLASTWAVE);
DoCast(me->GetVictim(), SPELL_BLASTWAVE);
events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS);
break;
case EVENT_SHOUT:
DoCast(me->getVictim(), SPELL_SHOUT);
DoCast(me->GetVictim(), SPELL_SHOUT);
events.ScheduleEvent(EVENT_SHOUT, 10 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS);
break;
case EVENT_KNOCK_AWAY:
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
DoCast(me->GetVictim(), SPELL_KNOCKAWAY);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 14 * IN_MILLISECONDS);
break;
}
@@ -80,11 +80,11 @@ public:
switch (eventId)
{
case EVENT_SHOOT:
DoCast(me->getVictim(), SPELL_SHOOT);
DoCast(me->GetVictim(), SPELL_SHOOT);
events.ScheduleEvent(EVENT_SHOOT, 500);
break;
case EVENT_STUN_BOMB:
DoCast(me->getVictim(), SPELL_STUNBOMB);
DoCast(me->GetVictim(), SPELL_STUNBOMB);
events.ScheduleEvent(EVENT_STUN_BOMB, 14 * IN_MILLISECONDS);
break;
}
@@ -81,15 +81,15 @@ public:
switch (eventId)
{
case EVENT_WHIRLWIND:
DoCast(me->getVictim(), SPELL_WHIRLWIND);
DoCast(me->GetVictim(), SPELL_WHIRLWIND);
events.ScheduleEvent(EVENT_WHIRLWIND, 18 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 10 * IN_MILLISECONDS);
break;
case EVENT_THUNDERCLAP:
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
DoCast(me->GetVictim(), SPELL_THUNDERCLAP);
events.ScheduleEvent(EVENT_THUNDERCLAP, 16 * IN_MILLISECONDS);
break;
}
@@ -82,7 +82,7 @@ public:
switch (eventId)
{
case EVENT_CURSE_OF_BLOOD:
DoCast(me->getVictim(), SPELL_CURSEOFBLOOD);
DoCast(me->GetVictim(), SPELL_CURSEOFBLOOD);
events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45 * IN_MILLISECONDS);
break;
case EVENT_HEX:
@@ -91,7 +91,7 @@ public:
events.ScheduleEvent(EVENT_HEX, 15 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS);
break;
}
@@ -81,7 +81,7 @@ public:
switch (eventId)
{
case EVENT_FLAME_BREAK:
DoCast(me->getVictim(), SPELL_FLAMEBREAK);
DoCast(me->GetVictim(), SPELL_FLAMEBREAK);
events.ScheduleEvent(EVENT_FLAME_BREAK, 10 * IN_MILLISECONDS);
break;
case EVENT_IMMOLATE:
@@ -90,7 +90,7 @@ public:
events.ScheduleEvent(EVENT_IMMOLATE, 8 * IN_MILLISECONDS);
break;
case EVENT_TERRIFYING_ROAR:
DoCast(me->getVictim(), SPELL_TERRIFYINGROAR);
DoCast(me->GetVictim(), SPELL_TERRIFYINGROAR);
events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS);
break;
}
@@ -90,27 +90,27 @@ public:
switch (eventId)
{
case EVENT_SNAP_KICK:
DoCast(me->getVictim(), SPELL_SNAPKICK);
DoCast(me->GetVictim(), SPELL_SNAPKICK);
events.ScheduleEvent(EVENT_SNAP_KICK, 6 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 12 * IN_MILLISECONDS);
break;
case EVENT_UPPERCUT:
DoCast(me->getVictim(), SPELL_UPPERCUT);
DoCast(me->GetVictim(), SPELL_UPPERCUT);
events.ScheduleEvent(EVENT_UPPERCUT, 14 * IN_MILLISECONDS);
break;
case EVENT_MORTAL_STRIKE:
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
DoCast(me->GetVictim(), SPELL_MORTALSTRIKE);
events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10 * IN_MILLISECONDS);
break;
case EVENT_PUMMEL:
DoCast(me->getVictim(), SPELL_PUMMEL);
DoCast(me->GetVictim(), SPELL_PUMMEL);
events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16 * IN_MILLISECONDS);
break;
case EVENT_THROW_AXE:
DoCast(me->getVictim(), SPELL_THROWAXE);
DoCast(me->GetVictim(), SPELL_THROWAXE);
events.ScheduleEvent(EVENT_THROW_AXE, 8 * IN_MILLISECONDS);
break;
}
@@ -105,7 +105,7 @@ public:
events.ScheduleEvent(EVENT_BLAST_WAVE, 12000);
break;
case EVENT_KNOCK_BACK:
if (Unit* target = me->getVictim())
if (Unit* target = me->GetVictim())
{
DoCast(target, SPELL_BLAST_WAVE);
// Drop 50% of threat
@@ -226,14 +226,14 @@ public:
//Breath1_Timer
if (Breath1_Timer <= diff)
{
DoCast(me->getVictim(), Breath1_Spell);
DoCast(me->GetVictim(), Breath1_Spell);
Breath1_Timer = 60000;
} else Breath1_Timer -= diff;
//Breath2_Timer
if (Breath2_Timer <= diff)
{
DoCast(me->getVictim(), Breath2_Spell);
DoCast(me->GetVictim(), Breath2_Spell);
Breath2_Timer = 60000;
} else Breath2_Timer -= diff;
@@ -243,7 +243,7 @@ public:
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
{
if ((*i) && (*i)->getSource())
if ((*i) && (*i)->GetSource())
{
if (Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid()))
{
@@ -99,7 +99,7 @@ public:
ShadowOfEbonroc_Timer = urand(25000, 350000);
} else ShadowOfEbonroc_Timer -= diff;
if (me->getVictim() && me->getVictim()->HasAura(SPELL_SHADOWOFEBONROC))
if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_SHADOWOFEBONROC))
{
if (Heal_Timer <= diff)
{
@@ -75,7 +75,7 @@ public:
//WingBuffet_Timer
if (WingBuffet_Timer <= diff)
{
if (Unit* target = me->getVictim())
if (Unit* target = me->GetVictim())
{
DoCast(target, SPELL_WINGBUFFET);
if (DoGetThreat(target))
@@ -83,7 +83,7 @@ public:
//WingBuffet_Timer
if (WingBuffet_Timer <= diff)
{
if (Unit* target = me->getVictim())
if (Unit* target = me->GetVictim())
{
DoCast(target, SPELL_WINGBUFFET);
if (DoGetThreat(target))
@@ -138,28 +138,28 @@ public:
//ShadowFlame_Timer
if (ShadowFlame_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
DoCast(me->GetVictim(), SPELL_SHADOWFLAME);
ShadowFlame_Timer = 12000;
} else ShadowFlame_Timer -= diff;
//BellowingRoar_Timer
if (BellowingRoar_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_BELLOWINGROAR);
DoCast(me->GetVictim(), SPELL_BELLOWINGROAR);
BellowingRoar_Timer = 30000;
} else BellowingRoar_Timer -= diff;
//VeilOfShadow_Timer
if (VeilOfShadow_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_VEILOFSHADOW);
DoCast(me->GetVictim(), SPELL_VEILOFSHADOW);
VeilOfShadow_Timer = 15000;
} else VeilOfShadow_Timer -= diff;
//Cleave_Timer
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = 7000;
} else Cleave_Timer -= diff;
@@ -167,7 +167,7 @@ public:
if (TailLash_Timer <= diff)
{
//Cast NYI since we need a better check for behind target
//DoCast(me->getVictim(), SPELL_TAILLASH);
//DoCast(me->GetVictim(), SPELL_TAILLASH);
TailLash_Timer = 10000;
} else TailLash_Timer -= diff;
@@ -89,38 +89,38 @@ public:
//Cleave_Timer
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = urand(7000, 10000);
} else Cleave_Timer -= diff;
//WarStomp_Timer
if (WarStomp_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WARSTOMP);
DoCast(me->GetVictim(), SPELL_WARSTOMP);
WarStomp_Timer = urand(15000, 25000);
} else WarStomp_Timer -= diff;
//FireballVolley_Timer
if (FireballVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIREBALLVOLLEY);
DoCast(me->GetVictim(), SPELL_FIREBALLVOLLEY);
FireballVolley_Timer = urand(12000, 15000);
} else FireballVolley_Timer -= diff;
//Conflagration_Timer
if (Conflagration_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CONFLAGRATION);
DoCast(me->GetVictim(), SPELL_CONFLAGRATION);
//We will remove this threat reduction and add an aura check.
//if (DoGetThreat(me->getVictim()))
//DoModifyThreatPercent(me->getVictim(), -50);
//if (DoGetThreat(me->GetVictim()))
//DoModifyThreatPercent(me->GetVictim(), -50);
Conflagration_Timer = 12000;
} else Conflagration_Timer -= diff;
// Aura Check. If the gamer is affected by confliguration we attack a random gamer.
if (me->getVictim() && me->getVictim()->HasAura(SPELL_CONFLAGRATION))
if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
me->TauntApply(target);
@@ -74,7 +74,7 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -205,14 +205,14 @@ public:
//Cleave_Timer
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = 15000;
} else Cleave_Timer -= diff;
//FlameBreath_Timer
if (FlameBreath_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FLAMEBREATH);
DoCast(me->GetVictim(), SPELL_FLAMEBREATH);
FlameBreath_Timer = urand(4000, 8000);
} else FlameBreath_Timer -= diff;
@@ -240,7 +240,7 @@ public:
{
// have the victim cast the spell on himself otherwise the third effect aura will be applied
// to Vael instead of the player
me->getVictim()->CastSpell(me->getVictim(), SPELL_BURNINGADRENALINE, 1);
me->GetVictim()->CastSpell(me->GetVictim(), SPELL_BURNINGADRENALINE, 1);
BurningAdrenalineTank_Timer = 45000;
} else BurningAdrenalineTank_Timer -= diff;
@@ -248,7 +248,7 @@ public:
//FireNova_Timer
if (FireNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIRENOVA);
DoCast(me->GetVictim(), SPELL_FIRENOVA);
FireNova_Timer = 5000;
} else FireNova_Timer -= diff;
@@ -256,9 +256,9 @@ public:
if (TailSwipe_Timer <= diff)
{
//Only cast if we are behind
/*if (!me->HasInArc(M_PI, me->getVictim()))
/*if (!me->HasInArc(M_PI, me->GetVictim()))
{
DoCast(me->getVictim(), SPELL_TAILSWIPE);
DoCast(me->GetVictim(), SPELL_TAILSWIPE);
}*/
TailSwipe_Timer = 20000;
@@ -379,7 +379,7 @@ public:
//If nef is dead then we die to so the players get out of combat
//and cannot repeat the event
if (!Nefarian || !Nefarian->isAlive())
if (!Nefarian || !Nefarian->IsAlive())
{
NefarianGUID = 0;
me->DespawnOrUnsummon();
@@ -110,7 +110,7 @@ public:
if (uiSlamTimer <= uiDiff)
{
if (bCheckChances())
DoCast(me->getVictim(), SPELL_SMITE_SLAM);
DoCast(me->GetVictim(), SPELL_SMITE_SLAM);
uiSlamTimer = 11000;
} else uiSlamTimer -= uiDiff;
@@ -156,7 +156,7 @@ public:
break;
case 3:
SetCombatMovement(true);
me->GetMotionMaster()->MoveChase(me->getVictim(), me->m_CombatDistance);
me->GetMotionMaster()->MoveChase(me->GetVictim(), me->m_CombatDistance);
uiPhase = 0;
break;
}
@@ -232,7 +232,7 @@ public:
{
if (Creature* summon = Unit::GetCreature(*me, *itr))
{
if (summon->isAlive())
if (summon->IsAlive())
summon->DisappearAndDie();
else
summon->RemoveCorpse();
@@ -249,12 +249,12 @@ public:
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
if (Player* player = i->getSource())
if (Player* player = i->GetSource())
{
if (player->isGameMaster())
if (player->IsGameMaster())
continue;
if (player->isAlive())
if (player->IsAlive())
{
temp->SetInCombatWith(player);
player->SetInCombatWith(temp);
@@ -565,7 +565,7 @@ public:
void SetDataSummoner()
{
if (!me->isSummon())
if (!me->IsSummon())
return;
if (Unit* summon = me->ToTempSummon()->GetSummoner())
@@ -583,7 +583,7 @@ public:
void JustDied(Unit* /*killer*/)
{
if (!me->isSummon())
if (!me->IsSummon())
return;
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
@@ -108,7 +108,7 @@ public:
if (Repentance_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_REPENTANCE);
DoCast(me->GetVictim(), SPELL_REPENTANCE);
Talk(SAY_REPENTANCE);
Repentance_Timer = urand(25000, 35000); //A little randomness on that spell
@@ -164,7 +164,7 @@ public:
if (Creature* attumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
{
Attumen = attumen->GetGUID();
attumen->AI()->AttackStart(me->getVictim());
attumen->AI()->AttackStart(me->GetVictim());
SetMidnight(attumen, me->GetGUID());
Talk(SAY_APPEAR, Attumen);
}
@@ -187,10 +187,10 @@ public:
{
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (pAttumen->getVictim())
if (pAttumen->GetVictim())
{
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
pAttumen->SetTarget(pAttumen->getVictim()->GetGUID());
pAttumen->GetMotionMaster()->MoveChase(pAttumen->GetVictim());
pAttumen->SetTarget(pAttumen->GetVictim()->GetGUID());
}
pAttumen->SetObjectScale(1);
}
@@ -262,13 +262,13 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWCLEAVE);
DoCast(me->GetVictim(), SPELL_SHADOWCLEAVE);
CleaveTimer = urand(10000, 15000);
} else CleaveTimer -= diff;
if (CurseTimer <= diff)
{
DoCast(me->getVictim(), SPELL_INTANGIBLE_PRESENCE);
DoCast(me->GetVictim(), SPELL_INTANGIBLE_PRESENCE);
CurseTimer = 30000;
} else CurseTimer -= diff;
@@ -205,7 +205,7 @@ public:
if (AddGUID[i])
{
Creature* temp = Creature::GetCreature((*me), AddGUID[i]);
if (temp && temp->isAlive())
if (temp && temp->IsAlive())
temp->DisappearAndDie();
}
}
@@ -218,9 +218,9 @@ public:
if (AddGUID[i])
{
Creature* temp = Creature::GetCreature((*me), AddGUID[i]);
if (temp && temp->isAlive())
if (temp && temp->IsAlive())
{
temp->AI()->AttackStart(me->getVictim());
temp->AI()->AttackStart(me->GetVictim());
DoZoneInCombat(temp);
} else
EnterEvadeMode();
@@ -252,9 +252,9 @@ public:
if (AddGUID[i])
{
Creature* temp = Unit::GetCreature((*me), AddGUID[i]);
if (temp && temp->isAlive())
if (!temp->getVictim())
temp->AI()->AttackStart(me->getVictim());
if (temp && temp->IsAlive())
if (!temp->GetVictim())
temp->AI()->AttackStart(me->GetVictim());
}
}
CheckAdds_Timer = 5000;
@@ -347,7 +347,7 @@ struct boss_moroes_guestAI : public ScriptedAI
if (TempGUID)
{
Unit* unit = Unit::GetUnit(*me, TempGUID);
if (unit && unit->isAlive())
if (unit && unit->IsAlive())
return unit;
}
@@ -430,7 +430,7 @@ public:
if (MindFlay_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MINDFLY);
DoCast(me->GetVictim(), SPELL_MINDFLY);
MindFlay_Timer = 12000; // 3 sec channeled
} else MindFlay_Timer -= diff;
@@ -498,13 +498,13 @@ public:
if (JudgementOfCommand_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_JUDGEMENTOFCOMMAND);
DoCast(me->GetVictim(), SPELL_JUDGEMENTOFCOMMAND);
JudgementOfCommand_Timer = SealOfCommand_Timer + 29000;
} else JudgementOfCommand_Timer -= diff;
if (HammerOfJustice_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMMEROFJUSTICE);
DoCast(me->GetVictim(), SPELL_HAMMEROFJUSTICE);
HammerOfJustice_Timer = 12000;
} else HammerOfJustice_Timer -= diff;
}
@@ -566,7 +566,7 @@ public:
if (HolyFire_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HOLYFIRE);
DoCast(me->GetVictim(), SPELL_HOLYFIRE);
HolyFire_Timer = 22000;
} else HolyFire_Timer -= diff;
@@ -692,13 +692,13 @@ public:
if (Hamstring_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMSTRING);
DoCast(me->GetVictim(), SPELL_HAMSTRING);
Hamstring_Timer = 12000;
} else Hamstring_Timer -= diff;
if (MortalStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
DoCast(me->GetVictim(), SPELL_MORTALSTRIKE);
MortalStrike_Timer = 18000;
} else MortalStrike_Timer -= diff;
@@ -750,19 +750,19 @@ public:
if (Disarm_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_DISARM);
DoCast(me->GetVictim(), SPELL_DISARM);
Disarm_Timer = 12000;
} else Disarm_Timer -= diff;
if (HeroicStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HEROICSTRIKE);
DoCast(me->GetVictim(), SPELL_HEROICSTRIKE);
HeroicStrike_Timer = 10000;
} else HeroicStrike_Timer -= diff;
if (ShieldBash_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHIELDBASH);
DoCast(me->GetVictim(), SPELL_SHIELDBASH);
ShieldBash_Timer = 13000;
} else ShieldBash_Timer -= diff;
@@ -184,8 +184,8 @@ public:
// get the best suitable target
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
Player* p = i->getSource();
if (p && p->isAlive() // alive
Player* p = i->GetSource();
if (p && p->IsAlive() // alive
&& (!target || target->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
&& !p->HasAura(PlayerDebuff[j], 0) // not exhausted
&& !p->HasAura(PlayerBuff[(j+1)%3], 0) // not on another beam
@@ -219,8 +219,8 @@ public:
}
}
// aggro target if Red Beam
if (j == RED_PORTAL && me->getVictim() != target && target->GetTypeId() == TYPEID_PLAYER)
me->getThreatManager().addThreat(target, 100000.0f+DoGetThreat(me->getVictim()));
if (j == RED_PORTAL && me->GetVictim() != target && target->GetTypeId() == TYPEID_PLAYER)
me->getThreatManager().addThreat(target, 100000.0f+DoGetThreat(me->GetVictim()));
}
}
@@ -237,7 +237,7 @@ public:
void JustSummoned(Creature* summoned)
{
summoned->AI()->AttackStart(me->getVictim());
summoned->AI()->AttackStart(me->GetVictim());
}
void TakeOff()
@@ -309,19 +309,19 @@ public:
{
if (Movement)
{
DoStartMovement(me->getVictim());
DoStartMovement(me->GetVictim());
Movement = false;
}
if (BellowingRoarTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BELLOWING_ROAR);
DoCast(me->GetVictim(), SPELL_BELLOWING_ROAR);
BellowingRoarTimer = urand(30000, 40000);
} else BellowingRoarTimer -= diff;
if (SmolderingBreathTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SMOLDERING_BREATH);
DoCast(me->GetVictim(), SPELL_SMOLDERING_BREATH);
SmolderingBreathTimer = 20000;
} else SmolderingBreathTimer -= diff;
@@ -370,14 +370,14 @@ public:
{
for (uint8 i = 0; i <= 3; ++i)
{
DoCast(me->getVictim(), SPELL_SUMMON_SKELETON);
DoCast(me->GetVictim(), SPELL_SUMMON_SKELETON);
Skeletons = true;
}
}
if (RainofBonesTimer < diff && !RainBones) // only once at the beginning of phase 2
{
DoCast(me->getVictim(), SPELL_RAIN_OF_BONES);
DoCast(me->GetVictim(), SPELL_RAIN_OF_BONES);
RainBones = true;
SmokingBlastTimer = 20000;
} else RainofBonesTimer -= diff;
@@ -394,7 +394,7 @@ public:
{
if (SmokingBlastTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SMOKING_BLAST);
DoCast(me->GetVictim(), SPELL_SMOKING_BLAST);
SmokingBlastTimer = 1500; //timer wrong
} else SmokingBlastTimer -= diff;
}
@@ -276,7 +276,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 (pInfernal->isAlive())
if (pInfernal->IsAlive())
{
pInfernal->SetVisible(false);
pInfernal->setDeathState(JUST_DIED);
@@ -290,7 +290,7 @@ public:
for (uint8 i = 0; i < 2; ++i)
{
Unit* axe = Unit::GetUnit(*me, axes[i]);
if (axe && axe->isAlive())
if (axe && axe->IsAlive())
axe->Kill(axe);
axes[i] = 0;
}
@@ -324,7 +324,7 @@ public:
std::advance(itr, 1);
for (; itr != t_list.end(); ++itr) //store the threat list in a different container
if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
if (target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
targets.push_back(target);
//cut down to size if we have more than 5 targets
@@ -348,7 +348,7 @@ public:
for (uint8 i = 0; i < 5; ++i)
{
Unit* target = Unit::GetUnit(*me, enfeeble_targets[i]);
if (target && target->isAlive())
if (target && target->IsAlive())
target->SetHealth(enfeeble_health[i]);
enfeeble_targets[i] = 0;
enfeeble_health[i] = 0;
@@ -400,8 +400,8 @@ public:
if (me->HasUnitState(UNIT_STATE_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
return;
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->getVictim()->GetGUID())
me->SetTarget(me->getVictim()->GetGUID());
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->GetVictim()->GetGUID())
me->SetTarget(me->GetVictim()->GetGUID());
if (phase == 1)
{
@@ -480,13 +480,13 @@ public:
if (SunderArmorTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SUNDER_ARMOR);
DoCast(me->GetVictim(), SPELL_SUNDER_ARMOR);
SunderArmorTimer = urand(10000, 18000);
} else SunderArmorTimer -= diff;
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = urand(6000, 12000);
} else Cleave_Timer -= diff;
}
@@ -502,11 +502,11 @@ public:
{
if (Unit* axe = Unit::GetUnit(*me, axes[i]))
{
if (axe->getVictim())
DoModifyThreatPercent(axe->getVictim(), -100);
if (axe->GetVictim())
DoModifyThreatPercent(axe->GetVictim(), -100);
if (target)
axe->AddThreat(target, 1000000.0f);
//axe->getThreatManager().tauntFadeOut(axe->getVictim());
//axe->getThreatManager().tauntFadeOut(axe->GetVictim());
//axe->getThreatManager().tauntApply(target);
}
}
@@ -530,7 +530,7 @@ public:
if (ShadowNovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWNOVA);
DoCast(me->GetVictim(), SPELL_SHADOWNOVA);
ShadowNovaTimer = phase == 3 ? 31000 : uint32(-1);
} else ShadowNovaTimer -= diff;
@@ -540,7 +540,7 @@ public:
{
Unit* target = NULL;
if (phase == 1)
target = me->getVictim(); // the tank
target = me->GetVictim(); // the tank
else // anyone but the tank
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
@@ -570,18 +570,18 @@ public:
void DoMeleeAttacksIfReady()
{
if (me->IsWithinMeleeRange(me->getVictim()) && !me->IsNonMeleeSpellCasted(false))
if (me->IsWithinMeleeRange(me->GetVictim()) && !me->IsNonMeleeSpellCasted(false))
{
//Check for base attack
if (me->isAttackReady() && me->getVictim())
if (me->isAttackReady() && me->GetVictim())
{
me->AttackerStateUpdate(me->getVictim());
me->AttackerStateUpdate(me->GetVictim());
me->resetAttackTimer();
}
//Check for offhand attack
if (me->isAttackReady(OFF_ATTACK) && me->getVictim())
if (me->isAttackReady(OFF_ATTACK) && me->GetVictim())
{
me->AttackerStateUpdate(me->getVictim(), OFF_ATTACK);
me->AttackerStateUpdate(me->GetVictim(), OFF_ATTACK);
me->resetAttackTimer(OFF_ATTACK);
}
}
@@ -605,7 +605,7 @@ void netherspite_infernal::netherspite_infernalAI::Cleanup()
{
Creature* pMalchezaar = Unit::GetCreature(*me, malchezaar);
if (pMalchezaar && pMalchezaar->isAlive())
if (pMalchezaar && pMalchezaar->IsAlive())
CAST_AI(boss_malchezaar::boss_malchezaarAI, pMalchezaar->AI())->Cleanup(me, point);
}
@@ -195,7 +195,7 @@ public:
{
Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
//only on alive players
if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
if (target && target->IsAlive() && target->GetTypeId() == TYPEID_PLAYER)
targets.push_back(target);
}
@@ -424,7 +424,7 @@ public:
{
if (Creature* unit = me->SummonCreature(CREATURE_WATER_ELEMENTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
unit->Attack(me->getVictim(), true);
unit->Attack(me->GetVictim(), true);
unit->setFaction(me->getFaction());
}
}
@@ -438,7 +438,7 @@ public:
{
if (Creature* unit = me->SummonCreature(CREATURE_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
{
unit->Attack(me->getVictim(), true);
unit->Attack(me->GetVictim(), true);
unit->setFaction(me->getFaction());
}
}
@@ -538,7 +538,7 @@ public:
if (CastTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WATERBOLT);
DoCast(me->GetVictim(), SPELL_WATERBOLT);
CastTimer = urand(2000, 5000);
} else CastTimer -= diff;
}
@@ -105,7 +105,7 @@ public:
if (TerestianGUID)
{
Unit* Terestian = Unit::GetUnit(*me, TerestianGUID);
if (Terestian && Terestian->isAlive())
if (Terestian && Terestian->IsAlive())
DoCast(Terestian, SPELL_BROKEN_PACT, true);
}
} else ERROR_INST_DATA(me);
@@ -120,7 +120,7 @@ public:
if (AmplifyTimer <= diff)
{
me->InterruptNonMeleeSpells(false);
DoCast(me->getVictim(), SPELL_AMPLIFY_FLAMES);
DoCast(me->GetVictim(), SPELL_AMPLIFY_FLAMES);
AmplifyTimer = urand(10000, 20000);
} else AmplifyTimer -= diff;
@@ -236,7 +236,7 @@ public:
if (FireboltTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FIREBOLT);
DoCast(me->GetVictim(), SPELL_FIREBOLT);
FireboltTimer = 2200;
} else FireboltTimer -= diff;
@@ -309,7 +309,7 @@ public:
if (Minion* Kilrek = me->GetFirstMinion())
{
if (!Kilrek->isAlive())
if (!Kilrek->IsAlive())
{
Kilrek->UnSummon();
DoCast(me, SPELL_SUMMON_IMP, true);
@@ -370,7 +370,7 @@ public:
if (SacrificeTimer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (target && target->isAlive())
if (target && target->IsAlive())
{
DoCast(target, SPELL_SACRIFICE, true);
DoCast(target, SPELL_SUMMON_DEMONCHAINS, true);
@@ -394,15 +394,15 @@ public:
if (SummonTimer <= diff)
{
if (!PortalGUID[0])
DoCast(me->getVictim(), SPELL_FIENDISH_PORTAL, false);
DoCast(me->GetVictim(), SPELL_FIENDISH_PORTAL, false);
if (!PortalGUID[1])
DoCast(me->getVictim(), SPELL_FIENDISH_PORTAL_1, false);
DoCast(me->GetVictim(), SPELL_FIENDISH_PORTAL_1, false);
if (PortalGUID[0] && PortalGUID[1])
{
if (Creature* pPortal = Unit::GetCreature(*me, PortalGUID[urand(0, 1)]))
pPortal->CastSpell(me->getVictim(), SPELL_SUMMON_FIENDISIMP, false);
pPortal->CastSpell(me->GetVictim(), SPELL_SUMMON_FIENDISIMP, false);
SummonTimer = 5000;
}
} else SummonTimer -= diff;
@@ -105,8 +105,8 @@ void SummonCroneIfReady(InstanceScript* instance, Creature* creature)
{
if (Creature* pCrone = creature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, creature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
if (creature->getVictim())
pCrone->AI()->AttackStart(creature->getVictim());
if (creature->GetVictim())
pCrone->AI()->AttackStart(creature->GetVictim());
}
}
};
@@ -209,7 +209,7 @@ public:
if (FearTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SCREAM);
DoCast(me->GetVictim(), SPELL_SCREAM);
FearTimer = 30000;
} else FearTimer -= diff;
@@ -255,7 +255,7 @@ public:
if (DorotheeGUID)
{
Creature* Dorothee = (Unit::GetCreature((*me), DorotheeGUID));
if (Dorothee && Dorothee->isAlive())
if (Dorothee && Dorothee->IsAlive())
{
CAST_AI(boss_dorothee::boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee->GetGUID());
@@ -270,7 +270,7 @@ public:
if (YipTimer <= diff)
{
DoCast(me->getVictim(), SPELL_YIPPING);
DoCast(me->GetVictim(), SPELL_YIPPING);
YipTimer = 10000;
} else YipTimer -= diff;
@@ -285,7 +285,7 @@ void boss_dorothee::boss_dorotheeAI::SummonTito()
{
Talk(SAY_DOROTHEE_SUMMON);
CAST_AI(mob_tito::mob_titoAI, pTito->AI())->DorotheeGUID = me->GetGUID();
pTito->AI()->AttackStart(me->getVictim());
pTito->AI()->AttackStart(me->GetVictim());
SummonedTito = true;
TitoDied = false;
}
@@ -389,7 +389,7 @@ public:
if (BrainBashTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BRAIN_BASH);
DoCast(me->GetVictim(), SPELL_BRAIN_BASH);
BrainBashTimer = 15000;
} else BrainBashTimer -= diff;
@@ -494,7 +494,7 @@ public:
if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
CleaveTimer = 5000;
} else CleaveTimer -= diff;
@@ -601,19 +601,19 @@ public:
if (MangleTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MANGLE);
DoCast(me->GetVictim(), SPELL_MANGLE);
MangleTimer = urand(5000, 8000);
} else MangleTimer -= diff;
if (ShredTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SHRED);
DoCast(me->GetVictim(), SPELL_SHRED);
ShredTimer = urand(10000, 15000);
} else ShredTimer -= diff;
if (ScreamTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRIGHTENED_SCREAM);
DoCast(me->GetVictim(), SPELL_FRIGHTENED_SCREAM);
ScreamTimer = urand(20000, 30000);
} else ScreamTimer -= diff;
@@ -699,7 +699,7 @@ public:
if (ChainLightningTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CHAIN_LIGHTNING);
DoCast(me->GetVictim(), SPELL_CHAIN_LIGHTNING);
ChainLightningTimer = 15000;
} else ChainLightningTimer -= diff;
@@ -917,13 +917,13 @@ public:
if (FearTimer <= diff)
{
DoCast(me->getVictim(), SPELL_TERRIFYING_HOWL);
DoCast(me->GetVictim(), SPELL_TERRIFYING_HOWL);
FearTimer = urand(25000, 35000);
} else FearTimer -= diff;
if (SwipeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WIDE_SWIPE);
DoCast(me->GetVictim(), SPELL_WIDE_SWIPE);
SwipeTimer = urand(25000, 30000);
} else SwipeTimer -= diff;
}
@@ -994,10 +994,10 @@ void Resurrect(Creature* target)
target->SetFullHealth();
target->SetStandState(UNIT_STAND_STATE_STAND);
target->CastSpell(target, SPELL_RES_VISUAL, true);
if (target->getVictim())
if (target->GetVictim())
{
target->GetMotionMaster()->MoveChase(target->getVictim());
target->AI()->AttackStart(target->getVictim());
target->GetMotionMaster()->MoveChase(target->GetVictim());
target->AI()->AttackStart(target->GetVictim());
}
else
target->GetMotionMaster()->Initialize();
@@ -1240,10 +1240,10 @@ public:
if (JulianneGUID)
{
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
if (Julianne && Julianne->getVictim())
if (Julianne && Julianne->GetVictim())
{
me->AddThreat(Julianne->getVictim(), 1.0f);
AttackStart(Julianne->getVictim());
me->AddThreat(Julianne->GetVictim(), 1.0f);
AttackStart(Julianne->GetVictim());
}
}
}
@@ -1322,7 +1322,7 @@ public:
if (PoisonThrustTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POISON_THRUST);
DoCast(me->GetVictim(), SPELL_POISON_THRUST);
PoisonThrustTimer = urand(10000, 20000);
} else PoisonThrustTimer -= diff;
@@ -1390,8 +1390,8 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
Phase = PHASE_BOTH;
IsFakingDeath = false;
if (me->getVictim())
AttackStart(me->getVictim());
if (me->GetVictim())
AttackStart(me->GetVictim());
ResurrectSelfTimer = 0;
ResurrectTimer = 1000;
@@ -1441,7 +1441,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
if (urand(0, 1) && SummonedRomulo)
{
Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
if (Romulo && Romulo->isAlive() && !RomuloDead)
if (Romulo && Romulo->IsAlive() && !RomuloDead)
DoCast(Romulo, SPELL_ETERNAL_AFFECTION);
} else DoCast(me, SPELL_ETERNAL_AFFECTION);
@@ -305,7 +305,7 @@ public:
RaidWiped = true;
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource()->isAlive() && !i->getSource()->isGameMaster())
if (i->GetSource()->IsAlive() && !i->GetSource()->IsGameMaster())
{
RaidWiped = false;
break;
@@ -370,7 +370,7 @@ public:
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if (player->isGameMaster())
if (player->IsGameMaster())
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
@@ -598,10 +598,10 @@ public:
InstanceMap::PlayerList const &PlayerList = map->GetPlayers();
for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource()->isAlive())
if (i->GetSource()->IsAlive())
{
if (i->getSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
i->getSource()->CompleteQuest(9645);
if (i->GetSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
i->GetSource()->CompleteQuest(9645);
}
}
}
@@ -203,7 +203,7 @@ public:
for (i = threatlist.begin(); i != threatlist.end(); ++i)
{
Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
if (unit && unit->isAlive())
if (unit && unit->IsAlive())
{
float threat = me->getThreatManager().getThreat(unit);
summonedUnit->AddThreat(unit, threat);
@@ -298,14 +298,14 @@ public:
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
me->InterruptSpell(CURRENT_GENERIC_SPELL);
DoCast(me, SPELL_SHOCK_BARRIER, true);
DoCast(me->getVictim(), SPELL_PYROBLAST);
DoCast(me->GetVictim(), SPELL_PYROBLAST);
PyroblastTimer = 60000;
} else PyroblastTimer -= diff;
}
if (FireballTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FIREBALL_NORMAL);
DoCast(me->GetVictim(), SPELL_FIREBALL_NORMAL);
FireballTimer = urand(2000, 6000);
} else FireballTimer -= diff;
@@ -150,7 +150,7 @@ public:
{
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
{
if (!pAdd->getVictim())
if (!pAdd->GetVictim())
{
who->SetInCombatWith(pAdd);
pAdd->AddThreat(who, 0.0f);
@@ -165,7 +165,7 @@ public:
void InitializeLackeys()
{
//can be called if Creature are dead, so avoid
if (!me->isAlive())
if (!me->IsAlive())
return;
uint8 j = 0;
@@ -263,7 +263,7 @@ public:
{
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[i]))
{
if (pAdd->isAlive() && pAdd->GetHealth() < health)
if (pAdd->IsAlive() && pAdd->GetHealth() < health)
target = pAdd;
}
}
@@ -278,7 +278,7 @@ public:
if (urand(0, 1))
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->isAlive())
if (pAdd->IsAlive())
target = pAdd;
DoCast(target, SPELL_RENEW_NORMAL);
@@ -291,7 +291,7 @@ public:
if (urand(0, 1))
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->isAlive() && !pAdd->HasAura(SPELL_SHIELD))
if (pAdd->IsAlive() && !pAdd->HasAura(SPELL_SHIELD))
target = pAdd;
DoCast(target, SPELL_SHIELD);
@@ -310,7 +310,7 @@ public:
target = me;
else
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY]))
if (pAdd->isAlive())
if (pAdd->IsAlive())
target = pAdd;
}
@@ -368,7 +368,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
if (Creature* pDelrissa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_DELRISSA) : 0))
{
if (!pDelrissa->isAlive())
if (!pDelrissa->IsAlive())
pDelrissa->Respawn();
}
}
@@ -384,7 +384,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
{
if (Unit* pAdd = Unit::GetUnit(*me, m_auiLackeyGUIDs[i]))
{
if (!pAdd->getVictim() && pAdd != me)
if (!pAdd->GetVictim() && pAdd != me)
{
who->SetInCombatWith(pAdd);
pAdd->AddThreat(who, 0.0f);
@@ -394,7 +394,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
if (Creature* pDelrissa = Unit::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
{
if (pDelrissa->isAlive() && !pDelrissa->getVictim())
if (pDelrissa->IsAlive() && !pDelrissa->GetVictim())
{
who->SetInCombatWith(pDelrissa);
pDelrissa->AddThreat(who, 0.0f);
@@ -425,7 +425,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
if (uiLackeyDeathCount == MAX_ACTIVE_LACKEY)
{
//time to make her lootable and complete event if she died before lackeys
if (!pDelrissa->isAlive())
if (!pDelrissa->IsAlive())
{
if (!pDelrissa->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
@@ -544,8 +544,8 @@ public:
{
if (Wait_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_BACKSTAB, true);
DoCast(me->getVictim(), SPELL_KIDNEY_SHOT, true);
DoCast(me->GetVictim(), SPELL_BACKSTAB, true);
DoCast(me->GetVictim(), SPELL_KIDNEY_SHOT, true);
me->SetVisible(true); // ...? Hacklike
InVanish = false;
} else Wait_Timer -= diff;
@@ -553,19 +553,19 @@ public:
if (Gouge_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_GOUGE);
DoCast(me->GetVictim(), SPELL_GOUGE);
Gouge_Timer = 5500;
} else Gouge_Timer -= diff;
if (Kick_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_KICK);
DoCast(me->GetVictim(), SPELL_KICK);
Kick_Timer = 7000;
} else Kick_Timer -= diff;
if (Eviscerate_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_EVISCERATE);
DoCast(me->GetVictim(), SPELL_EVISCERATE);
Eviscerate_Timer = 4000;
} else Eviscerate_Timer -= diff;
@@ -632,13 +632,13 @@ public:
if (Immolate_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_IMMOLATE);
DoCast(me->GetVictim(), SPELL_IMMOLATE);
Immolate_Timer = 6000;
} else Immolate_Timer -= diff;
if (Shadow_Bolt_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOW_BOLT);
DoCast(me->GetVictim(), SPELL_SHADOW_BOLT);
Shadow_Bolt_Timer = 5000;
} else Shadow_Bolt_Timer -= diff;
@@ -712,13 +712,13 @@ public:
if (Knockdown_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKDOWN);
DoCast(me->GetVictim(), SPELL_KNOCKDOWN);
Knockdown_Timer = 6000;
} else Knockdown_Timer -= diff;
if (Snap_Kick_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SNAP_KICK);
DoCast(me->GetVictim(), SPELL_SNAP_KICK);
Snap_Kick_Timer = 4500;
} else Snap_Kick_Timer -= diff;
@@ -812,19 +812,19 @@ public:
if (Ice_Lance_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ICE_LANCE);
DoCast(me->GetVictim(), SPELL_ICE_LANCE);
Ice_Lance_Timer = 12000;
} else Ice_Lance_Timer -= diff;
if (Cone_of_Cold_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CONE_OF_COLD);
DoCast(me->GetVictim(), SPELL_CONE_OF_COLD);
Cone_of_Cold_Timer = 10000;
} else Cone_of_Cold_Timer -= diff;
if (Frostbolt_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLT);
DoCast(me->GetVictim(), SPELL_FROSTBOLT);
Frostbolt_Timer = 8000;
} else Frostbolt_Timer -= diff;
@@ -943,31 +943,31 @@ public:
if (Disarm_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_DISARM);
DoCast(me->GetVictim(), SPELL_DISARM);
Disarm_Timer = 6000;
} else Disarm_Timer -= diff;
if (Hamstring_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMSTRING);
DoCast(me->GetVictim(), SPELL_HAMSTRING);
Hamstring_Timer = 4500;
} else Hamstring_Timer -= diff;
if (Mortal_Strike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
DoCast(me->GetVictim(), SPELL_MORTAL_STRIKE);
Mortal_Strike_Timer = 4500;
} else Mortal_Strike_Timer -= diff;
if (Piercing_Howl_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_PIERCING_HOWL);
DoCast(me->GetVictim(), SPELL_PIERCING_HOWL);
Piercing_Howl_Timer = 10000;
} else Piercing_Howl_Timer -= diff;
if (Frightening_Shout_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
DoCast(me->GetVictim(), SPELL_FRIGHTENING_SHOUT);
Frightening_Shout_Timer = 18000;
} else Frightening_Shout_Timer -= diff;
@@ -1043,11 +1043,11 @@ public:
boss_priestess_lackey_commonAI::UpdateAI(diff);
if (me->IsWithinDistInMap(me->getVictim(), ATTACK_DISTANCE))
if (me->IsWithinDistInMap(me->GetVictim(), ATTACK_DISTANCE))
{
if (Wing_Clip_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WING_CLIP);
DoCast(me->GetVictim(), SPELL_WING_CLIP);
Wing_Clip_Timer = 4000;
} else Wing_Clip_Timer -= diff;
@@ -1062,7 +1062,7 @@ public:
else
{
//if go does not exist, then we can cast
DoCast(me->getVictim(), SPELL_FREEZING_TRAP);
DoCast(me->GetVictim(), SPELL_FREEZING_TRAP);
Freezing_Trap_Timer = 15000;
}
} else Freezing_Trap_Timer -= diff;
@@ -1073,25 +1073,25 @@ public:
{
if (Concussive_Shot_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CONCUSSIVE_SHOT);
DoCast(me->GetVictim(), SPELL_CONCUSSIVE_SHOT);
Concussive_Shot_Timer = 8000;
} else Concussive_Shot_Timer -= diff;
if (Multi_Shot_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MULTI_SHOT);
DoCast(me->GetVictim(), SPELL_MULTI_SHOT);
Multi_Shot_Timer = 10000;
} else Multi_Shot_Timer -= diff;
if (Aimed_Shot_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_AIMED_SHOT);
DoCast(me->GetVictim(), SPELL_AIMED_SHOT);
Aimed_Shot_Timer = 6000;
} else Aimed_Shot_Timer -= diff;
if (Shoot_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHOOT);
DoCast(me->GetVictim(), SPELL_SHOOT);
Shoot_Timer = 2500;
} else Shoot_Timer -= diff;
}
@@ -1174,7 +1174,7 @@ public:
if (Frost_Shock_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROST_SHOCK);
DoCast(me->GetVictim(), SPELL_FROST_SHOCK);
Frost_Shock_Timer = 7000;
} else Frost_Shock_Timer -= diff;
@@ -1185,7 +1185,7 @@ public:
// if (guid)
// {
// Unit* pAdd = Unit::GetUnit(*me, (*itr)->guid);
// if (pAdd && pAdd->isAlive())
// if (pAdd && pAdd->IsAlive())
// {
DoCast(me, SPELL_LESSER_HEALING_WAVE);
Healing_Wave_Timer = 5000;
@@ -1249,19 +1249,19 @@ public:
if (Goblin_Dragon_Gun_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_GOBLIN_DRAGON_GUN);
DoCast(me->GetVictim(), SPELL_GOBLIN_DRAGON_GUN);
Goblin_Dragon_Gun_Timer = 10000;
} else Goblin_Dragon_Gun_Timer -= diff;
if (Rocket_Launch_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ROCKET_LAUNCH);
DoCast(me->GetVictim(), SPELL_ROCKET_LAUNCH);
Rocket_Launch_Timer = 9000;
} else Rocket_Launch_Timer -= diff;
if (Fel_Iron_Bomb_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FEL_IRON_BOMB);
DoCast(me->GetVictim(), SPELL_FEL_IRON_BOMB);
Fel_Iron_Bomb_Timer = 15000;
} else Fel_Iron_Bomb_Timer -= diff;
@@ -115,7 +115,7 @@ public:
//Unit* unit = Unit::GetUnit(*me, FelCrystals[i]);
if (Creature* creature = Unit::GetCreature(*me, *itr))
{
if (!creature->isAlive())
if (!creature->IsAlive())
creature->Respawn(); // Let the core handle setting death state, etc.
// Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here.
@@ -156,7 +156,7 @@ public:
pCrystal = NULL;
//pCrystal = Unit::GetUnit(*me, FelCrystals[i]);
pCrystal = Unit::GetUnit(*me, *itr);
if (pCrystal && pCrystal->isAlive())
if (pCrystal && pCrystal->IsAlive())
{
// select nearest
if (!CrystalChosen || me->GetDistanceOrder(pCrystal, CrystalChosen, false))
@@ -192,7 +192,7 @@ public:
{
//Creature* pCrystal = (Unit::GetCreature(*me, FelCrystals[i]));
Creature* pCrystal = Unit::GetCreature(*me, *itr);
if (pCrystal && pCrystal->isAlive())
if (pCrystal && pCrystal->IsAlive())
pCrystal->Kill(pCrystal);
}
}
@@ -214,7 +214,7 @@ public:
if (type == POINT_MOTION_TYPE && id == 1)
{
Unit* CrystalChosen = Unit::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->isAlive())
if (CrystalChosen && CrystalChosen->IsAlive())
{
// Make the crystal attackable
// We also remove NON_ATTACKABLE in case the database has it set.
@@ -303,14 +303,14 @@ public:
Talk(SAY_EMPOWERED);
Unit* CrystalChosen = Unit::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->isAlive())
if (CrystalChosen && CrystalChosen->IsAlive())
// Use Deal Damage to kill it, not setDeathState.
CrystalChosen->Kill(CrystalChosen);
CrystalGUID = 0;
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveChase(me->getVictim());
me->GetMotionMaster()->MoveChase(me->GetVictim());
} else EmpowerTimer -= diff;
}
}
@@ -345,7 +345,7 @@ public:
if (InstanceScript* instance = me->GetInstanceScript())
{
Creature* Selin = (Unit::GetCreature(*me, instance->GetData64(DATA_SELIN)));
if (Selin && Selin->isAlive())
if (Selin && Selin->IsAlive())
{
if (CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->CrystalGUID == me->GetGUID())
{
@@ -353,10 +353,10 @@ public:
CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->DrainingCrystal = false;
CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->IsDraining = false;
CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->EmpowerTimer = 10000;
if (Selin->getVictim())
if (Selin->GetVictim())
{
Selin->AI()->AttackStart(Selin->getVictim());
Selin->GetMotionMaster()->MoveChase(Selin->getVictim());
Selin->AI()->AttackStart(Selin->GetVictim());
Selin->GetMotionMaster()->MoveChase(Selin->GetVictim());
}
}
}
@@ -185,7 +185,7 @@ public:
{
if (OverloadTimer <= diff)
{
DoCast(me->getVictim(), SPELL_OVERLOAD);
DoCast(me->GetVictim(), SPELL_OVERLOAD);
OverloadTimer = 2000;
} else OverloadTimer -= diff;
@@ -219,7 +219,7 @@ public:
{
if (Unit* temp = me->GetOwner())
{
if (temp && temp->isAlive())
if (temp && temp->IsAlive())
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
}
}
@@ -91,7 +91,7 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@@ -146,7 +146,7 @@ public:
for (Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)
{
if (Player* player = i->getSource())
if (Player* player = i->GetSource())
{
if (spell && spell->Effects[0].MiscValue)
player->KilledMonsterCredit(spell->Effects[0].MiscValue, 0);
@@ -146,7 +146,7 @@ class mob_core_rager : public CreatureScript
if (Creature* pGolemagg = instance->instance->GetCreature(instance->GetData64(BOSS_GOLEMAGG_THE_INCINERATOR)))
{
if (pGolemagg->isAlive())
if (pGolemagg->IsAlive())
{
me->AddAura(SPELL_GOLEMAGG_TRUST, me);
Talk(EMOTE_LOWHP);
@@ -163,7 +163,7 @@ class mob_core_rager : public CreatureScript
// Mangle
if (mangleTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MANGLE);
DoCast(me->GetVictim(), SPELL_MANGLE);
mangleTimer = 10*IN_MILLISECONDS;
}
else
@@ -223,7 +223,7 @@ class boss_ragnaros : public CreatureScript
events.ScheduleEvent(EVENT_ELEMENTAL_FIRE, urand(10000, 14000));
break;
case EVENT_MAGMA_BLAST:
if (me->IsWithinMeleeRange(me->getVictim()))
if (me->IsWithinMeleeRange(me->GetVictim()))
{
DoCastVictim(SPELL_MAGMA_BLAST);
if (!_hasYelledMagmaBurst)
@@ -245,22 +245,22 @@ public:
switch (eventId)
{
case EVENT_ICY_TOUCH:
DoCast(me->getVictim(), SPELL_ICY_TOUCH);
DoCast(me->GetVictim(), SPELL_ICY_TOUCH);
events.DelayEvents(1000, GCD_CAST);
events.ScheduleEvent(EVENT_ICY_TOUCH, 5000, GCD_CAST);
break;
case EVENT_PLAGUE_STRIKE:
DoCast(me->getVictim(), SPELL_PLAGUE_STRIKE);
DoCast(me->GetVictim(), SPELL_PLAGUE_STRIKE);
events.DelayEvents(1000, GCD_CAST);
events.ScheduleEvent(SPELL_PLAGUE_STRIKE, 5000, GCD_CAST);
break;
case EVENT_BLOOD_STRIKE:
DoCast(me->getVictim(), SPELL_BLOOD_STRIKE);
DoCast(me->GetVictim(), SPELL_BLOOD_STRIKE);
events.DelayEvents(1000, GCD_CAST);
events.ScheduleEvent(EVENT_BLOOD_STRIKE, 5000, GCD_CAST);
break;
case EVENT_DEATH_COIL:
DoCast(me->getVictim(), SPELL_DEATH_COIL);
DoCast(me->GetVictim(), SPELL_DEATH_COIL);
events.DelayEvents(1000, GCD_CAST);
events.ScheduleEvent(EVENT_DEATH_COIL, 5000, GCD_CAST);
break;
@@ -359,7 +359,7 @@ public:
{
player->CLOSE_GOSSIP_MENU();
if (player->isInCombat() || creature->isInCombat())
if (player->IsInCombat() || creature->IsInCombat())
return true;
if (npc_death_knight_initiateAI* pInitiateAI = CAST_AI(npc_death_knight_initiate::npc_death_knight_initiateAI, creature->AI()))
@@ -386,7 +386,7 @@ public:
if (player->HealthBelowPct(10))
return true;
if (player->isInCombat() || creature->isInCombat())
if (player->IsInCombat() || creature->IsInCombat())
return true;
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@@ -484,10 +484,10 @@ public:
EnterEvadeMode();
return;
}
else if (me->getVictim()->GetTypeId() == TYPEID_PLAYER && me->getVictim()->HealthBelowPct(10))
else if (me->GetVictim()->GetTypeId() == TYPEID_PLAYER && me->GetVictim()->HealthBelowPct(10))
{
me->getVictim()->CastSpell(me->getVictim(), 7267, true); // beg
me->getVictim()->RemoveGameObject(SPELL_DUEL_FLAG, true);
me->GetVictim()->CastSpell(me->GetVictim(), 7267, true); // beg
me->GetVictim()->RemoveGameObject(SPELL_DUEL_FLAG, true);
EnterEvadeMode();
return;
}
@@ -809,7 +809,7 @@ public:
{
if ((*itr)->GetOwner()->GetGUID() == me->GetOwner()->GetGUID())
{
if ((*itr)->isInCombat() && (*itr)->getAttackerForHelper())
if ((*itr)->IsInCombat() && (*itr)->getAttackerForHelper())
{
AttackStart((*itr)->getAttackerForHelper());
}
@@ -820,12 +820,12 @@ public:
void UpdateAI(uint32 /*diff*/)
{
if (!me->isInCombat())
if (!me->IsInCombat())
{
if (Unit* owner = me->GetOwner())
{
Player* plrOwner = owner->ToPlayer();
if (plrOwner && plrOwner->isInCombat())
if (plrOwner && plrOwner->IsInCombat())
{
if (plrOwner->getAttackerForHelper() && plrOwner->getAttackerForHelper()->GetEntry() == NPC_GHOSTS)
AttackStart(plrOwner->getAttackerForHelper());
@@ -840,14 +840,14 @@ public:
//ScriptedAI::UpdateAI(diff);
//Check if we have a current target
if (me->getVictim()->GetEntry() == NPC_GHOSTS)
if (me->GetVictim()->GetEntry() == NPC_GHOSTS)
{
if (me->isAttackReady())
{
//If we are within range melee the target
if (me->IsWithinMeleeRange(me->getVictim()))
if (me->IsWithinMeleeRange(me->GetVictim()))
{
me->AttackerStateUpdate(me->getVictim());
me->AttackerStateUpdate(me->GetVictim());
me->resetAttackTimer();
}
}
@@ -68,7 +68,7 @@ public:
void SpellHit(Unit* caster, const SpellInfo* spell)
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !speechCounter)
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->IsAlive() && !speechCounter)
{
if (Player* player = caster->ToPlayer())
{
@@ -309,7 +309,7 @@ public:
{
Creature* temp = Unit::GetCreature(*me, valrothGUID);
if (!temp || !temp->isAlive())
if (!temp || !temp->IsAlive())
{
Talk(SAY_BREAKOUT8);
waveTimer = 5000;
@@ -405,7 +405,7 @@ public:
void UpdateAI(uint32 diff)
{
if (uiStage && !me->isInCombat())
if (uiStage && !me->IsInCombat())
{
if (uiStage_timer <= diff)
{
@@ -498,14 +498,14 @@ public:
if (uiInquisitor_Penance_timer <= diff)
{
Shout();
DoCast(me->getVictim(), SPELL_INQUISITOR_PENANCE);
DoCast(me->GetVictim(), SPELL_INQUISITOR_PENANCE);
uiInquisitor_Penance_timer = urand(2000, 7000);
} else uiInquisitor_Penance_timer -= diff;
if (uiValroth_Smite_timer <= diff)
{
Shout();
DoCast(me->getVictim(), SPELL_VALROTH_SMITE);
DoCast(me->GetVictim(), SPELL_VALROTH_SMITE);
uiValroth_Smite_timer = urand(1000, 6000);
} else uiValroth_Smite_timer -= diff;
@@ -678,7 +678,7 @@ public:
void UpdateAI(uint32 diff)
{
if (PlayerGUID && !me->getVictim() && me->isAlive())
if (PlayerGUID && !me->GetVictim() && me->IsAlive())
{
if (ExecuteSpeech_Timer <= diff)
{
@@ -230,7 +230,7 @@ void UpdateWorldState(Map* map, uint32 id, uint32 state)
{
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* player = itr->getSource())
if (Player* player = itr->GetSource())
player->SendUpdateWorldState(id, state);
}
}
@@ -291,7 +291,7 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->isQuestGiver())
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
if (player->GetQuestStatus(12801) == QUEST_STATUS_INCOMPLETE)
@@ -1302,8 +1302,8 @@ public:
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->getSource()->isAlive() && me->IsWithinDistInMap(i->getSource(), 50))
i->getSource()->CastSpell(i->getSource(), SPELL_THE_LIGHT_OF_DAWN_Q, false);
if (i->GetSource()->IsAlive() && me->IsWithinDistInMap(i->GetSource(), 50))
i->GetSource()->CastSpell(i->GetSource(), SPELL_THE_LIGHT_OF_DAWN_Q, false);
}
}
me->SetVisible(false); // respawns another Darion for quest turn in
@@ -1343,25 +1343,25 @@ public:
if (uiDeath_strike <= diff)
{
DoCast(me->getVictim(), SPELL_DEATH_STRIKE);
DoCast(me->GetVictim(), SPELL_DEATH_STRIKE);
uiDeath_strike = urand(5000, 10000);
} else uiDeath_strike -= diff;
if (uiDeath_embrace <= diff)
{
DoCast(me->getVictim(), SPELL_DEATH_EMBRACE);
DoCast(me->GetVictim(), SPELL_DEATH_EMBRACE);
uiDeath_embrace = urand(5000, 10000);
} else uiDeath_embrace -= diff;
if (uiIcy_touch <= diff)
{
DoCast(me->getVictim(), SPELL_ICY_TOUCH1);
DoCast(me->GetVictim(), SPELL_ICY_TOUCH1);
uiIcy_touch = urand(5000, 10000);
} else uiIcy_touch -= diff;
if (uiUnholy_blight <= diff)
{
DoCast(me->getVictim(), SPELL_UNHOLY_BLIGHT);
DoCast(me->GetVictim(), SPELL_UNHOLY_BLIGHT);
uiUnholy_blight = urand(5000, 10000);
} else uiUnholy_blight -= diff;
@@ -1515,9 +1515,9 @@ public:
void NPCChangeTarget(uint64 ui_GUID)
{
if (Creature* temp = Unit::GetCreature(*me, ui_GUID))
if (temp->isAlive())
if (temp->IsAlive())
if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (pTarger->isAlive())
if (pTarger->IsAlive())
{
// temp->DeleteThreatList();
temp->AddThreat(pTarger, 0.0f);
@@ -1634,7 +1634,7 @@ public:
void DespawnNPC(uint64 pGUID)
{
if (Creature* temp = Unit::GetCreature(*me, pGUID))
if (temp->isAlive())
if (temp->IsAlive())
{
temp->SetVisible(false);
temp->Kill(temp);
@@ -74,7 +74,7 @@ public:
if (FlyBackTimer <= diff)
{
Player* player = NULL;
if (me->isSummon())
if (me->IsSummon())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
player = summoner->ToPlayer();
@@ -112,7 +112,7 @@ public:
//AoESilence_Timer
if (AoESilence_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_AOESILENCE);
DoCast(me->GetVictim(), SPELL_AOESILENCE);
AoESilence_Timer = urand(15000, 20000);
}
else AoESilence_Timer -= diff;
@@ -120,7 +120,7 @@ public:
//ArcaneExplosion_Timer
if (ArcaneExplosion_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ARCANEEXPLOSION);
DoCast(me->GetVictim(), SPELL_ARCANEEXPLOSION);
ArcaneExplosion_Timer = 8000;
}
else ArcaneExplosion_Timer -= diff;
@@ -71,7 +71,7 @@ public:
//SoulSiphon_Timer
if (SoulSiphon_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SOULSIPHON);
DoCast(me->GetVictim(), SPELL_SOULSIPHON);
return;
//SoulSiphon_Timer = 20000;
@@ -82,7 +82,7 @@ public:
//CallOfTheGrave_Timer
if (CallOftheGrave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CALLOFTHEGRAVE);
DoCast(me->GetVictim(), SPELL_CALLOFTHEGRAVE);
CallOftheGrave_Timer = 30000;
}
else CallOftheGrave_Timer -= diff;
@@ -90,7 +90,7 @@ public:
//Terrify_Timer
if (Terrify_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_TERRIFY);
DoCast(me->GetVictim(), SPELL_TERRIFY);
Terrify_Timer = 20000;
}
else Terrify_Timer -= diff;
@@ -92,7 +92,7 @@ public:
//FlameShock_Timer
if (FlameShock_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FLAMESHOCK);
DoCast(me->GetVictim(), SPELL_FLAMESHOCK);
FlameShock_Timer = urand(10000, 15000);
}
else FlameShock_Timer -= diff;
@@ -100,7 +100,7 @@ public:
//FlameSpike_Timer
if (FlameSpike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FLAMESPIKE);
DoCast(me->GetVictim(), SPELL_FLAMESPIKE);
FlameSpike_Timer = 30000;
}
else FlameSpike_Timer -= diff;
@@ -108,7 +108,7 @@ public:
//FireNova_Timer
if (FireNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIRENOVA);
DoCast(me->GetVictim(), SPELL_FIRENOVA);
FireNova_Timer = 40000;
}
else FireNova_Timer -= diff;
@@ -116,7 +116,7 @@ public:
//ShadowBolt_Timer
if (ShadowBolt_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
DoCast(me->GetVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 2000;
}
else ShadowBolt_Timer -= diff;
@@ -320,7 +320,7 @@ public:
DoCast(me, SPELL_HEAD, false);
SaySound(SAY_LOST_HEAD);
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFleeing(caster->getVictim());
me->GetMotionMaster()->MoveFleeing(caster->GetVictim());
}
}
@@ -332,10 +332,10 @@ public:
if (wait <= diff)
{
wait = 1000;
if (!me->getVictim())
if (!me->GetVictim())
return;
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFleeing(me->getVictim());
me->GetMotionMaster()->MoveFleeing(me->GetVictim());
}
else wait -= diff;
@@ -544,9 +544,9 @@ public:
std::list<Player*> temp;
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if ((me->IsWithinLOSInMap(i->getSource()) || !checkLoS) && me->getVictim() != i->getSource() &&
me->IsWithinDistInMap(i->getSource(), range) && i->getSource()->isAlive())
temp.push_back(i->getSource());
if ((me->IsWithinLOSInMap(i->GetSource()) || !checkLoS) && me->GetVictim() != i->GetSource() &&
me->IsWithinDistInMap(i->GetSource(), range) && i->GetSource()->IsAlive())
temp.push_back(i->GetSource());
if (!temp.empty())
{
@@ -577,7 +577,7 @@ public:
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
sLFGMgr->FinishDungeon(players.begin()->getSource()->GetGroup()->GetGUID(), 285);
sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285);
}
void SpellHit(Unit* caster, const SpellInfo* spell)
@@ -604,7 +604,7 @@ public:
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && unit->isAlive() && unit != caster)
if (unit && unit->IsAlive() && unit != caster)
me->AddThreat(unit, caster->getThreatManager().getThreat(unit));
}
}
@@ -624,7 +624,7 @@ public:
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
Unit* Head = Unit::GetUnit(*me, headGUID);
if (Head && Head->isAlive())
if (Head && Head->IsAlive())
{
Head->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
//Head->CastSpell(Head, SPELL_HEAD_INVIS, false);
@@ -731,7 +731,7 @@ public:
DoMeleeAttackIfReady();
if (cleave <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
cleave = urand(2000, 6000); //1 cleave per 2.0f-6.0fsec
}
else cleave -= diff;
@@ -749,7 +749,7 @@ public:
else
Phase = 1;
Creature* Head = Unit::GetCreature((*me), headGUID);
if (Head && Head->isAlive())
if (Head && Head->IsAlive())
{
CAST_AI(mob_head::mob_headAI, Head->AI())->Phase = Phase;
CAST_AI(mob_head::mob_headAI, Head->AI())->Disappear();
@@ -825,7 +825,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
DoCast(me, SPELL_SPROUT_BODY, true);
me->UpdateEntry(PUMPKIN_FIEND);
DoStartMovement(me->getVictim());
DoStartMovement(me->GetVictim());
}
}
@@ -850,7 +850,7 @@ public:
void MoveInLineOfSight(Unit* who)
{
if (!who || !me->IsValidAttackTarget(who) || me->getVictim())
if (!who || !me->IsValidAttackTarget(who) || me->GetVictim())
return;
me->AddThreat(who, 0.0f);
@@ -906,7 +906,7 @@ void mob_head::mob_headAI::Disappear()
if (bodyGUID)
{
Creature* body = Unit::GetCreature((*me), bodyGUID);
if (body && body->isAlive())
if (body && body->IsAlive())
{
withbody = true;
me->RemoveAllAuras();
@@ -110,7 +110,7 @@ public:
//Cleave_Timer
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
Cleave_Timer = 12000;
}
else Cleave_Timer -= diff;
@@ -119,7 +119,7 @@ public:
if (Whirlwind_Timer <= diff)
{
Talk(SAY_WHIRLWIND);
DoCast(me->getVictim(), SPELL_WHIRLWIND);
DoCast(me->GetVictim(), SPELL_WHIRLWIND);
Whirlwind_Timer = 30000;
}
else Whirlwind_Timer -= diff;
@@ -130,7 +130,7 @@ public:
//CurseOfBlood_Timer
if (CurseOfBlood_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSEOFBLOOD);
DoCast(me->GetVictim(), SPELL_CURSEOFBLOOD);
CurseOfBlood_Timer = 25000;
}
else CurseOfBlood_Timer -= diff;
@@ -110,7 +110,7 @@ public:
//ShadowWordPain_Timer
if (ShadowWordPain_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
DoCast(me->GetVictim(), SPELL_SHADOWWORDPAIN);
ShadowWordPain_Timer = urand(5000, 15000);
}
else ShadowWordPain_Timer -= diff;
@@ -95,7 +95,7 @@ public:
me->SetStandState(UNIT_STAND_STATE_STAND);
if (instance)
if (me->isAlive())
if (me->IsAlive())
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
_bHasDied = false;
@@ -192,8 +192,8 @@ public:
CrusaderStrike_Timer = 10000;
HammerOfJustice_Timer = 10000;
if (me->getVictim())
me->GetMotionMaster()->MoveChase(me->getVictim());
if (me->GetVictim())
me->GetMotionMaster()->MoveChase(me->GetVictim());
_bHeal = true;
}
@@ -206,7 +206,7 @@ public:
//CrusaderStrike_Timer
if (CrusaderStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CRUSADERSTRIKE);
DoCast(me->GetVictim(), SPELL_CRUSADERSTRIKE);
CrusaderStrike_Timer = 10000;
}
else CrusaderStrike_Timer -= diff;
@@ -214,7 +214,7 @@ public:
//HammerOfJustice_Timer
if (HammerOfJustice_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMMEROFJUSTICE);
DoCast(me->GetVictim(), SPELL_HAMMEROFJUSTICE);
HammerOfJustice_Timer = 60000;
}
else HammerOfJustice_Timer -= diff;
@@ -262,7 +262,7 @@ public:
_bCanResurrect = false;
if (instance)
if (me->isAlive())
if (me->IsAlive())
instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
}
@@ -316,7 +316,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
DoCast(me->getVictim(), SPELL_DEEPSLEEP);
DoCast(me->GetVictim(), SPELL_DEEPSLEEP);
_bCanResurrectCheck = true;
_bCanResurrect = true;
return;
@@ -339,7 +339,7 @@ public:
if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE)))
{
// checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
if (_bCanResurrectCheck && mograine->isAlive() && !mograine->HealthAbovePct(75))
if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
target = mograine;
}
}
@@ -362,7 +362,7 @@ public:
//HolySmite_Timer
if (HolySmite_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HOLYSMITE);
DoCast(me->GetVictim(), SPELL_HOLYSMITE);
HolySmite_Timer = 6000;
}
else HolySmite_Timer -= diff;
@@ -71,7 +71,7 @@ public:
//LichSlap_Timer
if (LichSlap_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_LICHSLAP);
DoCast(me->GetVictim(), SPELL_LICHSLAP);
LichSlap_Timer = 45000;
}
else LichSlap_Timer -= diff;
@@ -79,7 +79,7 @@ public:
//FrostboltVolley_Timer
if (FrostboltVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLTVOLLEY);
DoCast(me->GetVictim(), SPELL_FROSTBOLTVOLLEY);
FrostboltVolley_Timer = 20000;
}
else FrostboltVolley_Timer -= diff;
@@ -87,7 +87,7 @@ public:
//MindFlay_Timer
if (MindFlay_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MINDFLAY);
DoCast(me->GetVictim(), SPELL_MINDFLAY);
MindFlay_Timer = 20000;
}
else MindFlay_Timer -= diff;
@@ -95,7 +95,7 @@ public:
//FrostNova_Timer
if (FrostNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTNOVA);
DoCast(me->GetVictim(), SPELL_FROSTNOVA);
FrostNova_Timer = 15000;
}
else FrostNova_Timer -= diff;
@@ -122,7 +122,7 @@ public:
for (std::set<uint64>::const_iterator itr = HorsemanAdds.begin(); itr != HorsemanAdds.end(); ++itr)
{
Creature* add = instance->GetCreature(*itr);
if (add && add->isAlive())
if (add && add->IsAlive())
add->Kill(add);
}
HorsemanAdds.clear();
@@ -94,7 +94,7 @@ public:
if (CurseOfBlood_Timer <= diff)
{
//Cast
DoCast(me->getVictim(), SPELL_CURSEOFBLOOD);
DoCast(me->GetVictim(), SPELL_CURSEOFBLOOD);
//45 seconds
CurseOfBlood_Timer = 30000;
@@ -109,7 +109,7 @@ public:
me->setFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(11686); // Invisible Model
DoModifyThreatPercent(me->getVictim(), -99);
DoModifyThreatPercent(me->GetVictim(), -99);
//Summon 10 Illusions attacking random gamers
Unit* target = NULL;
@@ -130,7 +130,7 @@ public:
// if (Illusion_Timer <= diff)
// {
// //Cast
// DoCast(me->getVictim(), SPELL_ILLUSION);
// DoCast(me->GetVictim(), SPELL_ILLUSION);
//
// //3 Illusion will be summoned
// if (Illusioncounter < 3)
@@ -190,7 +190,7 @@ public:
if (Cleave_Timer <= diff)
{
//Cast
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
//5-8 seconds
Cleave_Timer = urand(5000, 8000);
@@ -82,14 +82,14 @@ public:
//ShadowVolley_Timer
if (ShadowVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
DoCast(me->GetVictim(), SPELL_SHADOWBOLTVOLLEY);
ShadowVolley_Timer = 15000;
} else ShadowVolley_Timer -= diff;
//BoneShield_Timer
if (BoneShield_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_BONESHIELD);
DoCast(me->GetVictim(), SPELL_BONESHIELD);
BoneShield_Timer = 45000;
} else BoneShield_Timer -= diff;
@@ -97,10 +97,10 @@ public:
if (Minion_Timer <= diff)
{
//Cast
SummonMinions(me->getVictim());
SummonMinions(me->getVictim());
SummonMinions(me->getVictim());
SummonMinions(me->getVictim());
SummonMinions(me->GetVictim());
SummonMinions(me->GetVictim());
SummonMinions(me->GetVictim());
SummonMinions(me->GetVictim());
Minion_Timer = 12000;
} else Minion_Timer -= diff;
@@ -109,8 +109,8 @@ public:
if (!Mages && HealthBelowPct(26))
{
//Cast
SummonMages(me->getVictim());
SummonMages(me->getVictim());
SummonMages(me->GetVictim());
SummonMages(me->GetVictim());
Mages = true;
}
@@ -95,28 +95,28 @@ public:
//Freeze_Timer
if (Freeze_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FREEZE);
DoCast(me->GetVictim(), SPELL_FREEZE);
Freeze_Timer = 24000;
} else Freeze_Timer -= diff;
//Fear_Timer
if (Fear_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FEAR);
DoCast(me->GetVictim(), SPELL_FEAR);
Fear_Timer = 30000;
} else Fear_Timer -= diff;
//ChillNova_Timer
if (ChillNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CHILLNOVA);
DoCast(me->GetVictim(), SPELL_CHILLNOVA);
ChillNova_Timer = 14000;
} else ChillNova_Timer -= diff;
//FrostVolley_Timer
if (FrostVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTVOLLEY);
DoCast(me->GetVictim(), SPELL_FROSTVOLLEY);
FrostVolley_Timer = 15000;
} else FrostVolley_Timer -= diff;
@@ -77,7 +77,7 @@ public:
//BlastWave_Timer
if (m_uiBlastWave_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_BLAST_WAVE);
DoCast(me->GetVictim(), SPELL_BLAST_WAVE);
m_uiBlastWave_Timer = 12000;
}
else
@@ -138,7 +138,7 @@ public:
Creature* pAda = instance->GetCreature(uiAdaGUID);
Creature* pAsh = instance->GetCreature(uiAshGUID);
if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive())
if (pAda && pAda->IsAlive() && pAsh && pAsh->IsAlive())
{
pAda->AI()->Talk(SAY_BOSS_DIE_AD);
pAsh->AI()->Talk(SAY_BOSS_DIE_AS);
@@ -243,7 +243,7 @@ public:
Creature* pArchmage = instance->GetCreature(uiArchmageArugalGUID);
if (!pArchmage || !pArchmage->isAlive())
if (!pArchmage || !pArchmage->IsAlive())
return;
if (uiPhase)
@@ -125,7 +125,7 @@ public:
if (ShadowBolt_Timer <= diff)
{
if (SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
DoCast(me->GetVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 10000;
} else ShadowBolt_Timer -= diff;
@@ -133,7 +133,7 @@ public:
//Cleave
if (Cleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
DoCast(me->GetVictim(), SPELL_CLEAVE);
//13 seconds until we should cast this again
Cleave_Timer = 7000 + (rand()%10000);
} else Cleave_Timer -= diff;
@@ -141,7 +141,7 @@ public:
//MortalStrike
if (MortalStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
DoCast(me->GetVictim(), SPELL_MORTALSTRIKE);
MortalStrike_Timer = 10000 + (rand()%15000);
} else MortalStrike_Timer -= diff;
@@ -83,7 +83,7 @@ public:
if (BansheeWail_Timer <= diff)
{
if (rand()%100 < 95)
DoCast(me->getVictim(), SPELL_BANSHEEWAIL);
DoCast(me->GetVictim(), SPELL_BANSHEEWAIL);
//4 seconds until we should cast this again
BansheeWail_Timer = 4000;
} else BansheeWail_Timer -= diff;
@@ -92,7 +92,7 @@ public:
if (BansheeCurse_Timer <= diff)
{
if (rand()%100 < 75)
DoCast(me->getVictim(), SPELL_BANSHEECURSE);
DoCast(me->GetVictim(), SPELL_BANSHEECURSE);
//18 seconds until we should cast this again
BansheeCurse_Timer = 18000;
} else BansheeCurse_Timer -= diff;
@@ -101,7 +101,7 @@ public:
if (Silence_Timer <= diff)
{
if (rand()%100 < 80)
DoCast(me->getVictim(), SPELL_SILENCE);
DoCast(me->GetVictim(), SPELL_SILENCE);
//13 seconds until we should cast this again
Silence_Timer = 13000;
} else Silence_Timer -= diff;
@@ -131,7 +131,7 @@ public:
//Cast
if (rand()%100 < 90) //90% chance to cast
{
DoCast(me->getVictim(), SPELL_PUMMEL);
DoCast(me->GetVictim(), SPELL_PUMMEL);
}
//12 seconds until we should cast this again
Pummel_Timer = 12000;
@@ -143,7 +143,7 @@ public:
//Cast
if (rand()%100 < 80) //80% chance to cast
{
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
DoCast(me->GetVictim(), SPELL_KNOCKAWAY);
}
//14 seconds until we should cast this again
KnockAway_Timer = 14000;
@@ -153,7 +153,7 @@ public:
if (Shoot_Timer <= diff)
{
//Cast
DoCast(me->getVictim(), SPELL_SHOOT);
DoCast(me->GetVictim(), SPELL_SHOOT);
//1 seconds until we should cast this again
Shoot_Timer = 1000;
} else Shoot_Timer -= diff;
@@ -131,28 +131,28 @@ public:
//MindBlast
if (m_uiMindBlast_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MINDBLAST);
DoCast(me->GetVictim(), SPELL_MINDBLAST);
m_uiMindBlast_Timer = urand(15000, 20000);
} else m_uiMindBlast_Timer -= uiDiff;
//CrusadersHammer
if (m_uiCrusadersHammer_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_CRUSADERSHAMMER);
DoCast(me->GetVictim(), SPELL_CRUSADERSHAMMER);
m_uiCrusadersHammer_Timer = 12000;
} else m_uiCrusadersHammer_Timer -= uiDiff;
//CrusaderStrike
if (m_uiCrusaderStrike_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_CRUSADERSTRIKE);
DoCast(me->GetVictim(), SPELL_CRUSADERSTRIKE);
m_uiCrusaderStrike_Timer = 15000;
} else m_uiCrusaderStrike_Timer -= uiDiff;
//HolyStrike
if (m_uiHolyStrike_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_HOLYSTRIKE);
DoCast(me->GetVictim(), SPELL_HOLYSTRIKE);
m_uiHolyStrike_Timer = 15000;
} else m_uiHolyStrike_Timer -= uiDiff;
@@ -173,14 +173,14 @@ public:
//MindBlast
if (m_uiMindBlast_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MINDBLAST);
DoCast(me->GetVictim(), SPELL_MINDBLAST);
m_uiMindBlast_Timer = urand(15000, 20000);
} else m_uiMindBlast_Timer -= uiDiff;
//ShadowShock
if (m_uiShadowShock_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SHADOWSHOCK);
DoCast(me->GetVictim(), SPELL_SHADOWSHOCK);
m_uiShadowShock_Timer = 11000;
} else m_uiShadowShock_Timer -= uiDiff;
@@ -205,7 +205,7 @@ public:
//MindControl
if (m_uiMindControl_Timer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MINDCONTROL);
DoCast(me->GetVictim(), SPELL_MINDCONTROL);
m_uiMindControl_Timer = 15000;
} else m_uiMindControl_Timer -= uiDiff;
}
@@ -63,7 +63,7 @@ public:
FuriousAnger_Timer = 5000;
AngerCount = 0;
if (me->isAlive())
if (me->IsAlive())
me->SetDisplayId(MODEL_NORMAL);
else
me->SetDisplayId(MODEL_HUMAN);
@@ -104,21 +104,21 @@ public:
//DrainingBlow
if (DrainingBlow_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_DRAININGBLOW);
DoCast(me->GetVictim(), SPELL_DRAININGBLOW);
DrainingBlow_Timer = 15000;
} else DrainingBlow_Timer -= diff;
//CrowdPummel
if (CrowdPummel_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CROWDPUMMEL);
DoCast(me->GetVictim(), SPELL_CROWDPUMMEL);
CrowdPummel_Timer = 15000;
} else CrowdPummel_Timer -= diff;
//MightyBlow
if (MightyBlow_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
DoCast(me->GetVictim(), SPELL_MIGHTYBLOW);
MightyBlow_Timer = 20000;
} else MightyBlow_Timer -= diff;
@@ -82,7 +82,7 @@ public:
if (Frostbolt_Timer <= diff)
{
if (rand()%100 < 90)
DoCast(me->getVictim(), SPELL_FROSTBOLT);
DoCast(me->GetVictim(), SPELL_FROSTBOLT);
Frostbolt_Timer = 3500;
} else Frostbolt_Timer -= diff;
@@ -90,7 +90,7 @@ public:
if (IceTomb_Timer <= diff)
{
if (rand()%100 < 65)
DoCast(me->getVictim(), SPELL_ICETOMB);
DoCast(me->GetVictim(), SPELL_ICETOMB);
IceTomb_Timer = 28000;
} else IceTomb_Timer -= diff;
@@ -98,7 +98,7 @@ public:
if (DrainLife_Timer <= diff)
{
if (rand()%100 < 55)
DoCast(me->getVictim(), SPELL_DRAINLIFE);
DoCast(me->GetVictim(), SPELL_DRAINLIFE);
DrainLife_Timer = 31000;
} else DrainLife_Timer -= diff;
@@ -92,7 +92,7 @@ public:
//EncasingWebs
if (EncasingWebs_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ENCASINGWEBS);
DoCast(me->GetVictim(), SPELL_ENCASINGWEBS);
EncasingWebs_Timer = 30000;
} else EncasingWebs_Timer -= diff;
@@ -100,21 +100,21 @@ public:
if (PierceArmor_Timer <= diff)
{
if (urand(0, 3) < 2)
DoCast(me->getVictim(), SPELL_PIERCEARMOR);
DoCast(me->GetVictim(), SPELL_PIERCEARMOR);
PierceArmor_Timer = 35000;
} else PierceArmor_Timer -= diff;
//CryptScarabs_Timer
if (CryptScarabs_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CRYPT_SCARABS);
DoCast(me->GetVictim(), SPELL_CRYPT_SCARABS);
CryptScarabs_Timer = 20000;
} else CryptScarabs_Timer -= diff;
//RaiseUndeadScarab
if (RaiseUndeadScarab_Timer <= diff)
{
RaiseUndeadScarab(me->getVictim());
RaiseUndeadScarab(me->GetVictim());
RaiseUndeadScarab_Timer = 16000;
} else RaiseUndeadScarab_Timer -= diff;
@@ -98,7 +98,7 @@ public:
//Knockout
if (Knockout_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKOUT);
DoCast(me->GetVictim(), SPELL_KNOCKOUT);
Knockout_Timer = 10000;
} else Knockout_Timer -= diff;
@@ -78,7 +78,7 @@ public:
if (RavenousClaw_Timer <= diff)
{
//Cast
DoCast(me->getVictim(), SPELL_RAVENOUSCLAW);
DoCast(me->GetVictim(), SPELL_RAVENOUSCLAW);
//15 seconds until we should cast this again
RavenousClaw_Timer = 15000;
} else RavenousClaw_Timer -= diff;
@@ -273,7 +273,7 @@ class instance_stratholme : public InstanceMapScript
for (std::set<uint64>::const_iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
{
if (Creature* pAbom = instance->GetCreature(*i))
if (!pAbom->isAlive())
if (!pAbom->IsAlive())
--count;
}
@@ -310,7 +310,7 @@ class instance_stratholme : public InstanceMapScript
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->getSource())
if (Player* player = itr->GetSource())
if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA);
@@ -60,7 +60,7 @@ public:
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* pGroupie = itr->getSource();
Player* pGroupie = itr->GetSource();
if (!pGroupie)
continue;
@@ -306,14 +306,14 @@ public:
if (SlashTimer <= diff)
{
DoCast(me->getVictim(), SPELL_METEOR_SLASH);
DoCast(me->GetVictim(), SPELL_METEOR_SLASH);
SlashTimer = 11000;
} else SlashTimer -= diff;
if (StompTimer <= diff)
{
Talk(YELL_LOVE);
DoCast(me->getVictim(), SPELL_STOMP);
DoCast(me->GetVictim(), SPELL_STOMP);
StompTimer = 30000;
} else StompTimer -= diff;
@@ -118,12 +118,12 @@ public:
{
if (temp->isDead())
temp->Respawn();
else if (temp->getVictim())
me->getThreatManager().addThreat(temp->getVictim(), 0.0f);
else if (temp->GetVictim())
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
}
}
if (!me->isInCombat())
if (!me->IsInCombat())
{
ShadowbladesTimer = 10000;
ShadownovaTimer = 30000;
@@ -146,7 +146,7 @@ public:
if (instance)
{
Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
if (temp && temp->isAlive() && !temp->getVictim())
if (temp && temp->IsAlive() && !temp->GetVictim())
temp->AI()->AttackStart(who);
}
@@ -324,10 +324,10 @@ public:
if (me->isAttackReady() && !me->IsNonMeleeSpellCasted(false))
{
//If we are within range melee the target
if (me->IsWithinMeleeRange(me->getVictim()))
if (me->IsWithinMeleeRange(me->GetVictim()))
{
HandleTouchedSpells(me->getVictim(), SPELL_DARK_TOUCHED);
me->AttackerStateUpdate(me->getVictim());
HandleTouchedSpells(me->GetVictim(), SPELL_DARK_TOUCHED);
me->AttackerStateUpdate(me->GetVictim());
me->resetAttackTimer();
}
}
@@ -380,12 +380,12 @@ public:
{
if (temp->isDead())
temp->Respawn();
else if (temp->getVictim())
me->getThreatManager().addThreat(temp->getVictim(), 0.0f);
else if (temp->GetVictim())
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
}
}
if (!me->isInCombat())
if (!me->IsInCombat())
{
ConflagrationTimer = 45000;
BlazeTimer = 100;
@@ -409,7 +409,7 @@ public:
if (instance)
{
Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
if (temp && temp->isAlive() && !temp->getVictim())
if (temp && temp->IsAlive() && !temp->GetVictim())
temp->AI()->AttackStart(who);
}
@@ -419,21 +419,21 @@ public:
void AttackStart(Unit* who)
{
if (!me->isInCombat())
if (!me->IsInCombat())
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
{
if (!who || me->getVictim())
if (!who || me->GetVictim())
return;
if (me->canCreatureAttack(who))
if (me->CanCreatureAttack(who))
{
float attackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, attackRadius) && me->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && me->IsWithinLOSInMap(who))
{
if (!me->isInCombat())
if (!me->IsInCombat())
{
DoStartNoMovement(who);
}
@@ -567,16 +567,16 @@ public:
}
}
}
if (!me->getVictim())
if (!me->GetVictim())
{
if (instance)
{
Creature* sisiter = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH));
if (sisiter && !sisiter->isDead() && sisiter->getVictim())
if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
{
me->AddThreat(sisiter->getVictim(), 0.0f);
DoStartNoMovement(sisiter->getVictim());
me->Attack(sisiter->getVictim(), false);
me->AddThreat(sisiter->GetVictim(), 0.0f);
DoStartNoMovement(sisiter->GetVictim());
me->Attack(sisiter->GetVictim(), false);
}
}
}
@@ -645,7 +645,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
DoCast(me->getVictim(), SPELL_BLAZE);
DoCast(me->GetVictim(), SPELL_BLAZE);
BlazeTimer = 3800;
}
} else BlazeTimer -= diff;
@@ -732,8 +732,8 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
//If we are within range melee the target
if (me->IsWithinMeleeRange(me->getVictim()))
DoCast(me->getVictim(), SPELL_DARK_STRIKE);
if (me->IsWithinMeleeRange(me->GetVictim()))
DoCast(me->GetVictim(), SPELL_DARK_STRIKE);
}
DarkstrikeTimer = 3000;
} else DarkstrikeTimer -= diff;
@@ -428,11 +428,11 @@ public:
events.ScheduleEvent(EVENT_BERSERK, 10000);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE, false);
DoCast(me->GetVictim(), SPELL_CLEAVE, false);
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
break;
case EVENT_CORROSION:
DoCast(me->getVictim(), SPELL_CORROSION, false);
DoCast(me->GetVictim(), SPELL_CORROSION, false);
events.ScheduleEvent(EVENT_CORROSION, urand(20000, 30000));
break;
case EVENT_GAS_NOVA:
@@ -538,7 +538,7 @@ public:
}
void UpdateAI(uint32 /*diff*/)
{
if (!me->getVictim())
if (!me->GetVictim())
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
AttackStart(target);
}
Loaded 100 of 490 files, more files were not shown because too many files have changed in this diff. Show more