From: Andrew C. <ac...@us...> - 2004-07-18 04:12:17
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17917/src/client Modified Files: psclientchar.cpp psclientchar.h Log Message: Changes/updates to the parents screen. Ability to use params ( $param ) inside progression scripts and use ProgressionManager::ChangeScript to fill them in. Index: psclientchar.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/psclientchar.cpp,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** psclientchar.cpp 4 Jul 2004 04:39:59 -0000 1.103 --- psclientchar.cpp 18 Jul 2004 04:12:08 -0000 1.104 *************** *** 478,481 **** --- 478,483 ---- selectedSkinColour = -1; selectedGender = PSCHARACTER_GENDER_MALE; + fatherMod = 1; + motherMod = 1; nameGenerator = new NameGenerationSystem(); *************** *** 982,986 **** lastname = selectedName.Slice(selectedName.FindFirst(' ')+1,selectedName.Length()); ! psCharUploadMessage upload( firstname, lastname, selectedRace, selectedGender, choicesMade, lifeEventsMade, selectedEyes, selectedHairStyle, selectedBeardStyle, selectedHairColour, selectedSkinColour ); --- 984,989 ---- lastname = selectedName.Slice(selectedName.FindFirst(' ')+1,selectedName.Length()); ! printf("Selected Gender: %d\n", selectedGender ); ! psCharUploadMessage upload( firstname, lastname, selectedRace, selectedGender, choicesMade, motherMod, fatherMod, lifeEventsMade, selectedEyes, selectedHairStyle, selectedBeardStyle, selectedHairColour, selectedSkinColour ); *************** *** 1012,1023 **** ! void psCreationManager::AddChoice( int choice ) ! { choicesMade.Push( choice ); ! currentCP-=GetCost( choice ); } ! void psCreationManager::RemoveChoice( int choice ) { for ( size_t x = 0; x < choicesMade.Length(); x++ ) --- 1015,1026 ---- ! void psCreationManager::AddChoice( int choice, int modifier ) ! { choicesMade.Push( choice ); ! currentCP-=GetCost( choice )*modifier; } ! void psCreationManager::RemoveChoice( int choice, int modifier ) { for ( size_t x = 0; x < choicesMade.Length(); x++ ) *************** *** 1025,1029 **** if ( choicesMade[x] == choice ) { ! currentCP += GetCost( choicesMade[x] ); choicesMade.DeleteIndex(x); --- 1028,1032 ---- if ( choicesMade[x] == choice ) { ! currentCP += GetCost( choicesMade[x] )*modifier; choicesMade.DeleteIndex(x); Index: psclientchar.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/psclientchar.h,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** psclientchar.h 2 Jul 2004 15:36:52 -0000 1.56 --- psclientchar.h 18 Jul 2004 04:12:08 -0000 1.57 *************** *** 275,280 **** LifeEventChoice* FindLifeEvent( int idNumber ); ! void AddChoice( int choice ); ! void RemoveChoice( int choice ); csArray<uint32_t> GetChoicesMade() { return choicesMade;} CreationChoice* GetChoice(int id); --- 275,280 ---- LifeEventChoice* FindLifeEvent( int idNumber ); ! void AddChoice( int choice, int modifier = 1 ); ! void RemoveChoice( int choice, int modifier = 1 ); csArray<uint32_t> GetChoicesMade() { return choicesMade;} CreationChoice* GetChoice(int id); *************** *** 294,297 **** --- 294,300 ---- bool IsAvailable(int id,int gender); + + void SetFatherMod( int mod ) { fatherMod = mod; } + void SetMotherMod( int mod ) { motherMod = mod; } private: csRef<iObjectRegistry> objectReg; *************** *** 338,341 **** --- 341,347 ---- int selectedHairColour; int selectedSkinColour; + + int fatherMod; + int motherMod; }; |