summaryrefslogtreecommitdiffstats
path: root/src/game-server/itemmanager.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-23 20:31:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-23 20:31:43 +0000
commitf689c19d25b634a1883f402eff6a07d73fa5da21 (patch)
tree9707ecf47b75db1c5c2aa4fcea0246c27275951a /src/game-server/itemmanager.cpp
parent0c3a3264db6b746c64a3f3145b73c0e5a846e7fc (diff)
downloadmanaserv-f689c19d25b634a1883f402eff6a07d73fa5da21.tar.gz
manaserv-f689c19d25b634a1883f402eff6a07d73fa5da21.tar.xz
manaserv-f689c19d25b634a1883f402eff6a07d73fa5da21.zip
Fixed compiler warnings, including a forgotten initialization of an item's
script pointer.
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);