aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-05-20 21:21:33 +0200
committerjackpoz <giacomopoz@gmail.com>2014-05-20 21:21:33 +0200
commit1083dbb993f1e227472891cda109098671d7eae2 (patch)
tree14823385047c6f42a7ae432643a60bb2835f50c9 /src/server/game/AI/SmartScripts
parentd36ecbf4a39ed4d1b434a2926609b1d0d7b3c645 (diff)
Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get*
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 9a677971619..ecaa20284d7 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -437,7 +437,7 @@ void SmartAI::EnterEvadeMode()
}
else if (mFollowGuid)
{
- if (Unit* target = me->GetUnit(*me, mFollowGuid))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, mFollowGuid))
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
// evade is not cleared in MoveFollow, so we can't keep it
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index dff9ddbaf2f..a1302c1d93c 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -429,7 +429,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ThreatContainer::StorageType threatList = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
{
- if (Unit* target = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
me->getThreatManager().modifyThreatPercent(target, e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature guidLow %u modify threat for unit %u, value %i",
@@ -2602,7 +2602,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
{
ThreatContainer::StorageType threatList = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
- if (Unit* temp = Unit::GetUnit(*me, (*i)->getUnitGuid()))
+ if (Unit* temp = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
l->push_back(temp);
}
break;