aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-06-13 19:35:01 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-06-13 19:35:01 +0200
commit87d9d1d7055fdda84d8f116041224ce0fb289b02 (patch)
tree3534098d09befbb23c39cbf02a3256365d5bfc76 /src/server/game
parent0bebf40fe7fc6ffdf3e86452f14e3bf647380b15 (diff)
parent1c9a3d562120039c9fe96d35a63ade8ee9cb1266 (diff)
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
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.cpp10
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.cpp4
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.cpp6
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp52
-rw-r--r--src/server/game/AI/CoreAI/ReactorAI.cpp2
-rw-r--r--src/server/game/AI/CoreAI/TotemAI.cpp8
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp26
-rw-r--r--src/server/game/AI/CreatureAI.cpp36
-rw-r--r--src/server/game/AI/CreatureAI.h2
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp8
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp14
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp18
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp22
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp28
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp64
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp10
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp4
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp16
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp2
-rw-r--r--src/server/game/Combat/HostileRefManager.cpp12
-rw-r--r--src/server/game/Combat/HostileRefManager.h2
-rw-r--r--src/server/game/Combat/ThreatManager.cpp38
-rw-r--r--src/server/game/Combat/ThreatManager.h4
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp2
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp4
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp10
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp88
-rw-r--r--src/server/game/Entities/Creature/Creature.h22
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp8
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.cpp20
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Entities/Object/Object.cpp42
-rw-r--r--src/server/game/Entities/Object/Object.h2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp8
-rw-r--r--src/server/game/Entities/Player/Player.cpp198
-rw-r--r--src/server/game/Entities/Player/Player.h6
-rw-r--r--src/server/game/Entities/Totem/Totem.cpp4
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp10
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp12
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp312
-rw-r--r--src/server/game/Entities/Unit/Unit.h72
-rw-r--r--src/server/game/Events/GameEventMgr.cpp20
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.cpp60
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h86
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiersImpl.h194
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp20
-rw-r--r--src/server/game/Groups/Group.cpp40
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp12
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp6
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp12
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp8
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp4
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp2
-rw-r--r--src/server/game/Handlers/LootHandler.cpp14
-rw-r--r--src/server/game/Handlers/MailHandler.cpp2
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp34
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp8
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp24
-rw-r--r--src/server/game/Handlers/PetHandler.cpp40
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp4
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp4
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp6
-rw-r--r--src/server/game/Handlers/TradeHandler.cpp8
-rw-r--r--src/server/game/Instances/InstanceScript.cpp28
-rw-r--r--src/server/game/Loot/LootMgr.cpp2
-rw-r--r--src/server/game/Mails/Mail.cpp4
-rw-r--r--src/server/game/Maps/Map.cpp48
-rw-r--r--src/server/game/Maps/MapManager.cpp4
-rw-r--r--src/server/game/Maps/PhaseMgr.cpp2
-rw-r--r--src/server/game/Miscellaneous/Formulas.h2
-rw-r--r--src/server/game/Movement/FollowerReference.cpp2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp8
-rw-r--r--src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp12
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp6
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp8
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h2
-rw-r--r--src/server/game/Movement/PathGenerator.cpp8
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp2
-rw-r--r--src/server/game/Scripting/MapScripts.cpp2
-rw-r--r--src/server/game/Server/WorldSession.cpp2
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp2
-rw-r--r--src/server/game/Skills/SkillExtraItems.h2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp62
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp2
-rw-r--r--src/server/game/Spells/Spell.cpp52
-rw-r--r--src/server/game/Spells/SpellEffects.cpp102
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp14
-rw-r--r--src/server/game/Texts/CreatureTextMgr.h14
96 files changed, 1119 insertions, 1123 deletions
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index f835533d322..85dd9cca90c 100644
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -26,7 +26,7 @@
int AggressorAI::Permissible(const Creature* creature)
{
// have some hostile factions, it will be selected by IsHostileTo check at MoveInLineOfSight
- if (!creature->isCivilian() && !creature->IsNeutralToAll())
+ if (!creature->IsCivilian() && !creature->IsNeutralToAll())
return PERMIT_BASE_PROACTIVE;
return PERMIT_BASE_NO;
@@ -164,7 +164,7 @@ void CasterAI::UpdateAI(uint32 diff)
events.Update(diff);
- if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
+ if (me->GetVictim()->HasBreakableByDamageCrowdControlAura(me))
{
me->InterruptNonMeleeSpells(false);
return;
@@ -224,7 +224,7 @@ void ArcherAI::UpdateAI(uint32 /*diff*/)
if (!UpdateVictim())
return;
- if (!me->IsWithinCombatRange(me->getVictim(), m_minRange))
+ if (!me->IsWithinCombatRange(me->GetVictim(), m_minRange))
DoSpellAttackIfReady(me->m_spells[0]);
else
DoMeleeAttackIfReady();
@@ -248,8 +248,8 @@ TurretAI::TurretAI(Creature* c) : CreatureAI(c)
bool TurretAI::CanAIAttack(const Unit* /*who*/) const
{
/// @todo use one function to replace it
- if (!me->IsWithinCombatRange(me->getVictim(), me->m_CombatDistance)
- || (m_minRange && me->IsWithinCombatRange(me->getVictim(), m_minRange)))
+ if (!me->IsWithinCombatRange(me->GetVictim(), me->m_CombatDistance)
+ || (m_minRange && me->IsWithinCombatRange(me->GetVictim(), m_minRange)))
return false;
return true;
}
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 1da190a86a8..220d53a20e0 100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -25,7 +25,7 @@
int GuardAI::Permissible(Creature const* creature)
{
- if (creature->isGuard())
+ if (creature->IsGuard())
return PERMIT_BASE_SPECIAL;
return PERMIT_BASE_NO;
@@ -50,7 +50,7 @@ bool GuardAI::CanSeeAlways(WorldObject const* obj)
void GuardAI::EnterEvadeMode()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
{
me->GetMotionMaster()->MoveIdle();
me->CombatStop(true);
diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp
index 187a72bae92..e3f852d08eb 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.cpp
+++ b/src/server/game/AI/CoreAI/PassiveAI.cpp
@@ -26,7 +26,7 @@ NullCreatureAI::NullCreatureAI(Creature* c) : CreatureAI(c) { me->SetReactState(
void PassiveAI::UpdateAI(uint32)
{
- if (me->isInCombat() && me->getAttackers().empty())
+ if (me->IsInCombat() && me->getAttackers().empty())
EnterEvadeMode();
}
@@ -37,9 +37,9 @@ void PossessedAI::AttackStart(Unit* target)
void PossessedAI::UpdateAI(uint32 /*diff*/)
{
- if (me->getVictim())
+ if (me->GetVictim())
{
- if (!me->IsValidAttackTarget(me->getVictim()))
+ if (!me->IsValidAttackTarget(me->GetVictim()))
me->AttackStop();
else
DoMeleeAttackIfReady();
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index be215d956b2..2a13e5c71bf 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -32,7 +32,7 @@
int PetAI::Permissible(const Creature* creature)
{
- if (creature->isPet())
+ if (creature->IsPet())
return PERMIT_BASE_SPECIAL;
return PERMIT_BASE_NO;
@@ -46,15 +46,15 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK)
bool PetAI::_needToStop()
{
// This is needed for charmed creatures, as once their target was reset other effects can trigger threat
- if (me->isCharmed() && me->getVictim() == me->GetCharmer())
+ if (me->IsCharmed() && me->GetVictim() == me->GetCharmer())
return true;
- return !me->IsValidAttackTarget(me->getVictim());
+ return !me->IsValidAttackTarget(me->GetVictim());
}
void PetAI::_stopAttack()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
{
TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow());
me->GetMotionMaster()->Clear();
@@ -75,7 +75,7 @@ void PetAI::_stopAttack()
void PetAI::UpdateAI(uint32 diff)
{
- if (!me->isAlive() || !me->GetCharmInfo())
+ if (!me->IsAlive() || !me->GetCharmInfo())
return;
Unit* owner = me->GetCharmerOrOwner();
@@ -86,10 +86,10 @@ void PetAI::UpdateAI(uint32 diff)
else
m_updateAlliesTimer -= diff;
- if (me->getVictim() && me->getVictim()->isAlive())
+ if (me->GetVictim() && me->GetVictim()->IsAlive())
{
// is only necessary to stop casting, the pet must not exit combat
- if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
+ if (me->GetVictim()->HasBreakableByDamageCrowdControlAura(me))
{
me->InterruptNonMeleeSpells(false);
return;
@@ -105,7 +105,7 @@ void PetAI::UpdateAI(uint32 diff)
// Check before attacking to prevent pets from leaving stay position
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
- if (me->GetCharmInfo()->IsCommandAttack() || (me->GetCharmInfo()->IsAtStay() && me->IsWithinMeleeRange(me->getVictim())))
+ if (me->GetCharmInfo()->IsCommandAttack() || (me->GetCharmInfo()->IsAtStay() && me->IsWithinMeleeRange(me->GetVictim())))
DoMeleeAttackIfReady();
}
else
@@ -159,7 +159,7 @@ void PetAI::UpdateAI(uint32 diff)
continue;
// Check if we're in combat or commanded to attack
- if (!me->isInCombat() && !me->GetCharmInfo()->IsCommandAttack())
+ if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack())
continue;
}
@@ -208,11 +208,11 @@ void PetAI::UpdateAI(uint32 diff)
if (!spellUsed)
delete spell;
}
- else if (me->getVictim() && CanAttack(me->getVictim()) && spellInfo->CanBeUsedInCombat())
+ else if (me->GetVictim() && CanAttack(me->GetVictim()) && spellInfo->CanBeUsedInCombat())
{
Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE, 0);
- if (spell->CanAutoCast(me->getVictim()))
- targetSpellStore.push_back(std::make_pair(me->getVictim(), spell));
+ if (spell->CanAutoCast(me->GetVictim()))
+ targetSpellStore.push_back(std::make_pair(me->GetVictim(), spell));
else
delete spell;
}
@@ -284,7 +284,7 @@ void PetAI::UpdateAllies()
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* Target = itr->getSource();
+ Player* Target = itr->GetSource();
if (!Target || !group->SameSubGroup((Player*)owner, Target))
continue;
@@ -302,7 +302,7 @@ void PetAI::KilledUnit(Unit* victim)
{
// Called from Unit::Kill() in case where pet or owner kills something
// if owner killed this victim, pet may still be attacking something else
- if (me->getVictim() && me->getVictim() != victim)
+ if (me->GetVictim() && me->GetVictim() != victim)
return;
// Clear target just in case. May help problem where health / focus / mana
@@ -345,7 +345,7 @@ void PetAI::OwnerAttackedBy(Unit* attacker)
return;
// Prevent pet from disengaging from current target
- if (me->getVictim() && me->getVictim()->isAlive())
+ if (me->GetVictim() && me->GetVictim()->IsAlive())
return;
// Continue to evaluate and attack if necessary
@@ -366,7 +366,7 @@ void PetAI::OwnerAttacked(Unit* target)
return;
// Prevent pet from disengaging from current target
- if (me->getVictim() && me->getVictim()->isAlive())
+ if (me->GetVictim() && me->GetVictim()->IsAlive())
return;
// Continue to evaluate and attack if necessary
@@ -400,7 +400,7 @@ Unit* PetAI::SelectNextTarget(bool allowAutoSelect) const
// Check owner victim
// 3.0.2 - Pets now start attacking their owners victim in defensive mode as soon as the hunter does
- if (Unit* ownerVictim = me->GetCharmerOrOwner()->getVictim())
+ if (Unit* ownerVictim = me->GetCharmerOrOwner()->GetVictim())
return ownerVictim;
// Neither pet or owner had a target and aggressive pets can pick any target
@@ -423,7 +423,7 @@ void PetAI::HandleReturnMovement()
// Prevent activating movement when under control of spells
// such as "Eyes of the Beast"
- if (me->isCharmed())
+ if (me->IsCharmed())
return;
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
@@ -527,7 +527,7 @@ bool PetAI::CanAttack(Unit* target)
if (!target)
return false;
- if (!target->isAlive())
+ if (!target->IsAlive())
{
// Clear target to prevent getting stuck on dead targets
me->AttackStop();
@@ -553,14 +553,14 @@ bool PetAI::CanAttack(Unit* target)
return (me->IsWithinMeleeRange(target) || me->GetCharmInfo()->IsCommandAttack());
// Pets attacking something (or chasing) should only switch targets if owner tells them to
- if (me->getVictim() && me->getVictim() != target)
+ if (me->GetVictim() && me->GetVictim() != target)
{
// Check if our owner selected this target and clicked "attack"
Unit* ownerTarget = NULL;
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
ownerTarget = owner->GetSelectedUnit();
else
- ownerTarget = me->GetCharmerOrOwner()->getVictim();
+ ownerTarget = me->GetCharmerOrOwner()->GetVictim();
if (ownerTarget && me->GetCharmInfo()->IsCommandAttack())
return (target->GetGUID() == ownerTarget->GetGUID());
@@ -580,19 +580,19 @@ void PetAI::ReceiveEmote(Player* player, uint32 emote)
switch (emote)
{
case TEXT_EMOTE_COWER:
- if (me->isPet() && me->ToPet()->IsPetGhoul())
+ if (me->IsPet() && me->ToPet()->IsPetGhoul())
me->HandleEmoteCommand(/*EMOTE_ONESHOT_ROAR*/EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
case TEXT_EMOTE_ANGRY:
- if (me->isPet() && me->ToPet()->IsPetGhoul())
+ if (me->IsPet() && me->ToPet()->IsPetGhoul())
me->HandleEmoteCommand(/*EMOTE_ONESHOT_COWER*/EMOTE_STATE_STUN);
break;
case TEXT_EMOTE_GLARE:
- if (me->isPet() && me->ToPet()->IsPetGhoul())
+ if (me->IsPet() && me->ToPet()->IsPetGhoul())
me->HandleEmoteCommand(EMOTE_STATE_STUN);
break;
case TEXT_EMOTE_SOOTHE:
- if (me->isPet() && me->ToPet()->IsPetGhoul())
+ if (me->IsPet() && me->ToPet()->IsPetGhoul())
me->HandleEmoteCommand(EMOTE_ONESHOT_OMNICAST_GHOUL);
break;
}
@@ -627,7 +627,7 @@ void PetAI::AttackedBy(Unit* attacker)
return;
// Prevent pet from disengaging from current target
- if (me->getVictim() && me->getVictim()->isAlive())
+ if (me->GetVictim() && me->GetVictim()->IsAlive())
return;
// Continue to evaluate and attack if necessary
diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp
index b99885088d4..d749ce91c05 100644
--- a/src/server/game/AI/CoreAI/ReactorAI.cpp
+++ b/src/server/game/AI/CoreAI/ReactorAI.cpp
@@ -25,7 +25,7 @@
int ReactorAI::Permissible(const Creature* creature)
{
- if (creature->isCivilian() || creature->IsNeutralToAll())
+ if (creature->IsCivilian() || creature->IsNeutralToAll())
return PERMIT_BASE_REACTIVE;
return PERMIT_BASE_NO;
diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp
index 45865c5dbc2..d8644c50b35 100644
--- a/src/server/game/AI/CoreAI/TotemAI.cpp
+++ b/src/server/game/AI/CoreAI/TotemAI.cpp
@@ -29,7 +29,7 @@
int TotemAI::Permissible(Creature const* creature)
{
- if (creature->isTotem())
+ if (creature->IsTotem())
return PERMIT_BASE_PROACTIVE;
return PERMIT_BASE_NO;
@@ -37,7 +37,7 @@ int TotemAI::Permissible(Creature const* creature)
TotemAI::TotemAI(Creature* c) : CreatureAI(c), i_victimGuid(0)
{
- ASSERT(c->isTotem());
+ ASSERT(c->IsTotem());
}
void TotemAI::MoveInLineOfSight(Unit* /*who*/)
@@ -54,7 +54,7 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
return;
- if (!me->isAlive() || me->IsNonMeleeSpellCasted(false))
+ if (!me->IsAlive() || me->IsNonMeleeSpellCasted(false))
return;
// Search spell
@@ -73,7 +73,7 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
// Search victim if no, not attackable, or out of range, or friendly (possible in case duel end)
if (!victim ||
!victim->isTargetableForAttack() || !me->IsWithinDistInMap(victim, max_range) ||
- me->IsFriendlyTo(victim) || !me->canSeeOrDetect(victim))
+ me->IsFriendlyTo(victim) || !me->CanSeeOrDetect(victim))
{
victim = NULL;
Trinity::NearestAttackableUnitInObjectRangeCheck u_check(me, me, max_range);
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 70c4761e025..9abdf9e8cfc 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -43,7 +43,7 @@ void UnitAI::DoMeleeAttackIfReady()
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- Unit* victim = me->getVictim();
+ Unit* victim = me->GetVictim();
//Make sure our attack is ready and we aren't currently casting before checking distance
if (me->isAttackReady() && me->IsWithinMeleeRange(victim))
{
@@ -65,9 +65,9 @@ bool UnitAI::DoSpellAttackIfReady(uint32 spell)
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell))
{
- if (me->IsWithinCombatRange(me->getVictim(), spellInfo->GetMaxRange(false)))
+ if (me->IsWithinCombatRange(me->GetVictim(), spellInfo->GetMaxRange(false)))
{
- me->CastSpell(me->getVictim(), spell, false);
+ me->CastSpell(me->GetVictim(), spell, false);
me->resetAttackTimer();
return true;
}
@@ -94,7 +94,7 @@ float UnitAI::DoGetSpellMaxRange(uint32 spellId, bool positive)
void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid)
{
- if (me->isInCombat())
+ if (me->IsInCombat())
{
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
@@ -108,7 +108,7 @@ void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid)
void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
{
- if (me->isInCombat())
+ if (me->IsInCombat())
{
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
@@ -131,7 +131,7 @@ void UnitAI::DoCast(uint32 spellId)
target = me;
break;
case AITARGET_VICTIM:
- target = me->getVictim();
+ target = me->GetVictim();
break;
case AITARGET_ENEMY:
{
@@ -157,8 +157,8 @@ void UnitAI::DoCast(uint32 spellId)
DefaultTargetSelector targetSelector(me, range, playerOnly, -(int32)spellId);
if (!(spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_VICTIM)
- && targetSelector(me->getVictim()))
- target = me->getVictim();
+ && targetSelector(me->GetVictim()))
+ target = me->GetVictim();
else
target = SelectTarget(SELECT_TARGET_RANDOM, 0, targetSelector);
}
@@ -180,10 +180,10 @@ void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
void UnitAI::DoCastVictim(uint32 spellId, bool triggered)
{
- if (!me->getVictim() || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered))
+ if (!me->GetVictim() || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered))
return;
- me->CastSpell(me->getVictim(), spellId, triggered);
+ me->CastSpell(me->GetVictim(), spellId, triggered);
}
void UnitAI::DoCastAOE(uint32 spellId, bool triggered)
@@ -269,10 +269,10 @@ void SimpleCharmedAI::UpdateAI(const uint32 /*diff*/)
}
}
- if (!charmer->isInCombat())
+ if (!charmer->IsInCombat())
me->GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, me->GetFollowAngle());
- Unit* target = me->getVictim();
+ Unit* target = me->GetVictim();
if (!target || !charmer->IsValidAttackTarget(target))
AttackStart(charmer->SelectNearestTargetInAttackDistance());
}
@@ -328,5 +328,5 @@ bool NonTankTargetSelector::operator()(Unit const* target) const
if (_playerOnly && target->GetTypeId() != TYPEID_PLAYER)
return false;
- return target != _source->getVictim();
+ return target != _source->GetVictim();
}
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 808a1a55a6a..09a6725485a 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -58,11 +58,11 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
return;
}
- if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
+ if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
if (Unit* nearTarget = creature->SelectNearestTarget(maxRangeToNearestTarget))
creature->AI()->AttackStart(nearTarget);
- else if (creature->isSummon())
+ else if (creature->IsSummon())
{
if (Unit* summoner = creature->ToTempSummon()->GetSummoner())
{
@@ -75,7 +75,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
}
}
- if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
+ if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
TC_LOG_ERROR(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
return;
@@ -88,12 +88,12 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
{
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
{
- if (player->isGameMaster())
+ if (player->IsGameMaster())
continue;
- if (player->isAlive())
+ if (player->IsAlive())
{
creature->SetInCombatWith(player);
player->SetInCombatWith(creature);
@@ -124,18 +124,18 @@ void CreatureAI::MoveInLineOfSight_Safe(Unit* who)
void CreatureAI::MoveInLineOfSight(Unit* who)
{
- if (me->getVictim())
+ if (me->GetVictim())
return;
if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) // non-combat pets should just stand there and look good;)
return;
- if (me->canStartAttack(who, false))
+ if (me->CanStartAttack(who, false))
AttackStart(who);
- //else if (who->getVictim() && me->IsFriendlyTo(who)
+ //else if (who->GetVictim() && me->IsFriendlyTo(who)
// && me->IsWithinDistInMap(who, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
- // && me->canStartAttack(who->getVictim(), true)) /// @todo if we use true, it will not attack it when it arrives
- // me->GetMotionMaster()->MoveChase(who->getVictim());
+ // && me->CanStartAttack(who->GetVictim(), true)) /// @todo if we use true, it will not attack it when it arrives
+ // me->GetMotionMaster()->MoveChase(who->GetVictim());
}
void CreatureAI::EnterEvadeMode()
@@ -171,7 +171,7 @@ void CreatureAI::EnterEvadeMode()
/*void CreatureAI::AttackedBy(Unit* attacker)
{
- if (!me->getVictim())
+ if (!me->GetVictim())
AttackStart(attacker);
}*/
@@ -186,12 +186,12 @@ void CreatureAI::SetGazeOn(Unit* target)
bool CreatureAI::UpdateVictimWithGaze()
{
- if (!me->isInCombat())
+ if (!me->IsInCombat())
return false;
if (me->HasReactState(REACT_PASSIVE))
{
- if (me->getVictim())
+ if (me->GetVictim())
return true;
else
me->SetReactState(REACT_AGGRESSIVE);
@@ -199,19 +199,19 @@ bool CreatureAI::UpdateVictimWithGaze()
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
- return me->getVictim();
+ return me->GetVictim();
}
bool CreatureAI::UpdateVictim()
{
- if (!me->isInCombat())
+ if (!me->IsInCombat())
return false;
if (!me->HasReactState(REACT_PASSIVE))
{
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
- return me->getVictim();
+ return me->GetVictim();
}
else if (me->getThreatManager().isThreatListEmpty())
{
@@ -224,7 +224,7 @@ bool CreatureAI::UpdateVictim()
bool CreatureAI::_EnterEvadeMode()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
return false;
// dont remove vehicle auras, passengers arent supposed to drop off the vehicle
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index 3d71abb47a9..34339859a95 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -160,7 +160,7 @@ class CreatureAI : public UnitAI
virtual void CorpseRemoved(uint32& /*respawnDelay*/) {}
// Called when victim entered water and creature can not enter water
- //virtual bool canReachByRangeAttack(Unit*) { return false; }
+ //virtual bool CanReachByRangeAttack(Unit*) { return false; }
/// == Fields =======================================
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index e7d61e73d06..d9cc356aaad 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -33,7 +33,7 @@ namespace FactorySelector
const CreatureAICreator* ai_factory = NULL;
CreatureAIRegistry& ai_registry(*CreatureAIRepository::instance());
- if (creature->isPet())
+ if (creature->IsPet())
ai_factory = ai_registry.GetRegistryItem("PetAI");
//scriptname in db
@@ -55,13 +55,13 @@ namespace FactorySelector
ai_factory = ai_registry.GetRegistryItem("PetAI");
else if (creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK))
ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
- else if (creature->isGuard())
+ else if (creature->IsGuard())
ai_factory = ai_registry.GetRegistryItem("GuardAI");
else if (creature->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
ai_factory = ai_registry.GetRegistryItem("PetAI");
- else if (creature->isTotem())
+ else if (creature->IsTotem())
ai_factory = ai_registry.GetRegistryItem("TotemAI");
- else if (creature->isTrigger())
+ else if (creature->IsTrigger())
{
if (creature->m_spells[0])
ai_factory = ai_registry.GetRegistryItem("TriggerAI");
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 687f43f616d..0a03c8ee336 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -139,7 +139,7 @@ void ScriptedAI::DoStartNoMovement(Unit* victim)
void ScriptedAI::DoStopAttack()
{
- if (me->getVictim())
+ if (me->GetVictim())
me->AttackStop();
}
@@ -312,8 +312,8 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
Map::PlayerList const& PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
- if (Player* player = itr->getSource())
- if (player->isAlive())
+ if (Player* player = itr->GetSource())
+ if (player->IsAlive())
player->TeleportTo(me->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
}
@@ -407,7 +407,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff)
return false;
}
- if (me->IsInEvadeMode() || !me->getVictim())
+ if (me->IsInEvadeMode() || !me->GetVictim())
return false;
float x = me->GetPositionX();
@@ -454,7 +454,7 @@ BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature),
void BossAI::_Reset()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
return;
me->ResetLootMode();
@@ -555,7 +555,7 @@ bool BossAI::CheckBoundary(Unit* who)
void BossAI::JustSummoned(Creature* summon)
{
summons.Summon(summon);
- if (me->isInCombat())
+ if (me->IsInCombat())
DoZoneInCombat(summon);
}
@@ -604,7 +604,7 @@ WorldBossAI::WorldBossAI(Creature* creature) :
void WorldBossAI::_Reset()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
return;
events.Reset();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 59de2baaed2..4fb7232711c 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -55,7 +55,7 @@ void npc_escortAI::AttackStart(Unit* who)
//see followerAI
bool npc_escortAI::AssistPlayerInCombat(Unit* who)
{
- if (!who || !who->getVictim())
+ if (!who || !who->GetVictim())
return false;
//experimental (unknown) flag not present
@@ -63,7 +63,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* who)
return false;
//not a player
- if (!who->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
+ if (!who->GetVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
return false;
//never attack friendly
@@ -74,7 +74,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* who)
if (me->IsWithinDistInMap(who, GetMaxPlayerDistance()) && me->IsWithinLOSInMap(who))
{
//already fighting someone?
- if (!me->getVictim())
+ if (!me->GetVictim())
{
AttackStart(who);
return true;
@@ -105,7 +105,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* who)
float fAttackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, fAttackRadius) && me->IsWithinLOSInMap(who))
{
- if (!me->getVictim())
+ if (!me->GetVictim())
{
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
@@ -130,7 +130,7 @@ void npc_escortAI::JustDied(Unit* /*killer*/)
if (Group* group = player->GetGroup())
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
- if (Player* member = groupRef->getSource())
+ if (Player* member = groupRef->GetSource())
if (member->GetQuestStatus(m_pQuestForEscort->GetQuestId()) == QUEST_STATUS_INCOMPLETE)
member->FailQuest(m_pQuestForEscort->GetQuestId());
}
@@ -194,7 +194,7 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
if (Group* group = player->GetGroup())
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
- if (Player* member = groupRef->getSource())
+ if (Player* member = groupRef->GetSource())
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance()))
return true;
}
@@ -208,7 +208,7 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
void npc_escortAI::UpdateAI(uint32 diff)
{
//Waypoint Updating
- if (HasEscortState(STATE_ESCORT_ESCORTING) && !me->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING))
+ if (HasEscortState(STATE_ESCORT_ESCORTING) && !me->GetVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING))
{
if (m_uiWPWaitTimer <= diff)
{
@@ -265,7 +265,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
}
//Check if player or any member of his group is within range
- if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPlayerGUID && !me->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING))
+ if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPlayerGUID && !me->GetVictim() && !HasEscortState(STATE_ESCORT_RETURNING))
{
if (m_uiPlayerCheckTimer <= diff)
{
@@ -418,7 +418,7 @@ void npc_escortAI::SetRun(bool on)
/// @todo get rid of this many variables passed in function.
void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, uint64 playerGUID /* = 0 */, Quest const* quest /* = NULL */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
{
- if (me->getVictim())
+ if (me->GetVictim())
{
TC_LOG_ERROR(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
return;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index 6160fe68ce0..1c76399aa5c 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -52,7 +52,7 @@ void FollowerAI::AttackStart(Unit* who)
//The flag (type_flag) is unconfirmed, but used here for further research and is a good candidate.
bool FollowerAI::AssistPlayerInCombat(Unit* who)
{
- if (!who || !who->getVictim())
+ if (!who || !who->GetVictim())
return false;
//experimental (unknown) flag not present
@@ -60,7 +60,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* who)
return false;
//not a player
- if (!who->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
+ if (!who->GetVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
return false;
//never attack friendly
@@ -71,7 +71,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* who)
if (me->IsWithinDistInMap(who, MAX_PLAYER_DISTANCE) && me->IsWithinLOSInMap(who))
{
//already fighting someone?
- if (!me->getVictim())
+ if (!me->GetVictim())
{
AttackStart(who);
return true;
@@ -102,7 +102,7 @@ void FollowerAI::MoveInLineOfSight(Unit* who)
float fAttackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, fAttackRadius) && me->IsWithinLOSInMap(who))
{
- if (!me->getVictim())
+ if (!me->GetVictim())
{
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
@@ -129,7 +129,7 @@ void FollowerAI::JustDied(Unit* /*killer*/)
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
{
- if (Player* member = groupRef->getSource())
+ if (Player* member = groupRef->GetSource())
{
if (member->GetQuestStatus(m_pQuestForFollow->GetQuestId()) == QUEST_STATUS_INCOMPLETE)
member->FailQuest(m_pQuestForFollow->GetQuestId());
@@ -186,7 +186,7 @@ void FollowerAI::EnterEvadeMode()
void FollowerAI::UpdateAI(uint32 uiDiff)
{
- if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !me->getVictim())
+ if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !me->GetVictim())
{
if (m_uiUpdateFollowTimer <= uiDiff)
{
@@ -214,7 +214,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
{
- Player* member = groupRef->getSource();
+ Player* member = groupRef->GetSource();
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
{
@@ -273,7 +273,7 @@ void FollowerAI::MovementInform(uint32 motionType, uint32 pointId)
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Quest* quest)
{
- if (me->getVictim())
+ if (me->GetVictim())
{
TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while in combat.");
return;
@@ -313,7 +313,7 @@ Player* FollowerAI::GetLeaderForFollower()
{
if (Player* player = Unit::GetPlayer(*me, m_uiLeaderGUID))
{
- if (player->isAlive())
+ if (player->IsAlive())
return player;
else
{
@@ -321,9 +321,9 @@ Player* FollowerAI::GetLeaderForFollower()
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
{
- Player* member = groupRef->getSource();
+ Player* member = groupRef->GetSource();
- if (member && member->isAlive() && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
+ if (member && member->IsAlive() && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
{
TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI GetLeader changed and returned new leader.");
m_uiLeaderGUID = member->GetGUID();
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index f8c99816cdf..4d2b5f88376 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -116,7 +116,7 @@ WayPoint* SmartAI::GetNextWayPoint()
void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
{
- if (me->isInCombat())// no wp movement in combat
+ if (me->IsInCombat())// no wp movement in combat
{
TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
return;
@@ -226,7 +226,7 @@ void SmartAI::EndPath(bool fail)
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
{
- Player* groupGuy = groupRef->getSource();
+ Player* groupGuy = groupRef->GetSource();
if (!fail && groupGuy->IsAtGroupRewardDistance(me) && !groupGuy->GetCorpse())
groupGuy->AreaExploredOrEventHappens(mEscortQuestID);
@@ -284,7 +284,7 @@ void SmartAI::UpdatePath(const uint32 diff)
{
if (mWPPauseTimer < diff)
{
- if (!me->isInCombat() && !HasEscortState(SMART_ESCORT_RETURNING) && (mWPReached || mLastWPIDReached == SMART_ESCORT_LAST_OOC_POINT || mForcedPaused))
+ if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING) && (mWPReached || mLastWPIDReached == SMART_ESCORT_LAST_OOC_POINT || mForcedPaused))
{
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_RESUMED, NULL, mLastWP->id, GetScript()->GetPathId());
RemoveEscortState(SMART_ESCORT_PAUSED);
@@ -312,7 +312,7 @@ void SmartAI::UpdatePath(const uint32 diff)
mWPReached = false;
}
}
- if (me->isInCombat() || HasEscortState(SMART_ESCORT_PAUSED | SMART_ESCORT_RETURNING))
+ if (me->IsInCombat() || HasEscortState(SMART_ESCORT_PAUSED | SMART_ESCORT_RETURNING))
return;
// handle next wp
if (mWPReached)//reached WP
@@ -390,7 +390,7 @@ bool SmartAI::IsEscortInvokerInRange()
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
{
- Player* groupGuy = groupRef->getSource();
+ Player* groupGuy = groupRef->GetSource();
if (me->GetDistance(groupGuy) <= SMART_ESCORT_MAX_PLAYER_DIST)
return true;
@@ -446,7 +446,7 @@ void SmartAI::RemoveAuras()
void SmartAI::EnterEvadeMode()
{
- if (!me->isAlive() || me->IsInEvadeMode())
+ if (!me->IsAlive() || me->IsInEvadeMode())
return;
RemoveAuras();
@@ -490,7 +490,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
if (!CanAIAttack(who))
return;
- if (!me->canStartAttack(who, false))
+ if (!me->CanStartAttack(who, false))
return;
if (me->IsHostileTo(who))
@@ -498,7 +498,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
float fAttackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, fAttackRadius) && me->IsWithinLOSInMap(who))
{
- if (!me->getVictim())
+ if (!me->GetVictim())
{
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
@@ -521,7 +521,7 @@ bool SmartAI::CanAIAttack(const Unit* /*who*/) const
bool SmartAI::AssistPlayerInCombat(Unit* who)
{
- if (!who || !who->getVictim())
+ if (!who || !who->GetVictim())
return false;
//experimental (unknown) flag not present
@@ -529,7 +529,7 @@ bool SmartAI::AssistPlayerInCombat(Unit* who)
return false;
//not a player
- if (!who->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
+ if (!who->GetVictim()->GetCharmerOrOwnerPlayerOrPlayerItself())
return false;
//never attack friendly
@@ -540,7 +540,7 @@ bool SmartAI::AssistPlayerInCombat(Unit* who)
if (me->IsWithinDistInMap(who, SMART_MAX_AID_DIST) && me->IsWithinLOSInMap(who))
{
//already fighting someone?
- if (!me->getVictim())
+ if (!me->GetVictim())
{
AttackStart(who);
return true;
@@ -784,12 +784,12 @@ void SmartAI::SetCombatMove(bool on)
mCanCombatMove = on;
if (!HasEscortState(SMART_ESCORT_ESCORTING))
{
- if (on && me->getVictim())
+ if (on && me->GetVictim())
{
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE)
{
SetRun(mRun);
- me->GetMotionMaster()->MoveChase(me->getVictim());
+ me->GetMotionMaster()->MoveChase(me->GetVictim());
me->CastStop();
}
}
@@ -939,7 +939,7 @@ class SmartTrigger : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
- if (!player->isAlive())
+ if (!player->IsAlive())
return false;
TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 9d182ee6885..2abc526134c 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -166,7 +166,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (IsCreature((*itr)))
+ if (IsCreature((*itr)) && !(*itr)->ToCreature()->IsPet()) // Prevented sending text to pets.
{
talker = (*itr)->ToCreature();
break;
@@ -1042,7 +1042,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
// The AI is only updated if the creature is alive
- if (me->isAlive())
+ if (me->IsAlive())
{
CAST_AI(SmartAI, me->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1); // Next tick
CAST_AI(SmartAI, me->AI())->StartDespawn();
@@ -1602,9 +1602,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
if (Creature* target = (*itr)->ToCreature())
- if (IsSmart(target) && target->getVictim())
+ if (IsSmart(target) && target->GetVictim())
if (CAST_AI(SmartAI, target->AI())->CanCombatMove())
- target->GetMotionMaster()->MoveChase(target->getVictim(), attackDistance, attackAngle);
+ target->GetMotionMaster()->MoveChase(target->GetVictim(), attackDistance, attackAngle);
delete targets;
}
@@ -2257,8 +2257,8 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
l->push_back(baseObject);
break;
case SMART_TARGET_VICTIM:
- if (me && me->getVictim())
- l->push_back(me->getVictim());
+ if (me && me->GetVictim())
+ l->push_back(me->GetVictim());
break;
case SMART_TARGET_HOSTILE_SECOND_AGGRO:
if (me)
@@ -2297,7 +2297,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
if (Group* group = player->GetGroup())
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
- if (Player* member = groupRef->getSource())
+ if (Player* member = groupRef->GetSource())
l->push_back(member);
}
// We still add the player to the list if there is no group. If we do
@@ -2532,18 +2532,18 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax);
break;
case SMART_EVENT_UPDATE_OOC:
- if (me && me->isInCombat())
+ if (me && me->IsInCombat())
return;
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax);
break;
case SMART_EVENT_UPDATE_IC:
- if (!me || !me->isInCombat())
+ if (!me || !me->IsInCombat())
return;
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax);
break;
case SMART_EVENT_HEALT_PCT:
{
- if (!me || !me->isInCombat() || !me->GetMaxHealth())
+ if (!me || !me->IsInCombat() || !me->GetMaxHealth())
return;
uint32 perc = (uint32)me->GetHealthPct();
if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min)
@@ -2553,17 +2553,17 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_TARGET_HEALTH_PCT:
{
- if (!me || !me->isInCombat() || !me->getVictim() || !me->getVictim()->GetMaxHealth())
+ if (!me || !me->IsInCombat() || !me->GetVictim() || !me->GetVictim()->GetMaxHealth())
return;
- uint32 perc = (uint32)me->getVictim()->GetHealthPct();
+ uint32 perc = (uint32)me->GetVictim()->GetHealthPct();
if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min)
return;
- ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->getVictim());
+ ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
break;
}
case SMART_EVENT_MANA_PCT:
{
- if (!me || !me->isInCombat() || !me->GetMaxPower(POWER_MANA))
+ if (!me || !me->IsInCombat() || !me->GetMaxPower(POWER_MANA))
return;
uint32 perc = uint32(100.0f * me->GetPower(POWER_MANA) / me->GetMaxPower(POWER_MANA));
if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min)
@@ -2573,34 +2573,34 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_TARGET_MANA_PCT:
{
- if (!me || !me->isInCombat() || !me->getVictim() || !me->getVictim()->GetMaxPower(POWER_MANA))
+ if (!me || !me->IsInCombat() || !me->GetVictim() || !me->GetVictim()->GetMaxPower(POWER_MANA))
return;
- uint32 perc = uint32(100.0f * me->getVictim()->GetPower(POWER_MANA) / me->getVictim()->GetMaxPower(POWER_MANA));
+ uint32 perc = uint32(100.0f * me->GetVictim()->GetPower(POWER_MANA) / me->GetVictim()->GetMaxPower(POWER_MANA));
if (perc > e.event.minMaxRepeat.max || perc < e.event.minMaxRepeat.min)
return;
- ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->getVictim());
+ ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
break;
}
case SMART_EVENT_RANGE:
{
- if (!me || !me->isInCombat() || !me->getVictim())
+ if (!me || !me->IsInCombat() || !me->GetVictim())
return;
- if (me->IsInRange(me->getVictim(), (float)e.event.minMaxRepeat.min, (float)e.event.minMaxRepeat.max))
- ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->getVictim());
+ if (me->IsInRange(me->GetVictim(), (float)e.event.minMaxRepeat.min, (float)e.event.minMaxRepeat.max))
+ ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
break;
}
case SMART_EVENT_TARGET_CASTING:
{
- if (!me || !me->isInCombat() || !me->getVictim() || !me->getVictim()->IsNonMeleeSpellCasted(false, false, true))
+ if (!me || !me->IsInCombat() || !me->GetVictim() || !me->GetVictim()->IsNonMeleeSpellCasted(false, false, true))
return;
- ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->getVictim());
+ ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
break;
}
case SMART_EVENT_FRIENDLY_HEALTH:
{
- if (!me || !me->isInCombat())
+ if (!me || !me->IsInCombat())
return;
Unit* target = DoSelectLowestHpFriendly((float)e.event.friendlyHealt.radius, e.event.friendlyHealt.hpDeficit);
@@ -2611,7 +2611,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_FRIENDLY_IS_CC:
{
- if (!me || !me->isInCombat())
+ if (!me || !me->IsInCombat())
return;
std::list<Creature*> pList;
@@ -2643,9 +2643,9 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_TARGET_BUFFED:
{
- if (!me || !me->getVictim())
+ if (!me || !me->GetVictim())
return;
- uint32 count = me->getVictim()->GetAuraCount(e.event.aura.spell);
+ uint32 count = me->GetVictim()->GetAuraCount(e.event.aura.spell);
if (count < e.event.aura.count)
return;
ProcessTimedAction(e, e.event.aura.repeatMin, e.event.aura.repeatMax);
@@ -2680,7 +2680,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (!me)
return;
- if (Unit* victim = me->getVictim())
+ if (Unit* victim = me->GetVictim())
{
if (!victim->HasInArc(static_cast<float>(M_PI), me))
ProcessTimedAction(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax, victim);
@@ -2721,7 +2721,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_OOC_LOS:
{
- if (!me || me->isInCombat())
+ if (!me || me->IsInCombat())
return;
//can trigger if closer than fMaxAllowedRange
float range = (float)e.event.los.maxDist;
@@ -2741,7 +2741,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_IC_LOS:
{
- if (!me || !me->isInCombat())
+ if (!me || !me->IsInCombat())
return;
//can trigger if closer than fMaxAllowedRange
float range = (float)e.event.los.maxDist;
@@ -2961,10 +2961,10 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
if (e.event.event_phase_mask && !IsInPhase(e.event.event_phase_mask))
return;
- if (e.GetEventType() == SMART_EVENT_UPDATE_IC && (!me || !me->isInCombat()))
+ if (e.GetEventType() == SMART_EVENT_UPDATE_IC && (!me || !me->IsInCombat()))
return;
- if (e.GetEventType() == SMART_EVENT_UPDATE_OOC && (me && me->isInCombat()))//can be used with me=NULL (go script)
+ if (e.GetEventType() == SMART_EVENT_UPDATE_OOC && (me && me->IsInCombat()))//can be used with me=NULL (go script)
return;
if (e.timer < diff)
@@ -3199,7 +3199,7 @@ void SmartScript::OnMoveInLineOfSight(Unit* who)
if (!me)
return;
- if (me->getVictim())
+ if (me->GetVictim())
return;
ProcessEventsFor(SMART_EVENT_IC_LOS, who);
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 845e96794bd..a4e50dc1281 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -465,7 +465,7 @@ void AchievementMgr<T>::ResetAchievementCriteria(AchievementCriteriaTypes type,
TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "ResetAchievementCriteria(%u, " UI64FMTD ", " UI64FMTD ")", type, miscValue1, miscValue2);
// disable for gamemasters with GM-mode enabled
- if (GetOwner()->isGameMaster())
+ if (GetOwner()->IsGameMaster())
return;
AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr->GetAchievementCriteriaByType(type);
@@ -1099,7 +1099,7 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
}
// disable for gamemasters with GM-mode enabled
- if (referencePlayer->isGameMaster())
+ if (referencePlayer->IsGameMaster())
{
TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: [Player %s GM mode on] %s, %s (%u), " UI64FMTD ", " UI64FMTD ", " UI64FMTD
, referencePlayer->GetName().c_str(), GetLogNameForGuid(GetOwner()->GetGUID()), AchievementGlobalMgr::GetCriteriaTypeString(type), type, miscValue1, miscValue2, miscValue3);
@@ -1855,7 +1855,7 @@ template<>
void AchievementMgr<Player>::CompletedAchievement(AchievementEntry const* achievement, Player* referencePlayer)
{
// disable for gamemasters with GM-mode enabled
- if (GetOwner()->isGameMaster())
+ if (GetOwner()->IsGameMaster())
return;
if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID))
@@ -1961,7 +1961,7 @@ void AchievementMgr<Guild>::CompletedAchievement(AchievementEntry const* achieve
if (Group const* group = referencePlayer->GetGroup())
for (GroupReference const* ref = group->GetFirstMember(); ref != NULL; ref = ref->next())
- if (Player const* groupMember = ref->getSource())
+ if (Player const* groupMember = ref->GetSource())
if (groupMember->GetGuildId() == GetOwner()->GetId())
ca.guids.insert(groupMember->GetGUID());
}
@@ -2723,7 +2723,7 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_MUST_BE_DEAD: // 6
- if (!unit || unit->isAlive())
+ if (!unit || unit->IsAlive())
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_MUST_BE_ENEMY: // 7
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index cd1bade2bd9..bff46b9de73 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -256,7 +256,7 @@ void Battlefield::InvitePlayerToWar(Player* player)
return;
/// @todo needed ?
- if (player->isInFlight())
+ if (player->IsInFlight())
return;
if (player->InArena() || player->GetBattleground())
@@ -521,7 +521,7 @@ void Battlefield::ShowNpc(Creature* creature, bool aggressive)
creature->SetPhaseMask(1, true);
creature->SetVisible(true);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- if (!creature->isAlive())
+ if (!creature->IsAlive())
creature->Respawn(true);
if (aggressive)
creature->SetReactState(REACT_AGGRESSIVE);
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 3e98c68efcd..be2aa7711a9 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -559,7 +559,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
player->ResetAllPowers();
- if (!player->isGameMaster())
+ if (!player->IsGameMaster())
{
// remove auras with duration lower than 30s
Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras();
@@ -886,10 +886,10 @@ void Battleground::EndBattleground(uint32 winner)
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
// Last standing - Rated 5v5 arena & be solely alive player
- if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->isAlive())
+ if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->IsAlive())
player->CastSpell(player, SPELL_THE_LAST_STANDING, true);
- if (!player->isAlive())
+ if (!player->IsAlive())
{
player->ResurrectPlayer(1.0f);
player->SpawnCorpseBones();
@@ -1037,7 +1037,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!player->isAlive()) // resurrect on exit
+ if (!player->IsAlive()) // resurrect on exit
{
player->ResurrectPlayer(1.0f);
player->SpawnCorpseBones();
@@ -1927,7 +1927,7 @@ uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
if (itr->second.Team == Team)
{
Player* player = ObjectAccessor::FindPlayer(itr->first);
- if (player && player->isAlive() && !player->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
+ if (player && player->IsAlive() && !player->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
++count;
}
}
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 5d6bab27070..4ac09bd2b30 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -171,7 +171,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
{
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member)
continue; // this should never happen
PlayerQueueInfo& pl_info = m_QueuedPlayers[member->GetGUID()];
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 0ececf6c6f7..c87fd3db8ca 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -381,7 +381,7 @@ void BattlegroundEY::HandleAreaTrigger(Player* player, uint32 trigger)
if (GetStatus() != STATUS_IN_PROGRESS)
return;
- if (!player->isAlive()) //hack code, must be removed later
+ if (!player->IsAlive()) //hack code, must be removed later
return;
switch (trigger)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index a73eee25ac1..7b4f323ac31 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -151,7 +151,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
if (Creature* catapult = GetBGCreature(u))
{
- if (!catapult->isAlive())
+ if (!catapult->IsAlive())
catapult->Respawn(true);
}
}
@@ -161,7 +161,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
if (Creature* glaiveThrower = GetBGCreature(u))
{
- if (!glaiveThrower->isAlive())
+ if (!glaiveThrower->IsAlive())
glaiveThrower->Respawn(true);
}
}
@@ -182,7 +182,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
if (Creature* siege = GetBGCreature(siegeType)) // this always should be true
{
- if (siege->isAlive())
+ if (siege->IsAlive())
{
if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC))
// following sniffs the vehicle always has UNIT_FLAG_UNK_14
@@ -199,7 +199,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
if (Creature* demolisher = GetBGCreature(u))
{
- if (!demolisher->isAlive())
+ if (!demolisher->IsAlive())
demolisher->Respawn(true);
}
}
@@ -718,7 +718,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_A : BG_IC_NPC_GLAIVE_THROWER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, nodePoint->faction,
@@ -733,7 +733,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_A : BG_IC_NPC_CATAPULT_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(NPC_CATAPULT, type, nodePoint->faction,
@@ -768,7 +768,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_A : BG_IC_NPC_DEMOLISHER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(NPC_DEMOLISHER, type, nodePoint->faction,
@@ -792,7 +792,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
}
uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
- if (!GetBGCreature(siegeType) || !GetBGCreature(siegeType)->isAlive())
+ if (!GetBGCreature(siegeType) || !GetBGCreature(siegeType)->IsAlive())
{
AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType, nodePoint->faction,
BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(),
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 0fd963cc0cf..24c989d76dd 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -507,7 +507,7 @@ void BattlegroundSA::TeleportPlayers()
if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!player->isAlive())
+ if (!player->IsAlive())
{
player->ResurrectPlayer(1.0f);
player->SpawnCorpseBones();
diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp
index 5b228229e89..4cd76b4e7a2 100644
--- a/src/server/game/Combat/HostileRefManager.cpp
+++ b/src/server/game/Combat/HostileRefManager.cpp
@@ -40,8 +40,8 @@ void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo c
threat /= getSize();
while (ref)
{
- if (ThreatCalcHelper::isValidProcess(victim, ref->getSource()->getOwner(), threatSpell))
- ref->getSource()->doAddThreat(victim, threat);
+ if (ThreatCalcHelper::isValidProcess(victim, ref->GetSource()->GetOwner(), threatSpell))
+ ref->GetSource()->doAddThreat(victim, threat);
ref = ref->next();
}
@@ -130,7 +130,7 @@ void HostileRefManager::deleteReferencesForFaction(uint32 faction)
while (ref)
{
HostileReference* nextRef = ref->next();
- if (ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction)
+ if (ref->GetSource()->GetOwner()->GetFactionTemplateEntry()->faction == faction)
{
ref->removeReference();
delete ref;
@@ -148,7 +148,7 @@ void HostileRefManager::deleteReference(Unit* creature)
while (ref)
{
HostileReference* nextRef = ref->next();
- if (ref->getSource()->getOwner() == creature)
+ if (ref->GetSource()->GetOwner() == creature)
{
ref->removeReference();
delete ref;
@@ -167,7 +167,7 @@ void HostileRefManager::setOnlineOfflineState(Unit* creature, bool isOnline)
while (ref)
{
HostileReference* nextRef = ref->next();
- if (ref->getSource()->getOwner() == creature)
+ if (ref->GetSource()->GetOwner() == creature)
{
ref->setOnlineOfflineState(isOnline);
break;
@@ -184,7 +184,7 @@ void HostileRefManager::UpdateVisibility()
while (ref)
{
HostileReference* nextRef = ref->next();
- if (!ref->getSource()->getOwner()->canSeeOrDetect(getOwner()))
+ if (!ref->GetSource()->GetOwner()->CanSeeOrDetect(GetOwner()))
{
nextRef = ref->next();
ref->removeReference();
diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h
index e1d3fd5ed84..84c8db8bff0 100644
--- a/src/server/game/Combat/HostileRefManager.h
+++ b/src/server/game/Combat/HostileRefManager.h
@@ -37,7 +37,7 @@ class HostileRefManager : public RefManager<Unit, ThreatManager>
explicit HostileRefManager(Unit* owner) { iOwner = owner; }
~HostileRefManager();
- Unit* getOwner() { return iOwner; }
+ Unit* GetOwner() { return iOwner; }
// send threat to all my hateres for the victim
// The victim is hated than by them as well
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index 249c1696348..b24979d9131 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -67,11 +67,11 @@ bool ThreatCalcHelper::isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellIn
return false;
// not to GM
- if (hatedUnit->GetTypeId() == TYPEID_PLAYER && hatedUnit->ToPlayer()->isGameMaster())
+ if (hatedUnit->GetTypeId() == TYPEID_PLAYER && hatedUnit->ToPlayer()->IsGameMaster())
return false;
// not to dead and not for dead
- if (!hatedUnit->isAlive() || !hatingUnit->isAlive())
+ if (!hatedUnit->IsAlive() || !hatingUnit->IsAlive())
return false;
// not in same map or phase
@@ -128,8 +128,8 @@ void HostileReference::sourceObjectDestroyLink()
void HostileReference::fireStatusChanged(ThreatRefStatusChangeEvent& threatRefStatusChangeEvent)
{
- if (getSource())
- getSource()->processThreatEvent(&threatRefStatusChangeEvent);
+ if (GetSource())
+ GetSource()->processThreatEvent(&threatRefStatusChangeEvent);
}
//============================================================
@@ -150,8 +150,8 @@ void HostileReference::addThreat(float modThreat)
if (isValid() && modThreat >= 0.0f)
{
Unit* victimOwner = getTarget()->GetCharmerOrOwner();
- if (victimOwner && victimOwner->isAlive())
- getSource()->addThreat(victimOwner, 0.0f); // create a threat to the owner of a pet, if the pet attacks
+ if (victimOwner && victimOwner->IsAlive())
+ GetSource()->addThreat(victimOwner, 0.0f); // create a threat to the owner of a pet, if the pet attacks
}
}
@@ -171,21 +171,21 @@ void HostileReference::updateOnlineStatus()
bool accessible = false;
if (!isValid())
- if (Unit* target = ObjectAccessor::GetUnit(*getSourceUnit(), getUnitGuid()))
- link(target, getSource());
+ if (Unit* target = ObjectAccessor::GetUnit(*GetSourceUnit(), getUnitGuid()))
+ link(target, GetSource());
// only check for online status if
// ref is valid
// target is no player or not gamemaster
// target is not in flight
if (isValid()
- && (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster())
+ && (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->IsGameMaster())
&& !getTarget()->HasUnitState(UNIT_STATE_IN_FLIGHT)
- && getTarget()->IsInMap(getSourceUnit())
- && getTarget()->InSamePhase(getSourceUnit())
+ && getTarget()->IsInMap(GetSourceUnit())
+ && getTarget()->InSamePhase(GetSourceUnit())
)
{
- Creature* creature = getSourceUnit()->ToCreature();
+ Creature* creature = GetSourceUnit()->ToCreature();
online = getTarget()->isInAccessiblePlaceFor(creature);
if (!online)
{
@@ -242,9 +242,9 @@ void HostileReference::removeReference()
//============================================================
-Unit* HostileReference::getSourceUnit()
+Unit* HostileReference::GetSourceUnit()
{
- return (getSource()->getOwner());
+ return (GetSource()->GetOwner());
}
//============================================================
@@ -350,14 +350,14 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
}
}
- if (attacker->canCreatureAttack(target)) // skip non attackable currently targets
+ if (attacker->CanCreatureAttack(target)) // skip non attackable currently targets
{
if (currentVictim) // select 1.3/1.1 better target in comparison current target
{
// list sorted and and we check current target, then this is best case
if (currentVictim == currentRef || currentRef->getThreat() <= 1.1f * currentVictim->getThreat())
{
- if (currentVictim != currentRef && attacker->canCreatureAttack(currentVictim->getTarget()))
+ if (currentVictim != currentRef && attacker->CanCreatureAttack(currentVictim->getTarget()))
currentRef = currentVictim; // for second case, if currentvictim is attackable
found = true;
@@ -408,7 +408,7 @@ void ThreatManager::clearReferences()
void ThreatManager::addThreat(Unit* victim, float threat, SpellSchoolMask schoolMask, SpellInfo const* threatSpell)
{
- if (!ThreatCalcHelper::isValidProcess(victim, getOwner(), threatSpell))
+ if (!ThreatCalcHelper::isValidProcess(victim, GetOwner(), threatSpell))
return;
doAddThreat(victim, ThreatCalcHelper::calcThreat(victim, iOwner, threat, schoolMask, threatSpell));
@@ -445,7 +445,7 @@ void ThreatManager::_addThreat(Unit* victim, float threat)
HostileReference* hostileRef = new HostileReference(victim, this, 0);
iThreatContainer.addReference(hostileRef);
hostileRef->addThreat(threat); // now we add the real threat
- if (victim->GetTypeId() == TYPEID_PLAYER && victim->ToPlayer()->isGameMaster())
+ if (victim->GetTypeId() == TYPEID_PLAYER && victim->ToPlayer()->IsGameMaster())
hostileRef->setOnlineOfflineState(false); // GM is always offline
}
}
@@ -462,7 +462,7 @@ void ThreatManager::modifyThreatPercent(Unit* victim, int32 percent)
Unit* ThreatManager::getHostilTarget()
{
iThreatContainer.update();
- HostileReference* nextVictim = iThreatContainer.selectNextVictim(getOwner()->ToCreature(), getCurrentVictim());
+ HostileReference* nextVictim = iThreatContainer.selectNextVictim(GetOwner()->ToCreature(), getCurrentVictim());
setCurrentVictim(nextVictim);
return getCurrentVictim() != NULL ? getCurrentVictim()->getTarget() : NULL;
}
diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h
index 8162ad50eb7..9b249bd4bee 100644
--- a/src/server/game/Combat/ThreatManager.h
+++ b/src/server/game/Combat/ThreatManager.h
@@ -128,7 +128,7 @@ class HostileReference : public Reference<Unit, ThreatManager>
// Inform the source, that the status of that reference was changed
void fireStatusChanged(ThreatRefStatusChangeEvent& threatRefStatusChangeEvent);
- Unit* getSourceUnit();
+ Unit* GetSourceUnit();
private:
float iThreat;
float iTempThreatModifier; // used for taunt
@@ -224,7 +224,7 @@ class ThreatManager
HostileReference* getCurrentVictim() const { return iCurrentVictim; }
- Unit* getOwner() const { return iOwner; }
+ Unit* GetOwner() const { return iOwner; }
Unit* getHostilTarget();
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index d6fb6905985..7f530f2d96a 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -275,7 +275,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
case CONDITION_ALIVE:
{
if (Unit* unit = object->ToUnit())
- condMeets = unit->isAlive();
+ condMeets = unit->IsAlive();
break;
}
case CONDITION_HP_VAL:
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index 45bbfe565fc..529ca8dc9ec 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -309,7 +309,7 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
if (unit)
{
if ((spellFlags & SPELL_DISABLE_PLAYER && unit->GetTypeId() == TYPEID_PLAYER) ||
- (unit->GetTypeId() == TYPEID_UNIT && ((unit->ToCreature()->isPet() && spellFlags & SPELL_DISABLE_PET) || spellFlags & SPELL_DISABLE_CREATURE)))
+ (unit->GetTypeId() == TYPEID_UNIT && ((unit->ToCreature()->IsPet() && spellFlags & SPELL_DISABLE_PET) || spellFlags & SPELL_DISABLE_CREATURE)))
{
if (spellFlags & SPELL_DISABLE_MAP)
{
@@ -372,7 +372,7 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
if (!unit)
return true;
if (Player const* player = unit->ToPlayer())
- if (player->isGameMaster())
+ if (player->IsGameMaster())
return false;
return true;
case DISABLE_TYPE_BATTLEGROUND:
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index a2cf3d48a17..9eebc460d3b 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -492,7 +492,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
uint8 memberCount = 0;
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && joinData.result == LFG_JOIN_OK; itr = itr->next())
{
- if (Player* plrg = itr->getSource())
+ if (Player* plrg = itr->GetSource())
{
if (!plrg->GetSession()->HasPermission(RBAC_PERM_JOIN_DUNGEON_FINDER))
joinData.result = LFG_JOIN_PARTY_NOT_MEET_REQS;
@@ -602,7 +602,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_JOIN_QUEUE, dungeons, comment);
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- if (Player* plrg = itr->getSource())
+ if (Player* plrg = itr->GetSource())
{
uint64 pguid = plrg->GetGUID();
plrg->GetSession()->SendLfgUpdateParty(updateData);
@@ -1327,7 +1327,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
LfgTeleportError error = LFG_TELEPORTERROR_OK;
- if (!player->isAlive())
+ if (!player->IsAlive())
error = LFG_TELEPORTERROR_PLAYER_DEAD;
else if (player->IsFalling() || player->HasUnitState(UNIT_STATE_JUMPING))
error = LFG_TELEPORTERROR_FALLING;
@@ -1350,7 +1350,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
// Select a player inside to be teleported to
for (GroupReference* itr = group->GetFirstMember(); itr != NULL && !mapid; itr = itr->next())
{
- Player* plrg = itr->getSource();
+ Player* plrg = itr->GetSource();
if (plrg && plrg != player && plrg->GetMapId() == uint32(dungeon->map))
{
mapid = plrg->GetMapId();
@@ -1366,7 +1366,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
if (!player->GetMap()->IsDungeon())
player->SetBattlegroundEntryPoint();
- if (player->isInFlight())
+ if (player->IsInFlight())
{
player->GetMotionMaster()->MovementExpired();
player->CleanupAfterTaxiFlight();
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index 98b5265a8ba..9dfbb0e9fb3 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -110,7 +110,7 @@ void LFGPlayerScript::OnMapChanged(Player* player)
}
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
- if (Player* member = itr->getSource())
+ if (Player* member = itr->GetSource())
player->GetSession()->SendNameQueryOpcode(member->GetGUID());
if (sLFGMgr->selectedRandomLfgDungeon(player->GetGUID()))
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index f0b21a29bd2..ebbf11be586 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -210,14 +210,14 @@ void Creature::DisappearAndDie()
DestroyForNearbyPlayers();
//SetVisibility(VISIBILITY_OFF);
//ObjectAccessor::UpdateObjectVisibility(this);
- if (isAlive())
+ if (IsAlive())
setDeathState(JUST_DIED);
RemoveCorpse(false);
}
void Creature::SearchFormation()
{
- if (isSummon())
+ if (IsSummon())
return;
uint32 lowguid = GetDBTableGUIDLow();
@@ -426,7 +426,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
}
// trigger creature is always not selectable and can not be attacked
- if (isTrigger())
+ if (IsTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
InitializeReactState();
@@ -520,7 +520,7 @@ void Creature::Update(uint32 diff)
// creature can be dead after Unit::Update call
// CORPSE/DEAD state will processed at next tick (in other case death timer will be updated unexpectedly)
- if (!isAlive())
+ if (!IsAlive())
break;
// if creature is charmed, switch to charmed AI
@@ -541,7 +541,7 @@ void Creature::Update(uint32 diff)
// creature can be dead after UpdateAI call
// CORPSE/DEAD state will processed at next tick (in other case death timer will be updated unexpectedly)
- if (!isAlive())
+ if (!IsAlive())
break;
if (m_regenTimer > 0)
@@ -555,9 +555,9 @@ void Creature::Update(uint32 diff)
if (m_regenTimer != 0)
break;
- bool bInCombat = isInCombat() && (!getVictim() || // if isInCombat() is true and this has no victim
- !getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
- !getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->isGameMaster()); // or the victim/owner/charmer is not a GameMaster
+ bool bInCombat = IsInCombat() && (!GetVictim() || // if IsInCombat() is true and this has no victim
+ !GetVictim()->GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
+ !GetVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->IsGameMaster()); // or the victim/owner/charmer is not a GameMaster
/*if (m_regenTimer <= diff)
{*/
@@ -599,7 +599,7 @@ void Creature::RegenerateMana()
uint32 addvalue = 0;
// Combat and any controlled creature
- if (isInCombat() || GetCharmerOrOwnerGUID())
+ if (IsInCombat() || GetCharmerOrOwnerGUID())
{
float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
float Spirit = GetStat(STAT_SPIRIT);
@@ -659,7 +659,7 @@ void Creature::RegenerateHealth()
void Creature::DoFleeToGetAssistance()
{
- if (!getVictim())
+ if (!GetVictim())
return;
if (HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
@@ -673,7 +673,7 @@ void Creature::DoFleeToGetAssistance()
CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.SetNoCreate();
- Trinity::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
+ Trinity::NearestAssistCreatureInCreatureRangeCheck u_check(this, GetVictim(), radius);
Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck> searcher(this, creature, u_check);
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
@@ -684,7 +684,7 @@ void Creature::DoFleeToGetAssistance()
UpdateSpeed(MOVE_RUN, false);
if (!creature)
- //SetFeared(true, getVictim()->GetGUID(), 0, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
+ //SetFeared(true, GetVictim()->GetGUID(), 0, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
/// @todo use 31365
SetControlled(true, UNIT_STATE_FLEEING);
else
@@ -789,7 +789,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
uint32 displayID = GetNativeDisplayId();
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
- if (minfo && !isTotem()) // Cancel load if no model defined or if totem
+ if (minfo && !IsTotem()) // Cancel load if no model defined or if totem
{
SetDisplayId(displayID);
SetNativeDisplayId(displayID);
@@ -799,7 +799,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
LastUsedScriptID = GetCreatureTemplate()->ScriptID;
/// @todo Replace with spell, handle from DB
- if (isSpiritHealer() || isSpiritGuide())
+ if (IsSpiritHealer() || IsSpiritGuide())
{
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
@@ -813,17 +813,17 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
void Creature::InitializeReactState()
{
- if (isTotem() || isTrigger() || GetCreatureType() == CREATURE_TYPE_CRITTER || isSpiritService())
+ if (IsTotem() || IsTrigger() || GetCreatureType() == CREATURE_TYPE_CRITTER || IsSpiritService())
SetReactState(REACT_PASSIVE);
else
SetReactState(REACT_AGGRESSIVE);
- /*else if (isCivilian())
+ /*else if (IsCivilian())
SetReactState(REACT_DEFENSIVE);*/;
}
bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const
{
- if (!isBattleMaster())
+ if (!IsBattleMaster())
return false;
BattlegroundTypeId bgTypeId = sBattlegroundMgr->GetBattleMasterBG(GetEntry());
@@ -1020,7 +1020,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
void Creature::SelectLevel(const CreatureTemplate* cinfo)
{
- uint32 rank = isPet()? 0 : cinfo->rank;
+ uint32 rank = IsPet()? 0 : cinfo->rank;
// level
uint8 minlevel = std::min(cinfo->maxlevel, cinfo->minlevel);
@@ -1326,7 +1326,7 @@ bool Creature::IsInvisibleDueToDespawn() const
if (Unit::IsInvisibleDueToDespawn())
return true;
- if (isAlive() || m_corpseRemoveTime > time(NULL))
+ if (IsAlive() || m_corpseRemoveTime > time(NULL))
return false;
return true;
@@ -1340,9 +1340,9 @@ bool Creature::CanAlwaysSee(WorldObject const* obj) const
return false;
}
-bool Creature::canStartAttack(Unit const* who, bool force) const
+bool Creature::CanStartAttack(Unit const* who, bool force) const
{
- if (isCivilian())
+ if (IsCivilian())
return false;
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
@@ -1363,7 +1363,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
if (!_IsTargetAcceptable(who))
return false;
- if (who->isInCombat() && IsWithinDist(who, ATTACK_DISTANCE))
+ if (who->IsInCombat() && IsWithinDist(who, ATTACK_DISTANCE))
if (Unit* victim = who->getAttackerForHelper())
if (IsWithinDistInMap(victim, sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)))
force = true;
@@ -1372,7 +1372,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
return false;
}
- if (!canCreatureAttack(who, force))
+ if (!CanCreatureAttack(who, force))
return false;
return IsWithinLOSInMap(who);
@@ -1434,7 +1434,7 @@ void Creature::setDeathState(DeathState s)
setActive(false);
- if (!isPet() && GetCreatureTemplate()->SkinLootId)
+ if (!IsPet() && GetCreatureTemplate()->SkinLootId)
if (LootTemplates_Skinning.HaveLootFor(GetCreatureTemplate()->SkinLootId))
if (hasLootRecipient())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
@@ -1456,7 +1456,7 @@ void Creature::setDeathState(DeathState s)
}
else if (s == JUST_RESPAWNED)
{
- //if (isPet())
+ //if (IsPet())
// setActive(true);
SetFullHealth();
SetLootRecipient(NULL);
@@ -1482,7 +1482,7 @@ void Creature::Respawn(bool force)
if (force)
{
- if (isAlive())
+ if (IsAlive())
setDeathState(JUST_DIED);
else if (getDeathState() != CORPSE)
setDeathState(CORPSE);
@@ -1545,7 +1545,7 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn)
return;
}
- if (isAlive())
+ if (IsAlive())
setDeathState(JUST_DIED);
RemoveCorpse(false);
@@ -1600,7 +1600,7 @@ bool Creature::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index)
bool Creature::isElite() const
{
- if (isPet())
+ if (IsPet())
return false;
uint32 rank = GetCreatureTemplate()->rank;
@@ -1609,7 +1609,7 @@ bool Creature::isElite() const
bool Creature::isWorldBoss() const
{
- if (isPet())
+ if (IsPet())
return false;
return GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_BOSS;
@@ -1790,7 +1790,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
void Creature::CallAssistance()
{
- if (!m_AlreadyCallAssistance && getVictim() && !isPet() && !isCharmed())
+ if (!m_AlreadyCallAssistance && GetVictim() && !IsPet() && !IsCharmed())
{
SetNoCallAssistance(true);
@@ -1805,7 +1805,7 @@ void Creature::CallAssistance()
Cell cell(p);
cell.SetNoCreate();
- Trinity::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius);
+ Trinity::AnyAssistCreatureInRangeCheck u_check(this, GetVictim(), radius);
Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck> searcher(this, assistList, u_check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
@@ -1815,7 +1815,7 @@ void Creature::CallAssistance()
if (!assistList.empty())
{
- AssistDelayEvent* e = new AssistDelayEvent(getVictim()->GetGUID(), *this);
+ AssistDelayEvent* e = new AssistDelayEvent(GetVictim()->GetGUID(), *this);
while (!assistList.empty())
{
// Pushing guids because in delay can happen some creature gets despawned => invalid pointer
@@ -1830,14 +1830,14 @@ void Creature::CallAssistance()
void Creature::CallForHelp(float radius)
{
- if (radius <= 0.0f || !getVictim() || isPet() || isCharmed())
+ if (radius <= 0.0f || !GetVictim() || IsPet() || IsCharmed())
return;
CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.SetNoCreate();
- Trinity::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), radius);
+ Trinity::CallOfHelpCreatureInRangeDo u_do(this, GetVictim(), radius);
Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo> worker(this, u_do);
TypeContainerVisitor<Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
@@ -1852,18 +1852,18 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
return false;
// we don't need help from zombies :)
- if (!isAlive())
+ if (!IsAlive())
return false;
// we don't need help from non-combatant ;)
- if (isCivilian())
+ if (IsCivilian())
return false;
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC))
return false;
// skip fighting creature
- if (isInCombat())
+ if (IsInCombat())
return false;
// only free creature
@@ -1904,7 +1904,7 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
if (target->HasUnitState(UNIT_STATE_DIED))
{
// guards can detect fake death
- if (isGuard() && target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH))
+ if (IsGuard() && target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH))
return true;
else
return false;
@@ -1927,14 +1927,14 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
void Creature::SaveRespawnTime()
{
- if (isSummon() || !m_DBTableGuid || (m_creatureData && !m_creatureData->dbData))
+ if (IsSummon() || !m_DBTableGuid || (m_creatureData && !m_creatureData->dbData))
return;
GetMap()->SaveCreatureRespawnTime(m_DBTableGuid, m_respawnTime);
}
// this should not be called by petAI or
-bool Creature::canCreatureAttack(Unit const* victim, bool /*force*/) const
+bool Creature::CanCreatureAttack(Unit const* victim, bool /*force*/) const
{
if (!victim->IsInMap(this))
return false;
@@ -2087,12 +2087,12 @@ void Creature::SetInCombatWithZone()
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())
{
this->SetInCombatWith(player);
player->SetInCombatWith(this);
@@ -2468,7 +2468,7 @@ float Creature::GetAggroRange(Unit const* target) const
// Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
// Based on data from wowwiki due to lack of 3.3.5a data
- if (target && this->isPet())
+ if (target && this->IsPet())
{
uint32 targetLevel = 0;
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index df4031f521f..d70a4268235 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -157,18 +157,18 @@ struct CreatureTemplate
return SKILL_SKINNING; // normal case
}
- bool isExotic() const
+ bool IsExotic() const
{
return (type_flags & CREATURE_TYPEFLAGS_EXOTIC) != 0;
}
- bool isTameable(bool canTameExotic) const
+ bool IsTameable(bool canTameExotic) const
{
if (type != CREATURE_TYPE_BEAST || family == 0 || (type_flags & CREATURE_TYPEFLAGS_TAMEABLE) == 0)
return false;
// if can tame exotic then can tame any tameable
- return canTameExotic || !isExotic();
+ return canTameExotic || !IsExotic();
}
};
@@ -470,12 +470,12 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
uint32 GetCorpseDelay() const { return m_corpseDelay; }
- bool isRacialLeader() const { return GetCreatureTemplate()->RacialLeader; }
- bool isCivilian() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; }
- bool isTrigger() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER; }
- bool isGuard() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD; }
- bool canWalk() const { return GetCreatureTemplate()->InhabitType & INHABIT_GROUND; }
- bool canSwim() const { return GetCreatureTemplate()->InhabitType & INHABIT_WATER; }
+ bool IsRacialLeader() const { return GetCreatureTemplate()->RacialLeader; }
+ bool IsCivilian() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_CIVILIAN; }
+ bool IsTrigger() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER; }
+ bool IsGuard() const { return GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD; }
+ bool CanWalk() const { return GetCreatureTemplate()->InhabitType & INHABIT_GROUND; }
+ bool CanSwim() const { return GetCreatureTemplate()->InhabitType & INHABIT_WATER; }
bool CanFly() const { return GetCreatureTemplate()->InhabitType & INHABIT_AIR; }
void SetReactState(ReactStates st) { m_reactState = st; }
@@ -486,7 +486,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
/// @todo Rename these properly
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
bool isCanTrainingAndResetTalentsOf(Player* player) const;
- bool canCreatureAttack(Unit const* victim, bool force = true) const;
+ bool CanCreatureAttack(Unit const* victim, bool force = true) const;
bool IsImmunedToSpell(SpellInfo const* spellInfo) const; // override Unit::IsImmunedToSpell
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // override Unit::IsImmunedToSpellEffect
bool isElite() const;
@@ -596,7 +596,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
CreatureSpellCooldowns m_CreatureSpellCooldowns;
CreatureSpellCooldowns m_CreatureCategoryCooldowns;
- bool canStartAttack(Unit const* u, bool force) const;
+ bool CanStartAttack(Unit const* u, bool force) const;
float GetAttackDistance(Unit const* player) const;
float GetAggroRange(Unit const* target) const;
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index 5b3f7a15d47..f8966ba1923 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -180,10 +180,10 @@ void CreatureGroup::MemberAttackStart(Creature* member, Unit* target)
if (itr->first == member)
continue;
- if (!itr->first->isAlive())
+ if (!itr->first->IsAlive())
continue;
- if (itr->first->getVictim())
+ if (itr->first->GetVictim())
continue;
if (itr->first->IsValidAttackTarget(target) && itr->first->AI())
@@ -195,7 +195,7 @@ void CreatureGroup::FormationReset(bool dismiss)
{
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
- if (itr->first != m_leader && itr->first->isAlive())
+ if (itr->first != m_leader && itr->first->IsAlive())
{
if (dismiss)
itr->first->GetMotionMaster()->Initialize();
@@ -219,7 +219,7 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z)
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
Creature* member = itr->first;
- if (member == m_leader || !member->isAlive() || member->getVictim())
+ if (member == m_leader || !member->IsAlive() || member->GetVictim())
continue;
float angle = itr->second->follow_angle;
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 4e21faf2a6c..b14d74edf37 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -68,7 +68,7 @@ void TempSummon::Update(uint32 diff)
}
case TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT:
{
- if (!isInCombat())
+ if (!IsInCombat())
{
if (m_timer <= diff)
{
@@ -127,7 +127,7 @@ void TempSummon::Update(uint32 diff)
return;
}
- if (!isInCombat())
+ if (!IsInCombat())
{
if (m_timer <= diff)
{
@@ -150,7 +150,7 @@ void TempSummon::Update(uint32 diff)
return;
}
- if (!isInCombat() && isAlive())
+ if (!IsInCombat() && IsAlive())
{
if (m_timer <= diff)
{
@@ -173,7 +173,7 @@ void TempSummon::Update(uint32 diff)
void TempSummon::InitStats(uint32 duration)
{
- ASSERT(!isPet());
+ ASSERT(!IsPet());
m_timer = duration;
m_lifetime = duration;
@@ -183,7 +183,7 @@ void TempSummon::InitStats(uint32 duration)
Unit* owner = GetSummoner();
- if (owner && isTrigger() && m_spells[0])
+ if (owner && IsTrigger() && m_spells[0])
{
setFaction(owner->getFaction());
SetLevel(owner->getLevel());
@@ -202,7 +202,7 @@ void TempSummon::InitStats(uint32 duration)
if (owner->m_SummonSlot[slot] && owner->m_SummonSlot[slot] != GetGUID())
{
Creature* oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]);
- if (oldSummon && oldSummon->isSummon())
+ if (oldSummon && oldSummon->IsSummon())
oldSummon->ToTempSummon()->UnSummon();
}
owner->m_SummonSlot[slot] = GetGUID();
@@ -242,8 +242,8 @@ void TempSummon::UnSummon(uint32 msTime)
return;
}
- //ASSERT(!isPet());
- if (isPet())
+ //ASSERT(!IsPet());
+ if (IsPet())
{
((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT);
ASSERT(!IsInWorld());
@@ -314,7 +314,7 @@ void Minion::RemoveFromWorld()
bool Minion::IsGuardianPet() const
{
- return isPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET);
+ return IsPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET);
}
Guardian::Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) : Minion(properties, owner, isWorldObject)
@@ -380,7 +380,7 @@ void Puppet::Update(uint32 time)
//check if caster is channelling?
if (IsInWorld())
{
- if (!isAlive())
+ if (!IsAlive())
{
UnSummon();
/// @todo why long distance .die does not remove it
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 8d15e6ab39a..07a3c0412d2 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -303,7 +303,7 @@ void GameObject::Update(uint32 diff)
m_cooldownTime = time(NULL) + 10; // Hardcoded tooltip value
else if (Unit* owner = GetOwner())
{
- if (owner->isInCombat())
+ if (owner->IsInCombat())
m_cooldownTime = time(NULL) + goInfo->trap.startDelay;
}
m_lootState = GO_READY;
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 96248f067de..eae333bc4c8 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -243,7 +243,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
}
if (Unit const* unit = ToUnit())
- if (unit->getVictim())
+ if (unit->GetVictim())
flags |= UPDATEFLAG_HAS_TARGET;
ByteBuffer buf(500);
@@ -488,7 +488,7 @@ void Object::_BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
if (flags & UPDATEFLAG_HAS_TARGET)
{
- ObjectGuid victimGuid = self->getVictim()->GetGUID(); // checked in BuildCreateUpdateBlockForPlayer
+ ObjectGuid victimGuid = self->GetVictim()->GetGUID(); // checked in BuildCreateUpdateBlockForPlayer
data->WriteBit(victimGuid[2]);
data->WriteBit(victimGuid[7]);
data->WriteBit(victimGuid[0]);
@@ -663,7 +663,7 @@ void Object::_BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
if (flags & UPDATEFLAG_HAS_TARGET)
{
- ObjectGuid victimGuid = self->getVictim()->GetGUID(); // checked in BuildCreateUpdateBlockForPlayer
+ ObjectGuid victimGuid = self->GetVictim()->GetGUID(); // checked in BuildCreateUpdateBlockForPlayer
data->WriteByteSeq(victimGuid[4]);
data->WriteByteSeq(victimGuid[0]);
data->WriteByteSeq(victimGuid[3]);
@@ -710,7 +710,7 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
{
if (!go->IsDynTransport())
{
- if (go->ActivateToQuest(target) || target->isGameMaster())
+ if (go->ActivateToQuest(target) || target->IsGameMaster())
IsActivateToQuest = true;
if (go->GetGoArtKit())
@@ -721,7 +721,7 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
{
if (!go->IsTransport())
{
- if (go->ActivateToQuest(target) || target->isGameMaster())
+ if (go->ActivateToQuest(target) || target->IsGameMaster())
IsActivateToQuest = true;
updateMask->SetBit(GAMEOBJECT_BYTES_1);
@@ -759,7 +759,7 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
if (GetTypeId() == TYPEID_UNIT)
{
- if (!target->canSeeSpellClickOn(this->ToCreature()))
+ if (!target->CanSeeSpellClickOn(this->ToCreature()))
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
}
@@ -787,7 +787,7 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
// Gamemasters should be always able to select units - remove not selectable flag
else if (index == UNIT_FIELD_FLAGS)
{
- if (target->isGameMaster())
+ if (target->IsGameMaster())
*data << (m_uint32Values[index] & ~UNIT_FLAG_NOT_SELECTABLE);
else
*data << m_uint32Values[index];
@@ -811,7 +811,7 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
if (cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
{
- if (target->isGameMaster())
+ if (target->IsGameMaster())
{
if (cinfo->Modelid1)
*data << cinfo->Modelid1;//Modelid1 is a visible model for gms
@@ -872,8 +872,8 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
{
if (unit->IsControlledByPlayer() && target != this && sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && unit->IsInRaidWith(target))
{
- FactionTemplateEntry const* ft1 = unit->getFactionTemplateEntry();
- FactionTemplateEntry const* ft2 = target->getFactionTemplateEntry();
+ FactionTemplateEntry const* ft1 = unit->GetFactionTemplateEntry();
+ FactionTemplateEntry const* ft2 = target->GetFactionTemplateEntry();
if (ft1 && ft2 && !ft1->IsFriendlyTo(*ft2))
{
if (index == UNIT_FIELD_BYTES_2)
@@ -916,19 +916,19 @@ void Object::_BuildValuesUpdate(uint8 updateType, ByteBuffer* data, UpdateMask*
switch (go->GetGoType())
{
case GAMEOBJECT_TYPE_CHEST:
- if (target->isGameMaster())
+ if (target->IsGameMaster())
*data << uint16(GO_DYNFLAG_LO_ACTIVATE);
else
*data << uint16(GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_SPARKLE);
break;
case GAMEOBJECT_TYPE_GENERIC:
- if (target->isGameMaster())
+ if (target->IsGameMaster())
*data << uint16(0);
else
*data << uint16(GO_DYNFLAG_LO_SPARKLE);
break;
case GAMEOBJECT_TYPE_GOOBER:
- if (target->isGameMaster())
+ if (target->IsGameMaster())
*data << uint16(GO_DYNFLAG_LO_ACTIVATE);
else
*data << uint16(GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_SPARKLE);
@@ -2054,7 +2054,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
// non swim unit must be at ground (mostly speedup, because it don't must be in water and water level check less fast
if (!ToCreature()->CanFly())
{
- bool canSwim = ToCreature()->canSwim();
+ bool canSwim = ToCreature()->CanSwim();
float ground_z = z;
float max_z = canSwim
? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
@@ -2151,7 +2151,7 @@ float WorldObject::GetSightRange(const WorldObject* target) const
return 0.0f;
}
-bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, bool distanceCheck) const
+bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, bool distanceCheck) const
{
if (this == obj)
return true;
@@ -2468,8 +2468,8 @@ void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 Target
Map::PlayerList const& pList = GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
- if (itr->getSource()->GetZoneId() == zoneid)
- say_do(itr->getSource());
+ if (itr->GetSource()->GetZoneId() == zoneid)
+ say_do(itr->GetSource());
}
void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsBossEmote)
@@ -2924,7 +2924,7 @@ namespace Trinity
float x, y, z;
- if (!c->isAlive() || c->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED) ||
+ if (!c->IsAlive() || c->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED) ||
!c->GetMotionMaster()->GetDestination(x, y, z))
{
x = c->GetPositionX();
@@ -3341,7 +3341,7 @@ struct WorldObjectChangeAccumulator
Player* source = NULL;
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- source = iter->getSource();
+ source = iter->GetSource();
BuildPacket(source);
@@ -3359,7 +3359,7 @@ struct WorldObjectChangeAccumulator
Creature* source = NULL;
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- source = iter->getSource();
+ source = iter->GetSource();
if (!source->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator it = source->GetSharedVisionList().begin();
@@ -3374,7 +3374,7 @@ struct WorldObjectChangeAccumulator
DynamicObject* source = NULL;
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- source = iter->getSource();
+ source = iter->GetSource();
uint64 guid = source->GetCasterGUID();
if (IS_PLAYER_GUID(guid))
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index a72f4fcf3e4..427d5a91afd 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -685,7 +685,7 @@ class WorldObject : public Object, public WorldLocation
float GetGridActivationRange() const;
float GetVisibilityRange() const;
float GetSightRange(WorldObject const* target = NULL) const;
- bool canSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false) const;
+ bool CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false) const;
FlaggedValuesArray32<int32, uint32, StealthType, TOTAL_STEALTH_TYPES> m_stealth;
FlaggedValuesArray32<int32, uint32, StealthType, TOTAL_STEALTH_TYPES> m_stealthDetect;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index ce564bd9090..55043537daa 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -162,7 +162,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
if (petType == HUNTER_PET)
{
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(petEntry);
- if (!creatureInfo || !creatureInfo->isTameable(owner->CanTameExoticPets()))
+ if (!creatureInfo || !creatureInfo->IsTameable(owner->CanTameExoticPets()))
return false;
}
@@ -646,7 +646,7 @@ void Creature::Regenerate(Powers power)
if (Powers((*i)->GetMiscValue()) == power)
AddPct(addvalue, (*i)->GetAmount());
- addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (isHunterPet()? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
+ addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (IsHunterPet()? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
ModifyPower(power, int32(addvalue));
}
@@ -664,7 +664,7 @@ void Pet::GivePetXP(uint32 xp)
if (xp < 1)
return;
- if (!isAlive())
+ if (!IsAlive())
return;
uint8 maxlevel = std::min((uint8)sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel());
@@ -789,7 +789,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
//Determine pet type
PetType petType = MAX_PET_TYPE;
- if (isPet() && GetOwner()->GetTypeId() == TYPEID_PLAYER)
+ if (IsPet() && GetOwner()->GetTypeId() == TYPEID_PLAYER)
{
if (GetOwner()->getClass() == CLASS_WARLOCK
|| GetOwner()->getClass() == CLASS_SHAMAN // Fire Elemental
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 642da3e8d95..e8faa8e579a 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -463,8 +463,8 @@ inline void KillRewarder::_InitGroupData()
{
// 2. In case when player is in group, initialize variables necessary for group calculations:
for (GroupReference* itr = _group->GetFirstMember(); itr != NULL; itr = itr->next())
- if (Player* member = itr->getSource())
- if (member->isAlive() && member->IsAtGroupRewardDistance(_victim))
+ if (Player* member = itr->GetSource())
+ if (member->IsAlive() && member->IsAtGroupRewardDistance(_victim))
{
const uint8 lvl = member->getLevel();
// 2.1. _count - number of alive group members within reward distance;
@@ -502,7 +502,7 @@ inline void KillRewarder::_InitXP(Player* player)
inline void KillRewarder::_RewardHonor(Player* player)
{
// Rewarded player must be alive.
- if (player->isAlive())
+ if (player->IsAlive())
player->RewardHonor(_victim, _count, -1, true);
}
@@ -514,7 +514,7 @@ inline void KillRewarder::_RewardXP(Player* player, float rate)
// 4.2.1. If player is in group, adjust XP:
// * set to 0 if player's level is more than maximum level of not gray member;
// * cut XP in half if _isFullXP is false.
- if (_maxNotGrayMember && player->isAlive() &&
+ if (_maxNotGrayMember && player->IsAlive() &&
_maxNotGrayMember->getLevel() >= player->getLevel())
xp = _isFullXP ?
uint32(xp * rate) : // Reward FULL XP if all group members are not gray.
@@ -551,7 +551,7 @@ inline void KillRewarder::_RewardReputation(Player* player, float rate)
inline void KillRewarder::_RewardKillCredit(Player* player)
{
// 4.4. Give kill credit (player must not be in group, or he must be alive or without corpse).
- if (!_group || player->isAlive() || !player->GetCorpse())
+ if (!_group || player->IsAlive() || !player->GetCorpse())
if (_victim->GetTypeId() == TYPEID_UNIT)
player->KilledMonster(_victim->ToCreature()->GetCreatureTemplate(), _victim->GetGUID());
}
@@ -610,7 +610,7 @@ void KillRewarder::_RewardGroup()
// 3.1.3. Reward each group member (even dead or corpse) within reward distance.
for (GroupReference* itr = _group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- if (Player* member = itr->getSource())
+ if (Player* member = itr->GetSource())
{
if (member->IsAtGroupRewardDistance(_victim))
{
@@ -1298,7 +1298,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
uint32 final_damage = DealDamage(this, damage, NULL, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- if (!isAlive())
+ if (!IsAlive())
{
if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage
{
@@ -1322,7 +1322,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
return MINUTE * IN_MILLISECONDS;
case BREATH_TIMER:
{
- if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_DISABLE_BREATHING)))
+ if (!IsAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_DISABLE_BREATHING)))
return DISABLED_MIRROR_TIMER;
int32 UnderWaterTime = 3 * MINUTE * IN_MILLISECONDS;
AuraEffectList const& mModWaterBreathing = GetAuraEffectsByType(SPELL_AURA_MOD_WATER_BREATHING);
@@ -1332,7 +1332,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
}
case FIRE_TIMER:
{
- if (!isAlive())
+ if (!IsAlive())
return DISABLED_MIRROR_TIMER;
return 1 * IN_MILLISECONDS;
}
@@ -1395,7 +1395,7 @@ void Player::HandleDrowning(uint32 time_diff)
int32 UnderWaterTime = getMaxTimer(BREATH_TIMER);
// Need breath regen
m_MirrorTimer[BREATH_TIMER]+=10*time_diff;
- if (m_MirrorTimer[BREATH_TIMER] >= UnderWaterTime || !isAlive())
+ if (m_MirrorTimer[BREATH_TIMER] >= UnderWaterTime || !IsAlive())
StopMirrorTimer(BREATH_TIMER);
else if (m_MirrorTimerFlagsLast & UNDERWATER_INWATER)
SendMirrorTimer(BREATH_TIMER, UnderWaterTime, m_MirrorTimer[BREATH_TIMER], 10);
@@ -1417,7 +1417,7 @@ void Player::HandleDrowning(uint32 time_diff)
if (m_MirrorTimer[FATIGUE_TIMER] < 0)
{
m_MirrorTimer[FATIGUE_TIMER]+= 1*IN_MILLISECONDS;
- if (isAlive()) // Calculate and deal damage
+ if (IsAlive()) // Calculate and deal damage
{
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
EnvironmentalDamage(DAMAGE_EXHAUSTED, damage);
@@ -1433,7 +1433,7 @@ void Player::HandleDrowning(uint32 time_diff)
{
int32 DarkWaterTime = getMaxTimer(FATIGUE_TIMER);
m_MirrorTimer[FATIGUE_TIMER]+=10*time_diff;
- if (m_MirrorTimer[FATIGUE_TIMER] >= DarkWaterTime || !isAlive())
+ if (m_MirrorTimer[FATIGUE_TIMER] >= DarkWaterTime || !IsAlive())
StopMirrorTimer(FATIGUE_TIMER);
else if (m_MirrorTimerFlagsLast & UNDERWARER_INDARKWATER)
SendMirrorTimer(FATIGUE_TIMER, DarkWaterTime, m_MirrorTimer[FATIGUE_TIMER], 10);
@@ -1574,9 +1574,9 @@ void Player::Update(uint32 p_time)
UpdateAfkReport(now);
- if (isCharmed())
+ if (IsCharmed())
if (Unit* charmer = GetCharmer())
- if (charmer->GetTypeId() == TYPEID_UNIT && charmer->isAlive())
+ if (charmer->GetTypeId() == TYPEID_UNIT && charmer->IsAlive())
UpdateCharmedAI();
// Update items that have just a limited lifetime
@@ -1624,7 +1624,7 @@ void Player::Update(uint32 p_time)
if (HasUnitState(UNIT_STATE_MELEE_ATTACKING) && !HasUnitState(UNIT_STATE_CASTING))
{
- if (Unit* victim = getVictim())
+ if (Unit* victim = GetVictim())
{
// default combat reach 10
/// @todo add weapon, skill check
@@ -1747,7 +1747,7 @@ void Player::Update(uint32 p_time)
m_timeSyncTimer -= p_time;
}
- if (isAlive())
+ if (IsAlive())
{
m_regenTimer += p_time;
RegenerateAll();
@@ -1838,7 +1838,7 @@ void Player::Update(uint32 p_time)
//we should execute delayed teleports only for alive(!) players
//because we don't want player's ghost teleported from graveyard
- if (IsHasDelayedTeleport() && isAlive())
+ if (IsHasDelayedTeleport() && IsAlive())
TeleportTo(m_teleport_dest, m_teleport_options);
}
@@ -1846,7 +1846,7 @@ void Player::setDeathState(DeathState s)
{
uint32 ressSpellId = 0;
- bool cur = isAlive();
+ bool cur = IsAlive();
if (s == JUST_DIED)
{
@@ -1886,7 +1886,7 @@ void Player::setDeathState(DeathState s)
if (s == JUST_DIED && cur && ressSpellId)
SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
- if (isAlive() && !cur)
+ if (IsAlive() && !cur)
//clear aura case after resurrection by another way (spells will be applied before next death)
SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
@@ -2214,7 +2214,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
}
else
{
- if (getClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !isGameMaster() && !HasSpell(50977))
+ if (getClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977))
return false;
// far teleport to another map
@@ -2528,7 +2528,7 @@ void Player::RegenerateAll()
if (m_regenTimerCount >= 2000)
{
// Not in combat or they have regeneration
- if (!isInCombat() || IsPolymorphed() || m_baseHealthRegen ||
+ if (!IsInCombat() || IsPolymorphed() || m_baseHealthRegen ||
HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT) ||
HasAuraType(SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT))
{
@@ -2581,7 +2581,7 @@ void Player::Regenerate(Powers power)
{
float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
- if (isInCombat()) // Trinity Updates Mana in intervals of 2s, which is correct
+ if (IsInCombat()) // Trinity Updates Mana in intervals of 2s, which is correct
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER) * ManaIncreaseRate * ((0.001f * m_regenTimer) + CalculatePct(0.001f, spellHaste));
else
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER) * ManaIncreaseRate * ((0.001f * m_regenTimer) + CalculatePct(0.001f, spellHaste));
@@ -2589,7 +2589,7 @@ void Player::Regenerate(Powers power)
break;
case POWER_RAGE: // Regenerate rage
{
- if (!isInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
+ if (!IsInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
{
float RageDecreaseRate = sWorld->getRate(RATE_POWER_RAGE_LOSS);
addvalue += -25 * RageDecreaseRate / meleeHaste; // 2.5 rage by tick (= 2 seconds => 1.25 rage/sec)
@@ -2604,7 +2604,7 @@ void Player::Regenerate(Powers power)
break;
case POWER_RUNIC_POWER:
{
- if (!isInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
+ if (!IsInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
{
float RunicPowerDecreaseRate = sWorld->getRate(RATE_POWER_RUNICPOWER_LOSS);
addvalue += -30 * RunicPowerDecreaseRate; // 3 RunicPower by tick
@@ -2613,7 +2613,7 @@ void Player::Regenerate(Powers power)
break;
case POWER_HOLY_POWER: // Regenerate holy power
{
- if (!isInCombat())
+ if (!IsInCombat())
addvalue += -1.0f; // remove 1 each 10 sec
}
break;
@@ -2634,7 +2634,7 @@ void Player::Regenerate(Powers power)
AddPct(addvalue, (*i)->GetAmount());
// Butchery requires combat for this effect
- if (power != POWER_RUNIC_POWER || isInCombat())
+ if (power != POWER_RUNIC_POWER || IsInCombat())
addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * ((power != POWER_ENERGY) ? m_regenTimerCount : m_regenTimer) / (5 * IN_MILLISECONDS);
}
@@ -2701,10 +2701,10 @@ void Player::RegenerateHealth()
if (IsPolymorphed())
addvalue = (float)GetMaxHealth()/3;
// normal regen case (maybe partly in combat case)
- else if (!isInCombat() || HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
+ else if (!IsInCombat() || HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
{
addvalue = HealthIncreaseRate;
- if (!isInCombat())
+ if (!IsInCombat())
{
if (getLevel() < 15)
addvalue = (0.20f*((float)GetMaxHealth())/getLevel()*HealthIncreaseRate);
@@ -2768,9 +2768,9 @@ bool Player::CanInteractWithQuestGiver(Object* questGiver)
case TYPEID_GAMEOBJECT:
return GetGameObjectIfCanInteractWith(questGiver->GetGUID(), GAMEOBJECT_TYPE_QUESTGIVER) != NULL;
case TYPEID_PLAYER:
- return isAlive() && questGiver->ToPlayer()->isAlive();
+ return IsAlive() && questGiver->ToPlayer()->IsAlive();
case TYPEID_ITEM:
- return isAlive();
+ return IsAlive();
default:
break;
}
@@ -2786,7 +2786,7 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
if (!IsInWorld())
return NULL;
- if (isInFlight())
+ if (IsInFlight())
return NULL;
// exist (we need look pets also for some interaction (quest/etc)
@@ -2795,11 +2795,11 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
return NULL;
// Deathstate checks
- if (!isAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_GHOST))
+ if (!IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_GHOST))
return NULL;
// alive or spirit healer
- if (!creature->isAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_DEAD_INTERACT))
+ if (!creature->IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_DEAD_INTERACT))
return NULL;
// appropriate npc type
@@ -3036,7 +3036,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate)
if (xp < 1)
return;
- if (!isAlive() && !GetBattlegroundId())
+ if (!IsAlive() && !GetBattlegroundId())
return;
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN))
@@ -4563,7 +4563,7 @@ bool Player::ResetTalents(bool no_cost)
/* when prev line will dropped use next line
if (Pet* pet = GetPet())
{
- if (pet->getPetType() == HUNTER_PET && !pet->GetCreatureTemplate()->isTameable(CanTameExoticPets()))
+ if (pet->getPetType() == HUNTER_PET && !pet->GetCreatureTemplate()->IsTameable(CanTameExoticPets()))
RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
}
*/
@@ -5546,7 +5546,7 @@ void Player::RepopAtGraveyard()
AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId());
// Such zones are considered unreachable as a ghost and the player must be automatically revived
- if ((!isAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < (zone ? zone->MaxDepth : -500.0f))
+ if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < (zone ? zone->MaxDepth : -500.0f))
{
ResurrectPlayer(0.5f);
SpawnCorpseBones();
@@ -6795,10 +6795,10 @@ void Player::SendMovieStart(uint32 MovieId)
void Player::CheckAreaExploreAndOutdoor()
{
- if (!isAlive())
+ if (!IsAlive())
return;
- if (isInFlight())
+ if (IsInFlight())
return;
bool isOutdoor;
@@ -7187,7 +7187,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
}
else
{
- if (!victim->ToCreature()->isRacialLeader())
+ if (!victim->ToCreature()->IsRacialLeader())
return false;
honor_f = 100.0f; // ??? need more info
@@ -7903,7 +7903,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
// remove items with area/map limitations (delete only for alive player to allow back in ghost mode)
// if player resurrected at teleport this will be applied in resurrect code
- if (isAlive())
+ if (IsAlive())
DestroyZoneLimitedItem(true, newZone);
// check some item equip limitations (in result lost CanTitanGrip at talent reset, for example)
@@ -7954,7 +7954,7 @@ void Player::CheckDuelDistance(time_t currTime)
bool Player::IsOutdoorPvPActive()
{
- return isAlive() && !HasInvisibilityAura() && !HasStealthAura() && IsPvP() && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight();
+ return IsAlive() && !HasInvisibilityAura() && !HasStealthAura() && IsPvP() && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !IsInFlight();
}
void Player::DuelComplete(DuelCompleteType type)
@@ -8591,7 +8591,7 @@ void Player::UpdateEquipSpellsAtFormChange()
}
void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx)
{
- if (!target || !target->isAlive() || target == this)
+ if (!target || !target->IsAlive() || target == this)
return;
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
@@ -9162,7 +9162,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
Creature* creature = GetMap()->GetCreature(guid);
// must be in range and creature must be alive for pickpocket and must be dead for another loot
- if (!creature || creature->isAlive() != (loot_type == LOOT_PICKPOCKETING) || !creature->IsWithinDistInMap(this, INTERACTION_DISTANCE))
+ if (!creature || creature->IsAlive() != (loot_type == LOOT_PICKPOCKETING) || !creature->IsWithinDistInMap(this, INTERACTION_DISTANCE))
{
SendLootRelease(guid);
return;
@@ -11428,7 +11428,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
// - in-progress arenas
if (!pProto->CanChangeEquipStateInCombat())
{
- if (isInCombat())
+ if (IsInCombat())
return EQUIP_ERR_NOT_IN_COMBAT;
if (Battleground* bg = GetBattleground())
@@ -11436,7 +11436,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
return EQUIP_ERR_NOT_DURING_ARENA_MATCH;
}
- if (isInCombat()&& (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0)
+ if (IsInCombat()&& (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0)
return EQUIP_ERR_CLIENT_LOCKED_OUT; // maybe exist better err
if (IsNonMeleeSpellCasted(false))
@@ -11583,7 +11583,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const
// - in-progress arenas
if (!pProto->CanChangeEquipStateInCombat())
{
- if (isInCombat())
+ if (IsInCombat())
return EQUIP_ERR_NOT_IN_COMBAT;
if (Battleground* bg = GetBattleground())
@@ -11789,7 +11789,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const
{
TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseItem item = %u", pItem->GetEntry());
- if (!isAlive() && not_loading)
+ if (!IsAlive() && not_loading)
return EQUIP_ERR_PLAYER_DEAD;
//if (isStunned())
@@ -12155,7 +12155,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
{
VisualizeItem(slot, pItem);
- if (isAlive())
+ if (IsAlive())
{
ItemTemplate const* pProto = pItem->GetTemplate();
@@ -12165,7 +12165,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
_ApplyItemMods(pItem, slot, true);
- if (pProto && isInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer == 0)
+ if (pProto && IsInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer == 0)
{
uint32 cooldownSpell = getClass() == CLASS_ROGUE ? 6123 : 6119;
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cooldownSpell);
@@ -12932,7 +12932,7 @@ void Player::SwapItem(uint16 src, uint16 dst)
TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
- if (!isAlive())
+ if (!IsAlive())
{
SendEquipError(EQUIP_ERR_PLAYER_DEAD, pSrcItem, pDstItem);
return;
@@ -14439,6 +14439,10 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
canTalk = false;
break;
case GOSSIP_OPTION_TRAINER:
+ if (getClass() != creature->GetCreatureTemplate()->trainer_class && creature->GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS)
+ TC_LOG_ERROR(LOG_FILTER_SQL, "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) request wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)",
+ GetName().c_str(), GetGUIDLow(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class);
+ // no break;
case GOSSIP_OPTION_GOSSIP:
case GOSSIP_OPTION_SPIRITGUIDE:
case GOSSIP_OPTION_INNKEEPER:
@@ -16152,7 +16156,7 @@ void Player::GroupEventHappens(uint32 questId, WorldObject const* pEventObject)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
// for any leave or dead (with not released body) group member at appropriate distance
if (player && player->IsAtGroupRewardDistance(pEventObject) && !player->GetCorpse())
@@ -17566,7 +17570,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// Spell code allow apply any auras to dead character in load time in aura/spell/item loading
// Do now before stats re-calculation cleanup for ghost state unexpected auras
- if (!isAlive())
+ if (!IsAlive())
RemoveAllAurasOnDeath();
else
RemoveAllAurasRequiringDeadTarget();
@@ -17893,7 +17897,7 @@ void Player::_LoadGlyphAuras()
void Player::LoadCorpse()
{
- if (isAlive())
+ if (IsAlive())
sObjectAccessor->ConvertCorpseForPlayer(GetGUID());
else
{
@@ -18032,7 +18036,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
}
CharacterDatabase.CommitTransaction(trans);
}
- //if (isAlive())
+ //if (IsAlive())
_ApplyAllItemMods();
}
@@ -18097,7 +18101,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
PreparedStatement* stmt = NULL;
// Do not allow to have item limited to another map/zone in alive state
- if (isAlive() && item->IsLimitedToAnotherMapOrZone(GetMapId(), zoneId))
+ if (IsAlive() && item->IsLimitedToAnotherMapOrZone(GetMapId(), zoneId))
{
TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s', map: %u) has item (GUID: %u, entry: %u) limited to another map (%u). Deleting item.",
GetGUIDLow(), GetName().c_str(), GetMapId(), item->GetGUIDLow(), item->GetEntry(), zoneId);
@@ -18931,7 +18935,7 @@ void Player::ConvertInstancesToGroup(Player* player, Group* group, bool switchLe
bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report)
{
- if (!isGameMaster() && ar)
+ if (!IsGameMaster() && ar)
{
uint8 LevelMin = 0;
uint8 LevelMax = 0;
@@ -19006,7 +19010,7 @@ bool Player::CheckInstanceLoginValid()
if (!GetMap())
return false;
- if (!GetMap()->IsDungeon() || isGameMaster())
+ if (!GetMap()->IsDungeon() || IsGameMaster())
return true;
if (GetMap()->IsRaid())
@@ -20376,7 +20380,7 @@ void Player::UpdateAfkReport(time_t currTime)
void Player::UpdateContestedPvP(uint32 diff)
{
- if (!m_contestedPvPTimer||isInCombat())
+ if (!m_contestedPvPTimer||IsInCombat())
return;
if (m_contestedPvPTimer <= diff)
{
@@ -20631,7 +20635,7 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
rPlayer->BuildPlayerChat(&data, CHAT_MSG_WHISPER_INFORM, _text, language);
GetSession()->SendPacket(&data);
- if (!isAcceptWhispers() && !isGameMaster() && !rPlayer->isGameMaster())
+ if (!isAcceptWhispers() && !IsGameMaster() && !rPlayer->IsGameMaster())
{
SetAcceptWhispers(true);
ChatHandler(GetSession()).SendSysMessage(LANG_COMMAND_WHISPERON);
@@ -20789,7 +20793,7 @@ void Player::VehicleSpellInitialize()
WorldPacket data(SMSG_PET_SPELLS, 8 + 2 + 4 + 4 + 4 * 10 + 1 + 1 + cooldownCount * (4 + 2 + 4 + 4));
data << uint64(vehicle->GetGUID()); // Guid
data << uint16(0); // Pet Family (0 for all vehicles)
- data << uint32(vehicle->isSummon() ? vehicle->ToTempSummon()->GetTimer() : 0); // Duration
+ data << uint32(vehicle->IsSummon() ? vehicle->ToTempSummon()->GetTimer() : 0); // Duration
// The following three segments are read by the client as one uint32
data << uint8(vehicle->GetReactState()); // React State
data << uint8(0); // Command State
@@ -21243,7 +21247,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
return false;
// not let cheating with start flight in time of logout process || while in combat || has type state: stunned || has type state: root
- if (GetSession()->isLogingOut() || isInCombat() || HasUnitState(UNIT_STATE_STUNNED) || HasUnitState(UNIT_STATE_ROOT))
+ if (GetSession()->isLogingOut() || IsInCombat() || HasUnitState(UNIT_STATE_STUNNED) || HasUnitState(UNIT_STATE_ROOT))
{
GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERBUSY);
return false;
@@ -21678,7 +21682,7 @@ bool Player::BuyCurrencyFromVendorSlot(uint64 vendorGuid, uint32 vendorSlot, uin
// cheating attempt
if (count < 1) count = 1;
- if (!isAlive())
+ if (!IsAlive())
return false;
CurrencyTypesEntry const* proto = sCurrencyTypesStore.LookupEntry(currency);
@@ -21809,7 +21813,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
if (slot > MAX_BAG_SIZE && slot != NULL_SLOT)
return false;
- if (!isAlive())
+ if (!IsAlive())
return false;
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
@@ -21997,7 +22001,7 @@ uint32 Player::GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot) const
void Player::UpdateHomebindTime(uint32 time)
{
// GMs never get homebind timer online
- if (m_InstanceValid || isGameMaster())
+ if (m_InstanceValid || IsGameMaster())
{
if (m_HomebindTimer) // instance valid, but timer not reset
{
@@ -22037,7 +22041,7 @@ void Player::UpdatePvPState(bool onlyFFA)
{
/// @todo should we always synchronize UNIT_FIELD_BYTES_2, 1 of controller and controlled?
// no, we shouldn't, those are checked for affecting player by client
- if (!pvpInfo.IsInNoPvPArea && !isGameMaster()
+ if (!pvpInfo.IsInNoPvPArea && !IsGameMaster()
&& (pvpInfo.IsInFFAPvPArea || sWorld->IsFFAPvPRealm()))
{
if (!HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
@@ -22240,7 +22244,7 @@ void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
void Player::UpdatePotionCooldown(Spell* spell)
{
// no potion used i combat or still in combat
- if (!m_lastPotionId || isInCombat())
+ if (!m_lastPotionId || IsInCombat())
return;
// Call not from spell cast, send cooldown event for item spells if no in combat
@@ -22491,7 +22495,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
// call after remove to be sure that player resurrected for correct cast
- if (bg->isBattleground() && !isGameMaster() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
+ if (bg->isBattleground() && !IsGameMaster() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
{
if (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN)
{
@@ -22668,7 +22672,7 @@ inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/)
template<>
inline void BeforeVisibilityDestroy<Creature>(Creature* t, Player* p)
{
- if (p->GetPetGUID() == t->GetGUID() && t->ToCreature()->isPet())
+ if (p->GetPetGUID() == t->GetGUID() && t->ToCreature()->IsPet())
((Pet*)t)->Remove(PET_SAVE_NOT_IN_SLOT, true);
}
@@ -22676,7 +22680,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
{
if (HaveAtClient(target))
{
- if (!canSeeOrDetect(target, false, true))
+ if (!CanSeeOrDetect(target, false, true))
{
if (target->GetTypeId() == TYPEID_UNIT)
BeforeVisibilityDestroy<Creature>(target->ToCreature(), this);
@@ -22691,7 +22695,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
}
else
{
- if (canSeeOrDetect(target, false, true))
+ if (CanSeeOrDetect(target, false, true))
{
//if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle)
// UpdateVisibilityOf(((Unit*)target)->m_Vehicle);
@@ -22726,7 +22730,7 @@ void Player::UpdateTriggerVisibility()
if (IS_CREATURE_GUID(*itr))
{
Creature* obj = GetMap()->GetCreature(*itr);
- if (!obj || !(obj->isTrigger() || obj->HasAuraType(SPELL_AURA_TRANSFORM))) // can transform into triggers
+ if (!obj || !(obj->IsTrigger() || obj->HasAuraType(SPELL_AURA_TRANSFORM))) // can transform into triggers
continue;
obj->BuildValuesUpdateBlockForPlayer(&udata, this);
@@ -22740,10 +22744,10 @@ void Player::UpdateTriggerVisibility()
void Player::SendInitialVisiblePackets(Unit* target)
{
SendAurasForTarget(target);
- if (target->isAlive())
+ if (target->IsAlive())
{
- if (target->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && target->getVictim())
- target->SendMeleeAttackStart(target->getVictim());
+ if (target->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && target->GetVictim())
+ target->SendMeleeAttackStart(target->GetVictim());
}
}
@@ -22752,7 +22756,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
{
if (HaveAtClient(target))
{
- if (!canSeeOrDetect(target, false, true))
+ if (!CanSeeOrDetect(target, false, true))
{
BeforeVisibilityDestroy<T>(target, this);
@@ -22766,7 +22770,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
}
else //if (visibleNow.size() < 30 || target->GetTypeId() == TYPEID_UNIT && target->ToCreature()->IsVehicle())
{
- if (canSeeOrDetect(target, false, true))
+ if (CanSeeOrDetect(target, false, true))
{
//if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle)
// UpdateVisibilityOf(((Unit*)target)->m_Vehicle, data, visibleNow);
@@ -23590,7 +23594,7 @@ bool Player::GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const
float Player::GetReputationPriceDiscount(Creature const* creature) const
{
- FactionTemplateEntry const* vendor_faction = creature->getFactionTemplateEntry();
+ FactionTemplateEntry const* vendor_faction = creature->GetFactionTemplateEntry();
if (!vendor_faction || !vendor_faction->faction)
return 1.0f;
@@ -23731,7 +23735,7 @@ void Player::SummonIfPossible(bool agree)
return;
// stop taxi flight at summon
- if (isInFlight())
+ if (IsInFlight())
{
GetMotionMaster()->MovementExpired();
CleanupAfterTaxiFlight();
@@ -23959,8 +23963,8 @@ bool Player::isHonorOrXPTarget(Unit const* victim)
if (Creature const* const creature = victim->ToCreature())
{
- if (creature->isTotem() ||
- creature->isPet() ||
+ if (creature->IsTotem() ||
+ creature->IsPet() ||
creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL)
return false;
}
@@ -23976,7 +23980,7 @@ bool Player::GetsRecruitAFriendBonus(bool forXP)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player)
continue;
@@ -24024,7 +24028,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player)
continue;
@@ -24032,7 +24036,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
continue; // member (alive or dead) or his corpse at req. distance
// quest objectives updated only for alive group member or dead but with not released body
- if (player->isAlive()|| !player->GetCorpse())
+ if (player->IsAlive()|| !player->GetCorpse())
player->KilledMonsterCredit(creature_id, creature_guid);
}
}
@@ -24045,7 +24049,7 @@ bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
if (!pRewardSource)
return false;
const WorldObject* player = GetCorpse();
- if (!player || isAlive())
+ if (!player || IsAlive())
player = this;
if (player->GetMapId() != pRewardSource->GetMapId() || player->GetInstanceId() != pRewardSource->GetInstanceId())
@@ -24059,7 +24063,7 @@ bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
if (!pOther)
return false;
const WorldObject* player = GetCorpse();
- if (!player || isAlive())
+ if (!player || IsAlive())
player = this;
if (player->GetMapId() != pOther->GetMapId() || player->GetInstanceId() != pOther->GetInstanceId())
@@ -24285,7 +24289,7 @@ Player* Player::GetNextRandomRaidMember(float radius)
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* Target = itr->getSource();
+ Player* Target = itr->GetSource();
// IsHostileTo check duel and controlled by enemy
if (Target && Target != this && IsWithinDistInMap(Target, radius) &&
@@ -24327,7 +24331,7 @@ PartyResult Player::CanUninviteFromGroup() const
/// @todo Should also be sent when anyone has recently left combat, with an aprox ~5 seconds timer.
for (GroupReference const* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
- if (itr->getSource() && itr->getSource()->isInCombat())
+ if (itr->GetSource() && itr->GetSource()->IsInCombat())
return ERR_PARTY_LFG_BOOT_IN_COMBAT;
/* Missing support for these types
@@ -24448,7 +24452,7 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z)
}
// Allow travel in dark water on taxi or transport
- if ((liquid_status.type_flags & MAP_LIQUID_TYPE_DARK_WATER) && !isInFlight() && !GetTransport())
+ if ((liquid_status.type_flags & MAP_LIQUID_TYPE_DARK_WATER) && !IsInFlight() && !GetTransport())
m_MirrorTimerFlags |= UNDERWARER_INDARKWATER;
else
m_MirrorTimerFlags &= ~UNDERWARER_INDARKWATER;
@@ -24561,7 +24565,7 @@ bool Player::CanUseBattlegroundObject(GameObject* gameobject)
// It is possible to call this method with a null pointer, only skipping faction check.
if (gameobject)
{
- FactionTemplateEntry const* playerFaction = getFactionTemplateEntry();
+ FactionTemplateEntry const* playerFaction = GetFactionTemplateEntry();
FactionTemplateEntry const* faction = sFactionTemplateStore.LookupEntry(gameobject->GetUInt32Value(GAMEOBJECT_FACTION));
if (playerFaction && faction && !playerFaction->IsFriendlyTo(*faction))
@@ -24572,14 +24576,14 @@ bool Player::CanUseBattlegroundObject(GameObject* gameobject)
// Note: Mount, stealth and invisibility will be removed when used
return (!isTotalImmune() && // Damage immune
!HasAura(SPELL_RECENTLY_DROPPED_FLAG) && // Still has recently held flag debuff
- isAlive()); // Alive
+ IsAlive()); // Alive
}
bool Player::CanCaptureTowerPoint()
{
return (!HasStealthAura() && // not stealthed
!HasInvisibilityAura() && // not invisible
- isAlive()); // live player
+ IsAlive()); // live player
}
uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, BarberShopStyleEntry const* newSkin)
@@ -24736,10 +24740,10 @@ void Player::UpdateCharmedAI()
}
}
- if (!charmer->isInCombat())
+ if (!charmer->IsInCombat())
GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- Unit* target = getVictim();
+ Unit* target = GetVictim();
if (!target || !charmer->IsValidAttackTarget(target))
{
target = charmer->SelectNearestTarget();
@@ -25249,7 +25253,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
//Players with low fall distance, Feather Fall or physical immunity (charges used) are ignored
// 14.57 can be calculated by resolving damageperc formula below to 0
- if (z_diff >= 14.57f && !isDead() && !isGameMaster() &&
+ if (z_diff >= 14.57f && !isDead() && !IsGameMaster() &&
!HasAuraType(SPELL_AURA_HOVER) && !HasAuraType(SPELL_AURA_FEATHER_FALL) &&
!HasAuraType(SPELL_AURA_FLY) && !IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL))
{
@@ -25279,7 +25283,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
uint32 final_damage = EnvironmentalDamage(DAMAGE_FALL, damage);
// recheck alive, might have died of EnvironmentalDamage, avoid cases when player die in fact like Spirit of Redemption case
- if (isAlive() && final_damage < original_health)
+ if (IsAlive() && final_damage < original_health)
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING, uint32(z_diff*100));
}
@@ -25664,10 +25668,10 @@ void Player::ResummonPetTemporaryUnSummonedIfAny()
bool Player::IsPetNeedBeTemporaryUnsummoned() const
{
- return !IsInWorld() || !isAlive() || IsMounted() /*+in flight*/;
+ return !IsInWorld() || !IsAlive() || IsMounted() /*+in flight*/;
}
-bool Player::canSeeSpellClickOn(Creature const* c) const
+bool Player::CanSeeSpellClickOn(Creature const* c) const
{
if (!c->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK))
return false;
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index bbda2a75fba..38475287e19 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1277,7 +1277,7 @@ class Player : public Unit, public GridObject<Player>
// mount_id can be used in scripting calls
bool isAcceptWhispers() const { return m_ExtraFlags & PLAYER_EXTRA_ACCEPT_WHISPERS; }
void SetAcceptWhispers(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_ACCEPT_WHISPERS; else m_ExtraFlags &= ~PLAYER_EXTRA_ACCEPT_WHISPERS; }
- bool isGameMaster() const { return m_ExtraFlags & PLAYER_EXTRA_GM_ON; }
+ bool IsGameMaster() const { return m_ExtraFlags & PLAYER_EXTRA_GM_ON; }
void SetGameMaster(bool on);
bool isGMChat() const { return m_ExtraFlags & PLAYER_EXTRA_GM_CHAT; }
void SetGMChat(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_GM_CHAT; else m_ExtraFlags &= ~PLAYER_EXTRA_GM_CHAT; }
@@ -2150,7 +2150,7 @@ class Player : public Unit, public GridObject<Player>
void SetCanBlock(bool value);
bool CanTitanGrip() const { return m_canTitanGrip; }
void SetCanTitanGrip(bool value) { m_canTitanGrip = value; }
- bool CanTameExoticPets() const { return isGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); }
+ bool CanTameExoticPets() const { return IsGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); }
void SetRegularAttackTime();
void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; }
@@ -2483,7 +2483,7 @@ class Player : public Unit, public GridObject<Player>
void SetTitle(CharTitlesEntry const* title, bool lost = false);
//bool isActiveObject() const { return true; }
- bool canSeeSpellClickOn(Creature const* creature) const;
+ bool CanSeeSpellClickOn(Creature const* creature) const;
uint32 GetChampioningFaction() const { return m_ChampioningFaction; }
void SetChampioningFaction(uint32 faction) { m_ChampioningFaction = faction; }
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index 9526d8755a5..3b283ca39c2 100644
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -35,7 +35,7 @@ Totem::Totem(SummonPropertiesEntry const* properties, Unit* owner) : Minion(prop
void Totem::Update(uint32 time)
{
- if (!GetOwner()->isAlive() || !isAlive())
+ if (!GetOwner()->IsAlive() || !IsAlive())
{
UnSummon(); // remove self
return;
@@ -136,7 +136,7 @@ void Totem::UnSummon(uint32 msTime)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* target = itr->getSource();
+ Player* target = itr->GetSource();
if (target && group->SameSubGroup(owner, target))
target->RemoveAurasDueToSpell(GetSpell(), GetGUID());
}
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 3ed41781982..5361eaff8a2 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -574,13 +574,13 @@ void Transport::UpdateForMap(Map const* targetMap)
{
for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
{
- if (this != itr->getSource()->GetTransport())
+ if (this != itr->GetSource()->GetTransport())
{
UpdateData transData(GetMapId());
- BuildCreateUpdateBlockForPlayer(&transData, itr->getSource());
+ BuildCreateUpdateBlockForPlayer(&transData, itr->GetSource());
WorldPacket packet;
transData.BuildPacket(&packet);
- itr->getSource()->SendDirectMessage(&packet);
+ itr->GetSource()->SendDirectMessage(&packet);
}
}
}
@@ -592,8 +592,8 @@ void Transport::UpdateForMap(Map const* targetMap)
transData.BuildPacket(&out_packet);
for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
- if (this != itr->getSource()->GetTransport())
- itr->getSource()->SendDirectMessage(&out_packet);
+ if (this != itr->GetSource()->GetTransport())
+ itr->GetSource()->SendDirectMessage(&out_packet);
}
}
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index ac771004096..e319f45f6f2 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -313,7 +313,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
if (ranged)
{
UpdateDamagePhysical(RANGED_ATTACK);
- if (pet && pet->isHunterPet()) // At ranged attack change for hunter pet
+ if (pet && pet->IsHunterPet()) // At ranged attack change for hunter pet
pet->UpdateAttackPowerAndDamage();
}
else
@@ -1049,7 +1049,7 @@ void Guardian::UpdateResistances(uint32 school)
float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school));
// hunter and warlock pets gain 40% of owner's resistance
- if (isPet())
+ if (IsPet())
value += float(CalculatePct(m_owner->GetResistance(SpellSchools(school)), 40));
SetResistance(SpellSchools(school), int32(value));
@@ -1065,9 +1065,9 @@ void Guardian::UpdateArmor()
UnitMods unitMod = UNIT_MOD_ARMOR;
// hunter pets gain 35% of owner's armor value, warlock pets gain 100% of owner's armor
- if (isHunterPet())
+ if (IsHunterPet())
bonus_armor = float(CalculatePct(m_owner->GetArmor(), 70));
- else if (isPet())
+ else if (IsPet())
bonus_armor = m_owner->GetArmor();
value = GetModifierValue(unitMod, BASE_VALUE);
@@ -1145,7 +1145,7 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
Unit* owner = GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{
- if (isHunterPet()) //hunter pets benefit from owner's attack power
+ if (IsHunterPet()) //hunter pets benefit from owner's attack power
{
float mod = 1.0f; //Hunter contribution modifier
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
@@ -1165,7 +1165,7 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
SetBonusDamage(int32(owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier));
}
//demons benefit from warlocks shadow or fire damage
- else if (isPet())
+ else if (IsPet())
{
int32 fire = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) + owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
int32 shadow = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW)) + owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index bda77af54ed..a6084a62fdb 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -332,7 +332,7 @@ void Unit::Update(uint32 p_time)
SendThreatListUpdate();
// update combat timer only for players and pets (only pets with PetAI)
- if (isInCombat() && (GetTypeId() == TYPEID_PLAYER || (ToCreature()->isPet() && IsControlledByPlayer())))
+ if (IsInCombat() && (GetTypeId() == TYPEID_PLAYER || (ToCreature()->IsPet() && IsControlledByPlayer())))
{
// Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away
// targets without stopping half way there and running off.
@@ -358,7 +358,7 @@ void Unit::Update(uint32 p_time)
// update abilities available only for fraction of time
UpdateReactives(p_time);
- if (isAlive())
+ if (IsAlive())
{
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, HealthBelowPct(20));
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, HealthBelowPct(35));
@@ -555,7 +555,7 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
void Unit::DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb)
{
- if (!victim || !victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
+ if (!victim || !victim->IsAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
{
if (absorb)
*absorb += damage;
@@ -576,7 +576,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
// Signal to pets that their owner was attacked
Pet* pet = victim->ToPlayer()->GetPet();
- if (pet && pet->isAlive())
+ if (pet && pet->IsAlive())
pet->AI()->OwnerAttackedBy(this);
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
@@ -584,7 +584,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
}
// Signal the pet it was attacked so the AI can respond if needed
- if (victim->GetTypeId() == TYPEID_UNIT && this != victim && victim->isPet() && victim->isAlive())
+ if (victim->GetTypeId() == TYPEID_UNIT && this != victim && victim->IsPet() && victim->IsAlive())
victim->ToPet()->AI()->AttackedBy(this);
if (damagetype != NODAMAGE)
@@ -951,7 +951,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
return;
Unit* victim = damageInfo->target;
- if (!victim || !victim->isAlive())
+ if (!victim || !victim->IsAlive())
return;
SpellSchoolMask damageSchoolMask = SpellSchoolMask(damageInfo->schoolMask);
@@ -1056,7 +1056,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss)
if (!victim)
return;
- if (!victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
+ if (!victim->IsAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
return;
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID);
@@ -1094,7 +1094,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
if (!victim)
return;
- if (!isAlive() || !victim->isAlive())
+ if (!IsAlive() || !victim->IsAlive())
return;
// Select HitInfo/procAttacker/procVictim flag based on attack type
@@ -1267,7 +1267,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
{
Unit* victim = damageInfo->target;
- if (!victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
+ if (!victim->IsAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
return;
// Hmmmm dont like this emotes client must by self do all animations
@@ -1488,7 +1488,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo)
{
- if (!victim || !victim->isAlive() || !damage)
+ if (!victim || !victim->IsAlive() || !damage)
return;
DamageInfo dmgInfo = DamageInfo(this, victim, damage, spellInfo, schoolMask, damagetype);
@@ -1706,7 +1706,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
// Damage can be splitted only if aura has an alive caster
Unit* caster = (*itr)->GetCaster();
- if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->isAlive())
+ if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->IsAlive())
continue;
uint32 splitDamage = CalculatePct(dmgInfo.GetDamage(), (*itr)->GetAmount());
@@ -1799,7 +1799,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
if (HasUnitState(UNIT_STATE_CANNOT_AUTOATTACK) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
return;
- if (!victim->isAlive())
+ if (!victim->IsAlive())
return;
if ((attType == BASE_ATTACK || attType == OFF_ATTACK) && !IsWithinLOSInMap(victim))
@@ -1983,8 +1983,8 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
// Max 40% chance to score a glancing blow against mobs that are higher level (can do only players and pets and not with ranged weapon)
if (attType != RANGED_ATTACK &&
- (GetTypeId() == TYPEID_PLAYER || ToCreature()->isPet()) &&
- victim->GetTypeId() != TYPEID_PLAYER && !victim->ToCreature()->isPet() &&
+ (GetTypeId() == TYPEID_PLAYER || ToCreature()->IsPet()) &&
+ victim->GetTypeId() != TYPEID_PLAYER && !victim->ToCreature()->IsPet() &&
getLevel() < victim->getLevelForTarget(this))
{
// cap possible value (with bonuses > max skill)
@@ -2336,14 +2336,14 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
{
// Can`t miss on dead target (on skinning for example)
- if (!victim->isAlive() && victim->GetTypeId() != TYPEID_PLAYER)
+ if (!victim->IsAlive() && victim->GetTypeId() != TYPEID_PLAYER)
return SPELL_MISS_NONE;
SpellSchoolMask schoolMask = spell->GetSchoolMask();
// PvP - PvE spell misschances per leveldif > 2
int32 lchance = victim->GetTypeId() == TYPEID_PLAYER ? 7 : 11;
int32 thisLevel = getLevelForTarget(victim);
- if (GetTypeId() == TYPEID_UNIT && ToCreature()->isTrigger())
+ if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsTrigger())
thisLevel = std::max<int32>(thisLevel, spell->SpellLevel);
int32 leveldif = int32(victim->getLevelForTarget(this)) - thisLevel;
@@ -2479,7 +2479,7 @@ float Unit::GetUnitDodgeChance() const
return GetFloatValue(PLAYER_DODGE_PERCENTAGE);
else
{
- if (ToCreature()->isTotem())
+ if (ToCreature()->IsTotem())
return 0.0f;
else
{
@@ -2551,7 +2551,7 @@ float Unit::GetUnitBlockChance() const
}
else
{
- if (ToCreature()->isTotem())
+ if (ToCreature()->IsTotem())
return 0.0f;
else
{
@@ -2897,9 +2897,9 @@ bool Unit::isInBackInMap(Unit const* target, float distance, float arc) const
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
{
if (IsInWater())
- return c->canSwim();
+ return c->CanSwim();
else
- return c->canWalk() || c->CanFly();
+ return c->CanWalk() || c->CanFly();
}
bool Unit::IsInWater() const
@@ -2914,7 +2914,7 @@ bool Unit::IsUnderWater() const
void Unit::UpdateUnderwaterState(Map* m, float x, float y, float z)
{
- if (!isPet() && !IsVehicle())
+ if (!IsPet() && !IsVehicle())
return;
LiquidData liquid_status;
@@ -3067,7 +3067,7 @@ AuraApplication * Unit::_CreateAuraApplication(Aura* aura, uint8 effMask)
uint32 aurId = aurSpellInfo->Id;
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
- if (!isAlive() && !aurSpellInfo->IsDeathPersistent() &&
+ if (!IsAlive() && !aurSpellInfo->IsDeathPersistent() &&
(GetTypeId() != TYPEID_PLAYER || !ToPlayer()->GetSession()->PlayerLoading()))
return NULL;
@@ -3200,7 +3200,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
ASSERT(!aurApp->GetEffectMask());
// Remove totem at next update if totem loses its aura
- if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem()&& ToTotem()->GetSummonerGUID() == aura->GetCasterGUID())
+ if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->IsTotem()&& ToTotem()->GetSummonerGUID() == aura->GetCasterGUID())
{
if (ToTotem()->GetSpell() == aura->GetId() && ToTotem()->GetTotemType() == TOTEM_PASSIVE)
ToTotem()->setDeathState(JUST_DIED);
@@ -4685,7 +4685,7 @@ void Unit::ProcDamageAndSpell(Unit* victim, uint32 procAttacker, uint32 procVict
ProcDamageAndSpellFor(false, victim, procAttacker, procExtra, attType, procSpell, amount, procAura);
// Now go on with a victim's events'n'auras
// Not much to do if no flags are set or there is no victim
- if (victim && victim->isAlive() && procVictim)
+ if (victim && victim->IsAlive() && procVictim)
victim->ProcDamageAndSpellFor(true, this, procVictim, procExtra, attType, procSpell, amount, procAura);
}
@@ -5051,7 +5051,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// 41409 Dementia: Every 5 seconds either gives you -5% damage/healing. (Druid, Shaman, Priest, Warlock, Mage, Paladin)
case 39446:
{
- if (GetTypeId() != TYPEID_PLAYER || !isAlive())
+ if (GetTypeId() != TYPEID_PLAYER || !IsAlive())
return false;
// Select class defined buff
@@ -5114,7 +5114,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// triggered at positive/self casts also, current attack target used then
if (target && IsFriendlyTo(target))
{
- target = getVictim();
+ target = GetVictim();
if (!target)
{
uint64 selected_guid = ToPlayer()->GetSelection();
@@ -5237,7 +5237,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 31872:
{
// Roll chane
- if (!victim || !victim->isAlive() || !roll_chance_i(triggerAmount))
+ if (!victim || !victim->IsAlive() || !roll_chance_i(triggerAmount))
return false;
// Remove any stun effect on target
@@ -5546,7 +5546,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Glyph of Sunder Armor
if (dummySpell->Id == 58387)
{
- if (!victim || !victim->isAlive() || !procSpell)
+ if (!victim || !victim->IsAlive() || !procSpell)
return false;
target = SelectNearbyTarget(victim);
@@ -5678,7 +5678,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Vampiric Touch
if (dummySpell->SpellFamilyFlags[1] & 0x00000400)
{
- if (!victim || !victim->isAlive())
+ if (!victim || !victim->IsAlive())
return false;
if (effIndex != 0)
@@ -5707,7 +5707,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Vampiric Embrace
case 15286:
{
- if (!victim || !victim->isAlive() || procSpell->SpellFamilyFlags[1] & 0x80000)
+ if (!victim || !victim->IsAlive() || procSpell->SpellFamilyFlags[1] & 0x80000)
return false;
// heal amount
@@ -6055,7 +6055,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- if (Player* member = itr->getSource())
+ if (Player* member = itr->GetSource())
{
// check if it was heal by paladin which casted this beacon of light
if (member->GetAura(53563, victim->GetGUID()))
@@ -6226,7 +6226,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 71406: // Tiny Abomination in a Jar
case 71545: // Tiny Abomination in a Jar (Heroic)
{
- if (!victim || !victim->isAlive())
+ if (!victim || !victim->IsAlive())
return false;
CastSpell(this, 71432, true, NULL, triggeredByAura);
@@ -6337,7 +6337,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 33757:
{
Player* player = ToPlayer();
- if (!player || !castItem || !castItem->IsEquipped() || !victim || !victim->isAlive())
+ if (!player || !castItem || !castItem->IsEquipped() || !victim || !victim->IsAlive())
return false;
// custom cooldown processing case
@@ -6562,7 +6562,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Flametongue Weapon (Passive)
if (dummySpell->SpellFamilyFlags[0] & 0x200000)
{
- if (GetTypeId() != TYPEID_PLAYER || !victim || !victim->isAlive() || !castItem || !castItem->IsEquipped())
+ if (GetTypeId() != TYPEID_PLAYER || !victim || !victim->IsAlive() || !castItem || !castItem->IsEquipped())
return false;
WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
@@ -6630,7 +6630,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Blood-Caked Blade
if (dummySpell->SpellIconID == 138)
{
- if (!target || !target->isAlive())
+ if (!target || !target->IsAlive())
return false;
triggered_spell_id = dummySpell->Effects[effIndex].TriggerSpell;
@@ -6659,11 +6659,11 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
break;
}
- if (pPet && pPet->getVictim() && damage && procSpell)
+ if (pPet && pPet->GetVictim() && damage && procSpell)
{
uint32 procDmg = damage / 2;
- pPet->SendSpellNonMeleeDamageLog(pPet->getVictim(), procSpell->Id, procDmg, procSpell->GetSchoolMask(), 0, 0, false, 0, false);
- pPet->DealDamage(pPet->getVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, procSpell->GetSchoolMask(), procSpell, true);
+ pPet->SendSpellNonMeleeDamageLog(pPet->GetVictim(), procSpell->Id, procDmg, procSpell->GetSchoolMask(), 0, 0, false, 0, false);
+ pPet->DealDamage(pPet->GetVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, procSpell->GetSchoolMask(), procSpell, true);
break;
}
else
@@ -7124,9 +7124,9 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 40336:
{
// On successful melee or ranged attack gain $29471s1 mana and if possible drain $27526s1 mana from the target.
- if (isAlive())
+ if (IsAlive())
CastSpell(this, 29471, true, castItem, triggeredByAura);
- if (victim && victim->isAlive())
+ if (victim && victim->IsAlive())
CastSpell(victim, 27526, true, castItem, triggeredByAura);
return true;
}
@@ -7284,7 +7284,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 67712: // Item - Coliseum 25 Normal Caster Trinket
case 67758: // Item - Coliseum 25 Heroic Caster Trinket
{
- if (!victim || !victim->isAlive() || GetTypeId() != TYPEID_PLAYER)
+ if (!victim || !victim->IsAlive() || GetTypeId() != TYPEID_PLAYER)
return false;
uint32 stack_spell_id = 0;
@@ -7359,7 +7359,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
basepoints0 = int32(CountPctFromMaxHealth(triggerAmount));
target = this;
trigger_spell_id = 31616;
- if (victim && victim->isAlive())
+ if (victim && victim->IsAlive())
victim->getThreatManager().modifyThreatPercent(this, -10);
}
else
@@ -7487,7 +7487,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// Greater Heal Refund (Avatar Raiment set)
case 37594:
{
- if (!victim || !victim->isAlive())
+ if (!victim || !victim->IsAlive())
return false;
// Doesn't proc if target already has full health
@@ -7502,7 +7502,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 40971:
{
// If your target is below $s1% health
- if (!victim || !victim->isAlive() || victim->HealthAbovePct(triggerAmount))
+ if (!victim || !victim->IsAlive() || victim->HealthAbovePct(triggerAmount))
return false;
break;
}
@@ -7687,7 +7687,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
{
int32 scriptId = triggeredByAura->GetMiscValue();
- if (!victim || !victim->isAlive())
+ if (!victim || !victim->IsAlive())
return false;
Item* castItem = triggeredByAura->GetBase()->GetCastItemGUID() && GetTypeId() == TYPEID_PLAYER
@@ -7782,7 +7782,7 @@ void Unit::setPowerType(Powers new_powertype)
}
}
-FactionTemplateEntry const* Unit::getFactionTemplateEntry() const
+FactionTemplateEntry const* Unit::GetFactionTemplateEntry() const
{
FactionTemplateEntry const* entry = sFactionTemplateStore.LookupEntry(getFaction());
if (!entry)
@@ -7836,7 +7836,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
if (selfPlayerOwner->IsInRaidWith(targetPlayerOwner))
return REP_FRIENDLY; // return true to allow config option AllowTwoSide.Interaction.Group to work
// however client seems to allow mixed group parties, because in 13850 client it works like:
- // return GetFactionReactionTo(getFactionTemplateEntry(), target);
+ // return GetFactionReactionTo(GetFactionTemplateEntry(), target);
}
// check FFA_PVP
@@ -7846,7 +7846,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
if (selfPlayerOwner)
{
- if (FactionTemplateEntry const* targetFactionTemplateEntry = target->getFactionTemplateEntry())
+ if (FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry())
{
if (ReputationRank const* repRank = selfPlayerOwner->GetReputationMgr().GetForcedRankIfAny(targetFactionTemplateEntry))
return *repRank;
@@ -7873,7 +7873,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
}
}
// do checks dependant only on our faction
- return GetFactionReactionTo(getFactionTemplateEntry(), target);
+ return GetFactionReactionTo(GetFactionTemplateEntry(), target);
}
ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTemplateEntry, Unit const* target)
@@ -7882,7 +7882,7 @@ ReputationRank Unit::GetFactionReactionTo(FactionTemplateEntry const* factionTem
if (!factionTemplateEntry)
return REP_NEUTRAL;
- FactionTemplateEntry const* targetFactionTemplateEntry = target->getFactionTemplateEntry();
+ FactionTemplateEntry const* targetFactionTemplateEntry = target->GetFactionTemplateEntry();
if (!targetFactionTemplateEntry)
return REP_NEUTRAL;
@@ -7935,7 +7935,7 @@ bool Unit::IsFriendlyTo(Unit const* unit) const
bool Unit::IsHostileToPlayers() const
{
- FactionTemplateEntry const* my_faction = getFactionTemplateEntry();
+ FactionTemplateEntry const* my_faction = GetFactionTemplateEntry();
if (!my_faction || !my_faction->faction)
return false;
@@ -7948,7 +7948,7 @@ bool Unit::IsHostileToPlayers() const
bool Unit::IsNeutralToAll() const
{
- FactionTemplateEntry const* my_faction = getFactionTemplateEntry();
+ FactionTemplateEntry const* my_faction = GetFactionTemplateEntry();
if (!my_faction || !my_faction->faction)
return true;
@@ -7971,8 +7971,8 @@ void Unit::_removeAttacker(Unit* pAttacker)
Unit* Unit::getAttackerForHelper() const // If someone wants to help, who to give them
{
- if (getVictim() != NULL)
- return getVictim();
+ if (GetVictim() != NULL)
+ return GetVictim();
if (!m_attackers.empty())
return *(m_attackers.begin());
@@ -7986,7 +7986,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
return false;
// dead units can neither attack nor be attacked
- if (!isAlive() || !victim->IsInWorld() || !victim->isAlive())
+ if (!IsAlive() || !victim->IsInWorld() || !victim->IsAlive())
return false;
// player cannot attack in mount state
@@ -7996,7 +7996,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
// nobody can attack GM in GM-mode
if (victim->GetTypeId() == TYPEID_PLAYER)
{
- if (victim->ToPlayer()->isGameMaster())
+ if (victim->ToPlayer()->IsGameMaster())
return false;
}
else
@@ -8054,7 +8054,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
//if (GetTypeId() == TYPEID_UNIT)
// ToCreature()->SetCombatStartPosition(GetPositionX(), GetPositionY(), GetPositionZ());
- if (GetTypeId() == TYPEID_UNIT && !ToCreature()->isPet())
+ if (GetTypeId() == TYPEID_UNIT && !ToCreature()->IsPet())
{
// should not let player enter combat by right clicking target - doesn't helps
SetInCombatWith(victim);
@@ -8079,7 +8079,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
{
Pet* playerPet = this->ToPlayer()->GetPet();
- if (playerPet && playerPet->isAlive())
+ if (playerPet && playerPet->IsAlive())
playerPet->AI()->OwnerAttacked(victim);
}
@@ -8410,10 +8410,10 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
if (Guardian* oldPet = GetGuardianPet())
{
- if (oldPet != minion && (oldPet->isPet() || minion->isPet() || oldPet->GetEntry() != minion->GetEntry()))
+ if (oldPet != minion && (oldPet->IsPet() || minion->IsPet() || oldPet->GetEntry() != minion->GetEntry()))
{
// remove existing minion pet
- if (oldPet->isPet())
+ if (oldPet->IsPet())
((Pet*)oldPet)->Remove(PET_SAVE_AS_CURRENT);
else
oldPet->UnSummon();
@@ -8444,7 +8444,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
minion->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
// FIXME: hack, speed must be set only at follow
- if (GetTypeId() == TYPEID_PLAYER && minion->isPet())
+ if (GetTypeId() == TYPEID_PLAYER && minion->IsPet())
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
minion->SetSpeed(UnitMoveType(i), m_speed_rate[i], true);
@@ -8482,7 +8482,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
if (GetPetGUID() == minion->GetGUID())
SetPetGUID(0);
}
- else if (minion->isTotem())
+ else if (minion->IsTotem())
{
// All summoned by totem minions must disappear when it is removed.
if (SpellInfo const* spInfo = sSpellMgr->GetSpellInfo(minion->ToTotem()->GetSpell()))
@@ -8532,7 +8532,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
// show another pet bar if there is no charm bar
if (GetTypeId() == TYPEID_PLAYER && !GetCharmGUID())
{
- if ((*itr)->isPet())
+ if ((*itr)->IsPet())
ToPlayer()->PetSpellInitialize();
else
ToPlayer()->CharmSpellInitialize();
@@ -8552,7 +8552,7 @@ void Unit::GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry)
Unit* unit = *itr;
++itr;
if (unit->GetEntry() == entry && unit->GetTypeId() == TYPEID_UNIT
- && unit->ToCreature()->isSummon()) // minion, actually
+ && unit->ToCreature()->IsSummon()) // minion, actually
Minions.push_back(unit->ToCreature());
}
}
@@ -8564,7 +8564,7 @@ void Unit::RemoveAllMinionsByEntry(uint32 entry)
Unit* unit = *itr;
++itr;
if (unit->GetEntry() == entry && unit->GetTypeId() == TYPEID_UNIT
- && unit->ToCreature()->isSummon()) // minion, actually
+ && unit->ToCreature()->IsSummon()) // minion, actually
unit->ToTempSummon()->UnSummon();
// i think this is safe because i have never heard that a despawned minion will trigger a same minion
}
@@ -8661,7 +8661,7 @@ int32 Unit::DealHeal(Unit* victim, uint32 addhealth)
Unit* unit = this;
- if (GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem())
+ if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsTotem())
unit = GetOwner();
if (Player* player = unit->ToPlayer())
@@ -8748,7 +8748,7 @@ void Unit::RemoveAllControlled()
m_Controlled.erase(m_Controlled.begin());
if (target->GetCharmerGUID() == GetGUID())
target->RemoveCharmAuras();
- else if (target->GetOwnerGUID() == GetGUID() && target->isSummon())
+ else if (target->GetOwnerGUID() == GetGUID() && target->IsSummon())
target->ToTempSummon()->UnSummon();
else
TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
@@ -8785,7 +8785,7 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
if (GetTypeId() == TYPEID_PLAYER)
player = ToPlayer();
// Should we enable this also for charmed units?
- else if (GetTypeId() == TYPEID_UNIT && ToCreature()->isPet())
+ else if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsPet())
player = GetOwner()->ToPlayer();
if (!player)
@@ -8810,15 +8810,15 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
nearMembers.reserve(group->GetMembersCount() * 2);
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
- if (Player* Target = itr->getSource())
+ if (Player* Target = itr->GetSource())
{
// IsHostileTo check duel and controlled by enemy
- if (Target != this && Target->isAlive() && IsWithinDistInMap(Target, radius) && !IsHostileTo(Target))
+ if (Target != this && Target->IsAlive() && IsWithinDistInMap(Target, radius) && !IsHostileTo(Target))
nearMembers.push_back(Target);
// Push player's pet to vector
if (Unit* pet = Target->GetGuardianPet())
- if (pet != this && pet->isAlive() && IsWithinDistInMap(pet, radius) && !IsHostileTo(pet))
+ if (pet != this && pet->IsAlive() && IsWithinDistInMap(pet, radius) && !IsHostileTo(pet))
nearMembers.push_back(pet);
}
@@ -8873,7 +8873,7 @@ void Unit::UnsummonAllTotems()
continue;
if (Creature* OldTotem = GetMap()->GetCreature(m_SummonSlot[i]))
- if (OldTotem->isSummon())
+ if (OldTotem->IsSummon())
OldTotem->ToTempSummon()->UnSummon();
}
}
@@ -8940,7 +8940,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
return pdamage;
// For totems get damage bonus from owner
- if (GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem())
+ if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsTotem())
if (Unit* owner = GetOwner())
return owner->SpellDamageBonusDone(victim, spellProto, pdamage, damagetype);
@@ -8950,7 +8950,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
int32 DoneTotal = 0;
// Pet damage?
- if (GetTypeId() == TYPEID_UNIT && !ToCreature()->isPet())
+ if (GetTypeId() == TYPEID_UNIT && !ToCreature()->IsPet())
DoneTotalMod *= ToCreature()->GetSpellDamageMod(ToCreature()->GetCreatureTemplate()->rank);
// Some spells don't benefit from pct done mods
@@ -9124,7 +9124,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
if (HasAura(100001))
DoneTotalMod *= 2;
// Shadow Bite (30% increase from each dot)
- if (spellProto->SpellFamilyFlags[1] & 0x00400000 && isPet())
+ if (spellProto->SpellFamilyFlags[1] & 0x00400000 && IsPet())
if (uint8 count = victim->GetDoTsByCaster(GetOwnerGUID()))
AddPct(DoneTotalMod, 30 * count);
break;
@@ -9354,7 +9354,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
{
//! Mobs can't crit with spells. Player Totems can
//! Fire Elemental (from totem) can too - but this part is a hack and needs more research
- if (IS_CREATURE_GUID(GetGUID()) && !(isTotem() && IS_PLAYER_GUID(GetOwnerGUID())) && GetEntry() != 15438)
+ if (IS_CREATURE_GUID(GetGUID()) && !(IsTotem() && IS_PLAYER_GUID(GetOwnerGUID())) && GetEntry() != 15438)
return false;
// not critting spell
@@ -9602,7 +9602,7 @@ uint32 Unit::SpellCriticalHealingBonus(SpellInfo const* /*spellProto*/, uint32 d
uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) const
{
// For totems get healing bonus from owner (statue isn't totem in fact)
- if (GetTypeId() == TYPEID_UNIT && isTotem())
+ if (GetTypeId() == TYPEID_UNIT && IsTotem())
if (Unit* owner = GetOwner())
return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, stack);
@@ -10473,7 +10473,7 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const
return NULL;
}
-bool Unit::isServiceProvider() const
+bool Unit::IsServiceProvider() const
{
return HasFlag(UNIT_NPC_FLAGS,
UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER |
@@ -10511,10 +10511,10 @@ void Unit::CombatStart(Unit* target, bool initialAggro)
if (!target->IsStandState())
target->SetStandState(UNIT_STAND_STATE_STAND);
- if (!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
+ if (!target->IsInCombat() && target->GetTypeId() != TYPEID_PLAYER
&& !target->ToCreature()->HasReactState(REACT_PASSIVE) && target->ToCreature()->IsAIEnabled)
{
- if (target->isPet())
+ if (target->IsPet())
target->ToCreature()->AI()->AttackedBy(this); // PetAI has special handler before AttackStart()
else
target->ToCreature()->AI()->AttackStart(this);
@@ -10540,13 +10540,13 @@ void Unit::CombatStart(Unit* target, bool initialAggro)
void Unit::SetInCombatState(bool PvP, Unit* enemy)
{
// only alive units can be in combat
- if (!isAlive())
+ if (!IsAlive())
return;
if (PvP)
m_CombatTimer = 5000;
- if (isInCombat() || HasUnitState(UNIT_STATE_EVADE))
+ if (IsInCombat() || HasUnitState(UNIT_STATE_EVADE))
return;
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
@@ -10570,7 +10570,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
creature->GetFormation()->MemberAttackStart(creature, enemy);
}
- if (isPet())
+ if (IsPet())
{
UpdateSpeed(MOVE_RUN, true);
UpdateSpeed(MOVE_SWIM, true);
@@ -10603,14 +10603,14 @@ void Unit::ClearInCombat()
if (HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED))
SetUInt32Value(UNIT_DYNAMIC_FLAGS, creature->GetCreatureTemplate()->dynamicflags);
- if (creature->isPet())
+ if (creature->IsPet())
{
if (Unit* owner = GetOwner())
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
if (owner->GetSpeedRate(UnitMoveType(i)) > GetSpeedRate(UnitMoveType(i)))
SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true);
}
- else if (!isCharmed())
+ else if (!IsCharmed())
return;
}
else
@@ -10621,14 +10621,14 @@ void Unit::ClearInCombat()
bool Unit::isTargetableForAttack(bool checkFakeDeath) const
{
- if (!isAlive())
+ if (!IsAlive())
return false;
if (HasFlag(UNIT_FIELD_FLAGS,
UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC))
return false;
- if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->isGameMaster())
+ if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->IsGameMaster())
return false;
return !HasUnitState(UNIT_STATE_UNATTACKABLE) && (!checkFakeDeath || !HasUnitState(UNIT_STATE_DIED));
@@ -10650,7 +10650,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
// can't attack unattackable units or GMs
if (target->HasUnitState(UNIT_STATE_UNATTACKABLE)
- || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->isGameMaster()))
+ || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->IsGameMaster()))
return false;
// can't attack own vehicle or passenger
@@ -10659,11 +10659,11 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
return false;
// can't attack invisible (ignore stealth for aoe spells) also if the area being looked at is from a spell use the dynamic object created instead of the casting unit.
- if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && (obj ? !obj->canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()) : !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea())))
+ if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && (obj ? !obj->CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()) : !CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea())))
return false;
// can't attack dead
- if ((!bySpell || !bySpell->IsAllowingDeadTarget()) && !target->isAlive())
+ if ((!bySpell || !bySpell->IsAllowingDeadTarget()) && !target->IsAlive())
return false;
// can't attack untargetable
@@ -10709,7 +10709,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
Player const* player = target->GetTypeId() == TYPEID_PLAYER ? target->ToPlayer() : ToPlayer();
Unit const* creature = target->GetTypeId() == TYPEID_UNIT ? target : this;
- if (FactionTemplateEntry const* factionTemplate = creature->getFactionTemplateEntry())
+ if (FactionTemplateEntry const* factionTemplate = creature->GetFactionTemplateEntry())
{
if (!(player->GetReputationMgr().GetForcedRankIfAny(factionTemplate)))
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->faction))
@@ -10771,7 +10771,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
// can't assist unattackable units or GMs
if (target->HasUnitState(UNIT_STATE_UNATTACKABLE)
- || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->isGameMaster()))
+ || (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->IsGameMaster()))
return false;
// can't assist own vehicle or passenger
@@ -10780,11 +10780,11 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
return false;
// can't assist invisible
- if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
+ if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !CanSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
return false;
// can't assist dead
- if ((!bySpell || !bySpell->IsAllowingDeadTarget()) && !target->isAlive())
+ if ((!bySpell || !bySpell->IsAllowingDeadTarget()) && !target->IsAlive())
return false;
// can't assist untargetable
@@ -10856,7 +10856,7 @@ int32 Unit::ModifyHealth(int32 dVal)
return 0;
// Part of Evade mechanics. Only track health lost, not gained.
- if (dVal < 0 && GetTypeId() != TYPEID_PLAYER && !isPet())
+ if (dVal < 0 && GetTypeId() != TYPEID_PLAYER && !IsPet())
SetLastDamagedTime(time(NULL));
int32 curHealth = (int32)GetHealth();
@@ -11088,7 +11088,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
if (GetTypeId() == TYPEID_UNIT)
{
Unit* pOwner = GetCharmerOrOwner();
- if ((isPet() || isGuardian()) && !isInCombat() && pOwner) // Must check for owner or crash on "Tame Beast"
+ if ((IsPet() || IsGuardian()) && !IsInCombat() && pOwner) // Must check for owner or crash on "Tame Beast"
{
// For every yard over 5, increase speed by 0.01
// to help prevent pet from lagging behind and despawning
@@ -11180,7 +11180,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
// and do it only for real sent packets and use run for run/mounted as client expected
++ToPlayer()->m_forced_speed_changes[mtype];
- if (!isInCombat())
+ if (!IsInCombat())
if (Pet* pet = ToPlayer()->GetPet())
pet->SetSpeed(mtype, m_speed_rate[mtype], forced);
}
@@ -11258,11 +11258,11 @@ bool Unit::CanHaveThreatList() const
return false;
// only alive units can have threat list
- if (!isAlive() || isDying())
+ if (!IsAlive() || isDying())
return false;
// totems can not have threat list
- if (ToCreature()->isTotem())
+ if (ToCreature()->IsTotem())
return false;
// vehicles can not have threat list
@@ -11312,7 +11312,7 @@ void Unit::TauntApply(Unit* taunter)
{
ASSERT(GetTypeId() == TYPEID_UNIT);
- if (!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && taunter->ToPlayer()->isGameMaster()))
+ if (!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && taunter->ToPlayer()->IsGameMaster()))
return;
if (!CanHaveThreatList())
@@ -11323,7 +11323,7 @@ void Unit::TauntApply(Unit* taunter)
if (creature->HasReactState(REACT_PASSIVE))
return;
- Unit* target = getVictim();
+ Unit* target = GetVictim();
if (target && target == taunter)
return;
@@ -11340,7 +11340,7 @@ void Unit::TauntFadeOut(Unit* taunter)
{
ASSERT(GetTypeId() == TYPEID_UNIT);
- if (!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && taunter->ToPlayer()->isGameMaster()))
+ if (!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && taunter->ToPlayer()->IsGameMaster()))
return;
if (!CanHaveThreatList())
@@ -11351,7 +11351,7 @@ void Unit::TauntFadeOut(Unit* taunter)
if (creature->HasReactState(REACT_PASSIVE))
return;
- Unit* target = getVictim();
+ Unit* target = GetVictim();
if (!target || target != taunter)
return;
@@ -11388,8 +11388,8 @@ Unit* Creature::SelectVictim()
Unit* caster = tauntAuras.back()->GetCaster();
// The last taunt aura caster is alive an we are happy to attack him
- if (caster && caster->isAlive())
- return getVictim();
+ if (caster && caster->IsAlive())
+ return GetVictim();
else if (tauntAuras.size() > 1)
{
// We do not have last taunt aura caster but we have more taunt auras,
@@ -11401,7 +11401,7 @@ Unit* Creature::SelectVictim()
{
--aura;
caster = (*aura)->GetCaster();
- if (caster && canSeeOrDetect(caster, true) && IsValidAttackTarget(caster) && caster->isInAccessiblePlaceFor(ToCreature()))
+ if (caster && CanSeeOrDetect(caster, true) && IsValidAttackTarget(caster) && caster->isInAccessiblePlaceFor(ToCreature()))
{
target = caster;
break;
@@ -11409,7 +11409,7 @@ Unit* Creature::SelectVictim()
} while (aura != tauntAuras.begin());
}
else
- target = getVictim();
+ target = GetVictim();
}
if (CanHaveThreatList())
@@ -11422,17 +11422,17 @@ Unit* Creature::SelectVictim()
{
// We have player pet probably
target = getAttackerForHelper();
- if (!target && isSummon())
+ if (!target && IsSummon())
{
if (Unit* owner = ToTempSummon()->GetOwner())
{
- if (owner->isInCombat())
+ if (owner->IsInCombat())
target = owner->getAttackerForHelper();
if (!target)
{
for (ControlList::const_iterator itr = owner->m_Controlled.begin(); itr != owner->m_Controlled.end(); ++itr)
{
- if ((*itr)->isInCombat())
+ if ((*itr)->IsInCombat())
{
target = (*itr)->getAttackerForHelper();
if (target)
@@ -11446,7 +11446,7 @@ Unit* Creature::SelectVictim()
else
return NULL;
- if (target && _IsTargetAcceptable(target) && canCreatureAttack(target))
+ if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target))
{
SetInFront(target);
return target;
@@ -11466,7 +11466,7 @@ Unit* Creature::SelectVictim()
// Note: creature does not have targeted movement generator but has attacker in this case
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
{
- if ((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
+ if ((*itr) && !CanCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
&& !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
return NULL;
}
@@ -11480,7 +11480,7 @@ Unit* Creature::SelectVictim()
{
target = SelectNearestTargetInAttackDistance(m_CombatDistance ? m_CombatDistance : ATTACK_DISTANCE);
- if (target && _IsTargetAcceptable(target) && canCreatureAttack(target))
+ if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target))
return target;
}
@@ -11702,13 +11702,13 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,
return 1.0f;
// test pet/charm masters instead pets/charmeds
- Unit const* targetOwner = GetCharmerOrOwner();
+ Unit const* tarGetOwner = GetCharmerOrOwner();
Unit const* casterOwner = caster->GetCharmerOrOwner();
// Duration of crowd control abilities on pvp target is limited by 10 sec. (2.2.0)
if (limitduration > 0 && duration > limitduration)
{
- Unit const* target = targetOwner ? targetOwner : this;
+ Unit const* target = tarGetOwner ? tarGetOwner : this;
Unit const* source = casterOwner ? casterOwner : caster;
if ((target->GetTypeId() == TYPEID_PLAYER
@@ -11737,7 +11737,7 @@ float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,
}
// Some diminishings applies to mobs too (for example, Stun)
else if ((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER
- && ((targetOwner ? (targetOwner->GetTypeId() == TYPEID_PLAYER) : (GetTypeId() == TYPEID_PLAYER))
+ && ((tarGetOwner ? (tarGetOwner->GetTypeId() == TYPEID_PLAYER) : (GetTypeId() == TYPEID_PLAYER))
|| (GetTypeId() == TYPEID_UNIT && ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH)))
|| GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
{
@@ -12235,7 +12235,7 @@ int32 Unit::GetCreatePowers(Powers power) const
case POWER_FOCUS:
if (GetTypeId() == TYPEID_PLAYER && getClass() == CLASS_HUNTER)
return 100;
- return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
+ return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
case POWER_ENERGY:
return 100;
case POWER_RUNIC_POWER:
@@ -12351,7 +12351,7 @@ void Unit::UpdateCharmAI()
if (i_disabledAI) // disabled AI must be primary AI
{
- if (!isCharmed())
+ if (!IsCharmed())
{
delete i_AI;
i_AI = i_disabledAI;
@@ -12360,7 +12360,7 @@ void Unit::UpdateCharmAI()
}
else
{
- if (isCharmed())
+ if (IsCharmed())
{
i_disabledAI = i_AI;
if (isPossessed() || IsVehicle())
@@ -13196,7 +13196,7 @@ Player* Unit::GetSpellModOwner() const
{
if (GetTypeId() == TYPEID_PLAYER)
return (Player*)this;
- if (ToCreature()->isPet() || ToCreature()->isTotem())
+ if (ToCreature()->IsPet() || ToCreature()->IsTotem())
{
Unit* owner = GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
@@ -13426,8 +13426,8 @@ Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
VisitNearbyObject(dist, searcher);
// remove current target
- if (getVictim())
- targets.remove(getVictim());
+ if (GetVictim())
+ targets.remove(GetVictim());
if (exclude)
targets.remove(exclude);
@@ -13435,7 +13435,7 @@ Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
// remove not LoS targets
for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end();)
{
- if (!IsWithinLOSInMap(*tIter) || (*tIter)->isTotem() || (*tIter)->isSpiritService() || (*tIter)->GetCreatureType() == CREATURE_TYPE_CRITTER)
+ if (!IsWithinLOSInMap(*tIter) || (*tIter)->IsTotem() || (*tIter)->IsSpiritService() || (*tIter)->GetCreatureType() == CREATURE_TYPE_CRITTER)
targets.erase(tIter++);
else
++tIter;
@@ -13498,7 +13498,7 @@ void Unit::ApplyCastTimePercentMod(float val, bool apply)
uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const
{
// Not apply this to creature casted spells with casttime == 0
- if (CastingTime == 0 && GetTypeId() == TYPEID_UNIT && !ToCreature()->isPet())
+ if (CastingTime == 0 && GetTypeId() == TYPEID_UNIT && !ToCreature()->IsPet())
return 3500;
if (CastingTime > 7000) CastingTime = 7000;
@@ -13598,7 +13598,7 @@ void Unit::UpdateAuraForGroup(uint8 slot)
player->SetAuraUpdateMaskForRaid(slot);
}
}
- else if (GetTypeId() == TYPEID_UNIT && ToCreature()->isPet())
+ else if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsPet())
{
Pet* pet = ((Pet*)this);
if (pet->isControlled())
@@ -14077,7 +14077,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
}
// Do KILL and KILLED procs. KILL proc is called only for the unit who landed the killing blow (and its owner - for pets and totems) regardless of who tapped the victim
- if (isPet() || isTotem())
+ if (IsPet() || IsTotem())
if (Unit* owner = GetOwner())
owner->ProcDamageAndSpell(victim, PROC_FLAG_KILL, PROC_FLAG_NONE, PROC_EX_NONE, 0);
@@ -14131,7 +14131,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (player)
{
Pet* pet = player->GetPet();
- if (pet && pet->isAlive() && pet->isControlled())
+ if (pet && pet->IsAlive() && pet->isControlled())
pet->AI()->KilledUnit(victim);
}
@@ -14170,7 +14170,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
{
TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamageNotPlayer");
- if (!creature->isPet())
+ if (!creature->IsPet())
{
creature->DeleteThreatList();
CreatureTemplate const* cInfo = creature->GetCreatureTemplate();
@@ -14450,8 +14450,8 @@ void Unit::SetStunned(bool apply)
}
else
{
- if (isAlive() && getVictim())
- SetTarget(getVictim()->GetGUID());
+ if (IsAlive() && GetVictim())
+ SetTarget(GetVictim()->GetGUID());
// don't remove UNIT_FLAG_STUNNED for pet when owner is mounted (disabled pet's interface)
Unit* owner = GetOwner();
@@ -14554,12 +14554,12 @@ void Unit::SetFeared(bool apply)
}
else
{
- if (isAlive())
+ if (IsAlive())
{
if (GetMotionMaster()->GetCurrentMovementGeneratorType() == FLEEING_MOTION_TYPE)
GetMotionMaster()->MovementExpired();
- if (getVictim())
- SetTarget(getVictim()->GetGUID());
+ if (GetVictim())
+ SetTarget(GetVictim()->GetGUID());
}
}
@@ -14576,12 +14576,12 @@ void Unit::SetConfused(bool apply)
}
else
{
- if (isAlive())
+ if (IsAlive())
{
if (GetMotionMaster()->GetCurrentMovementGeneratorType() == CONFUSED_MOTION_TYPE)
GetMotionMaster()->MovementExpired();
- if (getVictim())
- SetTarget(getVictim()->GetGUID());
+ if (GetVictim())
+ SetTarget(GetVictim()->GetGUID());
}
}
@@ -14742,7 +14742,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
void Unit::RemoveCharmedBy(Unit* charmer)
{
- if (!isCharmed())
+ if (!IsCharmed())
return;
if (!charmer)
@@ -14787,7 +14787,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
{
creature->AIM_Initialize();
- if (creature->AI() && charmer && charmer->isAlive())
+ if (creature->AI() && charmer && charmer->IsAlive())
creature->AI()->AttackStart(charmer);
}
}
@@ -14845,7 +14845,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
// a guardian should always have charminfo
if (charmer->GetTypeId() == TYPEID_PLAYER && this != charmer->GetFirstControlled())
charmer->ToPlayer()->SendRemoveControlBar();
- else if (GetTypeId() == TYPEID_PLAYER || (GetTypeId() == TYPEID_UNIT && !ToCreature()->isGuardian()))
+ else if (GetTypeId() == TYPEID_PLAYER || (GetTypeId() == TYPEID_UNIT && !ToCreature()->IsGuardian()))
DeleteCharmInfo();
}
@@ -14866,7 +14866,7 @@ void Unit::RestoreFaction()
if (CreatureTemplate const* cinfo = ToCreature()->GetCreatureTemplate()) // normal creature
{
- FactionTemplateEntry const* faction = getFactionTemplateEntry();
+ FactionTemplateEntry const* faction = GetFactionTemplateEntry();
setFaction((faction && faction->friendlyMask & 0x004) ? cinfo->faction_H : cinfo->faction_A);
}
}
@@ -14992,33 +14992,33 @@ void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* Target = itr->getSource();
+ Player* Target = itr->GetSource();
// IsHostileTo check duel and controlled by enemy
if (Target && Target->GetSubGroup() == subgroup && !IsHostileTo(Target))
{
- if (Target->isAlive() && IsInMap(Target))
+ if (Target->IsAlive() && IsInMap(Target))
TagUnitMap.push_back(Target);
if (Guardian* pet = Target->GetGuardianPet())
- if (pet->isAlive() && IsInMap(Target))
+ if (pet->IsAlive() && IsInMap(Target))
TagUnitMap.push_back(pet);
}
}
}
else
{
- if (owner->isAlive() && (owner == this || IsInMap(owner)))
+ if (owner->IsAlive() && (owner == this || IsInMap(owner)))
TagUnitMap.push_back(owner);
if (Guardian* pet = owner->GetGuardianPet())
- if (pet->isAlive() && (pet == this || IsInMap(pet)))
+ if (pet->IsAlive() && (pet == this || IsInMap(pet)))
TagUnitMap.push_back(pet);
}
}
bool Unit::IsContestedGuard() const
{
- if (FactionTemplateEntry const* entry = getFactionTemplateEntry())
+ if (FactionTemplateEntry const* entry = GetFactionTemplateEntry())
return entry->IsContestedGuardFaction();
return false;
@@ -15041,7 +15041,7 @@ Aura* Unit::AddAura(uint32 spellId, Unit* target)
if (!spellInfo)
return NULL;
- if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
+ if (!target->IsAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
return NULL;
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
@@ -15177,14 +15177,14 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
RemoveNotOwnSingleTargetAuras(newPhaseMask); // we can lost access to caster or target
// modify hostile references for new phasemask, some special cases deal with hostile references themselves
- if (GetTypeId() == TYPEID_UNIT || (!ToPlayer()->isGameMaster() && !ToPlayer()->GetSession()->PlayerLogout()))
+ if (GetTypeId() == TYPEID_UNIT || (!ToPlayer()->IsGameMaster() && !ToPlayer()->GetSession()->PlayerLogout()))
{
HostileRefManager& refManager = getHostileRefManager();
HostileReference* ref = refManager.getFirst();
while (ref)
{
- if (Unit* unit = ref->getSource()->getOwner())
+ if (Unit* unit = ref->GetSource()->GetOwner())
if (Creature* creature = unit->ToCreature())
refManager.setOnlineOfflineState(creature, creature->InSamePhase(newPhaseMask));
@@ -15300,7 +15300,7 @@ float Unit::GetCombatRatingReduction(CombatRating cr) const
if (Player const* player = ToPlayer())
return player->GetRatingBonusValue(cr);
// Player's pet get resilience from owner
- else if (isPet() && GetOwner())
+ else if (IsPet() && GetOwner())
if (Player* owner = GetOwner()->ToPlayer())
return owner->GetRatingBonusValue(cr);
@@ -15854,7 +15854,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
// Must be called only from aura handler
ASSERT(aurApp);
- if (!isAlive() || GetVehicleKit() == vehicle || vehicle->GetBase()->IsOnVehicle(this))
+ if (!IsAlive() || GetVehicleKit() == vehicle || vehicle->GetBase()->IsOnVehicle(this))
return;
if (m_vehicle)
@@ -15873,7 +15873,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
if (Player* player = ToPlayer())
{
- if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && player->isInCombat())
+ if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && player->IsInCombat())
{
vehicle->GetBase()->RemoveAura(const_cast<AuraApplication*>(aurApp));
return;
@@ -16493,9 +16493,9 @@ void Unit::RewardRage(uint32 baseRage, bool attacker)
void Unit::StopAttackFaction(uint32 faction_id)
{
- if (Unit* victim = getVictim())
+ if (Unit* victim = GetVictim())
{
- if (victim->getFactionTemplateEntry()->faction == faction_id)
+ if (victim->GetFactionTemplateEntry()->faction == faction_id)
{
AttackStop();
if (IsNonMeleeSpellCasted(false))
@@ -16510,7 +16510,7 @@ void Unit::StopAttackFaction(uint32 faction_id)
AttackerSet const& attackers = getAttackers();
for (AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();)
{
- if ((*itr)->getFactionTemplateEntry()->faction == faction_id)
+ if ((*itr)->GetFactionTemplateEntry()->faction == faction_id)
{
(*itr)->AttackStop();
itr = attackers.begin();
@@ -16866,7 +16866,7 @@ void Unit::ReleaseFocus(Spell const* focusSpell)
return;
_focusSpell = NULL;
- if (Unit* victim = getVictim())
+ if (Unit* victim = GetVictim())
SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID());
else
SetUInt64Value(UNIT_FIELD_TARGET, 0);
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index f164b04644b..3e8abdd404b 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1325,7 +1325,7 @@ class Unit : public WorldObject
void RemoveAllAttackers();
AttackerSet const& getAttackers() const { return m_attackers; }
bool isAttackingPlayer() const;
- Unit* getVictim() const { return m_attacking; }
+ Unit* GetVictim() const { return m_attacking; }
void CombatStop(bool includingCast = false);
void CombatStopWithPets(bool includingCast = false);
@@ -1341,11 +1341,11 @@ class Unit : public WorldObject
uint32 HasUnitTypeMask(uint32 mask) const { return mask & m_unitTypeMask; }
void AddUnitTypeMask(uint32 mask) { m_unitTypeMask |= mask; }
- bool isSummon() const { return m_unitTypeMask & UNIT_MASK_SUMMON; }
- bool isGuardian() const { return m_unitTypeMask & UNIT_MASK_GUARDIAN; }
- bool isPet() const { return m_unitTypeMask & UNIT_MASK_PET; }
- bool isHunterPet() const{ return m_unitTypeMask & UNIT_MASK_HUNTER_PET; }
- bool isTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; }
+ bool IsSummon() const { return m_unitTypeMask & UNIT_MASK_SUMMON; }
+ bool IsGuardian() const { return m_unitTypeMask & UNIT_MASK_GUARDIAN; }
+ bool IsPet() const { return m_unitTypeMask & UNIT_MASK_PET; }
+ bool IsHunterPet() const{ return m_unitTypeMask & UNIT_MASK_HUNTER_PET; }
+ bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; }
bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; }
uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
@@ -1406,7 +1406,7 @@ class Unit : public WorldObject
// faction template id
uint32 getFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); }
void setFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction); }
- FactionTemplateEntry const* getFactionTemplateEntry() const;
+ FactionTemplateEntry const* GetFactionTemplateEntry() const;
ReputationRank GetReactionTo(Unit const* target) const;
ReputationRank static GetFactionReactionTo(FactionTemplateEntry const* factionTemplateEntry, Unit const* target);
@@ -1497,26 +1497,26 @@ class Unit : public WorldObject
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType) const;
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const;
- bool isVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
- bool isTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
- bool isQuestGiver() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); }
- bool isGossip() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }
- bool isTaxi() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_FLIGHTMASTER); }
- bool isGuildMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PETITIONER); }
- bool isBattleMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEMASTER); }
- bool isBanker() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BANKER); }
- bool isInnkeeper() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_INNKEEPER); }
- bool isSpiritHealer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER); }
- bool isSpiritGuide() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITGUIDE); }
- bool isTabardDesigner()const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TABARDDESIGNER); }
- bool isAuctioner() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_AUCTIONEER); }
- bool isArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); }
- bool isServiceProvider() const;
- bool isSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); }
-
- bool isInFlight() const { return HasUnitState(UNIT_STATE_IN_FLIGHT); }
-
- bool isInCombat() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); }
+ bool IsVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
+ bool IsTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
+ bool IsQuestGiver() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); }
+ bool IsGossip() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }
+ bool IsTaxi() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_FLIGHTMASTER); }
+ bool IsGuildMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PETITIONER); }
+ bool IsBattleMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEMASTER); }
+ bool IsBanker() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BANKER); }
+ bool IsInnkeeper() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_INNKEEPER); }
+ bool IsSpiritHealer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER); }
+ bool IsSpiritGuide() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITGUIDE); }
+ bool IsTabardDesigner()const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TABARDDESIGNER); }
+ bool IsAuctioner() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_AUCTIONEER); }
+ bool IsArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); }
+ bool IsServiceProvider() const;
+ bool IsSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); }
+
+ bool IsInFlight() const { return HasUnitState(UNIT_STATE_IN_FLIGHT); }
+
+ bool IsInCombat() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); }
void CombatStart(Unit* target, bool initialAggro = true);
void SetInCombatState(bool PvP, Unit* enemy = NULL);
void SetInCombatWith(Unit* enemy);
@@ -1630,7 +1630,7 @@ class Unit : public WorldObject
void SendClearTarget();
- bool isAlive() const { return (m_deathState == ALIVE); }
+ bool IsAlive() const { return (m_deathState == ALIVE); }
bool isDying() const { return (m_deathState == JUST_DIED); }
bool isDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); }
DeathState getDeathState() const { return m_deathState; }
@@ -1653,7 +1653,7 @@ class Unit : public WorldObject
bool IsControlledByPlayer() const { return m_ControlledByPlayer; }
uint64 GetCharmerOrOwnerGUID() const;
uint64 GetCharmerOrOwnerOrOwnGUID() const;
- bool isCharmedOwnedByPlayerOrPlayer() const { return IS_PLAYER_GUID(GetCharmerOrOwnerOrOwnGUID()); }
+ bool IsCharmedOwnedByPlayerOrPlayer() const { return IS_PLAYER_GUID(GetCharmerOrOwnerOrOwnGUID()); }
Player* GetSpellModOwner() const;
@@ -1680,7 +1680,7 @@ class Unit : public WorldObject
Unit* GetFirstControlled() const;
void RemoveAllControlled();
- bool isCharmed() const { return GetCharmerGUID() != 0; }
+ bool IsCharmed() const { return GetCharmerGUID() != 0; }
bool isPossessed() const { return HasUnitState(UNIT_STATE_POSSESSED); }
bool isPossessedByPlayer() const;
bool isPossessing() const;
@@ -2132,14 +2132,14 @@ class Unit : public WorldObject
virtual bool isBeingLoaded() const { return false;}
bool IsDuringRemoveFromWorld() const {return m_duringRemoveFromWorld;}
- Pet* ToPet() { if (isPet()) return reinterpret_cast<Pet*>(this); else return NULL; }
- Pet const* ToPet() const { if (isPet()) return reinterpret_cast<Pet const*>(this); else return NULL; }
+ Pet* ToPet() { if (IsPet()) return reinterpret_cast<Pet*>(this); else return NULL; }
+ Pet const* ToPet() const { if (IsPet()) return reinterpret_cast<Pet const*>(this); else return NULL; }
- Totem* ToTotem() { if (isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
- Totem const* ToTotem() const { if (isTotem()) return reinterpret_cast<Totem const*>(this); else return NULL; }
+ Totem* ToTotem() { if (IsTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
+ Totem const* ToTotem() const { if (IsTotem()) return reinterpret_cast<Totem const*>(this); else return NULL; }
- TempSummon* ToTempSummon() { if (isSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; }
- TempSummon const* ToTempSummon() const { if (isSummon()) return reinterpret_cast<TempSummon const*>(this); else return NULL; }
+ TempSummon* ToTempSummon() { if (IsSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; }
+ TempSummon const* ToTempSummon() const { if (IsSummon()) return reinterpret_cast<TempSummon const*>(this); else return NULL; }
void SetTarget(uint64 guid);
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index 54e1ca6a5d6..df482411a0d 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -1330,25 +1330,21 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
itr->second.equipement_id_prev = creature->GetCurrentEquipmentId();
itr->second.modelid_prev = creature->GetDisplayId();
creature->LoadEquipment(itr->second.equipment_id, true);
- if (itr->second.modelid > 0 && itr->second.modelid_prev != itr->second.modelid)
+ if (itr->second.modelid > 0 && itr->second.modelid_prev != itr->second.modelid &&
+ sObjectMgr->GetCreatureModelInfo(itr->second.modelid))
{
- if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(itr->second.modelid))
- {
- creature->SetDisplayId(itr->second.modelid);
- creature->SetNativeDisplayId(itr->second.modelid);
- }
+ creature->SetDisplayId(itr->second.modelid);
+ creature->SetNativeDisplayId(itr->second.modelid);
}
}
else
{
creature->LoadEquipment(itr->second.equipement_id_prev, true);
- if (itr->second.modelid_prev > 0 && itr->second.modelid_prev != itr->second.modelid)
+ if (itr->second.modelid_prev > 0 && itr->second.modelid_prev != itr->second.modelid &&
+ sObjectMgr->GetCreatureModelInfo(itr->second.modelid_prev))
{
- if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(itr->second.modelid_prev))
- {
- creature->SetDisplayId(itr->second.modelid_prev);
- creature->SetNativeDisplayId(itr->second.modelid_prev);
- }
+ creature->SetDisplayId(itr->second.modelid_prev);
+ creature->SetNativeDisplayId(itr->second.modelid_prev);
}
}
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 2fb304c52e7..03b0cf90246 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -197,7 +197,7 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
Unit const* summoner = NULL;
// Check summoners for party
- if (clickee->isSummon())
+ if (clickee->IsSummon())
summoner = clickee->ToTempSummon()->GetSummoner();
if (!summoner)
summoner = clickee;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 088189737a9..363d6927cc1 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -76,17 +76,17 @@ void VisibleChangesNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- if (iter->getSource() == &i_object)
+ if (iter->GetSource() == &i_object)
continue;
- iter->getSource()->UpdateVisibilityOf(&i_object);
+ iter->GetSource()->UpdateVisibilityOf(&i_object);
- if (iter->getSource()->HasSharedVision())
+ if (iter->GetSource()->HasSharedVision())
{
- for (SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
- i != iter->getSource()->GetSharedVisionList().end(); ++i)
+ for (SharedVisionList::const_iterator i = iter->GetSource()->GetSharedVisionList().begin();
+ i != iter->GetSource()->GetSharedVisionList().end(); ++i)
{
- if ((*i)->m_seer == iter->getSource())
+ if ((*i)->m_seer == iter->GetSource())
(*i)->UpdateVisibilityOf(&i_object);
}
}
@@ -96,29 +96,29 @@ void VisibleChangesNotifier::Visit(PlayerMapType &m)
void VisibleChangesNotifier::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
- if (iter->getSource()->HasSharedVision())
- for (SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
- i != iter->getSource()->GetSharedVisionList().end(); ++i)
- if ((*i)->m_seer == iter->getSource())
+ if (iter->GetSource()->HasSharedVision())
+ for (SharedVisionList::const_iterator i = iter->GetSource()->GetSharedVisionList().begin();
+ i != iter->GetSource()->GetSharedVisionList().end(); ++i)
+ if ((*i)->m_seer == iter->GetSource())
(*i)->UpdateVisibilityOf(&i_object);
}
void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
- if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
- if (Player* caster = (Player*)iter->getSource()->GetCaster())
- if (caster->m_seer == iter->getSource())
+ if (IS_PLAYER_GUID(iter->GetSource()->GetCasterGUID()))
+ if (Player* caster = (Player*)iter->GetSource()->GetCaster())
+ if (caster->m_seer == iter->GetSource())
caster->UpdateVisibilityOf(&i_object);
}
inline void CreatureUnitRelocationWorker(Creature* c, Unit* u)
{
- if (!u->isAlive() || !c->isAlive() || c == u || u->isInFlight())
+ if (!u->IsAlive() || !c->IsAlive() || c == u || u->IsInFlight())
return;
if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STATE_SIGHTLESS))
- if (c->IsAIEnabled && c->canSeeOrDetect(u, false, true))
+ if (c->IsAIEnabled && c->CanSeeOrDetect(u, false, true))
c->AI()->MoveInLineOfSight_Safe(u);
}
@@ -126,7 +126,7 @@ void PlayerRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Player* player = iter->getSource();
+ Player* player = iter->GetSource();
vis_guids.erase(player->GetGUID());
@@ -145,7 +145,7 @@ void PlayerRelocationNotifier::Visit(CreatureMapType &m)
for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
- Creature* c = iter->getSource();
+ Creature* c = iter->GetSource();
vis_guids.erase(c->GetGUID());
@@ -160,7 +160,7 @@ void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Player* player = iter->getSource();
+ Player* player = iter->GetSource();
if (!player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
player->UpdateVisibilityOf(&i_creature);
@@ -171,12 +171,12 @@ void CreatureRelocationNotifier::Visit(PlayerMapType &m)
void CreatureRelocationNotifier::Visit(CreatureMapType &m)
{
- if (!i_creature.isAlive())
+ if (!i_creature.IsAlive())
return;
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Creature* c = iter->getSource();
+ Creature* c = iter->GetSource();
CreatureUnitRelocationWorker(&i_creature, c);
if (!c->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
@@ -188,7 +188,7 @@ void DelayedUnitRelocation::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Creature* unit = iter->getSource();
+ Creature* unit = iter->GetSource();
if (!unit->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
continue;
@@ -206,7 +206,7 @@ void DelayedUnitRelocation::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Player* player = iter->getSource();
+ Player* player = iter->GetSource();
WorldObject const* viewPoint = player->m_seer;
if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
@@ -234,7 +234,7 @@ void AIRelocationNotifier::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Creature* c = iter->getSource();
+ Creature* c = iter->GetSource();
CreatureUnitRelocationWorker(c, &i_unit);
if (isCreature)
CreatureUnitRelocationWorker((Creature*)&i_unit, c);
@@ -245,7 +245,7 @@ void MessageDistDeliverer::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Player* target = iter->getSource();
+ Player* target = iter->GetSource();
if (!target->InSamePhase(i_phaseMask))
continue;
@@ -270,7 +270,7 @@ void MessageDistDeliverer::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- Creature* target = iter->getSource();
+ Creature* target = iter->GetSource();
if (!target->InSamePhase(i_phaseMask))
continue;
@@ -292,7 +292,7 @@ void MessageDistDeliverer::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- DynamicObject* target = iter->getSource();
+ DynamicObject* target = iter->GetSource();
if (!target->InSamePhase(i_phaseMask))
continue;
@@ -325,14 +325,14 @@ void ObjectUpdater::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- if (iter->getSource()->IsInWorld())
- iter->getSource()->Update(i_timeDiff);
+ if (iter->GetSource()->IsInWorld())
+ iter->GetSource()->Update(i_timeDiff);
}
}
bool AnyDeadUnitObjectInRangeCheck::operator()(Player* u)
{
- return !u->isAlive() && !u->HasAuraType(SPELL_AURA_GHOST) && i_searchObj->IsWithinDistInMap(u, i_range);
+ return !u->IsAlive() && !u->HasAuraType(SPELL_AURA_GHOST) && i_searchObj->IsWithinDistInMap(u, i_range);
}
bool AnyDeadUnitObjectInRangeCheck::operator()(Corpse* u)
@@ -342,7 +342,7 @@ bool AnyDeadUnitObjectInRangeCheck::operator()(Corpse* u)
bool AnyDeadUnitObjectInRangeCheck::operator()(Creature* u)
{
- return !u->isAlive() && i_searchObj->IsWithinDistInMap(u, i_range);
+ return !u->IsAlive() && i_searchObj->IsWithinDistInMap(u, i_range);
}
bool AnyDeadUnitSpellTargetInRangeCheck::operator()(Player* u)
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 073546d7764..6984321e55b 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -111,7 +111,7 @@ namespace Trinity
template<class T> void updateObjects(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
- iter->getSource()->Update(i_timeDiff);
+ iter->GetSource()->Update(i_timeDiff);
}
void Visit(PlayerMapType &m) { updateObjects<Player>(m); }
@@ -247,8 +247,8 @@ namespace Trinity
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_GAMEOBJECT))
return;
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
void Visit(PlayerMapType &m)
@@ -256,16 +256,16 @@ namespace Trinity
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_PLAYER))
return;
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
void Visit(CreatureMapType &m)
{
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CREATURE))
return;
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
void Visit(CorpseMapType &m)
@@ -273,8 +273,8 @@ namespace Trinity
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CORPSE))
return;
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
void Visit(DynamicObjectMapType &m)
@@ -282,8 +282,8 @@ namespace Trinity
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_DYNAMICOBJECT))
return;
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
void Visit(AreaTriggerMapType &m)
@@ -291,8 +291,8 @@ namespace Trinity
if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_AREATRIGGER))
return;
for (AreaTriggerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
@@ -355,8 +355,8 @@ namespace Trinity
void Visit(GameObjectMapType& m)
{
for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(_phaseMask))
- _func(itr->getSource());
+ if (itr->GetSource()->InSamePhase(_phaseMask))
+ _func(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
@@ -479,8 +479,8 @@ namespace Trinity
void Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
@@ -546,8 +546,8 @@ namespace Trinity
void Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
@@ -566,8 +566,8 @@ namespace Trinity
void Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_searcher) && itr->getSource()->IsWithinDist(i_searcher, i_dist))
- i_do(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_searcher) && itr->GetSource()->IsWithinDist(i_searcher, i_dist))
+ i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
@@ -754,7 +754,7 @@ namespace Trinity
MostHPMissingInRange(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && u->isInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && u->GetMaxHealth() - u->GetHealth() > i_hp)
+ if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && u->GetMaxHealth() - u->GetHealth() > i_hp)
{
i_hp = u->GetMaxHealth() - u->GetHealth();
return true;
@@ -773,8 +773,8 @@ namespace Trinity
FriendlyCCedInRange(Unit const* obj, float range) : i_obj(obj), i_range(range) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && u->isInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
- (u->isFeared() || u->isCharmed() || u->isFrozen() || u->HasUnitState(UNIT_STATE_STUNNED) || u->HasUnitState(UNIT_STATE_CONFUSED)))
+ if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
+ (u->isFeared() || u->IsCharmed() || u->isFrozen() || u->HasUnitState(UNIT_STATE_STUNNED) || u->HasUnitState(UNIT_STATE_CONFUSED)))
{
return true;
}
@@ -791,7 +791,7 @@ namespace Trinity
FriendlyMissingBuffInRange(Unit const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && u->isInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
+ if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
!(u->HasAura(i_spell)))
{
return true;
@@ -810,7 +810,7 @@ namespace Trinity
AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u))
+ if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u))
return true;
else
return false;
@@ -827,13 +827,13 @@ namespace Trinity
AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
bool operator()(Unit* u)
{
- if (!u->isAlive())
+ if (!u->IsAlive())
return false;
if (u->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
return false;
- if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
+ if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem())
return false;
if (!u->isTargetableForAttack(false))
@@ -855,12 +855,12 @@ namespace Trinity
bool operator()(const Unit* u)
{
- return u->isAlive()
+ return u->IsAlive()
&& i_funit->IsWithinDistInMap(u, i_range)
&& !i_funit->IsFriendlyTo(u)
&& i_funit->IsValidAttackTarget(u)
&& u->GetCreatureType() != CREATURE_TYPE_CRITTER
- && i_funit->canSeeOrDetect(u);
+ && i_funit->CanSeeOrDetect(u);
}
private:
Unit const* i_funit;
@@ -886,7 +886,7 @@ namespace Trinity
AnyFriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && i_obj->IsWithinDistInMap(u, i_range) && i_funit->IsFriendlyTo(u))
+ if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && i_funit->IsFriendlyTo(u))
return true;
else
return false;
@@ -911,7 +911,7 @@ namespace Trinity
else if (!_refUnit->IsInPartyWith(u))
return false;
- return !_refUnit->IsHostileTo(u) && u->isAlive() && _source->IsWithinDistInMap(u, _range);
+ return !_refUnit->IsHostileTo(u) && u->IsAlive() && _source->IsWithinDistInMap(u, _range);
}
private:
@@ -927,7 +927,7 @@ namespace Trinity
AnyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {}
bool operator()(Unit* u)
{
- if (u->isAlive() && i_obj->IsWithinDistInMap(u, i_range))
+ if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
return true;
return false;
@@ -945,7 +945,7 @@ namespace Trinity
bool operator()(Unit* u)
{
if (u->isTargetableForAttack() && i_obj->IsWithinDistInMap(u, i_range) &&
- !i_funit->IsFriendlyTo(u) && i_funit->canSeeOrDetect(u))
+ !i_funit->IsFriendlyTo(u) && i_funit->CanSeeOrDetect(u))
{
i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check
return true;
@@ -979,7 +979,7 @@ namespace Trinity
bool operator()(Unit* u)
{
// Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems
- if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
+ if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem())
return false;
if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : NULL) && i_obj->IsWithinDistInMap(u, i_range))
@@ -1029,7 +1029,7 @@ namespace Trinity
struct AnyDeadUnitCheck
{
- bool operator()(Unit* u) { return !u->isAlive(); }
+ bool operator()(Unit* u) { return !u->IsAlive(); }
};
/*
@@ -1079,7 +1079,7 @@ namespace Trinity
if (!me->IsWithinDistInMap(u, m_range))
return false;
- if (!me->canSeeOrDetect(u))
+ if (!me->CanSeeOrDetect(u))
return false;
if (m_force)
@@ -1087,7 +1087,7 @@ namespace Trinity
if (!me->IsValidAttackTarget(u))
return false;
}
- else if (!me->canStartAttack(u, false))
+ else if (!me->CanStartAttack(u, false))
return false;
m_range = me->GetDistance(u); // use found unit range as new range limit for next check
@@ -1202,7 +1202,7 @@ namespace Trinity
bool operator()(Creature* u)
{
- if (u->GetEntry() == i_entry && u->isAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range))
+ if (u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range))
{
i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check
return true;
@@ -1226,7 +1226,7 @@ namespace Trinity
AnyPlayerInObjectRangeCheck(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) {}
bool operator()(Player* u)
{
- if (_reqAlive && !u->isAlive())
+ if (_reqAlive && !u->IsAlive())
return false;
if (!_obj->IsWithinDistInMap(u, _range))
@@ -1250,7 +1250,7 @@ namespace Trinity
bool operator()(Player* u)
{
- if (u->isAlive() && i_obj->IsWithinDistInMap(u, i_range))
+ if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
{
i_range = i_obj->GetDistance(u);
return true;
@@ -1271,7 +1271,7 @@ namespace Trinity
AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) {}
bool operator() (Unit* u)
{
- if (u->isAlive() && u->IsVisible() && u->IsFriendlyTo(unit))
+ if (u->IsAlive() && u->IsVisible() && u->IsFriendlyTo(unit))
return true;
return false;
@@ -1322,7 +1322,7 @@ namespace Trinity
bool operator() (Player* player)
{
//No threat list check, must be done explicit if expected to be in combat with creature
- if (!player->isGameMaster() && player->isAlive() && !unit->IsWithinDist(player, fRange, false))
+ if (!player->IsGameMaster() && player->IsAlive() && !unit->IsWithinDist(player, fRange, false))
return true;
return false;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index 6c7d69e57a0..3e71794a7e7 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -33,16 +33,16 @@ inline void Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- vis_guids.erase(iter->getSource()->GetGUID());
- i_player.UpdateVisibilityOf(iter->getSource(), i_data, i_visibleNow);
+ vis_guids.erase(iter->GetSource()->GetGUID());
+ i_player.UpdateVisibilityOf(iter->GetSource(), i_data, i_visibleNow);
}
}
inline void Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
- if (iter->getSource()->IsInWorld())
- iter->getSource()->Update(i_timeDiff);
+ if (iter->GetSource()->IsInWorld())
+ iter->GetSource()->Update(i_timeDiff);
}
// SEARCHERS & LIST SEARCHERS & WORKERS
@@ -61,12 +61,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(GameObjectMapType &m)
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -84,12 +84,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(PlayerMapType &m)
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -107,12 +107,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CreatureMapType &m)
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -130,12 +130,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CorpseMapType &m)
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -153,12 +153,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -176,12 +176,12 @@ void Trinity::WorldObjectSearcher<Check>::Visit(AreaTriggerMapType &m)
for (AreaTriggerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -195,11 +195,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -211,11 +211,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(PlayerMapType &m)
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -227,11 +227,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(CreatureMapType &m)
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -243,11 +243,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(CorpseMapType &m)
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -259,11 +259,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(DynamicObjectMapType &m)
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -275,11 +275,11 @@ void Trinity::WorldObjectLastSearcher<Check>::Visit(AreaTriggerMapType &m)
for (AreaTriggerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -290,8 +290,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
return;
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -301,8 +301,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
return;
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -312,8 +312,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
return;
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -323,8 +323,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
return;
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -334,8 +334,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType &m)
return;
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -345,8 +345,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(AreaTriggerMapType &m)
return;
for (AreaTriggerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
// Gameobject searchers
@@ -360,12 +360,12 @@ void Trinity::GameObjectSearcher<Check>::Visit(GameObjectMapType &m)
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -376,11 +376,11 @@ void Trinity::GameObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
{
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -388,9 +388,9 @@ template<class Check>
void Trinity::GameObjectListSearcher<Check>::Visit(GameObjectMapType &m)
{
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
// Unit searchers
@@ -404,12 +404,12 @@ void Trinity::UnitSearcher<Check>::Visit(CreatureMapType &m)
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -424,12 +424,12 @@ void Trinity::UnitSearcher<Check>::Visit(PlayerMapType &m)
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -440,11 +440,11 @@ void Trinity::UnitLastSearcher<Check>::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -453,11 +453,11 @@ void Trinity::UnitLastSearcher<Check>::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -465,18 +465,18 @@ template<class Check>
void Trinity::UnitListSearcher<Check>::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
void Trinity::UnitListSearcher<Check>::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
// Creature searchers
@@ -490,12 +490,12 @@ void Trinity::CreatureSearcher<Check>::Visit(CreatureMapType &m)
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -506,11 +506,11 @@ void Trinity::CreatureLastSearcher<Check>::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
@@ -518,18 +518,18 @@ template<class Check>
void Trinity::CreatureListSearcher<Check>::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
void Trinity::PlayerListSearcher<Check>::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (itr->GetSource()->InSamePhase(i_phaseMask))
+ if (i_check(itr->GetSource()))
+ i_objects.push_back(itr->GetSource());
}
template<class Check>
@@ -541,12 +541,12 @@ void Trinity::PlayerSearcher<Check>::Visit(PlayerMapType &m)
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
+ if (i_check(itr->GetSource()))
{
- i_object = itr->getSource();
+ i_object = itr->GetSource();
return;
}
}
@@ -557,11 +557,11 @@ void Trinity::PlayerLastSearcher<Check>::Visit(PlayerMapType& m)
{
for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
{
- if (!itr->getSource()->InSamePhase(i_phaseMask))
+ if (!itr->GetSource()->InSamePhase(i_phaseMask))
continue;
- if (i_check(itr->getSource()))
- i_object = itr->getSource();
+ if (i_check(itr->GetSource()))
+ i_object = itr->GetSource();
}
}
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index 3c7833baf15..50a54cd7263 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -36,10 +36,10 @@ void ObjectGridEvacuator::Visit(CreatureMapType &m)
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
for (CreatureMapType::iterator iter = m.begin(); iter != m.end();)
{
- Creature* c = iter->getSource();
+ Creature* c = iter->GetSource();
++iter;
- ASSERT(!c->isPet() && "ObjectGridRespawnMover must not be called for pets");
+ ASSERT(!c->IsPet() && "ObjectGridRespawnMover must not be called for pets");
c->GetMap()->CreatureRespawnRelocation(c, true);
}
}
@@ -194,7 +194,7 @@ void ObjectGridUnloader::Visit(GridRefManager<T> &m)
{
while (!m.isEmpty())
{
- T *obj = m.getFirst()->getSource();
+ T *obj = m.getFirst()->GetSource();
// if option set then object already saved at this moment
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
obj->SaveRespawnTime();
@@ -213,13 +213,13 @@ void ObjectGridStoper::Visit(CreatureMapType &m)
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- iter->getSource()->RemoveAllDynObjects();
- if (iter->getSource()->isInCombat())
+ iter->GetSource()->RemoveAllDynObjects();
+ if (iter->GetSource()->IsInCombat())
{
- iter->getSource()->CombatStop();
- iter->getSource()->DeleteThreatList();
- if (iter->getSource()->IsAIEnabled)
- iter->getSource()->AI()->EnterEvadeMode();
+ iter->GetSource()->CombatStop();
+ iter->GetSource()->DeleteThreatList();
+ if (iter->GetSource()->IsAIEnabled)
+ iter->GetSource()->AI()->EnterEvadeMode();
}
}
}
@@ -228,7 +228,7 @@ template<class T>
void ObjectGridCleaner::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
- iter->getSource()->CleanupsBeforeDelete();
+ iter->GetSource()->CleanupsBeforeDelete();
}
template void ObjectGridUnloader::Visit(CreatureMapType &);
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 9d27ca61511..03bfe56ac3e 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -474,10 +474,10 @@ bool Group::AddMember(Player* player)
// Broadcast group members' fields to player
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- if (itr->getSource() == player)
+ if (itr->GetSource() == player)
continue;
- if (Player* member = itr->getSource())
+ if (Player* member = itr->GetSource())
{
if (player->HaveAtClient(member))
{
@@ -626,7 +626,7 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod& method /*= GROUP_REMOV
{
Player* leader = ObjectAccessor::FindPlayer(GetLeaderGUID());
uint32 mapId = sLFGMgr->GetDungeonMapId(GetGUID());
- if (!mapId || !leader || (leader->isAlive() && leader->GetMapId() != mapId))
+ if (!mapId || !leader || (leader->IsAlive() && leader->GetMapId() != mapId))
{
Disband();
return false;
@@ -959,7 +959,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
//a vector is filled with only near party members
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member || !member->GetSession())
continue;
if (i->AllowedForPlayer(member))
@@ -1043,7 +1043,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
//a vector is filled with only near party members
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member || !member->GetSession())
continue;
@@ -1103,7 +1103,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* playerToRoll = itr->getSource();
+ Player* playerToRoll = itr->GetSource();
if (!playerToRoll || !playerToRoll->GetSession())
continue;
@@ -1178,7 +1178,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* playerToRoll = itr->getSource();
+ Player* playerToRoll = itr->GetSource();
if (!playerToRoll || !playerToRoll->GetSession())
continue;
@@ -1239,7 +1239,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* looter = itr->getSource();
+ Player* looter = itr->GetSource();
if (!looter->IsInWorld())
continue;
@@ -1254,7 +1254,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* looter = itr->getSource();
+ Player* looter = itr->GetSource();
if (looter->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
looter->GetSession()->SendPacket(&data);
}
@@ -1574,7 +1574,7 @@ void Group::UpdatePlayerOutOfRange(Player* player)
Player* member;
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- member = itr->getSource();
+ member = itr->GetSource();
if (member && !member->IsWithinDist(player, member->GetSightRange(), false))
member->GetSession()->SendPacket(&data);
}
@@ -1584,7 +1584,7 @@ void Group::BroadcastAddonMessagePacket(WorldPacket* packet, const std::string&
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player || (ignore != 0 && player->GetGUID() == ignore) || (ignorePlayersInBGRaid && player->GetGroup() != this))
continue;
@@ -1599,7 +1599,7 @@ void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player || (ignore != 0 && player->GetGUID() == ignore) || (ignorePlayersInBGRaid && player->GetGroup() != this))
continue;
@@ -1612,7 +1612,7 @@ void Group::BroadcastReadyCheck(WorldPacket* packet)
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (player && player->GetSession())
if (IsLeader(player->GetGUID()) || IsAssistant(player->GetGUID()))
player->GetSession()->SendPacket(packet);
@@ -1818,7 +1818,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side
// get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.)
- Player* reference = GetFirstMember()->getSource();
+ Player* reference = GetFirstMember()->GetSource();
// no reference found, can't join this way
if (!reference)
return ERR_BATTLEGROUND_JOIN_FAILED;
@@ -1836,7 +1836,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
memberscount = 0;
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next(), ++memberscount)
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
// offline member? don't let join
if (!member)
return ERR_BATTLEGROUND_JOIN_FAILED;
@@ -1902,7 +1902,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player->GetSession())
continue;
@@ -1926,7 +1926,7 @@ void Group::SetRaidDifficulty(Difficulty difficulty)
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player->GetSession())
continue;
@@ -1939,7 +1939,7 @@ bool Group::InCombatToInstance(uint32 instanceId)
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (player && !player->getAttackers().empty() && player->GetInstanceId() == instanceId && (player->GetMap()->IsRaidOrHeroicDungeon()))
for (std::set<Unit*>::const_iterator i = player->getAttackers().begin(); i != player->getAttackers().end(); ++i)
if ((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
@@ -2114,7 +2114,7 @@ void Group::UnbindInstance(uint32 mapid, uint8 difficulty, bool unload)
void Group::_homebindIfInstance(Player* player)
{
- if (player && !player->isGameMaster() && sMapStore.LookupEntry(player->GetMapId())->IsDungeon())
+ if (player && !player->IsGameMaster() && sMapStore.LookupEntry(player->GetMapId())->IsDungeon())
player->m_InstanceValid = false;
}
@@ -2382,7 +2382,7 @@ void Group::DelinkMember(uint64 guid)
while (ref)
{
GroupReference* nextRef = ref->next();
- if (ref->getSource()->GetGUID() == guid)
+ if (ref->GetSource()->GetGUID() == guid)
{
ref->unlink();
break;
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index c4855cd2fd5..16063e39657 100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -45,7 +45,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
if (!unit)
return;
- if (!unit->isBattleMaster()) // it's not battlemaster
+ if (!unit->IsBattleMaster()) // it's not battlemaster
return;
// Stop the npc if moving
@@ -236,7 +236,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member)
continue; // this should never happen
@@ -526,13 +526,13 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
_player->SetBattlegroundEntryPoint();
// resurrect the player
- if (!_player->isAlive())
+ if (!_player->IsAlive())
{
_player->ResurrectPlayer(1.0f);
_player->SpawnCorpseBones();
}
// stop taxi flight at port
- if (_player->isInFlight())
+ if (_player->IsInFlight())
{
_player->GetMotionMaster()->MovementExpired();
_player->CleanupAfterTaxiFlight();
@@ -590,7 +590,7 @@ void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& /*recvData*/)
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LEAVE Message");
// not allow leave battleground in combat
- if (_player->isInCombat())
+ if (_player->IsInCombat())
if (Battleground* bg = _player->GetBattleground())
if (bg->GetStatus() != STATUS_WAIT_LEAVE)
return;
@@ -742,7 +742,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member)
continue;
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 85a76760c7e..bb7d4b1052f 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1067,7 +1067,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
pCurrChar->LoadPet();
// Set FFA PvP for non GM in non-rest mode
- if (sWorld->IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
+ if (sWorld->IsFFAPvPRealm() && !pCurrChar->IsGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
if (pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
@@ -1120,7 +1120,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
if (sWorld->getBoolConfig(CONFIG_ALL_TAXI_PATHS))
pCurrChar->SetTaxiCheater(true);
- if (pCurrChar->isGameMaster())
+ if (pCurrChar->IsGameMaster())
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
@@ -1690,7 +1690,7 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket &recvData)
void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData)
{
- if (_player->isInCombat())
+ if (_player->IsInCombat())
return;
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE");
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 9ec018aaf78..1c5741cbad8 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -174,7 +174,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
else
{
// send in universal language if player in .gm on mode (ignore spell effects)
- if (sender->isGameMaster())
+ if (sender->IsGameMaster())
lang = LANG_UNIVERSAL;
else
{
@@ -326,7 +326,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
SendPlayerNotFoundNotice(to);
return;
}
- if (!sender->isGameMaster() && sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
+ if (!sender->IsGameMaster() && sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
{
SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
return;
@@ -338,7 +338,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
}
- if (GetPlayer()->HasAura(1852) && !receiver->isGameMaster())
+ if (GetPlayer()->HasAura(1852) && !receiver->IsGameMaster())
{
SendNotification(GetTrinityString(LANG_GM_SILENCE), GetPlayer()->GetName().c_str());
return;
@@ -470,7 +470,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
} break;
case CHAT_MSG_AFK:
{
- if (!_player->isInCombat())
+ if (!_player->IsInCombat())
{
if (_player->isAFK()) // Already AFK
{
@@ -661,7 +661,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
void WorldSession::HandleEmoteOpcode(WorldPacket& recvData)
{
- if (!GetPlayer()->isAlive() || GetPlayer()->HasUnitState(UNIT_STATE_DIED))
+ if (!GetPlayer()->IsAlive() || GetPlayer()->HasUnitState(UNIT_STATE_DIED))
return;
uint32 emote;
@@ -704,7 +704,7 @@ namespace Trinity
void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
{
- if (!GetPlayer()->isAlive())
+ if (!GetPlayer()->IsAlive())
return;
if (!GetPlayer()->CanSpeak())
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 27cc50dacc5..d4bfc235595 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -115,14 +115,14 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
}
// restrict invite to GMs
- if (!sWorld->getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->isGameMaster() && player->isGameMaster())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->IsGameMaster() && player->IsGameMaster())
{
SendPartyResult(PARTY_OP_INVITE, memberName, ERR_BAD_PLAYER_NAME_S);
return;
}
// can't group with
- if (!GetPlayer()->isGameMaster() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && GetPlayer()->GetTeam() != player->GetTeam())
+ if (!GetPlayer()->IsGameMaster() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && GetPlayer()->GetTeam() != player->GetTeam())
{
SendPartyResult(PARTY_OP_INVITE, memberName, ERR_PLAYER_WRONG_FACTION);
return;
@@ -946,7 +946,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
if (player->IsPvP())
playerStatus |= MEMBER_STATUS_PVP;
- if (!player->isAlive())
+ if (!player->IsAlive())
{
if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
playerStatus |= MEMBER_STATUS_GHOST;
@@ -1206,7 +1206,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket& recvData)
if (player->IsPvP())
playerStatus |= MEMBER_STATUS_PVP;
- if (!player->isAlive())
+ if (!player->IsAlive())
{
if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
playerStatus |= MEMBER_STATUS_GHOST;
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index f23a1c9632f..86e5004332a 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -542,7 +542,7 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData)
recvData >> guid;
- if (!GetPlayer()->isAlive())
+ if (!GetPlayer()->IsAlive())
return;
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LIST_INVENTORY");
@@ -594,7 +594,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
continue;
uint32 leftInStock = !vendorItem->maxcount ? 0xFFFFFFFF : vendor->GetVendorItemCurrentCount(vendorItem);
- if (!_player->isGameMaster()) // ignore conditions if GM on
+ if (!_player->IsGameMaster()) // ignore conditions if GM on
{
// Respect allowed class
if (!(itemTemplate->AllowableClass & _player->getClassMask()) && itemTemplate->Bonding == BIND_WHEN_PICKED_UP)
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 653caf23453..e19bcadc67b 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -246,7 +246,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
lfg::LfgLockPartyMap lockMap;
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* plrg = itr->getSource();
+ Player* plrg = itr->GetSource();
if (!plrg)
continue;
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index caf9d7a65e2..3dd0ab9f6d2 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -82,7 +82,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
{
Creature* creature = GetPlayer()->GetMap()->GetCreature(lguid);
- bool lootAllowed = creature && creature->isAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
+ bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
if (!lootAllowed || !creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
{
@@ -149,11 +149,11 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
case HIGHGUID_VEHICLE:
{
Creature* creature = player->GetMap()->GetCreature(guid);
- bool lootAllowed = creature && creature->isAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
+ bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
if (lootAllowed && creature->IsWithinDistInMap(player, INTERACTION_DISTANCE))
{
loot = &creature->loot;
- if (creature->isAlive())
+ if (creature->IsAlive())
shareMoney = false;
}
break;
@@ -172,7 +172,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
std::vector<Player*> playersNear;
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* member = itr->getSource();
+ Player* member = itr->GetSource();
if (!member)
continue;
@@ -232,7 +232,7 @@ void WorldSession::HandleLootOpcode(WorldPacket& recvData)
recvData >> guid;
// Check possible cheat
- if (!_player->isAlive())
+ if (!_player->IsAlive())
return;
GetPlayer()->SendLoot(guid, LOOT_CORPSE);
@@ -366,7 +366,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
{
Creature* creature = GetPlayer()->GetMap()->GetCreature(lguid);
- bool lootAllowed = creature && creature->isAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
+ bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
if (!lootAllowed || !creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
return;
@@ -374,7 +374,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
if (loot->isLooted())
{
// skip pickpocketing loot for speed, skinning timer reduction is no-op in fact
- if (!creature->isAlive())
+ if (!creature->IsAlive())
creature->AllLootRemovedFromCorpse();
creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index d34ea534753..cf17ee29345 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -153,7 +153,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
uint64 reqmoney = cost + money;
- if (!player->HasEnoughMoney(reqmoney) && !player->isGameMaster())
+ if (!player->HasEnoughMoney(reqmoney) && !player->IsGameMaster())
{
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_ENOUGH_MONEY);
return;
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 5a630a0bfe0..62227e14b5a 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -63,7 +63,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData)
recvData.read_skip<uint8>();
- if (GetPlayer()->isAlive() || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
+ if (GetPlayer()->IsAlive() || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
return;
if (GetPlayer()->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
@@ -373,14 +373,14 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/)
if (uint64 lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
- bool instantLogout = (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->isInCombat()) ||
- GetPlayer()->isInFlight() || HasPermission(RBAC_PERM_INSTANT_LOGOUT);
+ bool instantLogout = (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) ||
+ GetPlayer()->IsInFlight() || HasPermission(RBAC_PERM_INSTANT_LOGOUT);
/// TODO: Possibly add RBAC permission to log out in combat
bool canLogoutInCombat = GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
uint32 reason = 0;
- if (GetPlayer()->isInCombat() && !canLogoutInCombat)
+ if (GetPlayer()->IsInCombat() && !canLogoutInCombat)
reason = 1;
else if (GetPlayer()->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR))
reason = 3; // is jumping or falling
@@ -497,7 +497,7 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket& recvData)
void WorldSession::HandleReturnToGraveyard(WorldPacket& /*recvPacket*/)
{
- if (GetPlayer()->isAlive() || !GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
+ if (GetPlayer()->IsAlive() || !GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
return;
GetPlayer()->RepopAtGraveyard();
}
@@ -736,7 +736,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- if (GetPlayer()->isAlive())
+ if (GetPlayer()->IsAlive())
return;
// do not allow corpse reclaim in arena
@@ -775,7 +775,7 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recvData)
recvData >> guid;
recvData >> status;
- if (GetPlayer()->isAlive())
+ if (GetPlayer()->IsAlive())
return;
if (status == 0)
@@ -815,7 +815,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_AREATRIGGER. Trigger ID: %u", triggerId);
Player* player = GetPlayer();
- if (player->isInFlight())
+ if (player->IsInFlight())
{
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",
player->GetName().c_str(), player->GetGUIDLow(), triggerId);
@@ -889,7 +889,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
if (sScriptMgr->OnAreaTrigger(player, atEntry))
return;
- if (player->isAlive())
+ if (player->IsAlive())
if (uint32 questId = sObjectMgr->GetQuestForAreaTrigger(triggerId))
if (player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(questId);
@@ -1209,7 +1209,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recvData)
WorldPacket data(SMSG_INSPECT_TALENT, 8 + 4 + 1 + 1 + talent_points + 8 + 4 + 8 + 4);
data << player->GetGUID();
- if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->isGameMaster())
+ if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->IsGameMaster())
player->BuildPlayerTalentsInfoData(&data);
else
{
@@ -1300,7 +1300,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_WORLD_TELEPORT");
- if (GetPlayer()->isInFlight())
+ if (GetPlayer()->IsInFlight())
{
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
@@ -1546,7 +1546,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* groupGuy = itr->getSource();
+ Player* groupGuy = itr->GetSource();
if (!groupGuy)
continue;
@@ -1604,7 +1604,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* groupGuy = itr->getSource();
+ Player* groupGuy = itr->GetSource();
if (!groupGuy)
continue;
@@ -1641,7 +1641,7 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recvData*/)
return;
}
- if (_player->isInFlight()) // not blizz like; no any messages on blizz
+ if (_player->IsInFlight()) // not blizz like; no any messages on blizz
{
ChatHandler(this).SendSysMessage(LANG_YOU_IN_FLIGHT);
return;
@@ -1787,7 +1787,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData)
if (!unit)
return;
- if (!unit->isSpiritService()) // it's not spirit service
+ if (!unit->IsSpiritService()) // it's not spirit service
return;
if (bg)
@@ -1810,7 +1810,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData)
if (!unit)
return;
- if (!unit->isSpiritService()) // it's not spirit service
+ if (!unit->IsSpiritService()) // it's not spirit service
return;
if (bg)
@@ -1822,7 +1822,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData)
void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/)
{
- if (_player->isInFlight())
+ if (_player->IsInFlight())
return;
if (/*Battlefield* bf = */sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index 2739e53b818..f45efe0b47e 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -365,7 +365,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
}
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
- if (opcode == MSG_MOVE_FALL_LAND && plrMover && !plrMover->isInFlight())
+ if (opcode == MSG_MOVE_FALL_LAND && plrMover && !plrMover->IsInFlight())
plrMover->HandleFall(movementInfo);
if (plrMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plrMover->IsInWater())
@@ -406,13 +406,13 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
// NOTE: this is actually called many times while falling
// even after the player has been teleported away
/// @todo discard movement packets after the player is rooted
- if (plrMover->isAlive())
+ if (plrMover->IsAlive())
{
plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
// player can be alive if GM/etc
// change the death state to CORPSE to prevent the death timer from
// starting in the next player update
- if (!plrMover->isAlive())
+ if (!plrMover->IsAlive())
plrMover->KillPlayer();
}
}
@@ -596,7 +596,7 @@ void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recvData)
void WorldSession::HandleSummonResponseOpcode(WorldPacket& recvData)
{
- if (!_player->isAlive() || _player->isInCombat())
+ if (!_player->IsAlive() || _player->IsInCombat())
return;
uint64 summonerGuid;
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 51533ad8a9f..776643af0a9 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -335,11 +335,11 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
//if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
// GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- if (unit->isArmorer() || unit->isCivilian() || unit->isQuestGiver() || unit->isServiceProvider() || unit->isGuard())
+ if (unit->IsArmorer() || unit->IsCivilian() || unit->IsQuestGiver() || unit->IsServiceProvider() || unit->IsGuard())
unit->StopMoving();
// If spiritguide, no need for gossip menu, just put player into resurrect queue
- if (unit->isSpiritGuide())
+ if (unit->IsSpiritGuide())
{
Battleground* bg = _player->GetBattleground();
if (bg)
@@ -460,7 +460,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket& recvData)
uint64 npcGUID;
recvData >> npcGUID;
- if (!GetPlayer()->IsInWorld() || !GetPlayer()->isAlive())
+ if (!GetPlayer()->IsInWorld() || !GetPlayer()->IsAlive())
return;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
@@ -550,7 +550,7 @@ void WorldSession::SendStablePetCallback(PreparedQueryResult result, uint64 guid
uint8 num = 0; // counter for place holder
// not let move dead pet in slot
- if (pet && pet->isAlive() && pet->getPetType() == HUNTER_PET)
+ if (pet && pet->IsAlive() && pet->getPetType() == HUNTER_PET)
{
data << uint32(0); // 4.x unknown, some kind of order?
data << uint32(pet->GetCharmInfo()->GetPetNumber());
@@ -597,7 +597,7 @@ void WorldSession::HandleStablePet(WorldPacket& recvData)
recvData >> npcGUID;
- if (!GetPlayer()->isAlive())
+ if (!GetPlayer()->IsAlive())
{
SendStableResult(STABLE_ERR_STABLE);
return;
@@ -616,7 +616,7 @@ void WorldSession::HandleStablePet(WorldPacket& recvData)
Pet* pet = _player->GetPet();
// can't place in stable dead pet
- if (!pet || !pet->isAlive() || pet->getPetType() != HUNTER_PET)
+ if (!pet || !pet->IsAlive() || pet->getPetType() != HUNTER_PET)
{
SendStableResult(STABLE_ERR_STABLE);
return;
@@ -713,10 +713,10 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
}
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(petEntry);
- if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
+ if (!creatureInfo || !creatureInfo->IsTameable(_player->CanTameExoticPets()))
{
// if problem in exotic pet
- if (creatureInfo && creatureInfo->isTameable(true))
+ if (creatureInfo && creatureInfo->IsTameable(true))
SendStableResult(STABLE_ERR_EXOTIC);
else
SendStableResult(STABLE_ERR_STABLE);
@@ -724,7 +724,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
}
Pet* pet = _player->GetPet();
- if (pet && pet->isAlive())
+ if (pet && pet->IsAlive())
{
SendStableResult(STABLE_ERR_STABLE);
return;
@@ -844,10 +844,10 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
}
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(petEntry);
- if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
+ if (!creatureInfo || !creatureInfo->IsTameable(_player->CanTameExoticPets()))
{
// if problem in exotic pet
- if (creatureInfo && creatureInfo->isTameable(true))
+ if (creatureInfo && creatureInfo->IsTameable(true))
SendStableResult(STABLE_ERR_EXOTIC);
else
SendStableResult(STABLE_ERR_STABLE);
@@ -863,7 +863,7 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
}
// move alive pet to slot or delete dead pet
- _player->RemovePet(pet, pet->isAlive() ? PetSaveMode(slot) : PET_SAVE_AS_DELETED);
+ _player->RemovePet(pet, pet->IsAlive() ? PetSaveMode(slot) : PET_SAVE_AS_DELETED);
// summon unstabled pet
Pet* newPet = new Pet(_player);
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index c26c0ce7c01..ae18eece9a9 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -51,7 +51,7 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData)
if (_player->GetCritterGUID() == pet->GetGUID())
{
- if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->isSummon())
+ if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->IsSummon())
pet->ToTempSummon()->UnSummon();
}
}
@@ -89,7 +89,7 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
return;
}
- if (!pet->isAlive())
+ if (!pet->IsAlive())
{
SpellInfo const* spell = (flag == ACT_ENABLED || flag == ACT_PASSIVE) ? sSpellMgr->GetSpellInfo(spellid) : NULL;
if (!spell)
@@ -109,7 +109,7 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
//If a pet is dismissed, m_Controlled will change
std::vector<Unit*> controlled;
for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == pet->GetEntry() && (*itr)->isAlive())
+ if ((*itr)->GetEntry() == pet->GetEntry() && (*itr)->IsAlive())
controlled.push_back(*itr);
for (std::vector<Unit*>::iterator itr = controlled.begin(); itr != controlled.end(); ++itr)
HandlePetActionHelper(*itr, guid1, spellid, flag, guid2, x, y, z);
@@ -138,7 +138,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recvData)
return;
}
- if (!pet->isAlive())
+ if (!pet->IsAlive())
return;
pet->AttackStop();
@@ -205,9 +205,9 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
pet->ClearUnitState(UNIT_STATE_FOLLOW);
// This is true if pet has no target or has target but targets differs.
- if (pet->getVictim() != TargetUnit || (pet->getVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack()))
+ if (pet->GetVictim() != TargetUnit || (pet->GetVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack()))
{
- if (pet->getVictim())
+ if (pet->GetVictim())
pet->AttackStop();
if (pet->GetTypeId() != TYPEID_PLAYER && pet->ToCreature()->IsAIEnabled)
@@ -221,7 +221,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
pet->ToCreature()->AI()->AttackStart(TargetUnit);
//10% chance to play special pet attack talk, else growl
- if (pet->ToCreature()->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
+ if (pet->ToCreature()->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
pet->SendPetTalk((uint32)PET_TALK_ATTACK);
else
{
@@ -231,7 +231,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
}
else // charmed player
{
- if (pet->getVictim() && pet->getVictim() != TargetUnit)
+ if (pet->GetVictim() && pet->GetVictim() != TargetUnit)
pet->AttackStop();
charmInfo->SetIsCommandAttack(true);
@@ -252,7 +252,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
else if (pet->GetOwnerGUID() == GetPlayer()->GetGUID())
{
ASSERT(pet->GetTypeId() == TYPEID_UNIT);
- if (pet->isPet())
+ if (pet->IsPet())
{
if (((Pet*)pet)->getPetType() == HUNTER_PET)
GetPlayer()->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED);
@@ -371,7 +371,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
//10% chance to play special pet attack talk, else growl
//actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
- if (pet->ToCreature()->isPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
+ if (pet->ToCreature()->IsPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
else
{
@@ -381,9 +381,9 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
if (unit_target && !GetPlayer()->IsFriendlyTo(unit_target) && !pet->isPossessed() && !pet->IsVehicle())
{
// This is true if pet has no target or has target but targets differs.
- if (pet->getVictim() != unit_target)
+ if (pet->GetVictim() != unit_target)
{
- if (pet->getVictim())
+ if (pet->GetVictim())
pet->AttackStop();
pet->GetMotionMaster()->Clear();
if (pet->ToCreature()->IsAIEnabled)
@@ -449,7 +449,7 @@ void WorldSession::SendPetNameQuery(uint64 petguid, uint32 petnumber)
data << pet->GetName();
data << uint32(pet->GetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP));
- if (pet->isPet() && ((Pet*)pet)->GetDeclinedNames())
+ if (pet->IsPet() && ((Pet*)pet)->GetDeclinedNames())
{
data << uint8(1);
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@@ -466,7 +466,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
// spell case or GM
if (guid == GetPlayer()->GetGUID())
{
- if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
+ if (!GetPlayer()->IsGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
{
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
return false;
@@ -577,7 +577,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
//sign for autocast
if (act_state == ACT_ENABLED)
{
- if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->isPet())
+ if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, true);
else
for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
@@ -587,7 +587,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
//sign for no/turn off autocast
else if (act_state == ACT_DISABLED)
{
- if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->isPet())
+ if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, false);
else
for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
@@ -617,7 +617,7 @@ void WorldSession::HandlePetRename(WorldPacket& recvData)
Pet* pet = ObjectAccessor::FindPet(petguid);
// check it!
- if (!pet || !pet->isPet() || ((Pet*)pet)->getPetType()!= HUNTER_PET ||
+ if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType()!= HUNTER_PET ||
!pet->HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ||
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo())
return;
@@ -699,7 +699,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (pet)
{
- if (pet->isPet())
+ if (pet->IsPet())
_player->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED);
else if (pet->GetGUID() == _player->GetCharmGUID())
_player->StopCastingCharm();
@@ -740,7 +740,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
return;
}
- if (pet->isPet())
+ if (pet->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, state);
else
pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, state);
@@ -813,7 +813,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
Creature* pet = caster->ToCreature();
pet->AddCreatureSpellCooldown(spellId);
- if (pet->isPet())
+ if (pet->IsPet())
{
Pet* p = (Pet*)pet;
// 10% chance to play special pet attack talk, else growl
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 2d551d03f45..00de2225912 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -98,7 +98,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
uint32 charterid = 0;
uint32 cost = 0;
uint32 type = 0;
- if (creature->isTabardDesigner())
+ if (creature->IsTabardDesigner())
{
// if tabard designer, then trying to buy a guild charter.
// do not let if already in guild.
@@ -937,7 +937,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
WorldPacket data(SMSG_PETITION_SHOWLIST, 8+1+4*6);
data << guid; // npc guid
- if (creature->isTabardDesigner())
+ if (creature->IsTabardDesigner())
{
data << uint8(1); // count
data << uint32(1); // index
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 279c1392e17..12644ad2751 100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -163,7 +163,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvData)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player || player == _player) // not self
continue;
@@ -569,7 +569,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player || player == _player) // skip self
continue;
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 69e643eb00b..8fa99899296 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -149,7 +149,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
- if (pUser->isInCombat())
+ if (pUser->IsInCombat())
{
for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
@@ -510,7 +510,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
return;
}
- if (!pet->isAlive())
+ if (!pet->IsAlive())
{
pet->SendPetActionFeedback(FEEDBACK_PET_DEAD);
return;
@@ -563,7 +563,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
return;
Creature* totem = GetPlayer()->GetMap()->GetCreature(_player->m_SummonSlot[slotId]);
- if (totem && totem->isTotem() && totem->GetGUID() == guid)
+ if (totem && totem->IsTotem() && totem->GetGUID() == guid)
totem->ToTotem()->UnSummon();
}
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index 82804fe40fc..043280c842f 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -646,7 +646,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
if (GetPlayer()->m_trade)
return;
- if (!GetPlayer()->isAlive())
+ if (!GetPlayer()->IsAlive())
{
SendTradeStatus(TRADE_STATUS_YOU_DEAD);
return;
@@ -664,7 +664,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (GetPlayer()->isInFlight())
+ if (GetPlayer()->IsInFlight())
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
return;
@@ -690,13 +690,13 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (!pOther->isAlive())
+ if (!pOther->IsAlive())
{
SendTradeStatus(TRADE_STATUS_TARGET_DEAD);
return;
}
- if (pOther->isInFlight())
+ if (pOther->IsInFlight())
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
return;
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index 46bd523f9f2..447dc5c3e5a 100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -91,15 +91,15 @@ void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
switch (state)
{
case NOT_STARTED:
- if (!minion->isAlive())
+ if (!minion->IsAlive())
minion->Respawn();
- else if (minion->isInCombat())
+ else if (minion->IsInCombat())
minion->AI()->EnterEvadeMode();
break;
case IN_PROGRESS:
- if (!minion->isAlive())
+ if (!minion->IsAlive())
minion->Respawn();
- else if (!minion->getVictim())
+ else if (!minion->GetVictim())
minion->AI()->DoZoneInCombat();
break;
default:
@@ -210,7 +210,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
if (state == DONE)
for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
- if ((*i)->isWorldBoss() && (*i)->isAlive())
+ if ((*i)->isWorldBoss() && (*i)->IsAlive())
return false;
bossInfo->state = state;
@@ -297,7 +297,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
if (!lPlayers.isEmpty())
{
for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
player->SendUpdateWorldState(uiStateId, uiStateData);
}
else
@@ -317,7 +317,7 @@ void InstanceScript::DoSendNotifyToInstance(char const* format, ...)
vsnprintf(buff, 1024, format, ap);
va_end(ap);
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
if (WorldSession* session = player->GetSession())
session->SendNotification("%s", buff);
}
@@ -330,7 +330,7 @@ void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type,
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
player->UpdateAchievementCriteria(type, miscValue1, miscValue2, 0, unit);
}
@@ -341,7 +341,7 @@ void InstanceScript::DoStartTimedAchievement(AchievementCriteriaTimedTypes type,
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
player->StartTimedAchievement(type, entry);
}
@@ -352,7 +352,7 @@ void InstanceScript::DoStopTimedAchievement(AchievementCriteriaTimedTypes type,
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
player->RemoveTimedAchievement(type, entry);
}
@@ -364,7 +364,7 @@ void InstanceScript::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
{
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
{
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
{
player->RemoveAurasDueToSpell(spell);
if (Pet* pet = player->GetPet())
@@ -381,7 +381,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
player->CastSpell(player, spell, true);
}
@@ -456,7 +456,7 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi
Map::PlayerList const& players = instance->GetPlayers();
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
- if (Player* player = i->getSource())
+ if (Player* player = i->GetSource())
if (Group* grp = player->GetGroup())
if (grp->isLFGGroup())
{
@@ -474,6 +474,6 @@ void InstanceScript::UpdatePhasing()
Map::PlayerList const& players = instance->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
player->GetPhaseMgr().NotifyConditionChanged(phaseUdateData);
}
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 7da7cd975ee..ef914cc29ee 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -465,7 +465,7 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
roundRobinPlayer = lootOwner->GetGUID();
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
- if (Player* player = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
+ if (Player* player = itr->GetSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
FillNotNormalLootFor(player, player->IsAtGroupRewardDistance(lootOwner));
for (uint8 i = 0; i < items.size(); ++i)
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 2526364cef6..2fa0a03e63f 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -69,7 +69,7 @@ MailSender::MailSender(AuctionEntry* sender)
MailSender::MailSender(Player* sender)
{
m_messageType = MAIL_NORMAL;
- m_stationery = sender->isGameMaster() ? MAIL_STATIONERY_GM : MAIL_STATIONERY_DEFAULT;
+ m_stationery = sender->IsGameMaster() ? MAIL_STATIONERY_GM : MAIL_STATIONERY_DEFAULT;
m_senderId = sender->GetGUIDLow();
}
@@ -200,7 +200,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver,
if (m_COD)
expire_delay = 3 * DAY;
else
- expire_delay = pSender && pSender->isGameMaster() ? 90 * DAY : 30 * DAY;
+ expire_delay = pSender && pSender->IsGameMaster() ? 90 * DAY : 30 * DAY;
time_t expire_time = deliver_time + expire_delay;
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 90e072825de..fb0f6d0c461 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -520,7 +520,7 @@ void Map::Update(const uint32 t_diff)
/// update worldsessions for existing players
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
- Player* player = m_mapRefIter->getSource();
+ Player* player = m_mapRefIter->GetSource();
if (player && player->IsInWorld())
{
//player->Update(t_diff);
@@ -542,7 +542,7 @@ void Map::Update(const uint32 t_diff)
// to make sure calls to Map::Remove don't invalidate it
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
- Player* player = m_mapRefIter->getSource();
+ Player* player = m_mapRefIter->GetSource();
if (!player || !player->IsInWorld())
continue;
@@ -586,7 +586,7 @@ struct ResetNotifier
template<class T>inline void resetNotify(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter)
- iter->getSource()->ResetAllNotifies();
+ iter->GetSource()->ResetAllNotifies();
}
template<class T> void Visit(GridRefManager<T> &) {}
void Visit(CreatureMapType &m) { resetNotify<Creature>(m);}
@@ -597,7 +597,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
{
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i)
{
- NGridType *grid = i->getSource();
+ NGridType *grid = i->GetSource();
if (grid->GetGridState() != GRID_STATE_ACTIVE)
continue;
@@ -637,7 +637,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
TypeContainerVisitor<ResetNotifier, WorldTypeMapContainer > world_notifier(reset);
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i)
{
- NGridType *grid = i->getSource();
+ NGridType *grid = i->GetSource();
if (grid->GetGridState() != GRID_STATE_ACTIVE)
continue;
@@ -839,7 +839,7 @@ void Map::MoveAllCreaturesInMoveList()
//But this check is always needed to ensure safety
/// @todo pets will disappear if this is outside CreatureRespawnRelocation
//need to check why pet is frequently relocated to an unloaded cell
- if (c->isPet())
+ if (c->IsPet())
((Pet*)c)->Remove(PET_SAVE_NOT_IN_SLOT, true);
else
AddObjectToRemoveList(c);
@@ -1024,7 +1024,7 @@ void Map::RemoveAllPlayers()
{
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
if (!player->IsBeingTeleportedFar())
{
// this is happening for bg
@@ -1042,7 +1042,7 @@ void Map::UnloadAll()
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();)
{
- NGridType &grid(*i->getSource());
+ NGridType &grid(*i->GetSource());
++i;
UnloadGrid(grid, true); // deletes the grid and removes it from the GridRefManager
}
@@ -2090,8 +2090,8 @@ void Map::DelayedUpdate(const uint32 t_diff)
{
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();)
{
- NGridType *grid = i->getSource();
- GridInfo* info = i->getSource()->getGridInfoRef();
+ NGridType *grid = i->GetSource();
+ GridInfo* info = i->GetSource()->getGridInfoRef();
++i; // The update might delete the map and we need the next map before the iterator gets invalid
ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE);
si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, t_diff);
@@ -2182,7 +2182,7 @@ uint32 Map::GetPlayersCountExceptGMs() const
{
uint32 count = 0;
for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- if (!itr->getSource()->isGameMaster())
+ if (!itr->GetSource()->IsGameMaster())
++count;
return count;
}
@@ -2190,7 +2190,7 @@ uint32 Map::GetPlayersCountExceptGMs() const
void Map::SendToPlayers(WorldPacket const* data) const
{
for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- itr->getSource()->GetSession()->SendPacket(data);
+ itr->GetSource()->GetSession()->SendPacket(data);
}
bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const
@@ -2209,7 +2209,7 @@ bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const
for (MapRefManager::const_iterator iter = m_mapRefManager.begin(); iter != m_mapRefManager.end(); ++iter)
{
- Player* player = iter->getSource();
+ Player* player = iter->GetSource();
CellCoord p = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) &&
@@ -2235,7 +2235,7 @@ void Map::AddToActive(Creature* c)
AddToActiveHelper(c);
// also not allow unloading spawn grid to prevent creating creature clone at load
- if (!c->isPet() && c->GetDBTableGUIDLow())
+ if (!c->IsPet() && c->GetDBTableGUIDLow())
{
float x, y, z;
c->GetRespawnPosition(x, y, z);
@@ -2256,7 +2256,7 @@ void Map::RemoveFromActive(Creature* c)
RemoveFromActiveHelper(c);
// also allow unloading spawn grid
- if (!c->isPet() && c->GetDBTableGUIDLow())
+ if (!c->IsPet() && c->GetDBTableGUIDLow())
{
float x, y, z;
c->GetRespawnPosition(x, y, z);
@@ -2325,7 +2325,7 @@ bool InstanceMap::CanEnter(Player* player)
}
// allow GM's to enter
- if (player->isGameMaster())
+ if (player->IsGameMaster())
return Map::CanEnter(player);
// cannot enter if the instance is full (player cap), GMs don't count
@@ -2339,7 +2339,7 @@ bool InstanceMap::CanEnter(Player* player)
// cannot enter while an encounter is in progress on raids
/*Group* group = player->GetGroup();
- if (!player->isGameMaster() && group && group->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/
+ if (!player->IsGameMaster() && group && group->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/
if (IsRaid() && GetInstanceScript() && GetInstanceScript()->IsEncounterInProgress())
{
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
@@ -2353,9 +2353,9 @@ bool InstanceMap::CanEnter(Player* player)
if (!playerList.isEmpty())
for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i)
- if (Player* iPlayer = i->getSource())
+ if (Player* iPlayer = i->GetSource())
{
- if (iPlayer->isGameMaster()) // bypass GMs
+ if (iPlayer->IsGameMaster()) // bypass GMs
continue;
if (!player->GetGroup()) // player has not group and there is someone inside, deny entry
{
@@ -2568,14 +2568,14 @@ bool InstanceMap::Reset(uint8 method)
{
// notify the players to leave the instance so it can be reset
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- itr->getSource()->SendResetFailedNotify(GetId());
+ itr->GetSource()->SendResetFailedNotify(GetId());
}
else
{
if (method == INSTANCE_RESET_GLOBAL)
// set the homebind timer for players inside (1 minute)
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- itr->getSource()->m_InstanceValid = false;
+ itr->GetSource()->m_InstanceValid = false;
// the unload timer is not started
// instead the map will unload immediately after the players have left
@@ -2609,7 +2609,7 @@ void InstanceMap::PermBindAllPlayers(Player* source)
// group members outside the instance group don't get bound
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
- Player* player = itr->getSource();
+ Player* player = itr->GetSource();
// players inside an instance cannot be bound to other instances
// some players may already be permanently bound, in this case nothing happens
InstancePlayerBind* bind = player->GetBoundInstance(save->GetMapId(), save->GetDifficulty());
@@ -2642,7 +2642,7 @@ void InstanceMap::UnloadAll()
void InstanceMap::SendResetWarnings(uint32 timeLeft) const
{
for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDifficulty(IsRaid()), timeLeft);
+ itr->GetSource()->SendInstanceResetWarning(GetId(), itr->GetSource()->GetDifficulty(IsRaid()), timeLeft);
}
void InstanceMap::SetResetSchedule(bool on)
@@ -2758,7 +2758,7 @@ void BattlegroundMap::RemoveAllPlayers()
{
if (HavePlayers())
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
if (!player->IsBeingTeleportedFar())
player->TeleportTo(player->GetBattlegroundEntryPoint());
}
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 538285edd0f..ccf2e5321ce 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -183,7 +183,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
// FIXME: mapDiff is never used
//Bypass checks for GMs
- if (player->isGameMaster())
+ if (player->IsGameMaster())
return true;
char const* mapName = entry->name;
@@ -202,7 +202,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
}
}
- if (!player->isAlive())
+ if (!player->IsAlive())
{
if (Corpse* corpse = player->GetCorpse())
{
diff --git a/src/server/game/Maps/PhaseMgr.cpp b/src/server/game/Maps/PhaseMgr.cpp
index a7393dfba7f..0314a9605ba 100644
--- a/src/server/game/Maps/PhaseMgr.cpp
+++ b/src/server/game/Maps/PhaseMgr.cpp
@@ -225,7 +225,7 @@ void PhaseMgr::SetCustomPhase(uint32 phaseMask)
uint32 PhaseData::GetCurrentPhasemask() const
{
- if (player->isGameMaster())
+ if (player->IsGameMaster())
return uint32(PHASEMASK_ANYWHERE);
if (_CustomPhasemask)
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 39a478f158e..74a988acf70 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -166,7 +166,7 @@ namespace Trinity
uint32 gain;
if (u->GetTypeId() == TYPEID_UNIT &&
- (((Creature*)u)->isTotem() || ((Creature*)u)->isPet() ||
+ (((Creature*)u)->IsTotem() || ((Creature*)u)->IsPet() ||
(((Creature*)u)->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL) ||
((Creature*)u)->GetCreatureTemplate()->type == CREATURE_TYPE_CRITTER))
gain = 0;
diff --git a/src/server/game/Movement/FollowerReference.cpp b/src/server/game/Movement/FollowerReference.cpp
index 30797bbaaca..84c6c266cea 100644
--- a/src/server/game/Movement/FollowerReference.cpp
+++ b/src/server/game/Movement/FollowerReference.cpp
@@ -32,5 +32,5 @@ void FollowerReference::targetObjectDestroyLink()
void FollowerReference::sourceObjectDestroyLink()
{
- getSource()->stopFollowing();
+ GetSource()->stopFollowing();
}
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index 72537f0898c..ef24b112253 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -37,7 +37,7 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
unit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
unit->GetPosition(i_x, i_y, i_z);
- if (!unit->isAlive() || unit->IsStopped())
+ if (!unit->IsAlive() || unit->IsStopped())
return;
unit->StopMoving();
@@ -49,7 +49,7 @@ void ConfusedMovementGenerator<T>::DoReset(T* unit)
{
i_nextMoveTime.Reset(0);
- if (!unit->isAlive() || unit->IsStopped())
+ if (!unit->IsAlive() || unit->IsStopped())
return;
unit->StopMoving();
@@ -117,8 +117,8 @@ void ConfusedMovementGenerator<Creature>::DoFinalize(Creature* unit)
{
unit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
unit->ClearUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_CONFUSED_MOVE);
- if (unit->getVictim())
- unit->SetTarget(unit->getVictim()->GetGUID());
+ if (unit->GetVictim())
+ unit->SetTarget(unit->GetVictim()->GetGUID());
}
template void ConfusedMovementGenerator<Player>::DoInitialize(Player*);
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
index 216fffbfee1..f78411fc547 100644
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
@@ -125,8 +125,8 @@ void FleeingMovementGenerator<Creature>::DoFinalize(Creature* owner)
{
owner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING);
owner->ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE);
- if (owner->getVictim())
- owner->SetTarget(owner->getVictim()->GetGUID());
+ if (owner->GetVictim())
+ owner->SetTarget(owner->GetVictim()->GetGUID());
}
template<class T>
@@ -138,7 +138,7 @@ void FleeingMovementGenerator<T>::DoReset(T* owner)
template<class T>
bool FleeingMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
{
- if (!owner || !owner->isAlive())
+ if (!owner || !owner->IsAlive())
return false;
if (owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
@@ -169,9 +169,9 @@ void TimedFleeingMovementGenerator::Finalize(Unit* owner)
{
owner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_FLEEING);
owner->ClearUnitState(UNIT_STATE_FLEEING|UNIT_STATE_FLEEING_MOVE);
- if (Unit* victim = owner->getVictim())
+ if (Unit* victim = owner->GetVictim())
{
- if (owner->isAlive())
+ if (owner->IsAlive())
{
owner->AttackStop();
owner->ToCreature()->AI()->AttackStart(victim);
@@ -181,7 +181,7 @@ void TimedFleeingMovementGenerator::Finalize(Unit* owner)
bool TimedFleeingMovementGenerator::Update(Unit* owner, uint32 time_diff)
{
- if (!owner->isAlive())
+ if (!owner->IsAlive())
return false;
if (owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
index 2c3d5b3bf61..49cf797761a 100755
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.cpp
@@ -41,8 +41,8 @@ void RotateMovementGenerator::Initialize(Unit* owner)
if (!owner->IsStopped())
owner->StopMoving();
- if (owner->getVictim())
- owner->SetInFront(owner->getVictim());
+ if (owner->GetVictim())
+ owner->SetInFront(owner->GetVictim());
owner->AddUnitState(UNIT_STATE_ROTATING);
owner->AttackStop();
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 186723a1c43..917872c5960 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -125,7 +125,7 @@ void AssistanceMovementGenerator::Finalize(Unit* unit)
{
unit->ToCreature()->SetNoCallAssistance(false);
unit->ToCreature()->CallAssistance();
- if (unit->isAlive())
+ if (unit->IsAlive())
unit->GetMotionMaster()->MoveSeekAssistanceDistract(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY));
}
@@ -140,9 +140,9 @@ void EffectMovementGenerator::Finalize(Unit* unit)
return;
// Need restore previous movement since we have no proper states system
- if (unit->isAlive() && !unit->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_FLEEING))
+ if (unit->IsAlive() && !unit->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_FLEEING))
{
- if (Unit* victim = unit->getVictim())
+ if (Unit* victim = unit->GetVictim())
unit->GetMotionMaster()->MoveChase(victim);
else
unit->GetMotionMaster()->Initialize();
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index 723b0748494..24fd38a3a8f 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -116,7 +116,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
template<>
void RandomMovementGenerator<Creature>::DoInitialize(Creature* creature)
{
- if (!creature->isAlive())
+ if (!creature->IsAlive())
return;
if (!wander_distance)
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index 8086e60c912..f457443dc8c 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -58,7 +58,7 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool up
// be (GetCombatReach() + i_offset) away.
// Only applies when i_target is pet's owner otherwise pets and mobs end up
// doing a "dance" while fighting
- if (owner->isPet() && i_target->GetTypeId() == TYPEID_PLAYER)
+ if (owner->IsPet() && i_target->GetTypeId() == TYPEID_PLAYER)
{
dist = i_target->GetCombatReach();
size = i_target->GetCombatReach() - i_target->GetObjectSize();
@@ -89,7 +89,7 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool up
i_path = new PathGenerator(owner);
// allow pets to use shortcut if no path found when following their master
- bool forceDest = (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->isPet()
+ bool forceDest = (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsPet()
&& owner->HasUnitState(UNIT_STATE_FOLLOW));
bool result = i_path->CalculatePath(x, y, z, forceDest);
@@ -122,7 +122,7 @@ bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff)
if (!i_target.isValid() || !i_target->IsInWorld())
return false;
- if (!owner || !owner->isAlive())
+ if (!owner || !owner->IsAlive())
return false;
if (owner->HasUnitState(UNIT_STATE_NOT_MOVE))
@@ -252,7 +252,7 @@ void FollowMovementGenerator<Creature>::_updateSpeed(Creature* owner)
{
// pet only sync speed with owner
/// Make sure we are not in the process of a map change (IsInWorld)
- if (!owner->isPet() || !owner->IsInWorld() || !i_target.isValid() || i_target->GetGUID() != owner->GetOwnerGUID())
+ if (!owner->IsPet() || !owner->IsInWorld() || !i_target.isValid() || i_target->GetGUID() != owner->GetOwnerGUID())
return;
owner->UpdateSpeed(MOVE_RUN, true);
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index 3edeb348d54..14d0ab0ec66 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -83,7 +83,7 @@ class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMo
static void _clearUnitStateMove(T* u) { u->ClearUnitState(UNIT_STATE_CHASE_MOVE); }
static void _addUnitStateMove(T* u) { u->AddUnitState(UNIT_STATE_CHASE_MOVE); }
bool EnableWalking() const { return false;}
- bool _lostTarget(T* u) const { return u->getVictim() != this->GetTarget(); }
+ bool _lostTarget(T* u) const { return u->GetVictim() != this->GetTarget(); }
void _reachTarget(T*);
};
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index 3fd7e7ee393..6ef93402606 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -172,7 +172,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
BuildShortcut();
bool path = _sourceUnit->GetTypeId() == TYPEID_UNIT && _sourceUnit->ToCreature()->CanFly();
- bool waterPath = _sourceUnit->GetTypeId() == TYPEID_UNIT && _sourceUnit->ToCreature()->canSwim();
+ bool waterPath = _sourceUnit->GetTypeId() == TYPEID_UNIT && _sourceUnit->ToCreature()->CanSwim();
if (waterPath)
{
// Check both start and end points, if they're both in water, then we can *safely* let the creature move
@@ -207,7 +207,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
if (_sourceUnit->GetBaseMap()->IsUnderWater(p.x, p.y, p.z))
{
TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: underWater case\n");
- if (owner->canSwim())
+ if (owner->CanSwim())
buildShotrcut = true;
}
else
@@ -511,11 +511,11 @@ void PathGenerator::CreateFilter()
if (_sourceUnit->GetTypeId() == TYPEID_UNIT)
{
Creature* creature = (Creature*)_sourceUnit;
- if (creature->canWalk())
+ if (creature->CanWalk())
includeFlags |= NAV_GROUND; // walk
// creatures don't take environmental damage
- if (creature->canSwim())
+ if (creature->CanSwim())
includeFlags |= (NAV_WATER | NAV_MAGMA | NAV_SLIME); // swim
}
else // assume Player
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 6cc26483320..30308c12630 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -441,7 +441,7 @@ void OutdoorPvP::HandleKill(Player* killer, Unit* killed)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* groupGuy = itr->getSource();
+ Player* groupGuy = itr->GetSource();
if (!groupGuy)
continue;
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index bb791cd3810..c37cdf80730 100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -579,7 +579,7 @@ void Map::ScriptsProcess()
}
// quest id and flags checked at script loading
- if ((worldObject->GetTypeId() != TYPEID_UNIT || ((Unit*)worldObject)->isAlive()) &&
+ if ((worldObject->GetTypeId() != TYPEID_UNIT || ((Unit*)worldObject)->IsAlive()) &&
(step.script->QuestExplored.Distance == 0 || worldObject->IsWithinDistInMap(player, float(step.script->QuestExplored.Distance))))
player->AreaExploredOrEventHappens(step.script->QuestExplored.QuestID);
else
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index fc624b93448..42cf9803ab3 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -489,7 +489,7 @@ void WorldSession::LogoutPlayer(bool save)
bg->EventPlayerLoggedOut(_player);
///- Teleport to home if the player is in an invalid instance
- if (!_player->m_InstanceValid && !_player->isGameMaster())
+ if (!_player->m_InstanceValid && !_player->IsGameMaster())
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
sOutdoorPvPMgr->HandlePlayerLeaveZone(_player, _player->GetZoneId());
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index f0f2f787e60..66ad6fc190a 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -112,7 +112,7 @@ void LoadSkillExtraItemTable()
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
-bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax)
+bool CanCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax)
{
// get the info for the specified spell
SkillExtraItemMap::const_iterator ret = SkillExtraItemStore.find(spellId);
diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h
index fd73cdbeab6..507d513dd02 100644
--- a/src/server/game/Skills/SkillExtraItems.h
+++ b/src/server/game/Skills/SkillExtraItems.h
@@ -24,7 +24,7 @@
// predef classes used in functions
class Player;
// returns true and sets the appropriate info if the player can create extra items with the given spellId
-bool canCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax);
+bool CanCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax);
// function to load the extra item creation info from DB
void LoadSkillExtraItemTable();
#endif
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 6b2e67df095..faaedf42b74 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1588,7 +1588,7 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m
target->SetHealth(1);
}
// die at aura end
- else if (target->isAlive())
+ else if (target->IsAlive())
// call functions which may have additional effects after chainging state of unit
target->setDeathState(JUST_DIED);
}
@@ -2787,11 +2787,11 @@ void AuraEffect::HandleAuraModTotalThreat(AuraApplication const* aurApp, uint8 m
Unit* target = aurApp->GetTarget();
- if (!target->isAlive() || target->GetTypeId() != TYPEID_PLAYER)
+ if (!target->IsAlive() || target->GetTypeId() != TYPEID_PLAYER)
return;
Unit* caster = GetCaster();
- if (caster && caster->isAlive())
+ if (caster && caster->IsAlive())
target->getHostileRefManager().addTempThreat((float)GetAmount(), apply);
}
@@ -2802,11 +2802,11 @@ void AuraEffect::HandleModTaunt(AuraApplication const* aurApp, uint8 mode, bool
Unit* target = aurApp->GetTarget();
- if (!target->isAlive() || !target->CanHaveThreatList())
+ if (!target->IsAlive() || !target->CanHaveThreatList())
return;
Unit* caster = GetCaster();
- if (!caster || !caster->isAlive())
+ if (!caster || !caster->IsAlive())
return;
if (apply)
@@ -2915,7 +2915,7 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
// return;
Unit* target = aurApp->GetTarget();
- if (target->GetTypeId() != TYPEID_UNIT || !target->ToCreature()->isPet())
+ if (target->GetTypeId() != TYPEID_UNIT || !target->ToCreature()->IsPet())
return;
Pet* pet = target->ToPet();
@@ -2944,7 +2944,7 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
// Follow owner only if not fighting or owner didn't click "stay" at new location
// This may be confusing because pet bar shows "stay" when under the spell but it retains
// the "follow" flag. Player MUST click "stay" while under the spell.
- if (!pet->getVictim() && !pet->GetCharmInfo()->HasCommandState(COMMAND_STAY))
+ if (!pet->GetVictim() && !pet->GetCharmInfo()->HasCommandState(COMMAND_STAY))
{
pet->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, pet->GetFollowAngle());
}
@@ -3589,7 +3589,7 @@ void AuraEffect::HandleAuraModResistance(AuraApplication const* aurApp, uint8 mo
if (GetMiscValue() & int32(1<<x))
{
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(GetAmount()), apply);
- if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
+ if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->IsPet())
target->ApplyResistanceBuffModsMod(SpellSchools(x), GetAmount() > 0, (float)GetAmount(), apply);
}
}
@@ -3606,7 +3606,7 @@ void AuraEffect::HandleAuraModBaseResistancePCT(AuraApplication const* aurApp, u
if (target->GetTypeId() != TYPEID_PLAYER)
{
//pets only have base armor
- if (target->ToCreature()->isPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
+ if (target->ToCreature()->IsPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
target->HandleStatModifier(UNIT_MOD_ARMOR, BASE_PCT, float(GetAmount()), apply);
}
else
@@ -3631,7 +3631,7 @@ void AuraEffect::HandleModResistancePercent(AuraApplication const* aurApp, uint8
if (GetMiscValue() & int32(1<<i))
{
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT, float(GetAmount()), apply);
- if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
+ if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->IsPet())
{
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), true, (float)GetAmount(), apply);
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), false, (float)GetAmount(), apply);
@@ -3651,7 +3651,7 @@ void AuraEffect::HandleModBaseResistance(AuraApplication const* aurApp, uint8 mo
if (target->GetTypeId() != TYPEID_PLAYER)
{
//only pets have base stats
- if (target->ToCreature()->isPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
+ if (target->ToCreature()->IsPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
target->HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(GetAmount()), apply);
}
else
@@ -3704,7 +3704,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
{
//target->ApplyStatMod(Stats(i), m_amount, apply);
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(GetAmount()), apply);
- if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
+ if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->IsPet())
target->ApplyStatBuffMod(Stats(i), (float)GetAmount(), apply);
}
}
@@ -3817,14 +3817,14 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
// save current health state
float healthPct = target->GetHealthPct();
- bool alive = target->isAlive();
+ bool alive = target->IsAlive();
for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
{
if (GetMiscValueB() & 1 << i || !GetMiscValueB()) // 0 is also used for all stats
{
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, float(GetAmount()), apply);
- if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
+ if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->IsPet())
target->ApplyStatPercentBuffMod(Stats(i), float(GetAmount()), apply);
}
}
@@ -4016,7 +4016,7 @@ void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurAp
// Unit will keep hp% after MaxHealth being modified if unit is alive.
float percent = target->GetHealthPct();
target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(GetAmount()), apply);
- if (target->isAlive())
+ if (target->IsAlive())
target->SetHealth(target->CountPctFromMaxHealth(int32(percent)));
}
@@ -4732,7 +4732,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
// AT REMOVE
else
{
- if ((GetSpellInfo()->IsQuestTame()) && caster && caster->isAlive() && target->isAlive())
+ if ((GetSpellInfo()->IsQuestTame()) && caster && caster->IsAlive() && target->IsAlive())
{
uint32 finalSpelId = 0;
switch (GetId())
@@ -5486,12 +5486,12 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
{
// Feeding Frenzy Rank 1
case 53511:
- if (target->getVictim() && target->getVictim()->HealthBelowPct(35))
+ if (target->GetVictim() && target->GetVictim()->HealthBelowPct(35))
target->CastSpell(target, 60096, true, 0, this);
return;
// Feeding Frenzy Rank 2
case 53512:
- if (target->getVictim() && target->getVictim()->HealthBelowPct(35))
+ if (target->GetVictim() && target->GetVictim()->HealthBelowPct(35))
target->CastSpell(target, 60097, true, 0, this);
return;
default:
@@ -5560,10 +5560,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
{
switch (auraId)
{
- // Thaumaturgy Channel
- case 9712:
- triggerSpellId = 21029;
- break;
// Brood Affliction: Bronze
case 23170:
triggerSpellId = 23171;
@@ -5856,7 +5852,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
{
- if (!caster || !target->isAlive())
+ if (!caster || !target->IsAlive())
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo()))
@@ -5992,7 +5988,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) const
{
- if (!caster || !target->isAlive())
+ if (!caster || !target->IsAlive())
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo()))
@@ -6047,10 +6043,10 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
damage = (damage <= absorb+resist) ? 0 : (damage-absorb-resist);
if (damage)
procVictim |= PROC_FLAG_TAKEN_DAMAGE;
- if (caster->isAlive())
+ if (caster->IsAlive())
caster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, damage, BASE_ATTACK, GetSpellInfo());
int32 new_damage = caster->DealDamage(target, damage, &cleanDamage, DOT, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), false);
- if (caster->isAlive())
+ if (caster->IsAlive())
{
float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster);
@@ -6064,7 +6060,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) const
{
- if (!caster || !caster->isAlive() || !target->isAlive())
+ if (!caster || !caster->IsAlive() || !target->IsAlive())
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED))
@@ -6092,7 +6088,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster)
void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
{
- if (!caster || !target->isAlive())
+ if (!caster || !target->IsAlive())
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED))
@@ -6102,7 +6098,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
}
// heal for caster damage (must be alive)
- if (target != caster && GetSpellInfo()->AttributesEx2 & SPELL_ATTR2_HEALTH_FUNNEL && !caster->isAlive())
+ if (target != caster && GetSpellInfo()->AttributesEx2 & SPELL_ATTR2_HEALTH_FUNNEL && !caster->IsAlive())
return;
// don't regen when permanent aura target has full power
@@ -6200,7 +6196,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
{
Powers powerType = Powers(GetMiscValue());
- if (!caster || !caster->isAlive() || !target->isAlive() || target->getPowerType() != powerType)
+ if (!caster || !caster->IsAlive() || !target->IsAlive() || target->getPowerType() != powerType)
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo()))
@@ -6269,7 +6265,7 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const
else
powerType = Powers(GetMiscValue());
- if (!target->isAlive() || !target->GetMaxPower(powerType))
+ if (!target->IsAlive() || !target->GetMaxPower(powerType))
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED))
@@ -6300,7 +6296,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
{
Powers powerType = Powers(GetMiscValue());
- if (!target->isAlive() || !target->GetMaxPower(powerType))
+ if (!target->IsAlive() || !target->GetMaxPower(powerType))
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED))
@@ -6332,7 +6328,7 @@ void AuraEffect::HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) con
{
Powers powerType = Powers(GetMiscValue());
- if (!caster || !target->isAlive() || target->getPowerType() != powerType)
+ if (!caster || !target->IsAlive() || target->getPowerType() != powerType)
return;
if (target->HasUnitState(UNIT_STATE_ISOLATED) || target->IsImmunedToDamage(GetSpellInfo()))
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 12cd3c93c98..6546fd16d78 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -544,7 +544,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
// persistent area aura does not hit flying targets
if (GetType() == DYNOBJ_AURA_TYPE)
{
- if (itr->first->isInFlight())
+ if (itr->first->IsInFlight())
addUnit = false;
}
// unit auras can not stack with each other
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4e0c0e0f831..731b77c9c5b 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -650,7 +650,7 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets)
}
// try to use attacked unit as a target
else if ((m_caster->GetTypeId() == TYPEID_UNIT) && neededTargets & (TARGET_FLAG_UNIT_ENEMY | TARGET_FLAG_UNIT))
- unit = m_caster->getVictim();
+ unit = m_caster->GetVictim();
// didn't find anything - let's use self as target
if (!unit && neededTargets & (TARGET_FLAG_UNIT_RAID | TARGET_FLAG_UNIT_PARTY | TARGET_FLAG_UNIT_ALLY))
@@ -1166,7 +1166,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
case TYPEID_PLAYER:
{
Unit* unitTarget = (*itr)->ToUnit();
- if (unitTarget->isAlive() || !playerCaster->isHonorOrXPTarget(unitTarget)
+ if (unitTarget->IsAlive() || !playerCaster->isHonorOrXPTarget(unitTarget)
|| ((unitTarget->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0)
|| (unitTarget->GetDisplayId() != unitTarget->GetNativeDisplayId()))
break;
@@ -1523,7 +1523,7 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImpli
target = m_caster->GetGuardianPet();
break;
case TARGET_UNIT_SUMMONER:
- if (m_caster->isSummon())
+ if (m_caster->IsSummon())
target = m_caster->ToTempSummon()->GetSummoner();
break;
case TARGET_UNIT_VEHICLE:
@@ -2098,7 +2098,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
}
// Totem casts require spellfamilymask defined in spell_proc_event to proc
- if (m_originalCaster && m_caster != m_originalCaster && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->isTotem() && m_caster->IsControlledByPlayer())
+ if (m_originalCaster && m_caster != m_originalCaster && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsTotem() && m_caster->IsControlledByPlayer())
m_procEx |= PROC_EX_INTERNAL_REQ_FAMILY;
}
@@ -2155,7 +2155,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
targetInfo.targetGUID = targetGUID; // Store target GUID
targetInfo.effectMask = effectMask; // Store all effects not immune
targetInfo.processed = false; // Effects not apply on target
- targetInfo.alive = target->isAlive();
+ targetInfo.alive = target->IsAlive();
targetInfo.damage = 0;
targetInfo.crit = false;
targetInfo.scaleAura = false;
@@ -2354,7 +2354,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
return;
}
- if (unit->isAlive() != target->alive)
+ if (unit->IsAlive() != target->alive)
return;
if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsPositive() && (getMSTime() - target->timeDelay) <= unit->m_lastSanctuaryTime)
@@ -2561,7 +2561,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
// cast at creature (or GO) quest objectives update at successful cast finished (+channel finished)
// ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm...)
- if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !spellHitTarget->ToCreature()->isPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
+ if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !spellHitTarget->ToCreature()->IsPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
if (Player* p = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself())
p->CastedCreatureOrGO(spellHitTarget->GetEntry(), spellHitTarget->GetGUID(), m_spellInfo->Id);
}
@@ -2643,7 +2643,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
if (m_caster->GetTypeId() == TYPEID_PLAYER)
m_caster->ToPlayer()->UpdatePvP(true);
}
- if (unit->isInCombat() && !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_NO_INITIAL_AGGRO))
+ if (unit->IsInCombat() && !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_NO_INITIAL_AGGRO))
{
m_caster->SetInCombatState(unit->GetCombatTimer() > 0, unit);
unit->getHostileRefManager().threatAssist(m_caster, 0.0f);
@@ -3185,7 +3185,7 @@ void Spell::cast(bool skipCheck)
// This prevents spells such as Hunter's Mark from triggering pet attack
if (this->GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE)
if (Pet* playerPet = playerCaster->GetPet())
- if (playerPet->isAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT))
+ if (playerPet->IsAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT))
playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit());
}
@@ -3541,7 +3541,7 @@ void Spell::_handle_finish_phase()
}
if (m_caster->m_extraAttacks && GetSpellInfo()->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS))
- m_caster->HandleProcExtraAttackFor(m_caster->getVictim());
+ m_caster->HandleProcExtraAttackFor(m_caster->GetVictim());
/// @todo trigger proc phase finish here
}
@@ -3707,7 +3707,7 @@ void Spell::finish(bool ok)
if (!ok)
return;
- if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->isSummon())
+ if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsSummon())
{
// Unsummon statue
uint32 spell = m_caster->GetUInt32Value(UNIT_CREATED_BY_SPELL);
@@ -3906,7 +3906,7 @@ void Spell::SendSpellStart()
castFlags |= CAST_FLAG_PENDING;
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
- (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->isPet()))
+ (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet()))
&& m_spellInfo->PowerType != POWER_HEALTH)
castFlags |= CAST_FLAG_POWER_LEFT_SELF;
@@ -3993,7 +3993,7 @@ void Spell::SendSpellGo()
castFlags |= CAST_FLAG_PENDING;
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
- (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->isPet()))
+ (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet()))
&& m_spellInfo->PowerType != POWER_HEALTH)
castFlags |= CAST_FLAG_POWER_LEFT_SELF; // should only be sent to self, but the current messaging doesn't make that possible
@@ -4766,7 +4766,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOT
SpellCastResult Spell::CheckCast(bool strict)
{
// check death state
- if (!m_caster->isAlive() && !(m_spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !((m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD) || (IsTriggered() && !m_triggeredByAuraSpell)))
+ if (!m_caster->IsAlive() && !(m_spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !((m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD) || (IsTriggered() && !m_triggeredByAuraSpell)))
return SPELL_FAILED_CASTER_DEAD;
// check cooldowns to prevent cheating
@@ -4873,7 +4873,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_spellInfo->ExcludeCasterAuraSpell && m_caster->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->ExcludeCasterAuraSpell, m_caster)))
return SPELL_FAILED_CASTER_AURASTATE;
- if (reqCombat && m_caster->isInCombat() && !m_spellInfo->CanBeUsedInCombat())
+ if (reqCombat && m_caster->IsInCombat() && !m_spellInfo->CanBeUsedInCombat())
return SPELL_FAILED_AFFECTING_COMBAT;
}
@@ -4991,7 +4991,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
// zone check
- if (m_caster->GetTypeId() == TYPEID_UNIT || !m_caster->ToPlayer()->isGameMaster())
+ if (m_caster->GetTypeId() == TYPEID_UNIT || !m_caster->ToPlayer()->IsGameMaster())
{
uint32 zone, area;
m_caster->GetZoneAndAreaId(zone, area);
@@ -5006,7 +5006,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_caster->IsMounted() && m_caster->GetTypeId() == TYPEID_PLAYER && !(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE) &&
!m_spellInfo->IsPassive() && !(m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_MOUNTED))
{
- if (m_caster->isInFlight())
+ if (m_caster->IsInFlight())
return SPELL_FAILED_NOT_ON_TAXI;
else
return SPELL_FAILED_NOT_MOUNTED;
@@ -5167,7 +5167,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!pet->GetCurrentFoodBenefitLevel(foodItem->GetTemplate()->ItemLevel))
return SPELL_FAILED_FOOD_LOWLEVEL;
- if (m_caster->isInCombat() || pet->isInCombat())
+ if (m_caster->IsInCombat() || pet->IsInCombat())
return SPELL_FAILED_AFFECTING_COMBAT;
break;
@@ -5309,7 +5309,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
Creature* pet = m_caster->GetGuardianPet();
- if (pet && pet->isAlive())
+ if (pet && pet->IsAlive())
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
break;
@@ -5539,7 +5539,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
// not allow cast fly spells if not have req. skills (all spells is self target)
// allow always ghost flight spells
- if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive())
+ if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->IsAlive())
{
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(m_originalCaster->GetZoneId());
if (AreaTableEntry const* area = GetAreaEntryByAreaID(m_originalCaster->GetAreaId()))
@@ -5609,7 +5609,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
// dead owner (pets still alive when owners ressed?)
if (Unit* owner = m_caster->GetCharmerOrOwner())
- if (!owner->isAlive())
+ if (!owner->IsAlive())
return SPELL_FAILED_CASTER_DEAD;
if (!target && m_targets.GetUnitTarget())
@@ -6736,7 +6736,7 @@ bool SpellEvent::IsDeletable() const
bool Spell::IsValidDeadOrAliveTarget(Unit const* target) const
{
- if (target->isAlive())
+ if (target->IsAlive())
return !m_spellInfo->IsRequiringDeadTarget();
if (m_spellInfo->IsAllowingDeadTarget())
return true;
@@ -7359,19 +7359,19 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
switch (_targetSelectionType)
{
case TARGET_CHECK_ENEMY:
- if (unitTarget->isTotem())
+ if (unitTarget->IsTotem())
return false;
if (!_caster->_IsValidAttackTarget(unitTarget, _spellInfo))
return false;
break;
case TARGET_CHECK_ALLY:
- if (unitTarget->isTotem())
+ if (unitTarget->IsTotem())
return false;
if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
return false;
break;
case TARGET_CHECK_PARTY:
- if (unitTarget->isTotem())
+ if (unitTarget->IsTotem())
return false;
if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
return false;
@@ -7383,7 +7383,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
return false;
// nobreak;
case TARGET_CHECK_RAID:
- if (unitTarget->isTotem())
+ if (unitTarget->IsTotem())
return false;
if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
return false;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 97a06415a9d..9e7d0418905 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -271,7 +271,7 @@ void Spell::EffectResurrectNew(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || unitTarget->isAlive())
+ if (!unitTarget || unitTarget->IsAlive())
return;
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -297,7 +297,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
@@ -321,7 +321,7 @@ void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
uint32 absorb = 0;
@@ -339,7 +339,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
return;
- if (unitTarget && unitTarget->isAlive())
+ if (unitTarget && unitTarget->IsAlive())
{
bool apply_direct_bonus = true;
switch (m_spellInfo->SpellFamilyName)
@@ -953,7 +953,7 @@ void Spell::EffectJump(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
return;
- if (m_caster->isInFlight())
+ if (m_caster->IsInFlight())
return;
if (!unitTarget)
@@ -972,7 +972,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH)
return;
- if (m_caster->isInFlight())
+ if (m_caster->IsInFlight())
return;
if (!m_targets.HasDst())
@@ -1003,7 +1003,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || unitTarget->isInFlight())
+ if (!unitTarget || unitTarget->IsInFlight())
return;
// Pre effects
@@ -1196,7 +1196,7 @@ void Spell::EffectPowerDrain(SpellEffIndex effIndex)
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
- if (!unitTarget || !unitTarget->isAlive() || unitTarget->getPowerType() != powerType || damage < 0)
+ if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
return;
// add spell damage bonus
@@ -1270,7 +1270,7 @@ void Spell::EffectPowerBurn(SpellEffIndex effIndex)
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
- if (!unitTarget || !unitTarget->isAlive() || unitTarget->getPowerType() != powerType || damage < 0)
+ if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
return;
// burn x% of target's mana, up to maximum of 2x% of caster's mana (Mana Burn)
@@ -1299,7 +1299,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
return;
- if (unitTarget && unitTarget->isAlive() && damage >= 0)
+ if (unitTarget && unitTarget->IsAlive() && damage >= 0)
{
// Try to get original caster
Unit* caster = m_originalCasterGUID ? m_originalCaster : m_caster;
@@ -1396,7 +1396,7 @@ void Spell::EffectHealPct(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive() || damage < 0)
+ if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
return;
// Skip if m_originalCaster not available
@@ -1414,7 +1414,7 @@ void Spell::EffectHealMechanical(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive() || damage < 0)
+ if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
return;
// Skip if m_originalCaster not available
@@ -1431,7 +1431,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive() || damage < 0)
+ if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
return;
damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
@@ -1445,7 +1445,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
// get max possible damage, don't count overkill for heal
uint32 healthGain = uint32(-unitTarget->GetHealthGain(-damage) * healMultiplier);
- if (m_caster->isAlive())
+ if (m_caster->IsAlive())
{
healthGain = m_caster->SpellHealingBonusDone(m_caster, m_spellInfo, healthGain, HEAL);
healthGain = m_caster->SpellHealingBonusTaken(m_caster, m_spellInfo, healthGain, HEAL);
@@ -1503,7 +1503,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
// the maximum number of created additional items
uint8 additionalMaxNum=0;
// get the chance and maximum number for creating extra items
- if (canCreateExtraItems(player, m_spellInfo->Id, additionalCreateChance, additionalMaxNum))
+ if (CanCreateExtraItems(player, m_spellInfo->Id, additionalCreateChance, additionalMaxNum))
{
// roll with this chance till we roll not to create or we create the max num
while (roll_chance_f(additionalCreateChance) && items_count <= additionalMaxNum)
@@ -1668,7 +1668,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
if (!unitTarget)
return;
- if (!unitTarget->isAlive())
+ if (!unitTarget->IsAlive())
return;
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
@@ -1774,7 +1774,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
if (!unitTarget)
return;
- if (!unitTarget->isAlive())
+ if (!unitTarget->IsAlive())
return;
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
@@ -1799,7 +1799,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
if (gameObjTarget)
{
// Players shouldn't be able to loot gameobjects that are currently despawned
- if (!gameObjTarget->isSpawned() && !player->isGameMaster())
+ if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
{
TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!",
player->GetName().c_str(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
@@ -2170,7 +2170,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
case SUMMON_TYPE_TOTEM:
{
summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id);
- if (!summon || !summon->isTotem())
+ if (!summon || !summon->IsTotem())
return;
// Mana Tide Totem
@@ -2418,7 +2418,7 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/)
return;
// Check for possible target
- if (!unitTarget || unitTarget->isInCombat())
+ if (!unitTarget || unitTarget->IsInCombat())
return;
// target must be OK to do this
@@ -2445,7 +2445,7 @@ void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/)
return;
// victim have to be alive and humanoid or undead
- if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
+ if (unitTarget->IsAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING);
}
@@ -2494,7 +2494,7 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
if (!unitTarget)
return;
- if (unitTarget->isInFlight())
+ if (unitTarget->IsInFlight())
return;
float dis = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
@@ -2771,7 +2771,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
Creature* creatureTarget = unitTarget->ToCreature();
- if (creatureTarget->isPet())
+ if (creatureTarget->IsPet())
return;
if (m_caster->getClass() != CLASS_HUNTER)
@@ -2820,7 +2820,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
if (m_originalCaster)
{
owner = m_originalCaster->ToPlayer();
- if (!owner && m_originalCaster->ToCreature()->isTotem())
+ if (!owner && m_originalCaster->ToCreature()->IsTotem())
owner = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself();
}
@@ -2877,7 +2877,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
if (m_caster->GetTypeId() == TYPEID_UNIT)
{
- if (m_caster->ToCreature()->isTotem())
+ if (m_caster->ToCreature()->IsTotem())
pet->SetReactState(REACT_AGGRESSIVE);
else
pet->SetReactState(REACT_DEFENSIVE);
@@ -2930,7 +2930,7 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)
// this effect use before aura Taunt apply for prevent taunt already attacking target
// for spell as marked "non effective at already attacking target"
if (!unitTarget || !unitTarget->CanHaveThreatList()
- || unitTarget->getVictim() == m_caster)
+ || unitTarget->GetVictim() == m_caster)
{
SendCastResult(SPELL_FAILED_DONT_REPORT);
return;
@@ -2959,7 +2959,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
// multiple weapon dmg effect workaround
@@ -3188,7 +3188,7 @@ void Spell::EffectThreat(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive() || !m_caster->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive() || !m_caster->IsAlive())
return;
if (!unitTarget->CanHaveThreatList())
@@ -3202,7 +3202,7 @@ void Spell::EffectHealMaxHealth(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
int32 addhealth = 0;
@@ -3221,7 +3221,7 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
/// @todo not all spells that used this effect apply cooldown at school spells
@@ -3421,7 +3421,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case 22984:
case 22985:
{
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
// Onyxia Scale Cloak
@@ -3650,7 +3650,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
case 52173: // Coyote Spirit Despawn
case 60243: // Blood Parrot Despawn
- if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->isSummon())
+ if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
unitTarget->ToTempSummon()->UnSummon();
return;
case 52479: // Gift of the Harvester
@@ -3765,7 +3765,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
case 60123: // Lightwell
{
- if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->isSummon())
+ if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->IsSummon())
return;
uint32 spell_heal;
@@ -3813,7 +3813,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
continue;
Creature* totem = unitTarget->GetMap()->GetCreature(unitTarget->m_SummonSlot[slot]);
- if (totem && totem->isTotem())
+ if (totem && totem->IsTotem())
{
m_caster->CastCustomSpell(totem, 55277, &basepoints0, NULL, NULL, true);
}
@@ -3872,7 +3872,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
// Judgement (seal trigger)
if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT)
{
- if (!unitTarget || !unitTarget->isAlive())
+ if (!unitTarget || !unitTarget->IsAlive())
return;
uint32 spellId1 = 0;
uint32 spellId2 = 0;
@@ -3965,7 +3965,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
Unit::AttackerSet const& attackers = unitTarget->getAttackers();
for (Unit::AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();)
{
- if (!(*itr)->canSeeOrDetect(unitTarget))
+ if (!(*itr)->CanSeeOrDetect(unitTarget))
(*(itr++))->AttackStop();
else
++itr;
@@ -4107,7 +4107,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck");
TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", target->GetName().c_str(), target->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
- if (target->isInFlight())
+ if (target->IsInFlight())
return;
target->TeleportTo(target->GetStartPosition(), TELE_TO_SPELL);
@@ -4336,7 +4336,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
if (!pet)
return;
- if (!pet->isAlive())
+ if (!pet->IsAlive())
return;
int32 benefit = pet->GetCurrentFoodBenefitLevel(foodItem->GetTemplate()->ItemLevel);
@@ -4357,7 +4357,7 @@ void Spell::EffectDismissPet(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isPet())
+ if (!unitTarget || !unitTarget->IsPet())
return;
Pet* pet = unitTarget->ToPet();
@@ -4439,7 +4439,7 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- if (unitTarget->isAlive() || !unitTarget->IsInWorld())
+ if (unitTarget->IsAlive() || !unitTarget->IsInWorld())
return;
Player* target = unitTarget->ToPlayer();
@@ -4461,7 +4461,7 @@ void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || !unitTarget->isAlive() || !unitTarget->getVictim())
+ if (!unitTarget || !unitTarget->IsAlive() || !unitTarget->GetVictim())
return;
if (unitTarget->m_extraAttacks)
@@ -4469,7 +4469,7 @@ void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
unitTarget->m_extraAttacks = damage;
- ExecuteLogEffectExtraAttacks(effIndex, unitTarget->getVictim(), damage);
+ ExecuteLogEffectExtraAttacks(effIndex, unitTarget->GetVictim(), damage);
}
void Spell::EffectParry(SpellEffIndex /*effIndex*/)
@@ -4495,7 +4495,7 @@ void Spell::EffectLeap(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- if (!unitTarget || unitTarget->isInFlight())
+ if (!unitTarget || unitTarget->IsInFlight())
return;
if (!m_targets.HasDst())
@@ -4569,7 +4569,7 @@ void Spell::EffectSelfResurrect(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
- if (!m_caster || m_caster->isAlive())
+ if (!m_caster || m_caster->IsAlive())
return;
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4850,7 +4850,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
return;
Pet* pet = player->GetPet();
- if (pet && pet->isAlive())
+ if (pet && pet->IsAlive())
return;
if (damage < 0)
@@ -4891,7 +4891,7 @@ void Spell::EffectDestroyAllTotems(SpellEffIndex /*effIndex*/)
continue;
Creature* totem = m_caster->GetMap()->GetCreature(m_caster->m_SummonSlot[slot]);
- if (totem && totem->isTotem())
+ if (totem && totem->IsTotem())
{
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
@@ -5193,7 +5193,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
return;
TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse");
- if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive()))
+ if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->IsAlive()))
return;
unitTarget->ToPlayer()->RemovedInsignia((Player*)m_caster);
@@ -5504,7 +5504,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
if (!caster)
return;
- FactionTemplateEntry const* casterFaction = caster->getFactionTemplateEntry();
+ FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
if ((casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)) || !targetFaction)
@@ -5540,7 +5540,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
if (!caster)
return;
- if (caster->isTotem())
+ if (caster->IsTotem())
caster = caster->ToTotem()->GetOwner();
// in another case summon new
@@ -5606,7 +5606,7 @@ void Spell::EffectRenamePet(SpellEffIndex /*effIndex*/)
return;
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
- !unitTarget->ToCreature()->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
+ !unitTarget->ToCreature()->IsPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
return;
unitTarget->SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
@@ -5861,7 +5861,7 @@ void Spell::EffectResurrectWithAura(SpellEffIndex effIndex)
if (!target)
return;
- if (unitTarget->isAlive())
+ if (unitTarget->IsAlive())
return;
if (target->IsRessurectRequested()) // already have one active request
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 88cda9d5db9..85e23f36312 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1665,7 +1665,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
return SPELL_FAILED_BAD_TARGETS;
// check visibility - ignore stealth for implicit (area) targets
- if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->canSeeOrDetect(target, implicit))
+ if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->CanSeeOrDetect(target, implicit))
return SPELL_FAILED_BAD_TARGETS;
Unit const* unitTarget = target->ToUnit();
@@ -1673,7 +1673,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
// creature/player specific target checks
if (unitTarget)
{
- if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && unitTarget->isInCombat())
+ if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && unitTarget->IsInCombat())
return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
// only spells with SPELL_ATTR3_ONLY_TARGET_GHOSTS can target ghosts
@@ -1738,7 +1738,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS && !unitTarget->ToPlayer())
return SPELL_FAILED_TARGET_NOT_PLAYER;
- if (!IsAllowingDeadTarget() && !unitTarget->isAlive())
+ if (!IsAllowingDeadTarget() && !unitTarget->IsAlive())
return SPELL_FAILED_TARGETS_DEAD;
// check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
@@ -1765,7 +1765,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
if (!unitTarget->ToPlayer()->IsVisible())
return SPELL_FAILED_BM_OR_INVISGOD;
- if (unitTarget->ToPlayer()->isGameMaster())
+ if (unitTarget->ToPlayer()->IsGameMaster())
return SPELL_FAILED_BM_OR_INVISGOD;
}
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 0887af332b1..0b23ece574b 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -387,8 +387,8 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data,
uint32 areaId = source->GetAreaId();
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (itr->getSource()->GetAreaId() == areaId && (!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- itr->getSource()->GetSession()->SendPacket(data);
+ if (itr->GetSource()->GetAreaId() == areaId && (!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ itr->GetSource()->GetSession()->SendPacket(data);
return;
}
case TEXT_RANGE_ZONE:
@@ -396,16 +396,16 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data,
uint32 zoneId = source->GetZoneId();
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (itr->getSource()->GetZoneId() == zoneId && (!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- itr->getSource()->GetSession()->SendPacket(data);
+ if (itr->GetSource()->GetZoneId() == zoneId && (!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ itr->GetSource()->GetSession()->SendPacket(data);
return;
}
case TEXT_RANGE_MAP:
{
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if ((!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- itr->getSource()->GetSession()->SendPacket(data);
+ if ((!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ itr->GetSource()->GetSession()->SendPacket(data);
return;
}
case TEXT_RANGE_WORLD:
@@ -413,7 +413,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data,
SessionMap const& smap = sWorld->GetAllSessions();
for (SessionMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter)
if (Player* player = iter->second->GetPlayer())
- if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->isGameMaster()))
+ if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->IsGameMaster()))
player->GetSession()->SendPacket(data);
return;
}
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h
index 6edcbf9a88a..c32e35e8770 100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
@@ -207,8 +207,8 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder
uint32 areaId = source->GetAreaId();
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (itr->getSource()->GetAreaId() == areaId && (!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- localizer(itr->getSource());
+ if (itr->GetSource()->GetAreaId() == areaId && (!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ localizer(itr->GetSource());
return;
}
case TEXT_RANGE_ZONE:
@@ -216,16 +216,16 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder
uint32 zoneId = source->GetZoneId();
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (itr->getSource()->GetZoneId() == zoneId && (!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- localizer(itr->getSource());
+ if (itr->GetSource()->GetZoneId() == zoneId && (!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ localizer(itr->GetSource());
return;
}
case TEXT_RANGE_MAP:
{
Map::PlayerList const& players = source->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if ((!team || Team(itr->getSource()->GetTeam()) == team) && (!gmOnly || itr->getSource()->isGameMaster()))
- localizer(itr->getSource());
+ if ((!team || Team(itr->GetSource()->GetTeam()) == team) && (!gmOnly || itr->GetSource()->IsGameMaster()))
+ localizer(itr->GetSource());
return;
}
case TEXT_RANGE_WORLD:
@@ -233,7 +233,7 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder
SessionMap const& smap = sWorld->GetAllSessions();
for (SessionMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter)
if (Player* player = iter->second->GetPlayer())
- if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->isGameMaster()))
+ if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->IsGameMaster()))
localizer(player);
return;
}