From: <wel...@us...> - 2010-06-26 19:42:03
|
Revision: 5998 http://planeshift.svn.sourceforge.net/planeshift/?rev=5998&view=rev Author: weltall2 Date: 2010-06-26 19:41:57 +0000 (Sat, 26 Jun 2010) Log Message: ----------- fixed bonus assignment. yeah -1 in an array is the best way to operate ^^ Modified Paths: -------------- trunk/src/server/bulkobjects/pscharacter.cpp Modified: trunk/src/server/bulkobjects/pscharacter.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharacter.cpp 2010-06-26 13:31:24 UTC (rev 5997) +++ trunk/src/server/bulkobjects/pscharacter.cpp 2010-06-26 19:41:57 UTC (rev 5998) @@ -1348,7 +1348,9 @@ // Check for attr bonuses for (int i = 0; i < PSITEMSTATS_STAT_BONUS_COUNT; i++) { - modifiers[currentitem->GetWeaponAttributeBonusType(i)].Buff(MODIFIER_FAKE_ACTIVESPELL, (int) currentitem->GetWeaponAttributeBonusMax(i)); + int attributeNum = currentitem->GetWeaponAttributeBonusType(i); + if(attributeNum != -1) + modifiers[currentitem->GetWeaponAttributeBonusType(i)].Buff(MODIFIER_FAKE_ACTIVESPELL, (int) currentitem->GetWeaponAttributeBonusMax(i)); } hasChanged = true; itemlist.Delete(it); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |