diff options
Diffstat (limited to 'src/game-server/item.cpp')
-rw-r--r-- | src/game-server/item.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game-server/item.cpp b/src/game-server/item.cpp index d568fb29..c6c9d11c 100644 --- a/src/game-server/item.cpp +++ b/src/game-server/item.cpp @@ -71,11 +71,11 @@ bool ItemEffectScript::apply(Being *itemUser) if (function.isValid()) { Script *script = ScriptManager::currentState(); - script->setMap(itemUser->getMap()); script->prepare(function); script->push(itemUser); script->push(mItemClass->getDatabaseID()); - script->execute(); // TODO return depending on script execution success. + script->execute(itemUser->getMap()); + // TODO return depending on script execution success. return true; } return false; @@ -90,11 +90,10 @@ void ItemEffectScript::dispell(Being *itemUser) if (function.isValid()) { Script *script = ScriptManager::currentState(); - script->setMap(itemUser->getMap()); script->prepare(function); script->push(itemUser); script->push(mItemClass->getDatabaseID()); - script->execute(); + script->execute(itemUser->getMap()); } } |