Register for your free account! | Forgot your password?

You last visited: Today at 15:36

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Problem] Rebirth System

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2012
Posts: 235
Received Thanks: 121
[Problem] Rebirth System

Hallo wie der ein oder andere sicherlich gelesen hat bin ich dabei das Rebirth System zu fixxen
dabei bin ich nun auf ein problem gestoßen und zwar müssten die einträge alle richtig sein jedoch wird die Aktuelle Rebirth Count nicht in der DB gespeichert

Hier mal meine Einträge:

Obj.h
Code:
#ifdef	__REBIRTH
public:
	int		m_nRebirthCount;
#endif	//__REBIRTH
Obj.cpp
Code:
#ifdef	__REBIRTH
	m_nRebirthCount = 0;
#endif	//__REBIRTH

#ifdef	__REBIRTH
	m_nRebirthCount = pMover->m_nRebirthCount;
#endif	//__REBIRTH
DBManagerSave.cpp
Code:
#ifdef	__REBIRTH
	MAX_SAVEPARAM	+= 1;	// m_nRebirthCount
#endif	//__REBIRTH

#ifdef	__REBIRTH
	bOK[++j] = qry->BindParameter( ++i, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,   0, 0, &pMover->m_nRebirthCount, 0, 0 );
#endif	//__REBIRTH
DBManager.h
Code:
#ifdef	__REBIRTH
		, int nRebirthCount = 0
#endif	//__REBIRTH
DBManager.cpp
Code:
#ifdef	__REBIRTH
								, int nRebirthCount
#endif	//__REBIRTH

#ifdef	__REBIRTH
	sprintf( strCharacter, ",@im_nRebirthCount=%d", nRebirthCount );
	strncat( qryCharacter, strCharacter, sizeof(strCharacter) );
#endif	//__REBIRTH
DBManagerfun.cpp
Code:
#ifdef	__REBIRTH
	mover.m_nRebirthCount = qry->GetInt("m_nRebirthCount");
#endif	//__REBIRTH
ObjSerializeOpt.cpp
Code:
#ifdef	__REBIRTH
			ar << m_nRebirthCount;
#endif	//__REBIRTH

#ifdef	__REBIRTH
			ar >> m_nRebirthCount;
#endif	//__REBIRTH
Mover.h
Code:
#ifdef	__REBIRTH
public:
	int		m_nRebirthCount;
#endif	//__REBIRTH
Mover.cpp
Code:
#ifdef	__REBIRTH
	m_nRebirthCount = 0;
#endif	//__REBIRTH


#ifdef __REBIRTH
void CMover::InitLevelRebirth( int nJob, LONG nLevel, BOOL bGamma ){
#ifdef __WORLDSERVER
    MoverProp* pProp = GetProp();
    if( pProp ){
		if( m_nRebirthCount >= MAX_REBIRTH_COUNT)
			return;
        if( nJob > 0 && nJob < MAX_LEGEND_HERO )
            AddChangeJob( nJob );
        else
            return;
        
        int nPoint = 0;
        if( m_nJob == JOB_MERCENARY )
            nPoint += 40;
        else if( m_nJob == JOB_ACROBAT )
            nPoint += 50;
        else if( m_nJob == JOB_ASSIST )
            nPoint += 60;
        else if( m_nJob == JOB_MAGICIAN )
            nPoint += 90;
        else if( m_nJob ==  JOB_KNIGHT || m_nJob ==  JOB_BLADE )
            nPoint += 120;
        else if( m_nJob ==  JOB_JESTER || m_nJob ==  JOB_RANGER )
            nPoint += 150;
        else if( m_nJob ==  JOB_RINGMASTER )
            nPoint += 160;
        else if( m_nJob ==  JOB_BILLPOSTER || m_nJob ==  JOB_PSYCHIKEEPER )
            nPoint += 180;
        else if( m_nJob ==  JOB_ELEMENTOR )
            nPoint += 390;
        else if( nJob ==  JOB_LORDTEMPLER_HERO || nJob ==  JOB_STORMBLADE_HERO )
            nPoint += 120;
        else if( nJob ==  JOB_WINDLURKER_HERO || nJob ==  JOB_CRACKSHOOTER_HERO )
            nPoint += 150;
        else if( nJob ==  JOB_FLORIST_HERO )
            nPoint += 160;
        else if( nJob ==  JOB_FORCEMASTER_HERO || nJob ==  JOB_MENTALIST_HERO )
            nPoint += 180;
        else if( nJob ==  JOB_ELEMENTORLORD_HERO )
            nPoint += 390;

        AddSkillPoint( nPoint );
        SetJobLevel( nLevel, nJob );
		m_nLevel      = nLevel;
        m_nDeathLevel = nLevel;
		
#if __VER >= 10 //__LEGEND
        if(IsMaster()){
            int dwTmpSkLevel = 1;
            if( nLevel > 59 && nLevel < 72 )
                dwTmpSkLevel = 1;
            else if( nLevel > 71 && nLevel < 84 )
                dwTmpSkLevel = 2;
            else if( nLevel > 83 && nLevel < 96 )
                dwTmpSkLevel = 3;
            else if( nLevel > 95 && nLevel < 108 )
                dwTmpSkLevel = 4;
            else if( nLevel > 107 && nLevel < 120 )
                dwTmpSkLevel = 5;
            for( int i = 0; i < MAX_SKILL_JOB; i++ ){                
                LPSKILL lpSkill = &(m_aJobSkill[i]);
                if( lpSkill && lpSkill->dwSkill != NULL_ID ){
                    ItemProp* pSkillProp    = prj.GetSkillProp( lpSkill->dwSkill );            
                    if( pSkillProp == NULL )
                        continue;
                    if( pSkillProp->dwItemKind1 != JTYPE_MASTER)
                        continue;
                    lpSkill->dwLevel = dwTmpSkLevel;
                }
            }
        }
#endif    //__LEGEND
        if( bGamma )
            m_nExp1 = 0;
        
        ( (CUser*)this )->AddSetChangeJob( nJob );
        g_UserMng.AddNearSetChangeJob( this, nJob, &((CUser*)this)->m_aJobSkill[MAX_JOB_SKILL] );
       
#if __VER >= 11 // __SYS_PLAYER_DATA
        g_dpDBClient.SendUpdatePlayerData( (CUser*)this );
#else    // __SYS_PLAYER_DATA
        g_DPCoreClient.SendPartyMemberJob( (CUser*)this );
        g_DPCoreClient.SendFriendChangeJob( (CUser*)this );
        if( m_idGuild != 0 )
            g_DPCoreClient.SendGuildChangeJobLevel( (CUser*)this );
#endif    // __SYS_PLAYER_DATA
        SetHitPoint( GetMaxHitPoint() );
        SetManaPoint( GetMaxManaPoint() );
        SetFatiguePoint( GetMaxFatiguePoint() );

		m_nRebirthCount++;

        if( nJob >= 1 && nJob <= 4 )
            m_nRemainGP = 28;
        if( nJob >= MAX_PROFESSIONAL && nJob < MAX_MASTER ){
			if ( m_nRemainGP > 0)
				m_nRemainGP = 0;
			if (m_nRebirthCount == 1)
				m_nRemainGP = 200;
			else if (m_nRebirthCount == 2)
				m_nRemainGP = 300;
			else if (m_nRebirthCount == 3)
				m_nRemainGP = 400;
			else if (m_nRebirthCount == 4)
				m_nRemainGP = 500;
			else if (m_nRebirthCount >= 5)
				m_nRemainGP = 600;
        }
		m_nStr = m_nSta = m_nDex = m_nInt = 50;
		
        g_UserMng.AddSetLevel( this, (WORD)m_nLevel );
        ( (CUser*)this )->AddSetGrowthLearningPoint( m_nRemainGP );
        ( (CUser*)this )->AddSetExperience( GetExp1(), (WORD)m_nLevel, m_nSkillPoint, m_nSkillLevel, m_nRebirthCount  );
        ( (CUser*)this )->AddSetState( m_nStr, m_nSta, m_nDex, m_nInt, m_nRemainGP );
#if __VER >= 13 // __HONORABLE_TITLE
        ((CUser*)this)->CheckHonorStat();
        ((CUser*)this)->AddHonorListAck();
        g_UserMng.AddHonorTitleChange( this, m_nHonor);
#endif    // __HONORABLE_TITLE
    }
#endif // __WORLDSERVER
}
#endif	//__REBIRTH
FuncTextCmd.cpp
Code:
#ifdef	__REBIRTH
BOOL TextCmd_rebirth( CScanner& scanner )
{
#ifdef __WORLDSERVER
	CUser *pUser;
	pUser = (CUser*)scanner.dwValue;
	if(pUser->m_nRebirthCount > MAX_REBIRTH_COUNT)
		pUser->AddText("Du hast bereits die maximale anzahl von Rebirthes erreicht!");
	else if(pUser->m_nLevel >= MAX_3RD_LEGEND_LEVEL && pUser->IsLegendHero())
		pUser->InitLevelRebirth( pUser->m_nJob-16,60, false);
	else
		pUser->AddText("Du hast nicht das passende Level für einen Rebirth!");
#endif
	return TRUE;
} 
#endif	//__REBIRTH
VersionCommon.h
Code:
#define	MAX_REBIRTH_COUNT				5		//Default = 0
#define	__REBIRTH								//Standart Rebirth System
DB:
Spallte ist erstellt und auf 0 gesetzt und vom Typ int

Character_STR
Code:
							, @im_nRebirthCount

								, m_nRebirthCount

						, m_nRebirthCount = @im_nRebirthCount

, @im_nRebirthCount int = 0
Hoffe jemand hat eine Idee was ich vergessen habe...



Andrej-Delany is offline  
Old   #2
 
elite*gold: 0
Join Date: Feb 2013
Posts: 162
Received Thanks: 151
DBManagerfun.cpp

Code:
#ifdef	__REBIRTH
	mover.m_nRebirthCount = qry->GetInt("m_nRebirthCount");
#endif	//__REBIRTH
Das muss in DBManagerjoin.cpp, was bei dir in DBManagerfun Steht, und zusätzlich noch dashier:

Code:
#ifdef	__REBIRTH
	ar << pMover->m_nRebirthCount;
#endif	//__REBIRTH
Ich bin mir aber nicht sicher.


i33zGames is offline  
Thanks
1 User
Old   #3
 
elite*gold: 0
Join Date: Dec 2012
Posts: 235
Received Thanks: 121
Quote:
Originally Posted by i33zGames View Post
DBManagerfun.cpp

Code:
#ifdef	__REBIRTH
	mover.m_nRebirthCount = qry->GetInt("m_nRebirthCount");
#endif	//__REBIRTH
Das muss in DBManagerjoin.cpp, was bei dir in DBManagerfun Steht, und zusätzlich noch dashier:

Code:
#ifdef	__REBIRTH
	ar << pMover->m_nRebirthCount;
#endif	//__REBIRTH
Ich bin mir aber nicht sicher.
Stimmt in der Join sthet es auch...

Muss für heute schluss machen habe noch was zu erledigen sry wird wohl heute nichts mehr werden
Andrej-Delany is offline  
Old   #4
 
elite*gold: 85
Join Date: Jan 2012
Posts: 1,140
Received Thanks: 873
is this need for rebirth system?

i do mine like this

from:
Code:
m_nRebirthCount
to:
Code:
m_nCampusPoint
And it works normally


Rhyder` is offline  
Thanks
1 User
Old   #5
 
elite*gold: 0
Join Date: Oct 2012
Posts: 939
Received Thanks: 148
m_nCampusPoint can be used for it. The only problem with it is that if you do the quest Master apprantice then it will also increased. Cause that system is using the m_nCampusPoint. I like the way Andrej does it making an new Row for it so you can still have the master apprentice system.

@andrej i will take an closer look in your code to see where it can be fixed when i am done with some bugs in my other systems.
raventh1984 is offline  
Old   #6
 
elite*gold: 0
Join Date: Dec 2012
Posts: 235
Received Thanks: 121
Quote:
Originally Posted by i33zGames View Post
Na bist du weiter gekommen?
Sry habe aktuell keine zeit arbeite von 8-21 Uhr da habe ich meist keine lust noch irgendwas anderes zu machen als mich auszuruhen ****** mich drum wenn ich wieder etwas mehr zeit habe
Andrej-Delany is offline  
Old   #7
 
elite*gold: 0
Join Date: Dec 2012
Posts: 235
Received Thanks: 121
Da ich keine Zeit mehr habe
#CloseRequest


Andrej-Delany is offline  
Closed Thread

Tags
flyff, rebirth



« Previous Thread | Next Thread »

Similar Threads
Rebirth System
Is there a release how to input Rebirth System into your server? If so can someone link me to the thread or site? Please and Thank You Love ,...
17 Replies - SRO PServer - Discussions / Questions
Rebirth system
Kann mir jmd. die files von Rebirth system geben?
29 Replies - Fiesta Online
was bedeutet rebirth system ? :o
ich hab das schon gegoogelt aber ich versteh nicht was das sein soll kann mir jemand weiter helfen ? :D
1 Replies - Dragonica
[IDDE] REBIRTH SYSTEM ..!!
Hallo Com da bin ich wieder wie wärs eigentlich mit som rebirth system rebirth ist z.b wenn man +9 sachen hat leuchtet es dann gehts wieder aus...
19 Replies - Metin2 PServer - Discussions / Questions
[Release] Rebirth System
Ich glaube es gibt soetwas noch nicht, deswegen release ich es mal. Ein Rebirth System ist ein System, wenn man Lvl. 120 ist das man wieder 60 kommt...
13 Replies - Flyff PServer Guides & Releases



All times are GMT +1. The time now is 15:36.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.