Character Details.

Results 1 to 6 of 6
  1. #1
    i <3 C++ Deviant is offline
    MemberRank
    Jun 2005 Join Date
    Little GardenLocation
    527Posts

    Character Details.

    hello ragezone,

    uhmm

    in source where can i edit the Character Details?

    i mean when you press "H"

    i will try to add/edit something


  2. #2
    Member kitballard is offline
    MemberRank
    Feb 2012 Join Date
    95Posts

    Re: Character Details.

    [color=#ff00aa]isn't that kinda hard codede?[/color[]

  3. #3
    [R8]ℓσℓ32 caja is offline
    MemberRank
    Oct 2008 Join Date
    Here!Location
    1,502Posts

    Re: Character Details.

    In source window, it's very very very very easy.

  4. #4
    i <3 C++ Deviant is offline
    MemberRank
    Jun 2005 Join Date
    Little GardenLocation
    527Posts

    Re: Character Details.

    anyone sir?

  5. #5
    xFutureB
    Guest

    Re: Character Details.

    Quote Originally Posted by caja View Post
    In source window, it's very very very very easy.
    As he sayd. WndField.cpp, so rest you could figure out on your own.

  6. #6
    [R8]ℓσℓ32 caja is offline
    MemberRank
    Oct 2008 Join Date
    Here!Location
    1,502Posts

    Re: Character Details.

    CWndCharInfo

    Functions for get the values
    Code:
    void CWndCharInfo::GetVirtualATK(int* pnMin, int* pnMax)
    {
    	int nParts = PARTS_RWEAPON;
    	
    	*pnMin = 0;
    	*pnMax = 0;
    	
    	if( g_pPlayer )
    	{
    		ItemProp* pItemProp = g_pPlayer->GetActiveHandItemProp( nParts );
    		if( pItemProp == NULL )
    			return;
    		
    		*pnMin = pItemProp->dwAbilityMin * 2;
    		*pnMax = pItemProp->dwAbilityMax * 2;
    		
    		*pnMin = g_pPlayer->GetParam( DST_ABILITY_MIN, *pnMin );
    		*pnMax = g_pPlayer->GetParam( DST_ABILITY_MAX, *pnMax );
    		
    		int nATK = 0;
    		switch( pItemProp->dwWeaponType )
    		{
    			case WT_MELEE_SWD:
    				nATK = (int)( float(( g_pPlayer->GetStr() + m_nStrCount - 12 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_SWD)) + (float(g_pPlayer->GetLevel() * 1.1f)) );
    				break;
    			case WT_MELEE_AXE:
    				nATK = (int)( float(( g_pPlayer->GetStr() + m_nStrCount - 12 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_AXE)) + (float(g_pPlayer->GetLevel() * 1.2f)) );
    				break;
    			case WT_MELEE_STAFF:
    				nATK = (int)( float(( g_pPlayer->GetStr() + m_nStrCount - 10 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_STAFF)) + (float(g_pPlayer->GetLevel() * 1.1f)) );
    				break;
    			case WT_MELEE_STICK:
    				nATK = (int)( float(( g_pPlayer->GetStr() + m_nStrCount - 10 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_STICK)) + (float(g_pPlayer->GetLevel() * 1.3f)) );
    				break;
    			case WT_MELEE_KNUCKLE:
    				nATK = (int)( float( (g_pPlayer->GetStr() + m_nStrCount - 10 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_KNUCKLE)) + (float(g_pPlayer->GetLevel() * 1.2f)) );
    				break;
    			case WT_MAGIC_WAND:
    				nATK = (int)( ( g_pPlayer->GetInt() + m_nIntCount - 10 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_WAND) + g_pPlayer->GetLevel() * 1.2f );
    				break;
    			case WT_MELEE_YOYO:
    				nATK = (int)( float(( g_pPlayer->GetStr() + m_nStrCount - 12 ) * g_pPlayer->GetJobPropFactor(JOB_PROP_YOYO)) + (float(g_pPlayer->GetLevel() * 1.1f)) );
    				break;
    			case WT_RANGE_BOW:
    				nATK = (int)( (((g_pPlayer->GetDex() + m_nDexCount -14)*4.0f + (g_pPlayer->GetLevel()*1.3f) + ((g_pPlayer->GetStr()+m_nStrCount)*0.2f)) * 0.7f) );
    				break;
    		}
    		
    		nATK += g_pPlayer->GetPlusWeaponATK( pItemProp->dwWeaponType );	// ¹«±âÀÇ Ãß°¡ °ø°Ý·Â¸¦ ±¸ÇÑ´Ù.
    
    		int nPlus = nATK + g_pPlayer->GetParam( DST_CHR_DMG, 0 );
    
    		*pnMin += nPlus;
    		*pnMax += nPlus;
    		
    		CItemElem *pWeapon = g_pPlayer->GetWeaponItem( nParts );
    		if( pWeapon && pWeapon->GetProp() )
    		{
    			float f = g_pPlayer->GetItemMultiplier( pWeapon );
    			*pnMin = (int)( *pnMin * f );
    			*pnMax = (int)( *pnMax * f );
    		}
    		
    		if( pWeapon )
    		{
    			int nOption = pWeapon->GetAbilityOption();
    			if( nOption > 0 )
    			{
    				int nValue = (int)pow( (float)( nOption ), 1.5f );
    
    				*pnMin += nValue;
    				*pnMax += nValue;
    			}
    		}
    	}
    }
    
    
    int CWndCharInfo::GetVirtualDEF()
    {
    	int nDefense = 0;
    
    	ATTACK_INFO info;
    	memset( &info, 0x00, sizeof(info) );
    	info.dwAtkFlags = AF_GENERIC;
    	
    	float fFactor = 1.0f;
    	if( g_pPlayer )
    	{
    		JobProp* pProperty = prj.GetJobProp( g_pPlayer->GetJob() ); 
    		assert( pProperty );
    		fFactor = pProperty->fFactorDef;
    	}
    	nDefense	= (int)( ((((g_pPlayer->GetLevel()*2) + ((g_pPlayer->GetSta()+m_nStaCount)/2)) / 2.8f ) - 4) + ((g_pPlayer->GetSta() + m_nStaCount - 14) * fFactor) );
    	nDefense	= nDefense + (g_pPlayer->GetDefenseByItem( FALSE ) / 4);
    	nDefense	= nDefense + ( g_pPlayer->GetParam( DST_ADJDEF, 0 ) );
    
    	nDefense	= (int)( nDefense * g_pPlayer->GetDEFMultiplier( &info ) );
    
    #ifdef __JEFF_11
    	if( nDefense < 0 )
    		nDefense	= 0;
    #endif	// __JEFF_11
    	return nDefense;
    }
    
    
    int CWndCharInfo::GetVirtualCritical()
    {
    	int nCritical;
    	nCritical	= ((g_pPlayer->GetDex() + m_nDexCount) / 10);
    	nCritical	= (int)( nCritical * g_pPlayer->GetJobPropFactor( JOB_PROP_CRITICAL ) );
    	nCritical	= g_pPlayer->GetParam( DST_CHR_CHANCECRITICAL, nCritical );	// Å©¸®Æ¼Äà Ȯ·üÀ» ³ô¿©ÁÖ´Â ½ºÅ³°ü·Ã 
    #ifdef __JEFF_11
    	if( nCritical < 0 )
    		nCritical	= 0;
    #endif	// __JEFF_11
    	
    	if( g_pPlayer )
    	{
    		if( g_pPlayer->m_idparty && (g_pPlayer->m_dwFlag & MVRF_CRITICAL) )	// ÆÄƼ && 1ȸ Å©¸®Æ¼Äà ¹ßµ¿?
    		{
    			if( g_Party.IsMember( g_pPlayer->m_idPlayer ) )
    				nCritical += (g_Party.m_nSizeofMember / 2);	
    			g_pPlayer->m_dwFlag &= (~MVRF_CRITICAL);
    		}
    
    #if __VER < 9 // __S_9_ADD
    		if( g_pPlayer->IsAfterDeath() )							// Á×À½ ÀÌÈÄ »óŶó¸é?
    			nCritical += CRITICAL_AFTER_DEATH;
    		
    		int nHitPercent = g_pPlayer->GetHitPointPercent( 100 );
    		if( nHitPercent < CRITICAL_BERSERK_HP )			// HP°¡ MAX´ëºñ 30% ¹Ì¸¸? 
    		{
    			// CRITICAL_BERSERK_HP : nHitPercent = CRITICAL_BERSERK_PROB : x
    			// 30 : 15 = 20 : x
    			nCritical += CRITICAL_BERSERK_PROB - ( nHitPercent * CRITICAL_BERSERK_PROB / CRITICAL_BERSERK_HP );
    		}
    #endif // __S_9_ADD
    	}
    	return nCritical;
    }
    
    
    float CWndCharInfo::GetVirtualATKSpeed()
    {
    	float fSpeed = 1.0f;
    	float fItem = 1.0f;
    	
    	ItemProp* pWeaponProp = g_pPlayer->GetActiveHandItemProp();
    	if( pWeaponProp )
    		fItem = pWeaponProp->fAttackSpeed;
    	
    	JobProp* pProperty = prj.GetJobProp( g_pPlayer->GetJob() ); 
    	ASSERT( pProperty );
    	
    	// A = int( ij¸¯ÅÍÀÇ °ø¼Ó + ( ¹«±âÀÇ °ø¼Ó * ( 4 * µ¦½º + ( ·¹º§ / 8 ) ) ) - 3 )
    	// °ø°Ý¼Óµµ = ( ( 50 / 200 - A ) / 2 ) + °¡ÁßÄ¡ 
    	int A = int( pProperty->fAttackSpeed + ( fItem * ( 4.0f * (g_pPlayer->GetDex() + m_nDexCount) + g_pPlayer->GetLevel() / 8.0f ) ) - 3.0f );
    
    	if( 187.5f <= A )
    		A	= (int)( 187.5f );
    
    	const MAX_ATTACK_SPEED_PLUSVALUE = 18;
    	
    	int nIndex = A / 10;
    	nIndex = max( nIndex, 0 );
    	nIndex = min( nIndex, (MAX_ATTACK_SPEED_PLUSVALUE-1) );
    	
    	float fPlusValue[MAX_ATTACK_SPEED_PLUSVALUE] = {
    		0.08f, 0.16f, 0.24f, 0.32f,	0.40f,
    		0.48f, 0.56f, 0.64f, 0.72f,	0.80f,
    		0.88f, 0.96f, 1.04f, 1.12f,	1.20f,
    		1.30f, 1.38f, 1.50f
    	};
    	
    	fSpeed = ( ( 50.0f / (200.f - A) ) / 2.0f ) + fPlusValue[nIndex];
    	
    	float fDstParam = g_pPlayer->GetParam( DST_ATTACKSPEED, 0 ) / 1000.0f;
    	fSpeed += fDstParam;
    	
    	if( 0 < g_pPlayer->GetParam( DST_ATTACKSPEED_RATE, 0 ) )
    		fSpeed = fSpeed + ( fSpeed * g_pPlayer->GetParam( DST_ATTACKSPEED_RATE, 0 ) / 100 );
    	
    	if( fSpeed < 0.0f )
    		fSpeed = 0.1f;
    	if( fSpeed > 2.0f )
    		fSpeed = 2.0f;
    	
    	return fSpeed;
    }
    And where it's printed on screen, it's the whole window...
    Code:
    void CWndCharInfo::OnDraw(C2DRender* p2DRender)

    Figure out how to add the new details, it's simple, just take a look at CMover class.

    Code:
    	int				GetHitPointPercent( int nPercent = 100 );
    	int				GetManaPointPercent( int nPercent = 100 );
    	int				GetFatiguePointPercent( int nPercent = 100 );
    	int				GetHitPoint();
    	int				GetManaPoint();
    	int				GetFatiguePoint();
    	int				GetMaxHitPoint();
    	int				GetMaxManaPoint();
    	int				GetMaxFatiguePoint();
    	int				GetMaxOriginHitPoint( BOOL bOrinal = TRUE );
    	int				GetMaxOriginManaPoint( BOOL bOrinal = TRUE );
    	int				GetMaxOriginFatiguePoint( BOOL bOrinal = TRUE );
    	int				GetHPRecovery();
    	int				GetMPRecovery();
    	int				GetFPRecovery();
    	int				GetNaturalArmor();
     	float			GetAttackSpeed();
    	float			GetCastingAniSpeed();
    	int				GetCastingTime( int nCastingTime );
    	float			GetDamageMultiplier( ATTACK_INFO* pInfo );
    	int				PostCalcMagicSkill( int nATK, ATTACK_INFO* pInfo );
    	int				PostCalcGeneric( int nATK, ATTACK_INFO* pInfo );
    	float			GetMagicSkillFactor( CMover* pDefender, SAI79::ePropType skillType );
    	float			GetATKMultiplier( CMover* pDefender, DWORD dwAtkFlags );
    	float			GetDEFMultiplier( ATTACK_INFO* pInfo );
    	float			GetBlockFactor( CMover* pAttacker, ATTACK_INFO* pInfo );
    	int				GetWeaponATK( DWORD dwWeaponType );
    	int				GetPlusWeaponATK( DWORD dwWeaponType );
    	int				GetWeaponPlusDamage( int nDamage, BOOL bRandom = TRUE );
    	void			GetDamagePropertyFactor( CMover* pDefender, int* pnATKFactor, int* pnDEFFactor, int nParts );
    	int				GetPropATKPlus( int nParts );
    	int				GetPropDEFPlus();
    	void			GetDamageRange( int& nMin, int& nMax );
    	BOOL			IsBlocking( CMover* pAttacker );
    	BOOL			CanFlyByAttack();
    	BOOL			IsCriticalAttack( CMover* pDefense, DWORD dwAtkFlags );
    	int				GetCriticalProb();
    	int				GetReqMp( int nReqMp );
    	int				GetReqFp( int nReqFp );
    	BOOL			GetAttackResult( CMover* pHitObj, DWORD dwOption );
    	int				GetAdjHitRate();
    	int				GetHitPower( ATTACK_INFO* pInfo );
    	int				GetRangeHitPower( ATTACK_INFO* pInfo );
    	int				GetParrying();
    	int				GetDefenseByItem( BOOL bRandom = TRUE );
    	int				GetShowDefense( BOOL bRandom );
    	int				GetResistMagic();
    	int				GetResistSpell( int nDestParam );
    	int				GetMeleeSkillPower( ATTACK_INFO* pInfo );	// ±ÙÁ¢°ø°Ý ½ºÅ³µ¥¹ÌÁö
    	int				GetMagicHitPower( int nMagicPower );			// ¿Ïµå°ø°Ý µ¥¹ÌÁö



Advertisement