From abde0f51b3062c158fb52e9dfff23d21d3be03d1 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sun, 11 Jul 2010 20:05:44 +0200 Subject: Made the different hard-coded paths and files be now taken from the data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127. --- src/npc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/npc.cpp') diff --git a/src/npc.cpp b/src/npc.cpp index cdfe5193..a3c26618 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -36,6 +36,7 @@ #include "net/npchandler.h" #include "resources/npcdb.h" +#include "configuration.h" NPC::NPC(int id, int subtype, Map *map): Player(id, subtype, map, true) @@ -68,7 +69,8 @@ void NPC::setSubtype(Uint16 subtype) i != info.sprites.end(); i++) { - std::string file = "graphics/sprites/" + (*i)->sprite; + std::string file = paths.getValue("sprites", + "graphics/sprites/") + (*i)->sprite; int variant = (*i)->variant; mSprites.push_back(AnimatedSprite::load(file, variant)); mSpriteIDs.push_back(0); -- cgit v1.2.3-70-g09d2