aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-19 00:54:01 -0500
committermegamage <none@none>2009-04-19 00:54:01 -0500
commit7f8cf6c5fe709d73e89d3ae5a1c85fec2f4618d1 (patch)
treec789774e9786bc3eb2d398b6d7afd347b1a56138 /src/game/Unit.h
parent60736b1f7da05e5eee5100edc3e80fbb9e228495 (diff)
*Update castcustomspell(). Allow change other spell values than basepoints.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r--src/game/Unit.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h
index f63ce4c4f23..89c0ddad86a 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -120,6 +120,24 @@ enum SpellModOp
#define MAX_SPELLMOD 32
+enum SpellValueMod
+{
+ SPELLVALUE_BASE_POINT0,
+ SPELLVALUE_BASE_POINT1,
+ SPELLVALUE_BASE_POINT2,
+ SPELLVALUE_MAX_TARGETS,
+};
+
+typedef std::pair<SpellValueMod, int32> CustomSpellValueMod;
+class CustomSpellValues : public std::vector<CustomSpellValueMod>
+{
+ public:
+ void AddSpellMod(SpellValueMod mod, int32 value)
+ {
+ push_back(std::make_pair(mod, value));
+ }
+};
+
enum SpellFacingFlags
{
SPELL_FACING_FLAG_INFRONT = 0x0001
@@ -235,7 +253,7 @@ enum InventorySlot
struct FactionTemplateEntry;
struct Modifier;
struct SpellEntry;
-struct SpellEntryExt;
+struct SpellValue;
class Aura;
class Creature;
@@ -1024,7 +1042,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
- void CastCustomSpell(Unit* Victim,SpellEntry const *spellInfo, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastCustomSpell(uint32 spellId, SpellValueMod mod, uint32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
+ void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void AddAura(uint32 spellId, Unit *target);