summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-09 09:47:21 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-13 12:57:16 +0100
commitc70be70cab3615cb36cc5f244671cf5d39f1fda8 (patch)
treeb15e68552ffd6adda832a9ae5d38160ef8299d7f /src/resources/iteminfo.h
parent717eb07c0d51098e319059883b11ba6e2bf4cbb8 (diff)
downloadmana-c70be70cab3615cb36cc5f244671cf5d39f1fda8.tar.gz
mana-c70be70cab3615cb36cc5f244671cf5d39f1fda8.tar.bz2
mana-c70be70cab3615cb36cc5f244671cf5d39f1fda8.tar.xz
mana-c70be70cab3615cb36cc5f244671cf5d39f1fda8.zip
General code cleanups
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index df559d69..5763e423 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -161,8 +161,8 @@ class ItemInfo
int mView = 0; /**< Item ID of how this item looks. */
int mId = 0; /**< Item ID */
- bool mEquippable; /**< Whether this item can be equipped. */
- bool mActivatable; /**< Whether this item can be activated. */
+ bool mEquippable = false; /**< Whether this item can be equipped. */
+ bool mActivatable = false; /**< Whether this item can be activated. */
// Equipment related members.
/** Attack type, in case of weapon.
@@ -172,12 +172,12 @@ class ItemInfo
std::string mAttackAction;
/** Attack range, will be equal to ATTACK_RANGE_NOT_SET if no weapon. */
- int mAttackRange;
+ int mAttackRange = 0;
/** Effects to be shown when weapon attacks - see also effects.xml */
std::string mMissileParticleFile;
- int mHitEffectId;
- int mCriticalHitEffectId;
+ int mHitEffectId = 0;
+ int mCriticalHitEffectId = 0;
/** Maps gender to sprite filenames. */
std::map<int, std::string> mAnimationFiles;
@@ -230,7 +230,7 @@ class TaItemInfo: public ItemInfo
friend class TaItemDB;
public:
- TaItemInfo() : ItemInfo()
+ TaItemInfo()
{}
// Declare TmwAthena Specific item info here
@@ -247,7 +247,7 @@ namespace ManaServ {
class ManaServItemInfo: public ItemInfo
{
public:
- ManaServItemInfo() : ItemInfo()
+ ManaServItemInfo()
{}
// Declare Manaserv Specific item info here