OregonCore  revision be9e804-git
Your Favourite TBC server
Spell.h File Reference
#include "GridDefines.h"
#include "SpellMgr.h"
#include "SharedDefines.h"

Go to the source code of this file.

Classes

struct  SpellCastTargetsReader
 
class  SpellCastTargets
 
struct  SpellValue
 
class  Spell
 
struct  Spell::TargetInfo
 
struct  Spell::GOTargetInfo
 
struct  Spell::ItemTargetInfo
 
struct  Oregon::SpellNotifierCreatureAndPlayer
 
class  SpellEvent
 

Namespaces

 Oregon
 

Typedefs

typedef void(Spell::* pEffect) (SpellEffIndex effIndex)
 

Enumerations

enum  SpellCastFlags {
  CAST_FLAG_PENDING = 0x00000001, CAST_FLAG_UNKNOWN1 = 0x00000002, CAST_FLAG_UNKNOWN2 = 0x00000010, CAST_FLAG_AMMO = 0x00000020,
  CAST_FLAG_UNKNOWN3 = 0x00000100
}
 
enum  SpellRangeFlag { SPELL_RANGE_DEFAULT = 0, SPELL_RANGE_MELEE = 1, SPELL_RANGE_RANGED = 2 }
 
enum  SpellNotifyPushType {
  PUSH_NONE = 0, PUSH_IN_FRONT, PUSH_IN_BACK, PUSH_IN_LINE,
  PUSH_SRC_CENTER, PUSH_DST_CENTER, PUSH_CASTER_CENTER, PUSH_CHAIN
}
 
enum  SpellState {
  SPELL_STATE_NULL = 0, SPELL_STATE_PREPARING = 1, SPELL_STATE_CASTING = 2, SPELL_STATE_FINISHED = 3,
  SPELL_STATE_IDLE = 4, SPELL_STATE_DELAYED = 5
}
 
enum  ReplenishType { REPLENISH_UNDEFINED = 0, REPLENISH_HEALTH = 20, REPLENISH_MANA = 21, REPLENISH_RAGE = 22 }
 
enum  SpellTargets { SPELL_TARGETS_ALLY, SPELL_TARGETS_ENEMY, SPELL_TARGETS_ENTRY, SPELL_TARGETS_CHAINHEAL }
 

Functions

bool IsQuestTameSpell (uint32 spellId)
 
ByteBufferoperator<< (ByteBuffer &buf, SpellCastTargets const &targets)
 
ByteBufferoperator>> (ByteBuffer &buf, SpellCastTargetsReader const &targets)
 

Typedef Documentation

typedef void(Spell::* pEffect) (SpellEffIndex effIndex)

Definition at line 816 of file Spell.h.

Enumeration Type Documentation

Enumerator
REPLENISH_UNDEFINED 
REPLENISH_HEALTH 
REPLENISH_MANA 
REPLENISH_RAGE 

Definition at line 233 of file Spell.h.

234 {
236  REPLENISH_HEALTH = 20,
237  REPLENISH_MANA = 21,
238  REPLENISH_RAGE = 22
239 };
Enumerator
CAST_FLAG_PENDING 
CAST_FLAG_UNKNOWN1 
CAST_FLAG_UNKNOWN2 
CAST_FLAG_AMMO 
CAST_FLAG_UNKNOWN3 

Definition at line 32 of file Spell.h.

33 {
34  CAST_FLAG_PENDING = 0x00000001, // Pending == 1
35  CAST_FLAG_UNKNOWN1 = 0x00000002,
36  CAST_FLAG_UNKNOWN2 = 0x00000010,
37  CAST_FLAG_AMMO = 0x00000020,
38  CAST_FLAG_UNKNOWN3 = 0x00000100
39 };
Enumerator
PUSH_NONE 
PUSH_IN_FRONT 
PUSH_IN_BACK 
PUSH_IN_LINE 
PUSH_SRC_CENTER 
PUSH_DST_CENTER 
PUSH_CASTER_CENTER 
PUSH_CHAIN 

Definition at line 48 of file Spell.h.

49 {
50  PUSH_NONE = 0,
56  PUSH_CASTER_CENTER, //this is never used in grid search
57  PUSH_CHAIN,
58 };
Enumerator
SPELL_RANGE_DEFAULT 
SPELL_RANGE_MELEE 
SPELL_RANGE_RANGED 

Definition at line 41 of file Spell.h.

42 {
44  SPELL_RANGE_MELEE = 1, //melee
45  SPELL_RANGE_RANGED = 2, //hunter range and ranged weapon
46 };
enum SpellState
Enumerator
SPELL_STATE_NULL 
SPELL_STATE_PREPARING 
SPELL_STATE_CASTING 
SPELL_STATE_FINISHED 
SPELL_STATE_IDLE 
SPELL_STATE_DELAYED 

Definition at line 223 of file Spell.h.

Enumerator
SPELL_TARGETS_ALLY 
SPELL_TARGETS_ENEMY 
SPELL_TARGETS_ENTRY 
SPELL_TARGETS_CHAINHEAL 

Definition at line 241 of file Spell.h.

Function Documentation

bool IsQuestTameSpell ( uint32  spellId)

Definition at line 53 of file Spell.cpp.

References SpellEntry::Effect, SpellEntry::EffectApplyAuraName, SPELL_AURA_DUMMY, SPELL_EFFECT_APPLY_AURA, SPELL_EFFECT_THREAT, and sSpellStore.

Referenced by Aura::HandleAuraDummy().

54 {
55  SpellEntry const* spellproto = sSpellStore.LookupEntry(spellId);
56  if (!spellproto) return false;
57 
58  return spellproto->Effect[0] == SPELL_EFFECT_THREAT
59  && spellproto->Effect[1] == SPELL_EFFECT_APPLY_AURA && spellproto->EffectApplyAuraName[1] == SPELL_AURA_DUMMY;
60 }
uint32 Effect[MAX_SPELL_EFFECTS]
Definition: DBCStructure.h:724
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
uint32 EffectApplyAuraName[MAX_SPELL_EFFECTS]
Definition: DBCStructure.h:734
ByteBuffer& operator<< ( ByteBuffer buf,
SpellCastTargets const &  targets 
)
inline

Definition at line 194 of file Spell.h.

References SpellCastTargets::write().

195 {
196  targets.write(buf);
197  return buf;
198 }
ByteBuffer& operator>> ( ByteBuffer buf,
SpellCastTargetsReader const &  targets 
)
inline

Definition at line 200 of file Spell.h.

References SpellCastTargetsReader::caster, SpellCastTargets::read(), and SpellCastTargetsReader::targets.

201 {
202  targets.targets.read(buf, targets.caster);
203  return buf;
204 }