summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--example/monsters.xml1
-rw-r--r--src/game-server/monster.cpp22
-rw-r--r--src/game-server/monster.h12
-rw-r--r--src/game-server/monstermanager.cpp6
4 files changed, 0 insertions, 41 deletions
diff --git a/example/monsters.xml b/example/monsters.xml
index 86a0c15..75438c8 100644
--- a/example/monsters.xml
+++ b/example/monsters.xml
@@ -89,7 +89,6 @@ exp<TAG>: Tells how much experience point a monster is giving up
range="32"
animation="attack"
/>
- <script>testmonster.lua</script> <!-- only Proof of Concept-->
</monster>
<monster id="2" name="Scorpion">
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index 7d5ec76..4724600 100644
--- a/src/game-server/monster.cpp
+++ b/src/game-server/monster.cpp
@@ -117,9 +117,6 @@ Monster::Monster(MonsterClass *specy):
{
addAttack(*it);
}
-
- // Load default script
- loadScript(specy->getScript());
}
Monster::~Monster()
@@ -288,25 +285,6 @@ void Monster::processAttack(Attack &attack)
}
}
-void Monster::loadScript(const std::string &scriptName)
-{
- if (scriptName.length() == 0)
- return;
-
- std::stringstream filename;
- filename << "scripts/monster/" << scriptName;
- if (ResourceManager::exists(filename.str()))
- {
- LOG_INFO("Loading monster script: " << filename.str());
- ScriptManager::currentState()->loadFile(filename.str());
- }
- else
- {
- LOG_WARN("Could not find script file \""
- << filename.str() << "\" for monster");
- }
-}
-
int Monster::calculatePositionPriority(Point position, int targetPriority)
{
Point thisPos = getPosition();
diff --git a/src/game-server/monster.h b/src/game-server/monster.h
index 93c9f4e..b924b37 100644
--- a/src/game-server/monster.h
+++ b/src/game-server/monster.h
@@ -202,12 +202,6 @@ class MonsterClass
double getVulnerability(Element element) const;
- /** sets the script file for the monster */
- void setScript(const std::string &filename) { mScript = filename; }
-
- /** Returns script filename */
- const std::string &getScript() const { return mScript; }
-
void setUpdateCallback(Script *script)
{ script->assignCallback(mUpdateCallback); }
@@ -239,7 +233,6 @@ class MonsterClass
int mOptimalLevel;
std::vector<AttackInfo *> mAttacks;
Vulnerabilities mVulnerabilities;
- std::string mScript;
/**
* A reference to the script function that is called each update.
@@ -303,11 +296,6 @@ class Monster : public Being
virtual void processAttack(Attack &attack);
/**
- * Loads a script file for this monster
- */
- void loadScript(const std::string &scriptName);
-
- /**
* Kills the being.
*/
void died();
diff --git a/src/game-server/monstermanager.cpp b/src/game-server/monstermanager.cpp
index e82a847..bb29bab 100644
--- a/src/game-server/monstermanager.cpp
+++ b/src/game-server/monstermanager.cpp
@@ -258,12 +258,6 @@ void MonsterManager::initialize()
}
}
- else if (xmlStrEqual(subnode->name, BAD_CAST "script"))
- {
- xmlChar *filename = subnode->xmlChildrenNode->content;
- std::string val = (char *)filename;
- monster->setScript(val);
- }
else if (xmlStrEqual(subnode->name, BAD_CAST "vulnerability"))
{
Element element = elementFromString(