summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/statuseffect.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 4c5262250..33579b2dc 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -176,8 +176,12 @@ void StatusEffect::loadXmlFile(const std::string &fileName)
if (the_map)
{
- StatusEffect *const startEffect = new StatusEffect;
- StatusEffect *const endEffect = new StatusEffect;
+ StatusEffect *startEffect = (*the_map)[1][index];
+ StatusEffect *endEffect = (*the_map)[0][index];
+ if (!startEffect)
+ startEffect = new StatusEffect;
+ if (!endEffect)
+ endEffect = new StatusEffect;
startEffect->mMessage = XML::getProperty(
node, "start-message", "");