summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-05-04 13:09:25 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-05-04 13:09:25 +0000
commit00fb4bde7974a20aacfc1c52e48fff2faee2d385 (patch)
tree2097ef003495d7e6b4a8cf697ad7896039aac113 /src/resources/mapreader.cpp
parentb3376bfe4e26591e1dc1066d8f2270baf4f9f759 (diff)
downloadmana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.gz
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.bz2
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.tar.xz
mana-00fb4bde7974a20aacfc1c52e48fff2faee2d385.zip
Merged particle engine into main eAthena branch.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index fda8916d..2230cb6a 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -231,6 +231,30 @@ MapReader::readMap(xmlNodePtr node, const std::string &path)
{
readProperties(childNode, map);
}
+ else if (xmlStrEqual(childNode->name, BAD_CAST "objectgroup"))
+ {
+ for_each_xml_child_node(objectNode, childNode)
+ {
+ if (xmlStrEqual(objectNode->name, BAD_CAST "object"))
+ {
+ std::string objName = XML::getProperty(objectNode, "name", "");
+ std::string objType = XML::getProperty(objectNode, "type", "");
+ int objX = XML::getProperty(objectNode, "x", 0);
+ int objY = XML::getProperty(objectNode, "y", 0);
+
+ logger->log("- Loading object name: %s type: %s at %d:%d",
+ objName.c_str(), objType.c_str(), objX, objY);
+ if (objType == "PARTICLE_EFFECT")
+ {
+ map->addParticleEffect(objName, objX, objY);
+ }
+ else
+ {
+ logger->log(" Warning: Unknown object type");
+ }
+ }
+ }
+ }
}
map->initializeOverlays();