Buff by Fame point

04/27/2013 12:40 SourceShop#1
Hello :)

I want to make buff depending on the number of points Fame
Is that my code is correct?

In DPDatabaseClient.cpp

After :

Code:
#if __VER >= 15 // __CAMPUS
		u_long idCampus = pUser->GetCampusId();
		if( idCampus )
		{
			CCampus* pCampus = CCampusHelper::GetInstance()->GetCampus( idCampus );
			if( pCampus && pCampus->IsMember( pUser->m_idPlayer ) )
				pUser->AddUpdateCampus( pCampus );
			else
				pUser->SetCampusId( 0 );
		}
#endif // __CAMPUS
This :

Code:
#ifdef __FAME_BUFF
			DWORD SKILL;
			switch( m_nFame )
			{ 
				case 50:
				{
					SKILL = SI_RIN_DUEL_50;
				}
				break;
				case 100:
				{
					SKILL = SI_RIN_DUEL_100;
				}
				break;
				case 200:
				{
					SKILL = SI_RIN_DUEL_200;
				}
				break;
				case 300:
				{
					SKILL = SI_RIN_DUEL_300;
				}
				break;
			}
                ItemProp* pSkillProp = prj.GetSkillProp( SKILL );
                AddSkillProp* pAddSkillProp = prj.GetAddSkillProp( pSkillProp->dwSubDefine, 1 );
                if( pAddSkillProp )
                {
					DWORD dwReferTarget1Backup = pSkillProp->dwReferTarget1;
					pSkillProp->dwReferTarget1 = NULL_ID;
					DWORD dwReferTarget2Backup = pSkillProp->dwReferTarget2;
					pSkillProp->dwReferTarget2 = NULL_ID;
					DWORD dwSkillTimeBackup = pAddSkillProp->dwSkillTime;
					pAddSkillProp->dwSkillTime = 3600000;
 
					pUser->DoApplySkill( pUser, pSkillProp, pAddSkillProp );
					g_UserMng.AddDoApplySkill( pUser, pUser->GetId(), SKILL, 1 );
				}
#endif //__FAME_BUFF
Thx, help me :)

And the buff is activated when you connect if you have the required number of points


SourceShop :)
04/28/2013 14:09 SourceShop#2
Help plz :s
04/30/2013 10:23 SourceShop#3
...... No idea?
04/30/2013 10:45 Mognakor#4
The switch is obviously wrong, as you only get a buff if you have exactly 50,100 etc. Fame Points. Better use if with >= or <=
04/30/2013 12:52 SourceShop#5
Ok thank you but I can code it in any file? : o