diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-07-11 12:58:11 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-07-11 12:58:11 +0000 |
commit | 84aafd27dad40f4033561052164c21fe68cf78ad (patch) | |
tree | 77fb9224634f95b1ede62c6605976feb4ee9455b /src/resources/equipmentinfo.h | |
parent | 8dd7eef0402cc6e22642f045e3cfde7f5b011d5b (diff) | |
download | mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.gz mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.bz2 mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.tar.xz mana-client-84aafd27dad40f4033561052164c21fe68cf78ad.zip |
Weapon sprites are now (almost) threated like other equipment sprites through the equipment sprite database. (use -u to ignore updates)
Diffstat (limited to 'src/resources/equipmentinfo.h')
-rw-r--r-- | src/resources/equipmentinfo.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/resources/equipmentinfo.h b/src/resources/equipmentinfo.h index 93a1cb42..5cd0643b 100644 --- a/src/resources/equipmentinfo.h +++ b/src/resources/equipmentinfo.h @@ -24,29 +24,53 @@ #ifndef _TMW_EQUIPMENTINFO_H_
#define _TMW_EQUIPMENTINFO_H_
-#include <string>
#include <map>
+#include <string>
+#include <vector>
+
+#include "spritedef.h"
+
+enum EquipmentSoundEvent
+{
+ EQUIP_EVENT_STRIKE,
+ EQUIP_EVENT_HIT
+};
class EquipmentInfo
{
public:
EquipmentInfo():
- mSlot (0)
+ mSlot (0),
+ mAttackType(ACTION_DEFAULT)
{
};
void
- setSlot (int slot) { mSlot = slot; };
+ setSlot (int slot) { mSlot = slot; }
const std::string&
- getSprite(int gender) {return animationFiles[gender]; };
+ getSprite(int gender) {return animationFiles[gender]; }
void
- setSprite(std::string animationFile, int gender) {animationFiles[gender] = animationFile; };
+ setSprite(std::string animationFile, int gender) {animationFiles[gender] = animationFile; }
+
+ void
+ setAttackType(std::string attackType);
+
+ const SpriteAction
+ getAttackType() { return mAttackType; }
+
+ void
+ addSound(EquipmentSoundEvent event, std::string filename);
+
+ std::string
+ getSound(EquipmentSoundEvent event) const;
private:
int mSlot; //not used at the moment but maybe useful on our own server
+ SpriteAction mAttackType;
std::map<int, std::string> animationFiles;
+ std::map<EquipmentSoundEvent, std::vector<std::string>* > mSounds;
};
#endif
|