aboutsummaryrefslogtreecommitdiff
path: root/src/game/ReactorAI.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-31 13:58:33 -0600
committermegamage <none@none>2009-01-31 13:58:33 -0600
commitd20eaef1d6c7b8d629347b51583cbcf954ff96ed (patch)
tree0387ea5eed3569d49ffcac9553ada179fba645f0 /src/game/ReactorAI.cpp
parentbe27bd230cbefc8241ab8704bef8894252403ea2 (diff)
parent1f2292af796d4b424bf45711ae8c50e764cf0d61 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ReactorAI.cpp')
-rw-r--r--src/game/ReactorAI.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/game/ReactorAI.cpp b/src/game/ReactorAI.cpp
index dd796b74f38..29b07f60b00 100644
--- a/src/game/ReactorAI.cpp
+++ b/src/game/ReactorAI.cpp
@@ -41,24 +41,6 @@ ReactorAI::MoveInLineOfSight(Unit *)
{
}
-void
-ReactorAI::AttackStart(Unit *p)
-{
- if(!p)
- return;
-
- if(i_creature.Attack(p,true))
- {
- DEBUG_LOG("Tag unit GUID: %u (TypeId: %u) as a victim", p->GetGUIDLow(), p->GetTypeId());
- i_creature.SetInCombatWith(p);
- p->SetInCombatWith(&i_creature);
-
- i_creature.AddThreat(p, 0.0f);
- i_victimGuid = p->GetGUID();
- i_creature.GetMotionMaster()->MoveChase(p);
- }
-}
-
bool
ReactorAI::IsVisible(Unit *) const
{
@@ -69,7 +51,7 @@ void
ReactorAI::UpdateAI(const uint32 /*time_diff*/)
{
// update i_victimGuid if i_creature.getVictim() !=0 and changed
- if(!i_creature.SelectHostilTarget() || !i_creature.getVictim())
+ if(!UpdateVictim())
return;
i_victimGuid = i_creature.getVictim()->GetGUID();