summaryrefslogtreecommitdiffstats
path: root/pokemod/ItemEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/ItemEffect.cpp')
-rw-r--r--pokemod/ItemEffect.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp
index 8520548f..9d223475 100644
--- a/pokemod/ItemEffect.cpp
+++ b/pokemod/ItemEffect.cpp
@@ -32,6 +32,12 @@ const QStringList ItemEffect::SpecialPhysicalStr = QStringList() << "Special" <<
const QStringList ItemEffect::BallTypeStr = QStringList() << "Regular" << "Master" << "Level" << "Love" << "Area" << "Time" << "Battle" << "Friend" << "Stat" << "Type" << "Weight";
const QStringList ItemEffect::BerryTypeStr = QStringList() << "HP Cure" << "Status Cure";
+ItemEffect::ItemEffect(const ItemEffect& effect) :
+ Object("ItemEffect", effect.pokemod(), effect.id())
+{
+ *this = effect;
+}
+
ItemEffect::ItemEffect(const Pokemod* pokemod, const int id) :
Object("ItemEffect", pokemod, id),
m_overworld(false),
@@ -45,13 +51,13 @@ ItemEffect::ItemEffect(const Pokemod* pokemod, const int id) :
{
}
-ItemEffect::ItemEffect(const Pokemod* pokemod, const ItemEffect& effect, const int id) :
+ItemEffect::ItemEffect(const ItemEffect& effect, const Pokemod* pokemod, const int id) :
Object("ItemEffect", pokemod, id)
{
*this = effect;
}
-ItemEffect::ItemEffect(const Pokemod* pokemod, const QDomElement& xml, const int id) :
+ItemEffect::ItemEffect(const QDomElement& xml, const Pokemod* pokemod, const int id) :
Object("ItemEffect", pokemod, id)
{
load(xml, id);
@@ -306,7 +312,7 @@ void ItemEffect::load(const QDomElement& xml, int id)
LOAD(int, value1);
LOAD(int, value2);
LOAD(int, value3);
- LOAD(Frac, value4);
+ LOAD(Fraction, value4);
}
QDomElement ItemEffect::save() const
@@ -319,7 +325,7 @@ QDomElement ItemEffect::save() const
SAVE(int, value1);
SAVE(int, value2);
SAVE(int, value3);
- SAVE(Frac, value4);
+ SAVE(Fraction, value4);
return xml;
}
@@ -416,7 +422,7 @@ void ItemEffect::setEffect(const int effect) throw(Exception)
m_value1 = 0;
m_value2 = INT_MAX;
m_value3 = INT_MAX;
- m_value4.set(1, 1); //, ((E_TypeBoost == effect) || (E_PPBoost == effect)) ? Frac::Over1 : Frac::Proper);
+ m_value4.set(1, 1); //, ((E_TypeBoost == effect) || (E_PPBoost == effect)) ? Fraction::Over1 : Fraction::Proper);
}
void ItemEffect::setValue1(const int value1) throw(Exception)
@@ -614,7 +620,7 @@ void ItemEffect::setValue3(const int value3) throw(Exception)
m_value3 = value3;
}
-void ItemEffect::setValue4(const Frac& value4) throw(Exception)
+void ItemEffect::setValue4(const Fraction& value4) throw(Exception)
{
switch (m_effect)
{
@@ -682,7 +688,7 @@ int ItemEffect::value3() const
return m_value3;
}
-Frac ItemEffect::value4() const
+Fraction ItemEffect::value4() const
{
return m_value4;
}