[wpdev-commits] wolfpack ChangeLog,1.86,1.87 basechar.cpp,1.154,1.155
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-30 12:31:22
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14683 Modified Files: ChangeLog basechar.cpp Log Message: bloodcolor Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -d -r1.154 -r1.155 *** basechar.cpp 30 Sep 2004 12:23:03 -0000 1.154 --- basechar.cpp 30 Sep 2004 12:31:12 -0000 1.155 *************** *** 2349,2352 **** --- 2349,2374 ---- if (basedef_) { bloodColor = (int)basedef_->getIntProperty("bloodcolor", 0); + + // If we have a strproperty with a custom list of colors, + // that is used instead + if (bloodColor != -1) { + // this property means: from,to + if (basedef_->hasStrProperty("bloodcolor")) { + QStringList bloodColors = QStringList::split(",", basedef_->getStrProperty("bloodcolor")); + if (bloodColors.count() == 2) { + bool ok; + int from = bloodColors[0].toInt(&ok); + if (ok) { + int to = bloodColors[1].toInt(&ok); + if (ok) { + if (to < from) { + std::swap(to, from); + bloodColor = RandomNum(from, to); + } + } + } + } + } + } } Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** ChangeLog 29 Sep 2004 19:08:16 -0000 1.86 --- ChangeLog 30 Sep 2004 12:31:12 -0000 1.87 *************** *** 8,11 **** --- 8,12 ---- - Fix bug #0000342 ( "Show Npc Titles" treated as numeric value, instead of boolean ) - Fix bug # 0000341 ( set char.orgname on char creation ) + - The bloodcolor for NPCs can now be defined. Wolfpack 12.9.11 Beta (26. September 2004) |