[Release] Autoskill

01/31/2015 13:44 Grening#1
Mit dieser Funktion werden alle Skills maximiert, sobald ihr das benötigete Level erreicht.

Fangen wir an:

Versioncommon.h vom Worldserver:
Code:
#define __AUTO_SKILL_MAX
Mover.cpp

In der Funktion
Code:
void CMover::InitProp( BOOL bInitAI )
nach dem hier suchen
Code:
	if( m_nJob != -1 ) 
	{
		ItemProp** apSkillProp = prj.m_aJobSkill[ m_nJob ];
		int nJobNum = prj.m_aJobSkillNum[ m_nJob ];
		
		LPSKILL lpSkill;
		for( i = 0; i < nJobNum; i++ )
		{
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i ];
			lpSkill->dwSkill = pSkillProp->dwID;
und das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX


Mover.cpp
In der Funktion
Code:
void CMover::InitLevel( int nJob, LONG nLevel, BOOL bGamma )
Nach dem hier suchen
Code:
		m_nJob	= JOB_VAGRANT;
		ItemProp** apSkillProp = prj.m_aJobSkill[ m_nJob ];
		int nJobNum = prj.m_aJobSkillNum[ m_nJob ];
		for( i = 0; i < nJobNum; i++ )
		{
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i ];
			lpSkill->dwSkill = pSkillProp->dwID;
und das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX
MoverParam.cpp
In der Funktion
Code:
BOOL  CMover::SetExpert( int nJob )
Unter
Code:
lpSkill->dwSkill = pSkillProp->dwID;
Das hier
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX
In der Funktion
Code:
BOOL CMover::AddChangeJob( int nJob )
Nach dem suchen
Code:
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i + MAX_JOB_SKILL ];
			lpSkill->dwSkill = pSkillProp->dwID;
Drunter
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX



Runter scrollen bis ihr das findet
Code:
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i + MAX_JOB_SKILL + MAX_EXPERT_SKILL ];
			lpSkill->dwSkill = pSkillProp->dwID;
und dann das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX



Runter scrollen bis das kommt
Code:
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i + MAX_JOB_SKILL + MAX_EXPERT_SKILL + MAX_PRO_SKILL];
			lpSkill->dwSkill = pSkillProp->dwID;
und dann das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX



Runterscrollen bis
Code:
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i + MAX_JOB_SKILL + MAX_EXPERT_SKILL + MAX_PRO_SKILL + MAX_MASTER_SKILL ];
			lpSkill->dwSkill = pSkillProp->dwID;
und dann das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX


Runter scrollen bis
Code:
			ItemProp* pSkillProp = apSkillProp[ i ];
			lpSkill = &m_aJobSkill[ i + MAX_JOB_SKILL + MAX_EXPERT_SKILL + MAX_PRO_SKILL + MAX_MASTER_SKILL + MAX_HERO_SKILL ];
			lpSkill->dwSkill = pSkillProp->dwID;
und dann das drunter einfügen
Code:
#ifdef	__AUTO_SKILL_MAX
			lpSkill->dwLevel = pSkillProp->dwExpertMax;
#endif	//__AUTO_SKILL_MAX
#geleeched aus der Ace Flyff Source.
#Es ist für diejenigen bestimmt die das gerne haben möchten und nicht für die, die es schon haben.
01/31/2015 14:46 Terrat#2
Aber trotzdem ein thx ist es wert.
01/31/2015 14:48 Grening#3
Redest du von dem #ifdef __AUTO_SKILL_MAX und #endif__AUTO_SKILL_MAX oder was meinst du genau?
01/31/2015 14:50 Terrat#4
Quote:
Originally Posted by Grening View Post
Redest du von dem #ifdef __AUTO_SKILL_MAX und #endif__AUTO_SKILL_MAX oder was meinst du genau?
Nein, hatte mich nur verlesen :) dachte ich hätte doppelte Einträge gesehen.