diff options
| author | Malcrom <malcromdev@gmail.com> | 2013-06-11 19:54:27 -0230 |
|---|---|---|
| committer | Malcrom <malcromdev@gmail.com> | 2013-06-11 19:54:27 -0230 |
| commit | 66978cfc3b672309ed79da917695bc59427974aa (patch) | |
| tree | de60f66490b11865b4f652bd7ec580da0e809ff3 /src/server/game/AI/CreatureAI.cpp | |
| parent | 46374bf533987b492abd590d7cd2ae182b35bd39 (diff) | |
Core: Some function renaming.
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
| -rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 808a1a55a6a..0f19f98e125 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; @@ -93,7 +93,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN if (player->isGameMaster()) continue; - if (player->isAlive()) + if (player->IsAlive()) { creature->SetInCombatWith(player); player->SetInCombatWith(creature); @@ -124,7 +124,7 @@ 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;) @@ -132,10 +132,10 @@ void CreatureAI::MoveInLineOfSight(Unit* who) 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 |
