TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattleExperienceEvent Class Reference

Public Member Functions

 BattleExperienceEvent (Creature *creature)
 
bool Execute (uint64 timer, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()
 
virtual ~BasicEvent ()
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 

Static Public Attributes

static uint32 const ExperiencedSpells [5] = { 0, SPELL_EXPERIENCED, SPELL_VETERAN, SPELL_ELITE, SPELL_ADDS_BERSERK }
 
static uint32 const ExperiencedTimes [5] = { 100000, 70000, 60000, 90000, 0 }
 

Private Attributes

Creature_creature
 
int32 _level
 

Additional Inherited Members

- Public Attributes inherited from BasicEvent
bool to_Abort
 
uint64 m_addTime
 
uint64 m_execTime
 

Constructor & Destructor Documentation

BattleExperienceEvent::BattleExperienceEvent ( Creature creature)
inline
514 : _creature(creature), _level(0) { }
Creature * _creature
Definition: boss_icecrown_gunship_battle.cpp:535
int32 _level
Definition: boss_icecrown_gunship_battle.cpp:536

Member Function Documentation

bool BattleExperienceEvent::Execute ( uint64  timer,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

517  {
518  if (!_creature->IsAlive())
519  return true;
520 
522  ++_level;
523 
525  if (_level < (_creature->GetMap()->IsHeroic() ? 4 : 3))
526  {
527  _creature->m_Events.AddEvent(this, timer + ExperiencedTimes[_level]);
528  return false;
529  }
530 
531  return true;
532  }
EventProcessor m_Events
Definition: Unit.h:1948
Creature * _creature
Definition: boss_icecrown_gunship_battle.cpp:535
static uint32 const ExperiencedSpells[5]
Definition: boss_icecrown_gunship_battle.cpp:511
Map * GetMap() const
Definition: Object.h:543
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.cpp:88
int32 _level
Definition: boss_icecrown_gunship_battle.cpp:536
static uint32 const ExperiencedTimes[5]
Definition: boss_icecrown_gunship_battle.cpp:512
Will ignore most target checks (mostly DBC target checks)
Definition: Unit.h:479
bool IsHeroic() const
Definition: Map.cpp:3420
bool IsAlive() const
Definition: Unit.h:1692
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869

+ Here is the call graph for this function:

Member Data Documentation

Creature* BattleExperienceEvent::_creature
private
int32 BattleExperienceEvent::_level
private
uint32 const BattleExperienceEvent::ExperiencedSpells = { 0, SPELL_EXPERIENCED, SPELL_VETERAN, SPELL_ELITE, SPELL_ADDS_BERSERK }
static
uint32 const BattleExperienceEvent::ExperiencedTimes = { 100000, 70000, 60000, 90000, 0 }
static

The documentation for this class was generated from the following file: