void BtnIMPPersonalityFinishYesCallback(GUI_BUTTON *btn,INT32 reason)
{

	// btn callback for IMP personality quiz answer button
	if (!(btn->uiFlags & BUTTON_ENABLED))
		return;

	if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
	{
		// confirm flag set, get out of HERE!
	   if( fConfirmHasBeenSelectedFlag )
		 {
			 // now set this button off
       btn->uiFlags&=~(BUTTON_CLICKED_ON);

			 return;
		 }

		 btn->uiFlags|=(BUTTON_CLICKED_ON);
     
	}
	else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
	{
		if (btn->uiFlags & BUTTON_CLICKED_ON)
		{
      
		  // now set this button off
      btn->uiFlags&=~(BUTTON_CLICKED_ON);

			// set fact yes was selected
		  fConfirmIsYesFlag = TRUE;

			// set fact that confirmation has been done
			fConfirmHasBeenSelectedFlag = TRUE;
      
			// now make skill, personality and attitude
			CreatePlayersPersonalitySkillsAndAttitude( );
			fButtonPendingFlag = TRUE;
      bPersonalityEndState = 1;
		}
	}
}
Exemplo n.º 2
0
void CreateACharacterFromPlayerEnteredStats( void )
{

		// Kaiden: Seems like as good a place as any to stash this function call to
		// ensure that these lists don't get overwritten or Nulled due to the amount
		// of changes and revisions that have been made to personalities and attitudes.
	CreatePlayersPersonalitySkillsAndAttitude();

	// copy over full name
	wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zName, pFullName );

	// the nickname
	wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zNickname, pNickName );

	// gender
	if ( fCharacterIsMale == TRUE )
	{
		// male
		gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = MALE;
	}
	else
	{
		// female
		gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = FEMALE;
	}


	// attributes
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLifeMax		= ( INT8 )iHealth;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLife		= ( INT8 )iHealth;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAgility	= ( INT8 )iAgility;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bStrength	= ( INT8 )iStrength;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bDexterity	= ( INT8 )iDexterity;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bWisdom	 = ( INT8 )iWisdom;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLeadership = ( INT8 )iLeadership;


		// skills
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMarksmanship = ( INT8 )iMarksmanship;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMedical		= ( INT8 )iMedical;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMechanical	= ( INT8 )iMechanical;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExplosive	= ( INT8 )iExplosives;


	// personality
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bDisability = ( INT8 )iPersonality;

	// attitude
	// SANDRO - decide here, if we use the default attitude or the new so called Character Trait for new traits
	if ( gGameOptions.fNewTraitSystem)
		gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bCharacterTrait = ( INT8 )iAttitude;
	else
		gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;

	// WDS: Advanced start 
	//gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = gGameExternalOptions.ubIMPStartingLevel;
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = StartingLevelChosen(); // We now choose the starting level on IMP creation - SANDRO

	// set time away
	gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMercStatus = 0;

	// face
	SelectMercFace( );

	//  Option for badass added - SANDRO
	if (bBadAssSelected())
		gMercProfiles[ LaptopSaveInfo.iIMPIndex ].uiBodyTypeSubFlags = 1;


	return;

}