*Add base scripting interfce for spells - thanks to Brian for help in making it compile with GCC.

*Add hook for handling spell effects in new scripting system.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-24 22:41:42 +02:00
parent 687cd83bdd
commit 2352fc7cdf
30 changed files with 1253 additions and 14 deletions
+8
View File
@@ -29,6 +29,8 @@ class Player;
class GameObject;
class DynamicObject;
class Aura;
struct SpellEntry;
class SpellScript;
// These flags represent the inner states of the targeting system
enum SpellInternalTargetFlags
@@ -268,6 +270,7 @@ class Spell
{
friend struct Trinity::SpellNotifierCreatureAndPlayer;
friend void Unit::SetCurrentCastedSpell(Spell * pSpell);
friend class SpellScript;
public:
void EffectNULL(uint32);
@@ -506,6 +509,7 @@ class Spell
Unit* GetCaster() const { return m_caster; }
Unit* GetOriginalCaster() const { return m_originalCaster; }
SpellEntry const * GetSpellInfo() const { return m_spellInfo; }
int32 GetPowerCost() const { return m_powerCost; }
void UpdatePointers(); // must be used at call Spell code after time delay (non triggered spell cast/update spell call/etc)
@@ -650,6 +654,10 @@ class Spell
void SpellDamageWeaponDmg(uint32 i);
void SpellDamageHeal(uint32 i);
// Scripting system
void LoadScripts();
std::list<SpellScript *> m_loadedScripts;
// effect helpers
void GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0);
void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *properties);