summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/item.cpp b/src/item.cpp
index b0008134..660fa7b7 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -23,12 +23,26 @@
#include "item.h"
-void Item::use(BeingPtr itemUser)
+bool Item::use(BeingPtr itemUser)
{
- //
+ bool usedSuccessfully = true;
+ // Applying Modifiers for a given lifetime
+ // TODO
+
+ // Calling a script if scriptName != ""
+ if (mScriptName != "")
+ {
+ if(runScript(itemUser) && usedSuccessfully)
+ return true;
+ else
+ return false;
+ }
+ else
+ return usedSuccessfully;
}
-void Item::useWithScript(const std::string scriptFile)
+bool Item::runScript(BeingPtr itemUser)
{
- //
+ //TODO
+ return true;
}