summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-06 10:38:07 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-06 10:38:07 +0100
commit7cbdab589491e007adacd7597c769cdb9308a32c (patch)
tree0269c37cccbed49a1cb15db9de816f39ef549189 /src/resources
parent616afb27c23def5661b3466d6fc86fd1c65c0082 (diff)
parentaa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5 (diff)
downloadmana-client-7cbdab589491e007adacd7597c769cdb9308a32c.tar.gz
mana-client-7cbdab589491e007adacd7597c769cdb9308a32c.tar.bz2
mana-client-7cbdab589491e007adacd7597c769cdb9308a32c.tar.xz
mana-client-7cbdab589491e007adacd7597c769cdb9308a32c.zip
Merge branch 'aethyra/master'
Conflicts: src/being.cpp src/being.h src/floor_item.cpp src/floor_item.h src/flooritemmanager.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/popupmenu.cpp src/net/beinghandler.cpp src/npc.cpp
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemdb.cpp4
-rw-r--r--src/resources/iteminfo.h22
-rw-r--r--src/resources/monsterinfo.cpp1
3 files changed, 18 insertions, 9 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index fec52150..1ff34d98 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -109,6 +109,10 @@ void ItemDB::load()
{
if (xmlStrEqual(itemChild->name, BAD_CAST "sprite"))
{
+ std::string attackParticle = XML::getProperty(
+ itemChild, "particle-effect", "");
+ itemInfo->setParticleEffect(attackParticle);
+
loadSpriteRef(itemInfo, itemChild);
}
else if (xmlStrEqual(itemChild->name, BAD_CAST "sound"))
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index c03dec28..2aff68a9 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -66,6 +66,11 @@ class ItemInfo
const std::string& getName() const
{ return mName; }
+ void setParticleEffect(const std::string &particleEffect)
+ { mParticle = particleEffect; }
+
+ std::string getParticleEffect() const { return mParticle; }
+
void setImageName(const std::string &imageName)
{ mImageName = imageName; }
@@ -112,17 +117,18 @@ class ItemInfo
const std::string& getSound(EquipmentSoundEvent event) const;
protected:
- std::string mImageName; /**< The filename of the icon image. */
+ std::string mImageName; /**< The filename of the icon image. */
std::string mName;
- std::string mDescription; /**< Short description. */
- std::string mEffect; /**< Description of effects. */
- std::string mType; /**< Item type. */
- short mWeight; /**< Weight in grams. */
- int mView; /**< Item ID of how this item looks. */
- int mId; /**< Item ID */
+ std::string mDescription; /**< Short description. */
+ std::string mEffect; /**< Description of effects. */
+ std::string mType; /**< Item type. */
+ std::string mParticle; /**< Particle effect used with this item */
+ short mWeight; /**< Weight in grams. */
+ int mView; /**< Item ID of how this item looks. */
+ int mId; /**< Item ID */
// Equipment related members
- SpriteAction mAttackType; /**< Attack type, in case of weapon. */
+ SpriteAction mAttackType; /**< Attack type, in case of weapon. */
/** Maps gender to sprite filenames. */
std::map<int, std::string> mAnimationFiles;
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 503990e7..734d1e01 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -35,7 +35,6 @@ MonsterInfo::~MonsterInfo()
mSounds.clear();
}
-
void MonsterInfo::addSound(MonsterSoundEvent event, std::string filename)
{
if (mSounds.find(event) == mSounds.end())