From: <rly...@us...> - 2010-09-29 04:45:47
|
Revision: 6233 http://planeshift.svn.sourceforge.net/planeshift/?rev=6233&view=rev Author: rlydontknow Date: 2010-09-29 04:45:40 +0000 (Wed, 29 Sep 2010) Log Message: ----------- correctly set added skill points to 0 in case of an invalid skill Modified Paths: -------------- trunk/src/server/bulkobjects/pscharacter.cpp Modified: trunk/src/server/bulkobjects/pscharacter.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharacter.cpp 2010-09-28 13:06:06 UTC (rev 6232) +++ trunk/src/server/bulkobjects/pscharacter.cpp 2010-09-29 04:45:40 UTC (rev 6233) @@ -3895,7 +3895,10 @@ bool SkillSet::AddToSkillPractice(PSSKILL skill, unsigned int val, unsigned int& added ) { if (skill<0 || skill>=(PSSKILL)psserver->GetCacheManager()->GetSkillAmount()) + { + added = 0; return 0; + } bool rankup = false; rankup = skills[skill].Practice( val, added, self ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |