Hallo Community,
da des öfteren nachgefragt wurde wie man die DSS/FKS Werte per Config erhöhen kann Release ich hier mal ein Tutorial was ich verwende.
Es stammt nicht von mir zur Information.
C
- //Anpassen der item_addon.cpp in der Server-Binary
- #include "stdafx.h"
- #include "config.h"
- #include "constants.h"
- #include "utils.h"
- #include "item.h"
- #include "item_addon.h"
- extern int minAddonFKS;
- extern int maxAddonFKS;
- extern int minAddonDSS;
- extern int maxAddonDSS;
- CItemAddonManager::CItemAddonManager()
- {
- }
- CItemAddonManager::~CItemAddonManager()
- {
- }
- void CItemAddonManager::ApplyAddonTo(int iAddonType, LPITEM pItem)
- {
- if (!pItem)
- {
- sys_err("ITEM pointer null");
- return;
- }
- // TODO 일단 하드코딩으로 평타 스킬 수치 변경만 경우만 적용받게한다.
- if (minAddonFKS>maxAddonFKS)
- {
- sys_err("item_addon: minAddonFKS [%d] is bigger than maxAddonFKS [%d]", minAddonFKS, maxAddonFKS);
- int bufferFKS = minAddonFKS;
- minAddonFKS = maxAddonFKS;
- maxAddonFKS = bufferFKS;
- }
- if(minAddonDSS==32767)
- minAddonDSS = (minAddonFKS*2);
- if(maxAddonDSS==32767)
- maxAddonDSS = (maxAddonFKS*2);
- if (minAddonDSS>maxAddonDSS)
- {
- sys_err("item_addon: minAddonDSS [%d] is bigger than maxAddonDSS [%d]", minAddonDSS, maxAddonDSS);
- int bufferDSS = minAddonDSS;
- minAddonDSS = maxAddonDSS;
- maxAddonDSS = bufferDSS;
- }
- int iSkillBonus = MINMAX(minAddonFKS, (int) (gauss_random(0, 5) + 0.5f), maxAddonFKS);
- int iNormalHitBonus = 0;
- if (abs(iSkillBonus) <= 20)
- iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
- else
- iNormalHitBonus = -2 * iSkillBonus + number(1, 5);
- iNormalHitBonus = MINMAX(minAddonDSS, iNormalHitBonus, maxAddonDSS);
- pItem->RemoveAttributeType(APPLY_SKILL_DAMAGE_BONUS);
- pItem->RemoveAttributeType(APPLY_NORMAL_HIT_DAMAGE_BONUS);
- pItem->AddAttribute(APPLY_NORMAL_HIT_DAMAGE_BONUS, iNormalHitBonus);
- pItem->AddAttribute(APPLY_SKILL_DAMAGE_BONUS, iSkillBonus);
- }
Code
- //Server-Binary -> game -> config.cpp
- //Suche folgendes
- int gPlayerMaxLevel = 99;
- //füge folgendes darunter
- int minAddonFKS = -30;
- int maxAddonFKS = 30;
- int minAddonDSS = 32767;
- int maxAddonDSS = 32767;
- //Suche folgendes
- TOKEN("max_level")
- {
- str_to_number(gPlayerMaxLevel, value_string);
- gPlayerMaxLevel = MINMAX(1, gPlayerMaxLevel, PLAYER_MAX_LEVEL_CONST);
- fprintf(stderr, "PLAYER_MAX_LEVEL: %d\n", gPlayerMaxLevel);
- }
- //füge folgendes darunter
- TOKEN("min_addon_fks")
- {
- str_to_number(minAddonFKS, value_string);
- minAddonFKS = MINMAX(-32767, minAddonFKS, 32767);
- fprintf(stderr, "MIN_ADDON_FKS: %d\n", minAddonFKS);
- }
- TOKEN("max_addon_fks")
- {
- str_to_number(maxAddonFKS, value_string);
- maxAddonFKS = MINMAX(-32767, maxAddonFKS, 32767);
- fprintf(stderr, "MAX_ADDON_FKS: %d\n", maxAddonFKS);
- }
- TOKEN("min_addon_dss")
- {
- str_to_number(minAddonDSS, value_string);
- minAddonDSS = MINMAX(-32767, minAddonDSS, 32766);
- fprintf(stderr, "MIN_ADDON_DSS: %d\n", maxAddonDSS);
- }
- TOKEN("max_addon_dss")
- {
- str_to_number(maxAddonDSS, value_string);
- maxAddonDSS = MINMAX(-32767, maxAddonDSS, 32766);
- fprintf(stderr, "MAX_ADDON_DSS: %d\n", maxAddonDSS);
- }
Code