aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAIImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/CreatureAIImpl.h')
-rw-r--r--src/server/game/AI/CreatureAIImpl.h110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index f3e32b6033d..559240c4a3f 100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -540,115 +540,5 @@ struct AISpellInfoType
AISpellInfoType* GetAISpellInfo(uint32 i);
-inline void CreatureAI::SetGazeOn(Unit* target)
-{
- if (me->IsValidAttackTarget(target))
- {
- AttackStart(target);
- me->SetReactState(REACT_PASSIVE);
- }
-}
-
-inline bool CreatureAI::UpdateVictimWithGaze()
-{
- if (!me->isInCombat())
- return false;
-
- if (me->HasReactState(REACT_PASSIVE))
- {
- if (me->getVictim())
- return true;
- else
- me->SetReactState(REACT_AGGRESSIVE);
- }
-
- if (Unit* victim = me->SelectVictim())
- AttackStart(victim);
- return me->getVictim();
-}
-
-inline bool CreatureAI::UpdateVictim()
-{
- if (!me->isInCombat())
- return false;
-
- if (!me->HasReactState(REACT_PASSIVE))
- {
- if (Unit* victim = me->SelectVictim())
- AttackStart(victim);
- return me->getVictim();
- }
- else if (me->getThreatManager().isThreatListEmpty())
- {
- EnterEvadeMode();
- return false;
- }
-
- return true;
-}
-
-inline bool CreatureAI::_EnterEvadeMode()
-{
- if (!me->isAlive())
- return false;
-
- // dont remove vehicle auras, passengers arent supposed to drop off the vehicle
- me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
-
- // sometimes bosses stuck in combat?
- me->DeleteThreatList();
- me->CombatStop(true);
- me->LoadCreaturesAddon();
- me->SetLootRecipient(NULL);
- me->ResetPlayerDamageReq();
-
- if (me->IsInEvadeMode())
- return false;
-
- return true;
-}
-
-inline void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
-{
- if (!victim || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered))
- return;
-
- me->CastSpell(victim, spellId, triggered);
-}
-
-inline void UnitAI::DoCastVictim(uint32 spellId, bool triggered)
-{
- // Why don't we check for casting unit_state and existing target as we do in DoCast(.. ?
- me->CastSpell(me->getVictim(), spellId, triggered);
-}
-
-inline void UnitAI::DoCastAOE(uint32 spellId, bool triggered)
-{
- if (!triggered && me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
- me->CastSpell((Unit*)NULL, spellId, triggered);
-}
-
-inline Creature* CreatureAI::DoSummon(uint32 entry, const Position& pos, uint32 despawnTime, TempSummonType summonType)
-{
- return me->SummonCreature(entry, pos, summonType, despawnTime);
-}
-
-inline Creature* CreatureAI::DoSummon(uint32 entry, WorldObject* obj, float radius, uint32 despawnTime, TempSummonType summonType)
-{
- Position pos;
- obj->GetRandomNearPosition(pos, radius);
- return me->SummonCreature(entry, pos, summonType, despawnTime);
-}
-
-inline Creature* CreatureAI::DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius, uint32 despawnTime, TempSummonType summonType)
-{
- Position pos;
- obj->GetRandomNearPosition(pos, radius);
- pos.m_positionZ += flightZ;
- return me->SummonCreature(entry, pos, summonType, despawnTime);
-}
-
#endif