[wpdev-commits] wolfpack basedef.cpp,1.19,1.20
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-18 01:32:21
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6258 Modified Files: basedef.cpp Log Message: Base Definition fix. Index: basedef.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** basedef.cpp 14 Sep 2004 00:00:37 -0000 1.19 --- basedef.cpp 18 Sep 2004 01:32:12 -0000 1.20 *************** *** 170,173 **** --- 170,185 ---- lootPacks_ = node->text(); } + else if ( node->name() == "inherit" ) + { + QString inheritID; + if ( node->hasAttribute( "id" ) ) + inheritID = node ->getAttribute( "id" ); + else + inheritID = node->value(); + + const cElement* element = Definitions::instance()->getDefinition( WPDT_NPC, inheritID ); + if ( element ) + applyDefinition( element ); + } else { *************** *** 399,402 **** --- 411,426 ---- setWaterSource( node->value().toUInt() != 0 ); } + else if ( node->name() == "inherit" ) + { + QString inheritID; + if ( node->hasAttribute( "id" ) ) + inheritID = node ->getAttribute( "id" ); + else + inheritID = node->value(); + + const cElement* element = Definitions::instance()->getDefinition( WPDT_ITEM, inheritID ); + if ( element ) + applyDefinition( element ); + } else { |