From e9996ad4ce607d4ee363e675b98890ce9d809ad8 Mon Sep 17 00:00:00 2001
From: joris <joris.dauphin@gmail.com>
Date: Fri, 10 Aug 2012 16:00:00 +0200
Subject: [PATCH] Add prefix Spell_ to specific spell class.

---
 src/include/spell/spell_adjustvariable.h  |  6 +++---
 src/include/spell/spell_adjustvital.h     |  4 ++--
 src/include/spell/spell_areaadjustvital.h |  4 ++--
 src/include/spell/spell_areabombardment.h |  4 ++--
 src/include/spell/spell_capture.h         |  4 ++--
 src/include/spell/spell_demolish.h        |  4 ++--
 src/include/spell/spell_polymorph.h       |  4 ++--
 src/include/spell/spell_spawnmissile.h    |  4 ++--
 src/include/spell/spell_spawnportal.h     |  4 ++--
 src/include/spell/spell_summon.h          |  4 ++--
 src/spell/script_spell.cpp                | 20 ++++++++++----------
 src/spell/spell_adjustvariable.cpp        |  4 ++--
 src/spell/spell_adjustvital.cpp           |  4 ++--
 src/spell/spell_areaadjustvital.cpp       |  4 ++--
 src/spell/spell_areabombardment.cpp       |  4 ++--
 src/spell/spell_capture.cpp               |  4 ++--
 src/spell/spell_demolish.cpp              |  4 ++--
 src/spell/spell_polymorph.cpp             |  4 ++--
 src/spell/spell_spawnmissile.cpp          |  4 ++--
 src/spell/spell_spawnportal.cpp           |  4 ++--
 src/spell/spell_summon.cpp                |  4 ++--
 21 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/src/include/spell/spell_adjustvariable.h b/src/include/spell/spell_adjustvariable.h
index 7c9b985fe..d952e1c24 100644
--- a/src/include/spell/spell_adjustvariable.h
+++ b/src/include/spell/spell_adjustvariable.h
@@ -65,11 +65,11 @@ public:
 };
 
 
-class AdjustVariable : public SpellActionType
+class Spell_AdjustVariable : public SpellActionType
 {
 public:
-	AdjustVariable() : Var(NULL) {};
-	~AdjustVariable() { delete [](this->Var); };
+	Spell_AdjustVariable() : Var(NULL) {};
+	~Spell_AdjustVariable() { delete [](this->Var); };
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_adjustvital.h b/src/include/spell/spell_adjustvital.h
index c527d098a..1eb87edd1 100644
--- a/src/include/spell/spell_adjustvital.h
+++ b/src/include/spell/spell_adjustvital.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class AdjustVital : public SpellActionType
+class Spell_AdjustVital : public SpellActionType
 {
 public:
-	AdjustVital() : SpellActionType(1), HP(0), Mana(0), MaxMultiCast(0) {};
+	Spell_AdjustVital() : SpellActionType(1), HP(0), Mana(0), MaxMultiCast(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_areaadjustvital.h b/src/include/spell/spell_areaadjustvital.h
index b71c8a561..c9d330928 100644
--- a/src/include/spell/spell_areaadjustvital.h
+++ b/src/include/spell/spell_areaadjustvital.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class AreaAdjustVital : public SpellActionType
+class Spell_AreaAdjustVital : public SpellActionType
 {
 public:
-	AreaAdjustVital() : HP(0), Mana(0) {};
+	Spell_AreaAdjustVital() : HP(0), Mana(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_areabombardment.h b/src/include/spell/spell_areabombardment.h
index 352697508..a681ab20d 100644
--- a/src/include/spell/spell_areabombardment.h
+++ b/src/include/spell/spell_areabombardment.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class AreaBombardment : public SpellActionType
+class Spell_AreaBombardment : public SpellActionType
 {
 public:
-	AreaBombardment() : Fields(0), Shards(0), Damage(0),
+	Spell_AreaBombardment() : Fields(0), Shards(0), Damage(0),
 		StartOffsetX(0), StartOffsetY(0), Missile(NULL) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
diff --git a/src/include/spell/spell_capture.h b/src/include/spell/spell_capture.h
index 4ab1d7564..16b6d55e7 100644
--- a/src/include/spell/spell_capture.h
+++ b/src/include/spell/spell_capture.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class Capture : public SpellActionType
+class Spell_Capture : public SpellActionType
 {
 public:
-	Capture() : SacrificeEnable(0), Damage(0), DamagePercent(0) {};
+	Spell_Capture() : SacrificeEnable(0), Damage(0), DamagePercent(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_demolish.h b/src/include/spell/spell_demolish.h
index a2b6855c5..d41ac6a58 100644
--- a/src/include/spell/spell_demolish.h
+++ b/src/include/spell/spell_demolish.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class Demolish : public SpellActionType
+class Spell_Demolish : public SpellActionType
 {
 public:
-	Demolish() : Damage(0), Range(0) {};
+	Spell_Demolish() : Damage(0), Range(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_polymorph.h b/src/include/spell/spell_polymorph.h
index 373fcc8f2..769afd7b3 100644
--- a/src/include/spell/spell_polymorph.h
+++ b/src/include/spell/spell_polymorph.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class Polymorph : public SpellActionType
+class Spell_Polymorph : public SpellActionType
 {
 public:
-	Polymorph() : SpellActionType(1), NewForm(NULL), PlayerNeutral(0) {};
+	Spell_Polymorph() : SpellActionType(1), NewForm(NULL), PlayerNeutral(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_spawnmissile.h b/src/include/spell/spell_spawnmissile.h
index a6d684413..98815b7c4 100644
--- a/src/include/spell/spell_spawnmissile.h
+++ b/src/include/spell/spell_spawnmissile.h
@@ -65,10 +65,10 @@ public:
 	int AddRandY;       /// Random add to the X coordinate
 };
 
-class SpawnMissile : public SpellActionType
+class Spell_SpawnMissile : public SpellActionType
 {
 public:
-	SpawnMissile() : Damage(0), TTL(-1), Delay(0), UseUnitVar(false),
+	Spell_SpawnMissile() : Damage(0), TTL(-1), Delay(0), UseUnitVar(false),
 		StartPoint(LocBaseCaster), EndPoint(LocBaseTarget), Missile(0) {}
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
diff --git a/src/include/spell/spell_spawnportal.h b/src/include/spell/spell_spawnportal.h
index 1141d96df..0c781560e 100644
--- a/src/include/spell/spell_spawnportal.h
+++ b/src/include/spell/spell_spawnportal.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class SpawnPortal : public SpellActionType
+class Spell_SpawnPortal : public SpellActionType
 {
 public:
-	SpawnPortal() : PortalType(0) {};
+	Spell_SpawnPortal() : PortalType(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/include/spell/spell_summon.h b/src/include/spell/spell_summon.h
index 5d2374708..ce4f4aea3 100644
--- a/src/include/spell/spell_summon.h
+++ b/src/include/spell/spell_summon.h
@@ -38,10 +38,10 @@
 
 #include "spells.h"
 
-class Summon : public SpellActionType
+class Spell_Summon : public SpellActionType
 {
 public:
-	Summon() : SpellActionType(1), UnitType(NULL), TTL(0), RequireCorpse(0) {};
+	Spell_Summon() : SpellActionType(1), UnitType(NULL), TTL(0), RequireCorpse(0) {};
 	virtual int Cast(CUnit &caster, const SpellType &spell,
 					 CUnit *target, const Vec2i &goalPos);
 	virtual void Parse(lua_State *l, int startIndex, int endIndex);
diff --git a/src/spell/script_spell.cpp b/src/spell/script_spell.cpp
index 3477551da..b184936ac 100644
--- a/src/spell/script_spell.cpp
+++ b/src/spell/script_spell.cpp
@@ -74,25 +74,25 @@ static SpellActionType *CclSpellAction(lua_State *l)
 
 	SpellActionType *spellaction = NULL;
 	if (!strcmp(value, "adjust-variable")) {
-		spellaction = new AdjustVariable;
+		spellaction = new Spell_AdjustVariable;
 	} else if (!strcmp(value, "adjust-vitals")) {
-		spellaction = new AdjustVital;
+		spellaction = new Spell_AdjustVital;
 	} else if (!strcmp(value, "area-adjust-vitals")) {
-		spellaction = new AreaAdjustVital;
+		spellaction = new Spell_AreaAdjustVital;
 	} else if (!strcmp(value, "area-bombardment")) {
-		spellaction = new AreaBombardment;
+		spellaction = new Spell_AreaBombardment;
 	} else if (!strcmp(value, "capture")) {
-		spellaction = new Capture;
+		spellaction = new Spell_Capture;
 	} else if (!strcmp(value, "demolish")) {
-		spellaction = new Demolish;
+		spellaction = new Spell_Demolish;
 	} else if (!strcmp(value, "polymorph")) {
-		spellaction = new Polymorph;
+		spellaction = new Spell_Polymorph;
 	} else if (!strcmp(value, "spawn-missile")) {
-		spellaction = new SpawnMissile;
+		spellaction = new Spell_SpawnMissile;
 	} else if (!strcmp(value, "spawn-portal")) {
-		spellaction = new SpawnPortal;
+		spellaction = new Spell_SpawnPortal;
 	} else if (!strcmp(value, "summon")) {
-		spellaction = new Summon;
+		spellaction = new Spell_Summon;
 	} else {
 		LuaError(l, "Unsupported action type: %s" _C_ value);
 	}
diff --git a/src/spell/spell_adjustvariable.cpp b/src/spell/spell_adjustvariable.cpp
index a214c90ba..ea473cd57 100644
--- a/src/spell/spell_adjustvariable.cpp
+++ b/src/spell/spell_adjustvariable.cpp
@@ -38,7 +38,7 @@
 #include "unit.h"
 
 
-/* virtual */ void AdjustVariable::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_AdjustVariable::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	int j = startIndex;
 	lua_rawgeti(l, -1, j + 1);
@@ -116,7 +116,7 @@
 **
 **  @return        =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int AdjustVariable::Cast(CUnit &caster, const SpellType &, CUnit *target, const Vec2i &/*goalPos*/)
+/* virtual */ int Spell_AdjustVariable::Cast(CUnit &caster, const SpellType &, CUnit *target, const Vec2i &/*goalPos*/)
 {
 	for (unsigned int i = 0; i < UnitTypeVar.GetNumberVariable(); ++i) {
 		CUnit *unit = (this->Var[i].TargetIsCaster) ? &caster : target;
diff --git a/src/spell/spell_adjustvital.cpp b/src/spell/spell_adjustvital.cpp
index 6bdf41925..1ff37550b 100644
--- a/src/spell/spell_adjustvital.cpp
+++ b/src/spell/spell_adjustvital.cpp
@@ -37,7 +37,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void AdjustVital::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_AdjustVital::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -73,7 +73,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int AdjustVital::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &/*goalPos*/)
+/* virtual */ int Spell_AdjustVital::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &/*goalPos*/)
 {
 	if (!target) {
 		return 0;
diff --git a/src/spell/spell_areaadjustvital.cpp b/src/spell/spell_areaadjustvital.cpp
index a5e98cad1..eea10e642 100644
--- a/src/spell/spell_areaadjustvital.cpp
+++ b/src/spell/spell_areaadjustvital.cpp
@@ -38,7 +38,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void AreaAdjustVital::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_AreaAdjustVital::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -69,7 +69,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int AreaAdjustVital::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
+/* virtual */ int Spell_AreaAdjustVital::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
 {
 	const Vec2i range(spell.Range, spell.Range);
 	const Vec2i typeSize(caster.Type->Width, caster.Type->Height);
diff --git a/src/spell/spell_areabombardment.cpp b/src/spell/spell_areabombardment.cpp
index c8bd97d39..a35dd2529 100644
--- a/src/spell/spell_areabombardment.cpp
+++ b/src/spell/spell_areabombardment.cpp
@@ -39,7 +39,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void AreaBombardment::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_AreaBombardment::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -97,7 +97,7 @@
 **  @internal: vladi: blizzard differs than original in this way:
 **   original: launches 50 shards at 5 random spots x 10 for 25 mana.
 */
-/* virtual */ int AreaBombardment::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
+/* virtual */ int Spell_AreaBombardment::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
 {
 	int fields = this->Fields;
 	const int shards = this->Shards;
diff --git a/src/spell/spell_capture.cpp b/src/spell/spell_capture.cpp
index fb73cda63..e1dc3628e 100644
--- a/src/spell/spell_capture.cpp
+++ b/src/spell/spell_capture.cpp
@@ -37,7 +37,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void Capture::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_Capture::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -70,7 +70,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int Capture::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &/*goalPos*/)
+/* virtual */ int Spell_Capture::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &/*goalPos*/)
 {
 	if (!target || caster.Player == target->Player) {
 		return 0;
diff --git a/src/spell/spell_demolish.cpp b/src/spell/spell_demolish.cpp
index 0406802e8..d4c78f2a8 100644
--- a/src/spell/spell_demolish.cpp
+++ b/src/spell/spell_demolish.cpp
@@ -37,7 +37,7 @@
 #include "script.h"
 #include "map.h"
 
-/* virtual */ void Demolish::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_Demolish::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -67,7 +67,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int Demolish::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
+/* virtual */ int Spell_Demolish::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
 {
 	// Allow error margins. (Lame, I know)
 	const Vec2i offset(this->Range + 2, this->Range + 2);
diff --git a/src/spell/spell_polymorph.cpp b/src/spell/spell_polymorph.cpp
index 0f86e5c2d..736d910f4 100644
--- a/src/spell/spell_polymorph.cpp
+++ b/src/spell/spell_polymorph.cpp
@@ -38,7 +38,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void Polymorph::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_Polymorph::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -81,7 +81,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int Polymorph::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
+/* virtual */ int Spell_Polymorph::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
 {
 	if (!target) {
 		return 0;
diff --git a/src/spell/spell_spawnmissile.cpp b/src/spell/spell_spawnmissile.cpp
index db324378b..370efdc29 100644
--- a/src/spell/spell_spawnmissile.cpp
+++ b/src/spell/spell_spawnmissile.cpp
@@ -94,7 +94,7 @@ static void CclSpellMissileLocation(lua_State *l, SpellActionMissileLocation *lo
 	}
 }
 
-/* virtual */ void SpawnMissile::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_SpawnMissile::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -183,7 +183,7 @@ static void EvaluateMissileLocation(const SpellActionMissileLocation &location,
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int SpawnMissile::Cast(CUnit &caster, const SpellType &, CUnit *target, const Vec2i &goalPos)
+/* virtual */ int Spell_SpawnMissile::Cast(CUnit &caster, const SpellType &, CUnit *target, const Vec2i &goalPos)
 {
 	PixelPos startPos;
 	PixelPos endPos;
diff --git a/src/spell/spell_spawnportal.cpp b/src/spell/spell_spawnportal.cpp
index 727ac27d2..b51bf47af 100644
--- a/src/spell/spell_spawnportal.cpp
+++ b/src/spell/spell_spawnportal.cpp
@@ -37,7 +37,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void SpawnPortal::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_SpawnPortal::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -73,7 +73,7 @@
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int SpawnPortal::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
+/* virtual */ int Spell_SpawnPortal::Cast(CUnit &caster, const SpellType &, CUnit *, const Vec2i &goalPos)
 {
 	// FIXME: vladi: cop should be placed only on explored land
 	CUnit *portal = caster.Goal;
diff --git a/src/spell/spell_summon.cpp b/src/spell/spell_summon.cpp
index 09bab991c..84c58f2e6 100644
--- a/src/spell/spell_summon.cpp
+++ b/src/spell/spell_summon.cpp
@@ -39,7 +39,7 @@
 #include "script.h"
 #include "unit.h"
 
-/* virtual */ void Summon::Parse(lua_State *l, int startIndex, int endIndex)
+/* virtual */ void Spell_Summon::Parse(lua_State *l, int startIndex, int endIndex)
 {
 	for (int j = startIndex; j < endIndex; ++j) {
 		lua_rawgeti(l, -1, j + 1);
@@ -91,7 +91,7 @@ public:
 **
 **  @return             =!0 if spell should be repeated, 0 if not
 */
-/* virtual */ int Summon::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
+/* virtual */ int Spell_Summon::Cast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
 {
 	Vec2i pos = goalPos;
 	bool cansummon;