aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-10 16:31:43 -0500
committermegamage <none@none>2009-05-10 16:31:43 -0500
commit55d52e22a8414b514b2c6d2bb5c3f8d4a2d2dbc5 (patch)
treeecfc80ff24ad3dae50b9d81dc05cf12ee123279a /src
parentdcf41256ddaa341b532bd7c565c3d18a7c3b6757 (diff)
*Fix build.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/CreatureAI.cpp20
-rw-r--r--src/game/CreatureAI.h6
-rw-r--r--src/game/CreatureAIImpl.h5
-rw-r--r--src/game/CreatureAIRegistry.cpp2
4 files changed, 26 insertions, 7 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp
index 2390b359731..011ffab22e5 100644
--- a/src/game/CreatureAI.cpp
+++ b/src/game/CreatureAI.cpp
@@ -33,7 +33,7 @@ void CreatureAI::OnCharmed(bool apply)
me->IsAIEnabled = false;
}
-AISpellInfoType *AISpellInfo;
+AISpellInfoType * CreatureAI::AISpellInfo;
void CreatureAI::DoZoneInCombat(Creature* creature)
{
@@ -257,6 +257,24 @@ void CreatureAI::SelectTargetList(std::list<Unit*> &targetList, uint32 num, Sele
}
}
+void CreatureAI::FillAISpellInfo()
+{
+ AISpellInfo = new AISpellInfoType[GetSpellStore()->GetNumRows()];
+
+ const SpellEntry * spellInfo;
+
+ for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
+ {
+ spellInfo = GetSpellStore()->LookupEntry(i);
+ if (!spellInfo)
+ continue;
+
+ for(uint32 j = 0; j < 3; ++j)
+ {
+ }
+ }
+}
+
/*void CreatureAI::AttackedBy( Unit* attacker )
{
if(!m_creature->getVictim())
diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h
index 6df7dcfbe95..ca13275dea1 100644
--- a/src/game/CreatureAI.h
+++ b/src/game/CreatureAI.h
@@ -21,8 +21,6 @@
#ifndef TRINITY_CREATUREAI_H
#define TRINITY_CREATUREAI_H
-#include "Common.h"
-#include "Platform/Define.h"
#include "UnitAI.h"
class WorldObject;
@@ -30,6 +28,7 @@ class Unit;
class Creature;
class Player;
struct SpellEntry;
+struct AISpellInfoType;
#define TIME_INTERVAL_LOOK 5000
#define VISIBILITY_RANGE 10000
@@ -165,6 +164,9 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
Unit* SelectTarget(SelectAggroTarget target, uint32 position = 0, float dist = 0, bool playerOnly = false, int32 aura = 0);
void SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAggroTarget target, float dist = 0, bool playerOnly = false, int32 aura = 0);
+
+ static AISpellInfoType *AISpellInfo;
+ static void FillAISpellInfo();
};
enum Permitions
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h
index 823f4cbcca6..7edebb709fd 100644
--- a/src/game/CreatureAIImpl.h
+++ b/src/game/CreatureAIImpl.h
@@ -20,6 +20,9 @@
#ifndef CREATUREAIIMPL_H
#define CREATUREAIIMPL_H
+#include "Common.h"
+#include "Platform/Define.h"
+
#define HEROIC(n,h) (HeroicMode ? h : n)
template<class T>
@@ -168,7 +171,5 @@ struct AISpellInfoType
uint32 cooldown;
};
-extern AISpellInfoType *AISpellInfo;
-
#endif
diff --git a/src/game/CreatureAIRegistry.cpp b/src/game/CreatureAIRegistry.cpp
index 36f49d28521..fc7130b0913 100644
--- a/src/game/CreatureAIRegistry.cpp
+++ b/src/game/CreatureAIRegistry.cpp
@@ -23,7 +23,6 @@
#include "AggressorAI.h"
#include "GuardAI.h"
#include "PetAI.h"
-#include "PossessedAI.h"
#include "TotemAI.h"
#include "OutdoorPvPObjectiveAI.h"
#include "CreatureEventAI.h"
@@ -47,7 +46,6 @@ namespace AIRegistry
(new CreatureAIFactory<PetAI>("PetAI"))->RegisterSelf();
(new CreatureAIFactory<TotemAI>("TotemAI"))->RegisterSelf();
(new CreatureAIFactory<OutdoorPvPObjectiveAI>("OutdoorPvPObjectiveAI"))->RegisterSelf();
- (new CreatureAIFactory<PossessedAI>("PossessedAI"))->RegisterSelf();
(new CreatureAIFactory<CreatureEventAI>("EventAI"))->RegisterSelf();
(new MovementGeneratorFactory<RandomMovementGenerator<Creature> >(RANDOM_MOTION_TYPE))->RegisterSelf();