From 6679f5cffa9d35a23b76605ddfbf3257f882b6ee Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 17 Apr 2008 23:34:36 +0000 Subject: [FIX] Frac -> Fraction [FIX] ImageCache and Ini removed [FIX] Fraction/Point widgets moved to pokemodr [FIX] Copy ctors made for pokemod classes [FIX] Ctors in pokemod fixed [FIX] Copyright headers fixed in pokemodr [FIX] PokeModr updated to new API and fixed in some places git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@99 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/ItemEffect.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'pokemod/ItemEffect.cpp') 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; } -- cgit