diff options
-rw-r--r-- | src/being.cpp | 2 | ||||
-rw-r--r-- | src/resources/itemdb.cpp | 2 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 12 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 10 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/being.cpp b/src/being.cpp index 56c2c69a..7a1f3eec 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -563,7 +563,7 @@ void Being::setAction(Action action, int attackType) case ATTACK: if (mEquippedWeapon) { - currentAction = mEquippedWeapon->getAttackType(); + currentAction = mEquippedWeapon->getWeaponAttackType(); reset(); } else diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index bfa19cf1..65ce38aa 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -85,7 +85,7 @@ static ItemType itemTypeFromString(const std::string &name, int id = 0) else return ITEM_UNUSABLE; } -static WeaponType weaponTypeFromString(const std::string &name, int id = 0) +static WeaponType weaponTypeFromString(const std::string &name) { if (name=="knife") return WPNTYPE_KNIFE; else if (name=="sword") return WPNTYPE_SWORD; diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 4b1d82ea..b7b29ee5 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -47,23 +47,23 @@ void ItemInfo::setWeaponType(int type) switch (type) { case WPNTYPE_NONE: - mAttackType = ACTION_DEFAULT; + mWeaponAttackType = ACTION_DEFAULT; break; case WPNTYPE_KNIFE: case WPNTYPE_SWORD: - mAttackType = ACTION_ATTACK_STAB; + mWeaponAttackType = ACTION_ATTACK_STAB; break; case WPNTYPE_THROWN: - mAttackType = ACTION_ATTACK_THROW; + mWeaponAttackType = ACTION_ATTACK_THROW; break; case WPNTYPE_BOW: - mAttackType = ACTION_ATTACK_BOW; + mWeaponAttackType = ACTION_ATTACK_BOW; break; case WPNTYPE_POLEARM: - mAttackType = ACTION_ATTACK_SWING; + mWeaponAttackType = ACTION_ATTACK_SWING; break; default: - mAttackType = ACTION_ATTACK; + mWeaponAttackType = ACTION_ATTACK; } } diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index d9fc05cc..1f27ae66 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -122,7 +122,7 @@ class ItemInfo mWeight(0), mView(0), mId(0), - mAttackType(ACTION_DEFAULT) + mWeaponAttackType(ACTION_DEFAULT) { } @@ -187,8 +187,8 @@ class ItemInfo std::string getMissileParticle() const { return mMissileParticle; } - SpriteAction getAttackType() const - { return mAttackType; } + SpriteAction getWeaponAttackType() const + { return mWeaponAttackType; } int getAttackRange() const { return mAttackRange; } @@ -212,8 +212,8 @@ class ItemInfo int mId; /**< Item ID */ // Equipment related members - SpriteAction mAttackType; /**< Attack type, in case of weapon. */ - int mAttackRange; /**< Attack range, will be zero if non weapon. */ + SpriteAction mWeaponAttackType; /**< Attack type, in case of weapon. */ + int mAttackRange; /**< Attack range, will be zero if non weapon. */ // Particle to be shown when weapon attacks std::string mMissileParticle; |