From: Luca P. <lpa...@us...> - 2002-04-28 21:33:06
|
Update of /cvsroot/planeshift/planeshift/src/client/gui In directory usw-pr-cvs1:/tmp/cvs-serv11955/client/gui Modified Files: psdcskil.cpp psdcmain.cpp Log Message: fixed skills points Index: psdcskil.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/psdcskil.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** psdcskil.cpp 20 Apr 2002 22:21:42 -0000 1.31 --- psdcskil.cpp 27 Apr 2002 21:21:24 -0000 1.32 *************** *** 986,990 **** ! csString buffer; csString description; csString cost; --- 986,990 ---- ! csString buffer = ""; csString description; csString cost; *************** *** 1012,1017 **** } ! buffer.Format("%s (%s) \n%s\n", ! (const char*) skillName, cost, description); psdWarning *skillInfo = new psdWarning(dialog->GetDialogManager()); --- 1012,1016 ---- } ! buffer.Format("%s (%s)\n %s\n", (const char*) skillName, cost, description); psdWarning *skillInfo = new psdWarning(dialog->GetDialogManager()); Index: psdcmain.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/psdcmain.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** psdcmain.cpp 20 Apr 2002 12:30:14 -0000 1.58 --- psdcmain.cpp 27 Apr 2002 21:21:25 -0000 1.59 *************** *** 624,637 **** ! //Check to see if there are points left. mdialog->creationPoints-=increment; if ( mdialog->creationPoints < 0 ) { ! mdialog->creationPoints+=increment; ! pccdata->DecRef(); ! return; } - double val; int min; --- 624,636 ---- ! // Check to see if there are points left. mdialog->creationPoints-=increment; if ( mdialog->creationPoints < 0 ) { ! mdialog->creationPoints+=increment; ! pccdata->DecRef(); ! return; } double val; int min; *************** *** 640,665 **** switch(iID) { ! case 100: ! statName = "Strength"; ! break; ! case 102: ! statName = "Endurance"; ! break; ! case 104: ! statName = "Agility"; ! break; ! case 106: ! statName = "Intelligence"; ! break; ! case 108: ! statName = "Will"; ! break; ! case 110: ! statName = "Charisma"; break; } --- 639,664 ---- switch(iID) { ! case 100: ! statName = "Strength"; ! break; ! case 102: ! statName = "Endurance"; ! break; ! case 104: ! statName = "Agility"; ! break; ! case 106: ! statName = "Intelligence"; ! break; ! case 108: ! statName = "Will"; ! break; ! case 110: ! statName = "Charisma"; break; } *************** *** 669,676 **** min = 25 + (int)(rdf->GetStatBonus(statName)*2); if ( val+increment >= min ) ! pccdata->SetStat(statName, val+increment); else ! mdialog->creationPoints+=increment; --- 668,684 ---- min = 25 + (int)(rdf->GetStatBonus(statName)*2); + + // Check if player has not assigned 10 points on a single stat + if (val+increment > min+10) + { + mdialog->creationPoints+=increment; + pccdata->DecRef(); + return; + } + if ( val+increment >= min ) ! pccdata->SetStat(statName, val+increment); else ! mdialog->creationPoints+=increment; *************** *** 827,854 **** bonus = (int)rdf->GetStatBonus("Strength"); pccdata->SetStat("Strength",min+(bonus*2)); - total += min+(bonus*2); bonus = (int)rdf->GetStatBonus("Endurance"); pccdata->SetStat("Endurance",min+(bonus*2)); - total += min+(bonus*2); bonus = (int)rdf->GetStatBonus("Agility"); pccdata->SetStat("Agility",min+(bonus*2)); ! total += min+(bonus*2); ! //Mental stats bonus = (int)rdf->GetStatBonus("Intelligence"); pccdata->SetStat("Intelligence",min+(bonus*2)); - total += min+(bonus*2); bonus = (int)rdf->GetStatBonus("Will"); pccdata->SetStat("Will",min+(bonus*2)); - total += min+(bonus*2); bonus = (int)rdf->GetStatBonus("Charisma"); pccdata->SetStat("Charisma",min+(bonus*2)); - total += min+(bonus*2); ! return total; } --- 835,856 ---- bonus = (int)rdf->GetStatBonus("Strength"); pccdata->SetStat("Strength",min+(bonus*2)); bonus = (int)rdf->GetStatBonus("Endurance"); pccdata->SetStat("Endurance",min+(bonus*2)); bonus = (int)rdf->GetStatBonus("Agility"); pccdata->SetStat("Agility",min+(bonus*2)); ! //Mental stats bonus = (int)rdf->GetStatBonus("Intelligence"); pccdata->SetStat("Intelligence",min+(bonus*2)); bonus = (int)rdf->GetStatBonus("Will"); pccdata->SetStat("Will",min+(bonus*2)); bonus = (int)rdf->GetStatBonus("Charisma"); pccdata->SetStat("Charisma",min+(bonus*2)); ! return min*6; } |