Jump to content

Recommended Posts

Spoiler

 

/src/server/common/service.h

Add:

#define VALUE_BONUS_DS_SET_BONUS

server/game/src/DragonSoul.cpp

Find:

float DSManager::GetWeight(DWORD dwVnum) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	float fWeight = 0.f;
	if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
		return 0.f;
  
	return fWeight;
}

Change with:

float DSManager::GetWeight(DWORD dwVnum) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	float fWeight = 0.f;
	if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
		return 0.f;
#ifdef VALUE_BONUS_DS_SET_BONUS
	return fWeight * (100.f / 37.f);
#else
	return fWeight;
#endif
}

 

Find:

int DSManager::GetBasicApplyValue(DWORD dwVnum, int iType, bool bAttr) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	DragonSoulTable::TVecApplys vec_basic_applys;
	int ret = 0;
	if (!m_pTable->GetBasicApplys(ds_type, vec_basic_applys))
		return ret;
	
	for (size_t j = 0; j < vec_basic_applys.size(); j++) {
		if (vec_basic_applys[j].apply_type == iType) {
			if (!bAttr)
				ret = vec_basic_applys[j].apply_value;
			else {
				float fWeight = 0.f;
				if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
					return 0;

				fWeight /= 100.f;
				ret = (short)(ceil((float)vec_basic_applys[j].apply_value * fWeight - 0.01f));
			}
			break;
		}
	}
	
	return ret;
}

int DSManager::GetAdditionalApplyValue(DWORD dwVnum, int iType, bool bAttr) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	DragonSoulTable::TVecApplys vec_addtional_applys;
	int ret = 0;
	if (!m_pTable->GetAdditionalApplys(ds_type, vec_addtional_applys))
		return ret;
	
	for (size_t j = 0; j < vec_addtional_applys.size(); j++) {
		if (vec_addtional_applys[j].apply_type == iType) {
			if (!bAttr)
				ret = vec_addtional_applys[j].apply_value;
			else {
				float fWeight = 0.f;
				if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
					return 0;
				
				fWeight /= 100.f;
				ret = (short)(ceil((float)vec_addtional_applys[j].apply_value * fWeight - 0.01f));
			}
			break;
		}
	}
	
	return ret;
}

Change with:

int DSManager::GetBasicApplyValue(DWORD dwVnum, int iType, bool bAttr) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	DragonSoulTable::TVecApplys vec_basic_applys;
	int ret = 0;
	if (!m_pTable->GetBasicApplys(ds_type, vec_basic_applys))
		return ret;
	
	for (size_t j = 0; j < vec_basic_applys.size(); j++) {
		if (vec_basic_applys[j].apply_type == iType) {
			if (!bAttr)
				ret = vec_basic_applys[j].apply_value;
			else {
				float fWeight = 0.f;
				if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
					return 0;

#ifdef VALUE_BONUS_DS_SET_BONUS
				fWeight /= 37.f;
#else
				fWeight /= 100.f;
#endif
				ret = (short)(ceil((float)vec_basic_applys[j].apply_value * fWeight - 0.01f));
			}
			break;
		}
	}
	
	return ret;
}

int DSManager::GetAdditionalApplyValue(DWORD dwVnum, int iType, bool bAttr) {
	BYTE ds_type, grade_idx, step_idx, strength_idx;
	GetDragonSoulInfo(dwVnum, ds_type, grade_idx, step_idx, strength_idx);
	
	DragonSoulTable::TVecApplys vec_addtional_applys;
	int ret = 0;
	if (!m_pTable->GetAdditionalApplys(ds_type, vec_addtional_applys))
		return ret;
	
	for (size_t j = 0; j < vec_addtional_applys.size(); j++) {
		if (vec_addtional_applys[j].apply_type == iType) {
			if (!bAttr)
				ret = vec_addtional_applys[j].apply_value;
			else {
				float fWeight = 0.f;
				if (!m_pTable->GetWeight(ds_type, grade_idx-1, 0, 0, fWeight))
					return 0;
				
#ifdef VALUE_BONUS_DS_SET_BONUS
				fWeight /= 37.f;
#else
				fWeight /= 100.f;
#endif
				ret = (short)(ceil((float)vec_addtional_applys[j].apply_value * fWeight - 0.01f));
			}
			break;
		}
	}
	
	return ret;
}

This change can only be made if you have DS Set Bonus.

Before:                              spacer.png

After:                                 spacer.png

I haven't found a better option for this nor any other topic related to changing the DS set values.

In case anyone is wondering "Well isn't this just visual?"
No, the value change is applied, you can test it with the /state command

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1
Link to comment
https://metin2.dev/topic/33685-ds-bonus-set-value-change/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.