diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-22 17:40:42 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-22 17:40:42 +0000 |
commit | 5a4e1ac688d83a46b6c6cb5c4945535f1ae4151f (patch) | |
tree | e608f83b2813e0f0d727fb3dac21096ef35fa03e /src/game-server/item.hpp | |
parent | dbc83dae37dff1338e1ee6358a0a8d10103278b0 (diff) | |
download | manaserv-5a4e1ac688d83a46b6c6cb5c4945535f1ae4151f.tar.gz manaserv-5a4e1ac688d83a46b6c6cb5c4945535f1ae4151f.tar.bz2 manaserv-5a4e1ac688d83a46b6c6cb5c4945535f1ae4151f.tar.xz manaserv-5a4e1ac688d83a46b6c6cb5c4945535f1ae4151f.zip |
added on use scripts (by Kage_Jittai)
Diffstat (limited to 'src/game-server/item.hpp')
-rw-r--r-- | src/game-server/item.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/game-server/item.hpp b/src/game-server/item.hpp index e0d8943f..3878755e 100644 --- a/src/game-server/item.hpp +++ b/src/game-server/item.hpp @@ -27,6 +27,8 @@ #include <vector> #include "game-server/object.hpp" +#include "scripting/script.hpp" + class AttackZone; class Being; @@ -175,8 +177,8 @@ class ItemModifiers class ItemClass { public: - ItemClass(int id, ItemType type) - : mDatabaseID(id), mType(type), mAttackZone(NULL) + ItemClass(int id, ItemType type, Script *s = NULL) + : mDatabaseID(id), mType(type), mAttackZone(NULL), mScript(NULL) {} ~ItemClass(); @@ -260,6 +262,12 @@ class ItemClass { return mSpriteID; } /** + * Sets the script that is to be used + */ + void setScript(Script *s) + { mScript = s; } + + /** * Set attack zone (only needed when the item is a weapon) */ void setAttackZone(AttackZone* attackZone) { mAttackZone = attackZone; } @@ -272,6 +280,8 @@ class ItemClass private: + //Script for using items + Script *mScript; // Item reference information unsigned short mDatabaseID; |