summaryrefslogtreecommitdiffstats
path: root/pokemod/Rules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Rules.cpp')
-rw-r--r--pokemod/Rules.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp
index 3e82f599..48f885b5 100644
--- a/pokemod/Rules.cpp
+++ b/pokemod/Rules.cpp
@@ -26,7 +26,7 @@
const QStringList Rules::DVStr = QStringList() << "16" << "32";
Rules::Rules(const Pokemod& par) :
- Object(par, 0),
+ Object("Rules", par, 0),
genderAllowed(false),
breedingAllowed(false),
holdItems(0),
@@ -56,13 +56,13 @@ Rules::Rules(const Pokemod& par) :
}
Rules::Rules(const Pokemod& par, const Rules& r) :
- Object(par, 0)
+ Object("Rules", par, 0)
{
*this = r;
}
Rules::Rules(const Pokemod& par, const QString& fname) :
- Object(par, 0)
+ Object("Rules", par, 0)
{
load(fname);
}
@@ -113,7 +113,7 @@ bool Rules::validate() const
return valid;
}
-void Rules::load(const QString& fname) throw(Exception)
+void Rules::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
unsigned i;
@@ -189,7 +189,7 @@ void Rules::setGenderAllowed(const bool g)
void Rules::setBreedingAllowed(const bool b) throw(Exception)
{
if (!genderAllowed)
- throw(Exception("Rules", "cannot breed without genders"));
+ throw(Exception(className, "cannot breed without genders"));
breedingAllowed = b;
}
@@ -226,28 +226,28 @@ void Rules::setBoxSize(const unsigned b)
void Rules::setMaxParty(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxParty"));
+ throw(BoundsException(className, "maxParty"));
maxParty = m;
}
void Rules::setMaxFight(const unsigned m) throw(BoundsException)
{
if (maxParty < m)
- throw(BoundsException("Rules", "maxFight"));
+ throw(BoundsException(className, "maxFight"));
maxFight = m;
}
void Rules::setMaxMoves(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxMoves"));
+ throw(BoundsException(className, "maxMoves"));
maxMoves = m;
}
void Rules::setMaxLevel(const unsigned m) throw(BoundsException)
{
if (!m)
- throw(BoundsException("Rules", "maxLevel"));
+ throw(BoundsException(className, "maxLevel"));
maxLevel = m;
}
@@ -274,7 +274,7 @@ void Rules::setSpecialDVSplit(const bool s)
void Rules::setMaxDVValue(const unsigned char m) throw(BoundsException)
{
if ((m != 16) && (m != 32))
- throw(BoundsException("Rules", "maxDVValue"));
+ throw(BoundsException(className, "maxDVValue"));
maxDVValue = m;
}
@@ -306,16 +306,16 @@ void Rules::setEffortValuesAllowed(const bool e)
void Rules::setMaxTotalEV(const unsigned m) throw(Exception)
{
if (!effortValuesAllowed)
- throw(Exception("Rules", "no effort values"));
+ throw(Exception(className, "no effort values"));
maxTotalEV = m;
}
void Rules::setMaxEVPerStat(const unsigned m) throw(Exception)
{
if (!effortValuesAllowed)
- throw(Exception("Rules", "no effort values"));
+ throw(Exception(className, "no effort values"));
if (maxTotalEV < m)
- throw(BoundsException("Rules", "maxEVPerStat"));
+ throw(BoundsException(className, "maxEVPerStat"));
maxEVPerStat = m;
}