From ae550d179c25e149f7e8a8d70011b364fb0d85d6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Apr 2013 14:57:08 +0300 Subject: some fixes after auto check. --- src/resources/beinginfo.cpp | 4 +--- src/resources/npcdb.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/resources') diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 905d28921..9e2f9a395 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -122,9 +122,7 @@ void BeingInfo::addAttack(const int id, std::string action, const int effectId, const int missEffectId, const std::string &missileParticle) { - if (mAttacks[id]) - delete mAttacks[id]; - + delete mAttacks[id]; mAttacks[id] = new Attack(action, effectId, hitEffectId, criticalHitEffectId, missEffectId, missileParticle); } diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp index 6e94bb3c3..9fc8ea73c 100644 --- a/src/resources/npcdb.cpp +++ b/src/resources/npcdb.cpp @@ -71,7 +71,7 @@ void NPCDB::load() BeingInfo *const currentInfo = new BeingInfo; - currentInfo->setTargetSelection(XML::getProperty(npcNode, + currentInfo->setTargetSelection(XML::getBoolProperty(npcNode, "targetSelection", true)); currentInfo->setTargetCursorSize(XML::getProperty(npcNode, -- cgit v1.2.3-60-g2f50