OregonCore  revision 3611e8a-git
Your Favourite TBC server
ScriptedCreature.h File Reference
#include "Creature.h"
#include "CreatureAI.h"
#include "CreatureAIImpl.h"
#include "ScriptedInstance.h"

Go to the source code of this file.

Classes

class  SummonList
 
struct  ScriptedAI
 
struct  Scripted_NoMovementAI
 
struct  BossAI
 

Macros

#define SCRIPT_CAST_TYPE   dynamic_cast
 
#define CAST_PLR(a)    (SCRIPT_CAST_TYPE<Player*>(a))
 
#define CAST_CRE(a)    (SCRIPT_CAST_TYPE<Creature*>(a))
 
#define CAST_SUM(a)    (SCRIPT_CAST_TYPE<TempSummon*>(a))
 
#define CAST_PET(a)    (SCRIPT_CAST_TYPE<Pet*>(a))
 
#define CAST_AI(a, b)    (SCRIPT_CAST_TYPE<a*>(b))
 

Functions

 __declspec (deprecated) inline SpellEntry *GET_SPELL(uint32 Id)
 
SpellEntryGET_SPELL (uint32 Id)
 
CreatureGetClosestCreatureWithEntry (WorldObject *pSource, uint32 uiEntry, float fMaxSearchRange, bool bAlive=true)
 
GameObjectGetClosestGameObjectWithEntry (WorldObject *pSource, uint32 uiEntry, float fMaxSearchRange)
 
void GetCreatureListWithEntryInGrid (std::list< Creature * > &lList, WorldObject *pSource, uint32 uiEntry, float fMaxSearchRange)
 
void GetGameObjectListWithEntryInGrid (std::list< GameObject * > &lList, WorldObject *pSource, uint32 uiEntry, float fMaxSearchRange)
 

Macro Definition Documentation

#define CAST_AI (   a,
 
)    (SCRIPT_CAST_TYPE<a*>(b))

Definition at line 32 of file ScriptedCreature.h.

Referenced by SmartScript::ProcessAction().

#define CAST_CRE (   a)    (SCRIPT_CAST_TYPE<Creature*>(a))

Definition at line 29 of file ScriptedCreature.h.

#define CAST_PET (   a)    (SCRIPT_CAST_TYPE<Pet*>(a))

Definition at line 31 of file ScriptedCreature.h.

#define CAST_PLR (   a)    (SCRIPT_CAST_TYPE<Player*>(a))

Definition at line 28 of file ScriptedCreature.h.

Referenced by ScriptedAI::DoTeleportPlayer().

#define CAST_SUM (   a)    (SCRIPT_CAST_TYPE<TempSummon*>(a))

Definition at line 30 of file ScriptedCreature.h.

Referenced by SummonList::DespawnAll().

#define SCRIPT_CAST_TYPE   dynamic_cast

Definition at line 26 of file ScriptedCreature.h.

Function Documentation

__declspec ( deprecated  )
SpellEntry* GET_SPELL ( uint32  Id)
inline

Definition at line 44 of file ScriptedCreature.h.

References GetSpellStore().

45 {
46  return const_cast<SpellEntry*>(GetSpellStore()->LookupEntry(Id));
47 }
DBCStorage< SpellEntry > const * GetSpellStore()
Definition: DBCStores.cpp:776
Creature* GetClosestCreatureWithEntry ( WorldObject pSource,
uint32  uiEntry,
float  fMaxSearchRange,
bool  bAlive = true 
)

Definition at line 678 of file ScriptedCreature.cpp.

References WorldObject::FindNearestCreature().

Referenced by BossAI::_JustReachedHome(), SmartScript::GetTargets(), Condition::Meets(), and Map::ScriptsProcess().

679 {
680  return pSource->FindNearestCreature(uiEntry, fMaxSearchRange, bAlive);
681 }
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true)
Definition: Object.cpp:2289
GameObject* GetClosestGameObjectWithEntry ( WorldObject pSource,
uint32  uiEntry,
float  fMaxSearchRange 
)

Definition at line 682 of file ScriptedCreature.cpp.

References WorldObject::FindNearestGameObject().

Referenced by BossAI::_JustReachedHome(), SmartScript::GetTargets(), and Condition::Meets().

683 {
684  return pSource->FindNearestGameObject(uiEntry, fMaxSearchRange);
685 }
GameObject * FindNearestGameObject(uint32 entry, float range)
Definition: Object.cpp:2298
void GetCreatureListWithEntryInGrid ( std::list< Creature * > &  lList,
WorldObject pSource,
uint32  uiEntry,
float  fMaxSearchRange 
)

Definition at line 686 of file ScriptedCreature.cpp.

References WorldObject::GetCreatureListWithEntryInGrid().

Referenced by BossAI::_JustReachedHome(), and WorldObject::SummonCreature().

687 {
688  return pSource->GetCreatureListWithEntryInGrid(lList, uiEntry, fMaxSearchRange);
689 }
void GetCreatureListWithEntryInGrid(std::list< Creature * > &creatureList, uint32 entry=GRID_SEARCH_ALL_ENTRIES, float maxSearchRange=250.0f) const
Definition: Object.cpp:2329
void GetGameObjectListWithEntryInGrid ( std::list< GameObject * > &  lList,
WorldObject pSource,
uint32  uiEntry,
float  fMaxSearchRange 
)

Definition at line 690 of file ScriptedCreature.cpp.

References WorldObject::GetGameObjectListWithEntryInGrid().

Referenced by BossAI::_JustReachedHome(), and WorldObject::SummonCreature().

691 {
692  return pSource->GetGameObjectListWithEntryInGrid(lList, uiEntry, fMaxSearchRange);
693 }
void GetGameObjectListWithEntryInGrid(std::list< GameObject * > &gameobjectList, uint32 entry=GRID_SEARCH_ALL_ENTRIES, float maxSearchRange=250.0f) const
Definition: Object.cpp:2316