From: Andrew C. <ac...@us...> - 2003-02-18 15:03:14
|
Update of /cvsroot/planeshift/planeshift/src/client/gui In directory sc8-pr-cvs1:/tmp/cvs-serv26424/src/client/gui Modified Files: psdcskil.cpp Log Message: Fix from Andrew Mann Index: psdcskil.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/psdcskil.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** psdcskil.cpp 13 Feb 2003 14:33:26 -0000 1.42 --- psdcskil.cpp 18 Feb 2003 15:03:10 -0000 1.43 *************** *** 615,639 **** case 74: ! skillName = "Lahar"; break; } ! baseCost = rpgInfo->GetSkill(skillName)->baseCost; ! rank = (int) pccdata->GetSkill(skillName); ! if ( increment > 0 ) ! cost = CalculateSkillCost( rank+increment, baseCost); ! else if ( increment < 0 ) ! cost = -CalculateSkillCost( rank, baseCost); ! if ( mdialog->creationPoints >= cost && (rank+increment) >= 0 ) { ! pccdata->SetSkill(skillName, rank+increment ); ! valid = true; } if ( valid ) ! mdialog->creationPoints -= cost; mdialog->UpdateAll(); --- 615,649 ---- case 74: ! skillName = "Lah\'ar"; break; } ! psSkillDefinition* skillDef = rpgInfo->GetSkill( skillName ); ! if ( skillDef != NULL ) ! { ! baseCost = skillDef->baseCost; ! rank = (int) pccdata->GetSkill(skillName); ! if ( increment > 0 ) ! cost = CalculateSkillCost( rank+increment, baseCost); ! else if ( increment < 0 ) ! cost = -CalculateSkillCost( rank, baseCost); ! ! if ( mdialog->creationPoints >= cost && (rank+increment) >= 0 ) ! { ! pccdata->SetSkill(skillName, rank+increment ); ! valid = true; ! } ! } ! else { ! Error2("Skill <%s> was not defined. Possible error in rpgrules.xml", ! (const char*)skillName ); } if ( valid ) ! mdialog->creationPoints -= cost; mdialog->UpdateAll(); *************** *** 802,806 **** caster->SetText(txt); ! cs_snprintf(txt,4,"%d", (int)pccdata->GetSkill("Lahar") ); caster = (psText*)GetComp(113); caster->SetText(txt); --- 812,816 ---- caster->SetText(txt); ! cs_snprintf(txt,4,"%d", (int)pccdata->GetSkill("Lah\'ar") ); caster = (psText*)GetComp(113); caster->SetText(txt); |