summaryrefslogtreecommitdiffstats
path: root/src/game-server/itemmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/itemmanager.cpp')
-rw-r--r--src/game-server/itemmanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game-server/itemmanager.cpp b/src/game-server/itemmanager.cpp
index 6541901..019f4c9 100644
--- a/src/game-server/itemmanager.cpp
+++ b/src/game-server/itemmanager.cpp
@@ -30,6 +30,7 @@
#include "game-server/attackzone.hpp"
#include "game-server/item.hpp"
#include "game-server/resourcemanager.hpp"
+#include "scripting/script.hpp"
#include "utils/logger.h"
#include "utils/xml.hpp"
@@ -181,19 +182,18 @@ void ItemManager::reload()
weight = 1;
}
- Script *s;
- //TODO: Clean this up some
+ // TODO: Clean this up some
+ Script *s = 0;
std::stringstream filename;
filename << "scripts/items/" << id << ".lua";
- if(ResourceManager::exists(filename.str())) //file exists!
+ if (ResourceManager::exists(filename.str())) // file exists!
{
LOG_INFO("Loading item script: " + filename.str());
s = Script::create("lua");
s->loadFile(filename.str());
}
-
item->setWeight(weight);
item->setCost(value);
item->setMaxPerSlot(maxPerSlot);