Drachenseelensystem entfernen (1/3): komplett eigene Dateien loeschen
Erster Schritt der vollstaendigen Entfernung des Drachenseelensystems. Loescht DragonSoul.h/.cpp (DSManager), dragon_soul_table.h/.cpp, char_dragonsoul.cpp, questlua_dragonsoul.cpp sowie die zugehoerige Datentabelle dragon_soul_table.txt. Diese Dateien sind zu 100% auf das Drachenseelensystem beschraenkt und werden komplett entfernt. Der Build kompiliert nach diesem Zwischenschritt noch NICHT (verwaiste #include "DragonSoul.h" und Aufrufe in weiteren Dateien folgen in einem separaten Commit) - das ist innerhalb dieser mehrteiligen Entfernung erwartet.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
#ifndef __INC_METIN_II_GAME_DRAGON_SOUL_H__
|
||||
#define __INC_METIN_II_GAME_DRAGON_SOUL_H__
|
||||
|
||||
#include "../../common/length.h"
|
||||
|
||||
class CHARACTER;
|
||||
class CItem;
|
||||
|
||||
class DragonSoulTable;
|
||||
|
||||
class DSManager : public singleton<DSManager>
|
||||
{
|
||||
public:
|
||||
DSManager();
|
||||
~DSManager();
|
||||
bool ReadDragonSoulTableFile(const char * c_pszFileName);
|
||||
|
||||
void GetDragonSoulInfo(DWORD dwVnum, OUT BYTE& bType, OUT BYTE& bGrade, OUT BYTE& bStep, OUT BYTE& bRefine) const;
|
||||
// fixme : titempos로
|
||||
WORD GetBasePosition(const LPITEM pItem) const;
|
||||
bool IsValidCellForThisItem(const LPITEM pItem, const TItemPos& Cell) const;
|
||||
int GetDuration(const LPITEM pItem) const;
|
||||
|
||||
// 용혼석을 받아서 특정 용심을 추출하는 함수
|
||||
bool ExtractDragonHeart(LPCHARACTER ch, LPITEM pItem, LPITEM pExtractor = NULL);
|
||||
|
||||
// 특정 용혼석(pItem)을 장비창에서 제거할 때에 성공 여부를 결정하고,
|
||||
// 실패시 부산물을 주는 함수.(부산물은 dragon_soul_table.txt에 정의)
|
||||
// DestCell에 invalid한 값을 넣으면 성공 시, 용혼석을 빈 공간에 자동 추가.
|
||||
// 실패 시, 용혼석(pItem)은 delete됨.
|
||||
// 추출아이템이 있다면 추출 성공 확률이 pExtractor->GetValue(0)%만큼 증가함.
|
||||
// 부산물은 언제나 자동 추가.
|
||||
bool PullOut(LPCHARACTER ch, TItemPos DestCell, IN OUT LPITEM& pItem, LPITEM pExtractor = NULL);
|
||||
|
||||
// 용혼석 업그레이드 함수
|
||||
bool DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
|
||||
bool DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
|
||||
bool DoRefineStrength(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE]);
|
||||
|
||||
bool DragonSoulItemInitialize(LPITEM pItem);
|
||||
|
||||
bool IsTimeLeftDragonSoul(LPITEM pItem) const;
|
||||
int LeftTime(LPITEM pItem) const;
|
||||
bool ActivateDragonSoul(LPITEM pItem);
|
||||
bool DeactivateDragonSoul(LPITEM pItem, bool bSkipRefreshOwnerActiveState = false);
|
||||
bool IsActiveDragonSoul(LPITEM pItem) const;
|
||||
private:
|
||||
void SendRefineResultPacket(LPCHARACTER ch, BYTE bSubHeader, const TItemPos& pos);
|
||||
|
||||
// 캐릭터의 용혼석 덱을 살펴보고, 활성화 된 용혼석이 없다면, 캐릭터의 용혼석 활성 상태를 off 시키는 함수.
|
||||
void RefreshDragonSoulState(LPCHARACTER ch);
|
||||
|
||||
DWORD MakeDragonSoulVnum(BYTE bType, BYTE grade, BYTE step, BYTE refine);
|
||||
bool PutAttributes(LPITEM pDS);
|
||||
bool RefreshItemAttributes(LPITEM pItem);
|
||||
|
||||
DragonSoulTable* m_pTable;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,145 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "char.h"
|
||||
#include "item.h"
|
||||
#include "desc.h"
|
||||
#include "DragonSoul.h"
|
||||
#include "log.h"
|
||||
|
||||
// 용혼석 초기화
|
||||
// 용혼석 on/off는 Affect로 저장되기 때문에,
|
||||
// 용혼석 Affect가 있다면 덱에 있는 용혼석을 activate해야한다.
|
||||
// 또한 용혼석 사용 자격은 QuestFlag로 저장해 놓았기 때문에,
|
||||
// 퀘스트 Flag에서 용혼석 사용 자격을 읽어온다.
|
||||
|
||||
// 캐릭터의 affect, quest가 load 되기 전에 DragonSoul_Initialize를 호출하면 안된다.
|
||||
// affect가 가장 마지막에 로드되어 LoadAffect에서 호출함.
|
||||
void CHARACTER::DragonSoul_Initialize()
|
||||
{
|
||||
for (int i = INVENTORY_MAX_NUM + WEAR_MAX_NUM; i < DRAGON_SOUL_EQUIP_SLOT_END; i++)
|
||||
{
|
||||
LPITEM pItem = GetItem(TItemPos(INVENTORY, i));
|
||||
if (NULL != pItem)
|
||||
pItem->SetSocket(ITEM_SOCKET_DRAGON_SOUL_ACTIVE_IDX, 0);
|
||||
}
|
||||
|
||||
if (FindAffect(AFFECT_DRAGON_SOUL_DECK_0))
|
||||
{
|
||||
DragonSoul_ActivateDeck(DRAGON_SOUL_DECK_0);
|
||||
}
|
||||
else if (FindAffect(AFFECT_DRAGON_SOUL_DECK_1))
|
||||
{
|
||||
DragonSoul_ActivateDeck(DRAGON_SOUL_DECK_1);
|
||||
}
|
||||
}
|
||||
|
||||
int CHARACTER::DragonSoul_GetActiveDeck() const
|
||||
{
|
||||
return m_pointsInstant.iDragonSoulActiveDeck;
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_IsDeckActivated() const
|
||||
{
|
||||
return m_pointsInstant.iDragonSoulActiveDeck >= 0;
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_IsQualified() const
|
||||
{
|
||||
return FindAffect(AFFECT_DRAGON_SOUL_QUALIFIED) != NULL;
|
||||
}
|
||||
|
||||
void CHARACTER::DragonSoul_GiveQualification()
|
||||
{
|
||||
if(NULL == FindAffect(AFFECT_DRAGON_SOUL_QUALIFIED))
|
||||
{
|
||||
LogManager::instance().CharLog(this, 0, "DS_QUALIFIED", "");
|
||||
}
|
||||
AddAffect(AFFECT_DRAGON_SOUL_QUALIFIED, APPLY_NONE, 0, AFF_NONE, INFINITE_AFFECT_DURATION, 0, false, false);
|
||||
//SetQuestFlag("dragon_soul.is_qualified", 1);
|
||||
//// 자격있다면 POINT_DRAGON_SOUL_IS_QUALIFIED는 무조건 1
|
||||
//PointChange(POINT_DRAGON_SOUL_IS_QUALIFIED, 1 - GetPoint(POINT_DRAGON_SOUL_IS_QUALIFIED));
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_ActivateDeck(int deck_idx)
|
||||
{
|
||||
if (deck_idx < DRAGON_SOUL_DECK_0 || deck_idx >= DRAGON_SOUL_DECK_MAX_NUM)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DragonSoul_GetActiveDeck() == deck_idx)
|
||||
return true;
|
||||
|
||||
DragonSoul_DeactivateAll();
|
||||
|
||||
if (!DragonSoul_IsQualified())
|
||||
{
|
||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("용혼석 상자가 활성화되지 않았습니다."));
|
||||
return false;
|
||||
}
|
||||
|
||||
AddAffect(AFFECT_DRAGON_SOUL_DECK_0 + deck_idx, APPLY_NONE, 0, 0, INFINITE_AFFECT_DURATION, 0, false);
|
||||
|
||||
m_pointsInstant.iDragonSoulActiveDeck = deck_idx;
|
||||
|
||||
for (int i = DRAGON_SOUL_EQUIP_SLOT_START + DS_SLOT_MAX * deck_idx;
|
||||
i < DRAGON_SOUL_EQUIP_SLOT_START + DS_SLOT_MAX * (deck_idx + 1); i++)
|
||||
{
|
||||
LPITEM pItem = GetInventoryItem(i);
|
||||
if (NULL != pItem)
|
||||
DSManager::instance().ActivateDragonSoul(pItem);
|
||||
}
|
||||
|
||||
return true; //fix
|
||||
}
|
||||
|
||||
void CHARACTER::DragonSoul_DeactivateAll()
|
||||
{
|
||||
for (int i = DRAGON_SOUL_EQUIP_SLOT_START; i < DRAGON_SOUL_EQUIP_SLOT_END; i++)
|
||||
{
|
||||
DSManager::instance().DeactivateDragonSoul(GetInventoryItem(i), true);
|
||||
}
|
||||
m_pointsInstant.iDragonSoulActiveDeck = -1;
|
||||
RemoveAffect(AFFECT_DRAGON_SOUL_DECK_0);
|
||||
RemoveAffect(AFFECT_DRAGON_SOUL_DECK_1);
|
||||
}
|
||||
|
||||
void CHARACTER::DragonSoul_CleanUp()
|
||||
{
|
||||
for (int i = DRAGON_SOUL_EQUIP_SLOT_START; i < DRAGON_SOUL_EQUIP_SLOT_END; i++)
|
||||
{
|
||||
DSManager::instance().DeactivateDragonSoul(GetInventoryItem(i), true);
|
||||
}
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_RefineWindow_Open(LPENTITY pEntity)
|
||||
{
|
||||
if (NULL == m_pointsInstant.m_pDragonSoulRefineWindowOpener)
|
||||
{
|
||||
m_pointsInstant.m_pDragonSoulRefineWindowOpener = pEntity;
|
||||
}
|
||||
|
||||
TPacketGCDragonSoulRefine PDS;
|
||||
PDS.header = HEADER_GC_DRAGON_SOUL_REFINE;
|
||||
PDS.bSubType = DS_SUB_HEADER_OPEN;
|
||||
LPDESC d = GetDesc();
|
||||
|
||||
if (NULL == d)
|
||||
{
|
||||
sys_err ("User(%s)'s DESC is NULL POINT.", GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
d->Packet(&PDS, sizeof(PDS));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_RefineWindow_Close()
|
||||
{
|
||||
m_pointsInstant.m_pDragonSoulRefineWindowOpener = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CHARACTER::DragonSoul_RefineWindow_CanRefine()
|
||||
{
|
||||
return NULL != m_pointsInstant.m_pDragonSoulRefineWindowOpener;
|
||||
}
|
||||
@@ -1,902 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "constants.h"
|
||||
#include "group_text_parse_tree.h"
|
||||
#include "dragon_soul_table.h"
|
||||
#include "item_manager.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
const std::string g_astGradeName[] =
|
||||
{
|
||||
"grade_normal",
|
||||
"grade_brilliant",
|
||||
"grade_rare",
|
||||
"grade_ancient",
|
||||
"grade_legendary",
|
||||
};
|
||||
|
||||
const std::string g_astStepName[] =
|
||||
{
|
||||
"step_lowest",
|
||||
"step_low",
|
||||
"step_mid",
|
||||
"step_high",
|
||||
"step_highest",
|
||||
};
|
||||
|
||||
const std::string g_astMaterialName[] =
|
||||
{
|
||||
"material_leather",
|
||||
"material_blood",
|
||||
"material_root",
|
||||
"material_needle",
|
||||
"material_jewel",
|
||||
"material_ds_refine_normal",
|
||||
"material_ds_refine_blessed",
|
||||
"material_ds_refine_holly",
|
||||
};
|
||||
|
||||
bool DragonSoulTable::ReadDragonSoulTableFile(const char * c_pszFileName)
|
||||
{
|
||||
m_pLoader = new CGroupTextParseTreeLoader;
|
||||
CGroupTextParseTreeLoader& loader = *m_pLoader;
|
||||
|
||||
if (false == loader.Load(c_pszFileName))
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt load error");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Group VnumMapper Reading.
|
||||
if (!ReadVnumMapper())
|
||||
return false;
|
||||
|
||||
// Group BasicApplys Reading.
|
||||
if (!ReadBasicApplys())
|
||||
return false;
|
||||
|
||||
// Group AdditionalApplys Reading.
|
||||
if (!ReadAdditionalApplys())
|
||||
return false;
|
||||
|
||||
m_pApplyNumSettingNode = loader.GetGroup("applynumsettings");
|
||||
m_pWeightTableNode = loader.GetGroup("weighttables");
|
||||
m_pRefineGradeTableNode = loader.GetGroup("refinegradetables");
|
||||
m_pRefineStepTableNode = loader.GetGroup("refinesteptables");
|
||||
m_pRefineStrengthTableNode = loader.GetGroup("refinestrengthtables");
|
||||
m_pDragonHeartExtTableNode = loader.GetGroup("dragonheartexttables");
|
||||
m_pDragonSoulExtTableNode = loader.GetGroup("dragonsoulexttables");
|
||||
|
||||
if (CheckApplyNumSettings()
|
||||
&& CheckWeightTables()
|
||||
&& CheckRefineGradeTables()
|
||||
&& CheckRefineStepTables()
|
||||
&& CheckRefineStrengthTables()
|
||||
&& CheckDragonHeartExtTables()
|
||||
&& CheckDragonSoulExtTables())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_err ("DragonSoul table Check failed.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetDragonSoulGroupName(BYTE bType, std::string& stGroupName) const
|
||||
{
|
||||
DragonSoulTable::TMapTypeToName::const_iterator it = m_map_type_to_name.find (bType);
|
||||
if (it != m_map_type_to_name.end())
|
||||
{
|
||||
stGroupName = it->second;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_err ("Invalid DragonSoul Type(%d)", bType);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DragonSoulTable::ReadVnumMapper()
|
||||
{
|
||||
std::string stName;
|
||||
|
||||
// Group VnumMapper Reading.
|
||||
CGroupNode* pGroupNode = m_pLoader->GetGroup("vnummapper");
|
||||
|
||||
if (NULL == pGroupNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need VnumMapper.");
|
||||
return false;
|
||||
}
|
||||
{
|
||||
int n = pGroupNode->GetRowCount();
|
||||
if (0 == n)
|
||||
{
|
||||
sys_err ("Group VnumMapper is Empty.");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::set <BYTE> setTypes;
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
const CGroupNode::CGroupNodeRow* pRow;
|
||||
pGroupNode->GetRow(i, &pRow);
|
||||
|
||||
std::string stDragonSoulName;
|
||||
BYTE bType;
|
||||
if (!pRow->GetValue("dragonsoulname", stDragonSoulName))
|
||||
{
|
||||
sys_err ("In Group VnumMapper, No DragonSoulName column.");
|
||||
return false;
|
||||
}
|
||||
if (!pRow->GetValue("type", bType))
|
||||
{
|
||||
sys_err ("In Group VnumMapper, %s's Vnum is invalid", stDragonSoulName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (setTypes.end() != setTypes.find(bType))
|
||||
{
|
||||
sys_err ("In Group VnumMapper, duplicated vnum exist.");
|
||||
return false;
|
||||
}
|
||||
m_map_name_to_type.insert(TMapNameToType::value_type(stDragonSoulName, bType));
|
||||
m_map_type_to_name.insert(TMapTypeToName::value_type(bType, stDragonSoulName));
|
||||
m_vecDragonSoulTypes.push_back(bType);
|
||||
m_vecDragonSoulNames.push_back(stDragonSoulName);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::ReadBasicApplys()
|
||||
{
|
||||
CGroupNode* pGroupNode = m_pLoader->GetGroup("basicapplys");
|
||||
|
||||
if (NULL == pGroupNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need BasicApplys.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint i = 0; i < m_vecDragonSoulNames.size(); i++)
|
||||
{
|
||||
CGroupNode* pChild;
|
||||
if (NULL == (pChild = pGroupNode->GetChildNode(m_vecDragonSoulNames[i])))
|
||||
{
|
||||
sys_err ("In Group BasicApplys, %s group is not defined.", m_vecDragonSoulNames[i].c_str());
|
||||
return false;
|
||||
}
|
||||
TVecApplys vecApplys;
|
||||
int n = pChild->GetRowCount();
|
||||
|
||||
// BasicApply Group은 Key가 1부터 시작함.
|
||||
for (int j = 1; j <= n; j++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << j;
|
||||
const CGroupNode::CGroupNodeRow* pRow = NULL;
|
||||
|
||||
pChild->GetRow(ss.str(), &pRow);
|
||||
if (NULL == pRow)
|
||||
{
|
||||
sys_err("In Group BasicApplys, No %d row.", j);
|
||||
}
|
||||
EApplyTypes at;
|
||||
int av;
|
||||
|
||||
std::string stTypeName;
|
||||
if (!pRow->GetValue("apply_type", stTypeName))
|
||||
{
|
||||
sys_err ("In Group BasicApplys, %s group's apply_type is empty.", m_vecDragonSoulNames[i].c_str());
|
||||
return false;
|
||||
}
|
||||
if (!(at = (EApplyTypes)FN_get_apply_type(stTypeName.c_str())))
|
||||
{
|
||||
sys_err ("In Group BasicApplys, %s group's apply_type %s is invalid.", m_vecDragonSoulNames[i].c_str(), stTypeName.c_str());
|
||||
return false;
|
||||
}
|
||||
if (!pRow->GetValue("apply_value", av))
|
||||
{
|
||||
sys_err ("In Group BasicApplys, %s group's apply_value %s is invalid.", m_vecDragonSoulNames[i].c_str(), av);
|
||||
return false;
|
||||
}
|
||||
vecApplys.push_back(SApply(at, av));
|
||||
}
|
||||
m_map_basic_applys_group.insert (TMapApplyGroup::value_type (m_map_name_to_type[m_vecDragonSoulNames[i]], vecApplys));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::ReadAdditionalApplys()
|
||||
{
|
||||
CGroupNode* pGroupNode = m_pLoader->GetGroup("additionalapplys");
|
||||
if (NULL == pGroupNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need AdditionalApplys.");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_vecDragonSoulNames.size(); i++)
|
||||
{
|
||||
CGroupNode* pChild;
|
||||
if (NULL == (pChild = pGroupNode->GetChildNode(m_vecDragonSoulNames[i])))
|
||||
{
|
||||
sys_err ("In Group AdditionalApplys, %s group is not defined.", m_vecDragonSoulNames[i].c_str());
|
||||
return false;
|
||||
}
|
||||
TVecApplys vecApplys;
|
||||
|
||||
int n = pChild->GetRowCount();
|
||||
|
||||
for (int j = 0; j < n; j++)
|
||||
{
|
||||
const CGroupNode::CGroupNodeRow* pRow;
|
||||
|
||||
pChild->GetRow(j, &pRow);
|
||||
|
||||
EApplyTypes at;
|
||||
int av;
|
||||
float prob;
|
||||
std::string stTypeName;
|
||||
if (!pRow->GetValue("apply_type", stTypeName))
|
||||
{
|
||||
sys_err ("In Group AdditionalApplys, %s group's apply_type is empty.", m_vecDragonSoulNames[i].c_str());
|
||||
return false;
|
||||
}
|
||||
if (!(at = (EApplyTypes)FN_get_apply_type(stTypeName.c_str())))
|
||||
{
|
||||
sys_err ("In Group AdditionalApplys, %s group's apply_type %s is invalid.", m_vecDragonSoulNames[i].c_str(), stTypeName.c_str());
|
||||
return false;
|
||||
}
|
||||
if (!pRow->GetValue("apply_value", av))
|
||||
{
|
||||
sys_err ("In Group AdditionalApplys, %s group's apply_value %s is invalid.", m_vecDragonSoulNames[i].c_str(), av);
|
||||
return false;
|
||||
}
|
||||
if (!pRow->GetValue("prob", prob))
|
||||
{
|
||||
sys_err ("In Group AdditionalApplys, %s group's probability %s is invalid.", m_vecDragonSoulNames[i].c_str(), prob);
|
||||
return false;
|
||||
}
|
||||
vecApplys.push_back(SApply(at, av, prob));
|
||||
}
|
||||
m_map_additional_applys_group.insert (TMapApplyGroup::value_type (m_map_name_to_type[m_vecDragonSoulNames[i]], vecApplys));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckApplyNumSettings ()
|
||||
{
|
||||
// Group ApplyNumSettings Reading.
|
||||
if (NULL == m_pApplyNumSettingNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need ApplyNumSettings.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_GRADE_MAX; j++)
|
||||
{
|
||||
int basis, add_min, add_max;
|
||||
if (!GetApplyNumSettings(m_vecDragonSoulTypes[i], j, basis, add_min, add_max))
|
||||
{
|
||||
sys_err ("In %s group of ApplyNumSettings, values in Grade(%s) row is invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckWeightTables ()
|
||||
{
|
||||
// Group WeightTables Reading.
|
||||
if (NULL == m_pWeightTableNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need WeightTables.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_GRADE_MAX; j++)
|
||||
{
|
||||
for (int k = 0; k < DRAGON_SOUL_STEP_MAX; k++)
|
||||
{
|
||||
for (int l = 0; l < DRAGON_SOUL_STRENGTH_MAX; l++)
|
||||
{
|
||||
float fWeight;
|
||||
if (!GetWeight(m_vecDragonSoulTypes[i], j, k, l, fWeight))
|
||||
{
|
||||
sys_err ("In %s group of WeightTables, value(Grade(%s), Step(%s), Strength(%d) is invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str(), g_astStepName[k].c_str(), l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckRefineGradeTables()
|
||||
{
|
||||
// Group UpgradeTables Reading.
|
||||
if (NULL == m_pRefineGradeTableNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need RefineGradeTables.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_GRADE_MAX - 1; j++)
|
||||
{
|
||||
int need_count, fee;
|
||||
std::vector <float> vec_probs;
|
||||
if (!GetRefineGradeValues(m_vecDragonSoulTypes[i], j, need_count, fee, vec_probs))
|
||||
{
|
||||
sys_err ("In %s group of RefineGradeTables, values in Grade(%s) row is invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (need_count < 1)
|
||||
{
|
||||
sys_err ("In %s group of RefineGradeTables, need_count of Grade(%s) is less than 1.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (fee < 0)
|
||||
{
|
||||
sys_err ("In %s group of RefineGradeTables, fee of Grade(%s) is less than 0.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (DRAGON_SOUL_GRADE_MAX != vec_probs.size())
|
||||
{
|
||||
sys_err ("In %s group of RefineGradeTables, probability list size is not %d.", DRAGON_SOUL_GRADE_MAX);
|
||||
return false;
|
||||
}
|
||||
for (int k = 0; k < vec_probs.size(); k++)
|
||||
{
|
||||
if (vec_probs[k] < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of RefineGradeTables, probability(index : %d) is less than 0.", k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckRefineStepTables ()
|
||||
{
|
||||
// Group ImproveTables Reading.
|
||||
if (NULL == m_pRefineStrengthTableNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need RefineStepTables.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_STEP_MAX - 1; j++)
|
||||
{
|
||||
int need_count, fee;
|
||||
std::vector <float> vec_probs;
|
||||
if (!GetRefineStepValues(m_vecDragonSoulTypes[i], j, need_count, fee, vec_probs))
|
||||
{
|
||||
sys_err ("In %s group of RefineStepTables, values in Step(%s) row is invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astStepName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (need_count < 1)
|
||||
{
|
||||
sys_err ("In %s group of RefineStepTables, need_count of Step(%s) is less than 1.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astStepName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (fee < 0)
|
||||
{
|
||||
sys_err ("In %s group of RefineStepTables, fee of Step(%s) is less than 0.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astStepName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (DRAGON_SOUL_GRADE_MAX != vec_probs.size())
|
||||
{
|
||||
sys_err ("In %s group of RefineStepTables, probability list size is not %d.",
|
||||
m_vecDragonSoulNames[i].c_str(), DRAGON_SOUL_GRADE_MAX);
|
||||
return false;
|
||||
}
|
||||
for (int k = 0; k < vec_probs.size(); k++)
|
||||
{
|
||||
if (vec_probs[k] < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of RefineStepTables, probability(index : %d) is less than 0.",
|
||||
m_vecDragonSoulNames[i].c_str(), k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DragonSoulTable::CheckRefineStrengthTables()
|
||||
{
|
||||
CGroupNode* pGroupNode = m_pRefineStrengthTableNode;
|
||||
// Group RefineTables Reading.
|
||||
if (NULL == pGroupNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need RefineStrengthTables.");
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = MATERIAL_DS_REFINE_NORMAL; j <= MATERIAL_DS_REFINE_HOLLY; j++)
|
||||
{
|
||||
int fee;
|
||||
float prob;
|
||||
for (int k = 0; k < DRAGON_SOUL_STRENGTH_MAX -1; k++)
|
||||
{
|
||||
if (!GetRefineStrengthValues(m_vecDragonSoulTypes[i], j, k, fee, prob))
|
||||
{
|
||||
sys_err ("In %s group of RefineStrengthTables, value(Material(%s), Strength(%d)) or fee are invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astMaterialName[j].c_str(), k);
|
||||
return false;
|
||||
}
|
||||
if (fee < 0)
|
||||
{
|
||||
sys_err ("In %s group of RefineStrengthTables, fee of Material(%s) is less than 0.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astMaterialName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (prob < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of RefineStrengthTables, probability(Material(%s), Strength(%d)) is less than 0.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astMaterialName[j].c_str(), k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckDragonHeartExtTables()
|
||||
{
|
||||
// Group DragonHeartExtTables Reading.
|
||||
if (NULL == m_pDragonHeartExtTableNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need DragonHeartExtTables.");
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_GRADE_MAX; j++)
|
||||
{
|
||||
std::vector <float> vec_chargings;
|
||||
std::vector <float> vec_probs;
|
||||
|
||||
if (!GetDragonHeartExtValues(m_vecDragonSoulTypes[i], j, vec_chargings, vec_probs))
|
||||
{
|
||||
sys_err ("In %s group of DragonHeartExtTables, CHARGING row or Grade(%s) row are invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (vec_chargings.size() != vec_probs.size())
|
||||
{
|
||||
sys_err ("In %s group of DragonHeartExtTables, CHARGING row size(%d) are not equal Grade(%s) row size(%d).",
|
||||
m_vecDragonSoulNames[i].c_str(), vec_chargings.size(), vec_probs.size());
|
||||
return false;
|
||||
}
|
||||
for (int k = 0; k < vec_chargings.size(); k++)
|
||||
{
|
||||
if (vec_chargings[k] < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of DragonHeartExtTables, CHARGING value(index : %d) is less than 0",
|
||||
m_vecDragonSoulNames[i].c_str(), k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int k = 0; k < vec_probs.size(); k++)
|
||||
{
|
||||
if (vec_probs[k] < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of DragonHeartExtTables, Probability(Grade : %s, index : %d) is less than 0",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str(), k);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::CheckDragonSoulExtTables()
|
||||
{
|
||||
// Group DragonSoulExtTables Reading.
|
||||
if (NULL == m_pDragonSoulExtTableNode)
|
||||
{
|
||||
sys_err ("dragon_soul_table.txt need DragonSoulExtTables.");
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < m_vecDragonSoulTypes.size(); i++)
|
||||
{
|
||||
for (int j = 0; j < DRAGON_SOUL_GRADE_MAX; j++)
|
||||
{
|
||||
float prob;
|
||||
DWORD by_product;
|
||||
if (!GetDragonSoulExtValues(m_vecDragonSoulTypes[i], j, prob, by_product))
|
||||
{
|
||||
sys_err ("In %s group of DragonSoulExtTables, Grade(%s) row is invalid.",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (prob < 0.f)
|
||||
{
|
||||
sys_err ("In %s group of DragonSoulExtTables, Probability(Grade : %s) is less than 0",
|
||||
m_vecDragonSoulNames[i].c_str(), g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
if (0 != by_product && NULL == ITEM_MANAGER::instance().GetTable(by_product))
|
||||
{
|
||||
sys_err ("In %s group of DragonSoulExtTables, ByProduct(%d) of Grade %s is not exist.",
|
||||
m_vecDragonSoulNames[i].c_str(), by_product, g_astGradeName[j].c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetBasicApplys(BYTE ds_type, OUT TVecApplys& vec_basic_applys)
|
||||
{
|
||||
TMapApplyGroup::iterator it = m_map_basic_applys_group.find(ds_type);
|
||||
if (m_map_basic_applys_group.end() == it)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
vec_basic_applys = it->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetAdditionalApplys(BYTE ds_type, OUT TVecApplys& vec_additional_applys)
|
||||
{
|
||||
TMapApplyGroup::iterator it = m_map_additional_applys_group.find(ds_type);
|
||||
if (m_map_additional_applys_group.end() == it)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
vec_additional_applys = it->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetApplyNumSettings(BYTE ds_type, BYTE grade_idx, OUT int& basis, OUT int& add_min, OUT int& add_max)
|
||||
{
|
||||
if (grade_idx >= DRAGON_SOUL_GRADE_MAX)
|
||||
{
|
||||
sys_err ("Invalid dragon soul grade_idx(%d).", grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pApplyNumSettingNode->GetGroupValue(stDragonSoulName, "basis", g_astGradeName[grade_idx], basis))
|
||||
{
|
||||
sys_err ("Invalid basis value. DragonSoulGroup(%s) Grade(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pApplyNumSettingNode->GetGroupValue(stDragonSoulName, "add_min", g_astGradeName[grade_idx], add_min))
|
||||
{
|
||||
sys_err ("Invalid add_min value. DragonSoulGroup(%s) Grade(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pApplyNumSettingNode->GetGroupValue(stDragonSoulName, "add_max", g_astGradeName[grade_idx], add_max))
|
||||
{
|
||||
sys_err ("Invalid add_max value. DragonSoulGroup(%s) Grade(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetWeight(BYTE ds_type, BYTE grade_idx, BYTE step_index, BYTE strength_idx, OUT float& fWeight)
|
||||
{
|
||||
if (grade_idx >= DRAGON_SOUL_GRADE_MAX || step_index >= DRAGON_SOUL_STEP_MAX || strength_idx >= DRAGON_SOUL_STRENGTH_MAX)
|
||||
{
|
||||
sys_err ("Invalid dragon soul grade_idx(%d) step_index(%d) strength_idx(%d).", grade_idx, step_index, strength_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
CGroupNode* pDragonSoulGroup = m_pWeightTableNode->GetChildNode(stDragonSoulName);
|
||||
if (NULL != pDragonSoulGroup)
|
||||
{
|
||||
if (pDragonSoulGroup->GetGroupValue(g_astGradeName[grade_idx], g_astStepName[step_index], strength_idx, fWeight))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// default group을 살펴봄.
|
||||
pDragonSoulGroup = m_pWeightTableNode->GetChildNode("default");
|
||||
if (NULL != pDragonSoulGroup)
|
||||
{
|
||||
if (!pDragonSoulGroup->GetGroupValue(g_astGradeName[grade_idx], g_astStepName[step_index], strength_idx, fWeight))
|
||||
{
|
||||
sys_err ("Invalid float. DragonSoulGroup(%s) Grade(%s) Row(%s) Col(%d))", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), g_astStepName[step_index].c_str(), strength_idx);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Grade(%s) Row(%s) Col(%d))", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), g_astStepName[step_index].c_str(), strength_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetRefineGradeValues(BYTE ds_type, BYTE grade_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs)
|
||||
{
|
||||
if (grade_idx >= DRAGON_SOUL_GRADE_MAX -1)
|
||||
{
|
||||
sys_err ("Invalid dragon soul grade_idx(%d).", grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
const CGroupNode::CGroupNodeRow * pRow;
|
||||
if (!m_pRefineGradeTableNode->GetGroupRow(stDragonSoulName, g_astGradeName[grade_idx], &pRow))
|
||||
{
|
||||
sys_err ("Invalid row. DragonSoulGroup(%s) Grade(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pRow->GetValue("need_count", need_count))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Grade(%s) Col(need_count)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pRow->GetValue("fee", fee))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Grade(%s) Col(fee)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
vec_probs.resize(DRAGON_SOUL_GRADE_MAX);
|
||||
for (int i = 0; i < DRAGON_SOUL_GRADE_MAX; i++)
|
||||
{
|
||||
if (!pRow->GetValue(g_astGradeName[i], vec_probs[i]))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Grade(%s) Col(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), g_astGradeName[i].c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetRefineStepValues(BYTE ds_type, BYTE step_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs)
|
||||
{
|
||||
if (step_idx >= DRAGON_SOUL_STEP_MAX - 1)
|
||||
{
|
||||
sys_err ("Invalid dragon soul step_idx(%d).", step_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
const CGroupNode::CGroupNodeRow * pRow;
|
||||
if (!m_pRefineStepTableNode->GetGroupRow(stDragonSoulName, g_astStepName[step_idx], &pRow))
|
||||
{
|
||||
sys_err ("Invalid row. DragonSoulGroup(%s) Step(%s)", stDragonSoulName.c_str(), g_astStepName[step_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pRow->GetValue("need_count", need_count))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Step(%s) Col(need_count)", stDragonSoulName.c_str(), g_astStepName[step_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pRow->GetValue("fee", fee))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Step(%s) Col(fee)", stDragonSoulName.c_str(), g_astStepName[step_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
vec_probs.resize(DRAGON_SOUL_STEP_MAX);
|
||||
for (int i = 0; i < DRAGON_SOUL_STEP_MAX; i++)
|
||||
{
|
||||
if (!pRow->GetValue(g_astStepName[i], vec_probs[i]))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s) Step(%s) Col(%s)", stDragonSoulName.c_str(), g_astStepName[step_idx].c_str(), g_astStepName[i].c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetRefineStrengthValues(BYTE ds_type, BYTE material_type, BYTE strength_idx, OUT int& fee, OUT float& prob)
|
||||
{
|
||||
if (material_type < MATERIAL_DS_REFINE_NORMAL || material_type > MATERIAL_DS_REFINE_HOLLY)
|
||||
{
|
||||
sys_err ("Invalid dragon soul material_type(%d).", material_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pRefineStrengthTableNode->GetGroupValue(stDragonSoulName, g_astMaterialName[material_type], "fee", fee))
|
||||
{
|
||||
sys_err ("Invalid fee. DragonSoulGroup(%s) Material(%s)",
|
||||
stDragonSoulName.c_str(), g_astMaterialName[material_type].c_str());
|
||||
return false;
|
||||
}
|
||||
std::string stStrengthIdx = boost::lexical_cast <std::string> ((int)strength_idx);
|
||||
|
||||
if (!m_pRefineStrengthTableNode->GetGroupValue(stDragonSoulName, g_astMaterialName[material_type], stStrengthIdx, prob))
|
||||
{
|
||||
sys_err ("Invalid prob. DragonSoulGroup(%s) Material(%s) Strength(%d)",
|
||||
stDragonSoulName.c_str(), g_astMaterialName[material_type].c_str(), strength_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetDragonHeartExtValues(BYTE ds_type, BYTE grade_idx, OUT std::vector<float>& vec_chargings, OUT std::vector<float>& vec_probs)
|
||||
{
|
||||
if (grade_idx >= DRAGON_SOUL_GRADE_MAX)
|
||||
{
|
||||
sys_err ("Invalid dragon soul grade_idx(%d).", grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
const CGroupNode::CGroupNodeRow * pRow;
|
||||
if (!m_pDragonHeartExtTableNode->GetGroupRow(stDragonSoulName, "charging", &pRow))
|
||||
{
|
||||
sys_err ("Invalid CHARGING row. DragonSoulGroup(%s)", stDragonSoulName.c_str());
|
||||
return false;
|
||||
}
|
||||
int n = pRow->GetSize();
|
||||
vec_chargings.resize(n);
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
if (!pRow->GetValue(i, vec_chargings[i]))
|
||||
{
|
||||
sys_err ("Invalid CHARGING value. DragonSoulGroup(%s), Col(%d)", stDragonSoulName.c_str(), i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_pDragonHeartExtTableNode->GetGroupRow(stDragonSoulName, g_astGradeName[grade_idx], &pRow))
|
||||
{
|
||||
sys_err ("Invalid row. DragonSoulGroup(%s) Grade(%s)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
int m = pRow->GetSize();
|
||||
if (n != m)
|
||||
{
|
||||
sys_err ("Invalid row size(%d). It must be same CHARGING row size(%d). DragonSoulGroup(%s) Grade(%s)", m, n,
|
||||
stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
vec_probs.resize(m);
|
||||
for (int i = 0; i < m; i++)
|
||||
{
|
||||
if (!pRow->GetValue(i, vec_probs[i]))
|
||||
{
|
||||
sys_err ("Invalid value. DragonSoulGroup(%s), Grade(%s) Col(%d)", stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DragonSoulTable::GetDragonSoulExtValues(BYTE ds_type, BYTE grade_idx, OUT float& prob, OUT DWORD& by_product)
|
||||
{
|
||||
if (grade_idx >= DRAGON_SOUL_GRADE_MAX)
|
||||
{
|
||||
sys_err ("Invalid dragon soul grade_idx(%d).", grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string stValue;
|
||||
std::string stDragonSoulName;
|
||||
if (!GetDragonSoulGroupName(ds_type, stDragonSoulName))
|
||||
{
|
||||
sys_err ("Invalid dragon soul type(%d).", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pDragonSoulExtTableNode->GetGroupValue(stDragonSoulName, g_astGradeName[grade_idx], "prob", prob))
|
||||
{
|
||||
sys_err ("Invalid Prob. DragonSoulGroup(%s) Grade(%s)",
|
||||
stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), g_astGradeName[grade_idx].c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pDragonSoulExtTableNode->GetGroupValue(stDragonSoulName, g_astGradeName[grade_idx], "byproduct", by_product))
|
||||
{
|
||||
sys_err ("Invalid fee. DragonSoulGroup(%s) Grade(%d)",
|
||||
stDragonSoulName.c_str(), g_astGradeName[grade_idx].c_str(), grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DragonSoulTable::DragonSoulTable()
|
||||
{
|
||||
m_pLoader = NULL;
|
||||
}
|
||||
DragonSoulTable::~DragonSoulTable ()
|
||||
{
|
||||
if (m_pLoader)
|
||||
delete m_pLoader;
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
#ifndef __INC_METIN_II_DRAGON_SOUL_TABLE_H__
|
||||
#define __INC_METIN_II_DRAGON_SOUL_TABLE_H__
|
||||
|
||||
struct SApply
|
||||
{
|
||||
SApply (EApplyTypes at, int av, float p = 0.f) : apply_type(at), apply_value(av), prob(p) {}
|
||||
EApplyTypes apply_type;
|
||||
int apply_value;
|
||||
float prob;
|
||||
};
|
||||
const int DRAGON_SOUL_ADDITIONAL_ATTR_START_IDX = 3;
|
||||
|
||||
class CGroupNode;
|
||||
class CGroupTextParseTreeLoader;
|
||||
|
||||
class DragonSoulTable
|
||||
{
|
||||
public:
|
||||
DragonSoulTable();
|
||||
~DragonSoulTable();
|
||||
typedef std::vector <SApply> TVecApplys;
|
||||
typedef std::map <BYTE, TVecApplys> TMapApplyGroup;
|
||||
|
||||
bool ReadDragonSoulTableFile(const char * c_pszFileName);
|
||||
bool GetDragonSoulGroupName(BYTE bType, std::string& stGroupName) const;
|
||||
|
||||
bool GetBasicApplys(BYTE ds_type, OUT TVecApplys& vec_basic_applys);
|
||||
bool GetAdditionalApplys(BYTE ds_type, OUT TVecApplys& vec_additional_attrs);
|
||||
|
||||
bool GetApplyNumSettings(BYTE ds_type, BYTE grade_idx, OUT int& basis, OUT int& add_min, OUT int& add_max);
|
||||
bool GetWeight(BYTE ds_type, BYTE grade_idx, BYTE step_index, BYTE strength_idx, OUT float& fWeight);
|
||||
bool GetRefineGradeValues(BYTE ds_type, BYTE grade_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs);
|
||||
bool GetRefineStepValues(BYTE ds_type, BYTE step_idx, OUT int& need_count, OUT int& fee, OUT std::vector<float>& vec_probs);
|
||||
bool GetRefineStrengthValues(BYTE ds_type, BYTE material_type, BYTE strength_idx, OUT int& fee, OUT float& prob);
|
||||
bool GetDragonHeartExtValues(BYTE ds_type, BYTE grade_idx, OUT std::vector<float>& vec_chargings, OUT std::vector<float>& vec_probs);
|
||||
bool GetDragonSoulExtValues(BYTE ds_type, BYTE grade_idx, OUT float& prob, OUT DWORD& by_product);
|
||||
|
||||
private:
|
||||
CGroupTextParseTreeLoader* m_pLoader;
|
||||
std::string stFileName;
|
||||
|
||||
// caching m_pLoader's child nodes.
|
||||
CGroupNode* m_pApplyNumSettingNode;
|
||||
CGroupNode* m_pWeightTableNode;
|
||||
CGroupNode* m_pRefineGradeTableNode;
|
||||
CGroupNode* m_pRefineStepTableNode;
|
||||
CGroupNode* m_pRefineStrengthTableNode;
|
||||
CGroupNode* m_pDragonHeartExtTableNode;
|
||||
CGroupNode* m_pDragonSoulExtTableNode;
|
||||
|
||||
typedef std::map <std::string, BYTE> TMapNameToType;
|
||||
typedef std::map <BYTE, std::string> TMapTypeToName;
|
||||
std::vector <std::string> m_vecDragonSoulNames;
|
||||
std::vector <BYTE> m_vecDragonSoulTypes;
|
||||
|
||||
TMapNameToType m_map_name_to_type;
|
||||
TMapTypeToName m_map_type_to_name;
|
||||
TMapApplyGroup m_map_basic_applys_group;
|
||||
TMapApplyGroup m_map_additional_applys_group;
|
||||
|
||||
bool ReadVnumMapper();
|
||||
bool ReadBasicApplys();
|
||||
bool ReadAdditionalApplys();
|
||||
// table check functions.
|
||||
bool CheckApplyNumSettings();
|
||||
bool CheckWeightTables();
|
||||
bool CheckRefineGradeTables();
|
||||
bool CheckRefineStepTables();
|
||||
bool CheckRefineStrengthTables();
|
||||
bool CheckDragonHeartExtTables();
|
||||
bool CheckDragonSoulExtTables();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,69 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "questmanager.h"
|
||||
#include "char.h"
|
||||
|
||||
#undef sys_err
|
||||
#ifndef __WIN32__
|
||||
#define sys_err(fmt, args...) quest::CQuestManager::instance().QuestError(__FUNCTION__, __LINE__, fmt, ##args)
|
||||
#else
|
||||
#define sys_err(fmt, ...) quest::CQuestManager::instance().QuestError(__FUNCTION__, __LINE__, fmt, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
namespace quest
|
||||
{
|
||||
int ds_open_refine_window(lua_State* L)
|
||||
{
|
||||
const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
||||
if (NULL == ch)
|
||||
{
|
||||
sys_err ("NULL POINT ERROR");
|
||||
return 0;
|
||||
}
|
||||
if (ch->DragonSoul_IsQualified())
|
||||
ch->DragonSoul_RefineWindow_Open(CQuestManager::instance().GetCurrentNPCCharacterPtr());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ds_give_qualification(lua_State* L)
|
||||
{
|
||||
const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
||||
if (NULL == ch)
|
||||
{
|
||||
sys_err ("NULL POINT ERROR");
|
||||
return 0;
|
||||
}
|
||||
ch->DragonSoul_GiveQualification();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ds_is_qualified(lua_State* L)
|
||||
{
|
||||
const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
||||
if (NULL == ch)
|
||||
{
|
||||
sys_err ("NULL POINT ERROR");
|
||||
lua_pushnumber(L, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
lua_pushnumber(L, ch->DragonSoul_IsQualified());
|
||||
return 1;
|
||||
}
|
||||
|
||||
void RegisterDragonSoulFunctionTable()
|
||||
{
|
||||
luaL_reg ds_functions[] =
|
||||
{
|
||||
{ "open_refine_window" , ds_open_refine_window },
|
||||
{ "give_qualification" , ds_give_qualification },
|
||||
{ "is_qualified" , ds_is_qualified },
|
||||
{ NULL , NULL }
|
||||
};
|
||||
|
||||
CQuestManager::instance().AddLuaFunctionTable("ds", ds_functions);
|
||||
}
|
||||
};
|
||||
@@ -1,314 +0,0 @@
|
||||
# 용혼석 테이블들...
|
||||
# TAB 으로 구분되니 엑셀로 볼 것.
|
||||
# vim으로 본다면 탭간 간격을 조정하고 볼 것. (set ts=16 추천)
|
||||
# 큰 따옴표로 묶인 부분은 안 구분.
|
||||
# \" 이딴거 지원 안함.
|
||||
|
||||
# 용혼석 Vnum에 대한 comment
|
||||
# ITEM VNUM을 10만 자리부터, FEDCBA라고 한다면
|
||||
# FE : 용혼석 종류. D : 등급
|
||||
# C : 단계 B : 강화
|
||||
# A : 여벌의 번호들...
|
||||
# 이 체계에서 벗어나는 용혼석은 용서하지 않을 것이다.
|
||||
# ok?
|
||||
# 용혼석이 너무나도 많기 때문에 Vnum이 중구난방이면,
|
||||
# Special item group에서 group으로 묶어서 처리하기도 힘들고-_-,
|
||||
# VnumHelper.h에서 처리하는 것도 힘들다. -_-
|
||||
# Group 잡는데만 수천줄을 써야할 지도...
|
||||
# Vnum에 체계를 잡아서 자릿수 기반으로 해야만 한다.
|
||||
|
||||
# Table은 "Group"과 "이름"으로 시작한다.
|
||||
# Table 내부에 또 Table이 있을 수 있다.
|
||||
# 그렇다고 엉뚱한 테이블을 써놓는다고 서버가 인식하는 것은 아니다.
|
||||
# 필요한 테이블은 다음과 같다.
|
||||
# BaseVnums, BaseAttrs, AddtionalAttrs, AttrSettings, UpgradeTable, ImproveTable,
|
||||
# RefineTable, UpgradeMoneys, ImproveTable, RefineMoneys, WeightTable, DurationTable,
|
||||
# DragonHeartExtTable, DragonSoulExtTable
|
||||
|
||||
# 확률 테이블의 값은 기본적으로 float이다.
|
||||
|
||||
# 중요 !!!!!
|
||||
# 테이블을 보다 보면 #--#이라 쓰여진 부분이 있는데 절대로 지우지 말것.
|
||||
#
|
||||
|
||||
# 이건 vnum to 이름 mapping.
|
||||
# 이걸로 특정 vnum의 용혼석이 어떤 종류의 용혼석인지(이름이 뭔지) 알아낸 후,
|
||||
# 그 용혼석에 해당하는 속성을 찾는다.
|
||||
# 또한 여기에 적혀있지 않은 용혼석이 밑에 Group 정의하는 부분에 있다면
|
||||
# 에러.
|
||||
Group VnumMapper
|
||||
{
|
||||
# 시작 vnum.
|
||||
# 여기서 써야할 부분은 위에 설명한 FE에 해당하는 부분.
|
||||
# FE를 써줄 것
|
||||
#--# DragonSoulName Type
|
||||
1 백룡석 11
|
||||
2 화룡석 12
|
||||
3 풍룡석 13
|
||||
4 철룡석 14
|
||||
5 뇌룡석 15
|
||||
6 흑룡석 16
|
||||
}
|
||||
|
||||
Group BasicApplys
|
||||
{
|
||||
Group 백룡석
|
||||
{
|
||||
# 1부터 순서대로 부여된다.
|
||||
#--# Apply_Type Apply_value
|
||||
1 INT 10
|
||||
2 RESIST_ICE 10
|
||||
}
|
||||
|
||||
Group 화룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value
|
||||
1 STR 10
|
||||
2 RESIST_FIRE 10
|
||||
}
|
||||
Group 풍룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value
|
||||
1 MAX_SP 500
|
||||
2 RESIST_WIND 10
|
||||
}
|
||||
Group 철룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value
|
||||
1 DEX 10
|
||||
2 RESIST_EARTH 10
|
||||
}
|
||||
Group 뇌룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value
|
||||
1 MAX_HP 1500
|
||||
2 RESIST_ELEC 10
|
||||
}
|
||||
Group 흑룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value
|
||||
1 CON 10
|
||||
2 RESIST_DARK 10
|
||||
}
|
||||
}
|
||||
|
||||
Group AdditionalApplys
|
||||
{
|
||||
Group 백룡석
|
||||
{
|
||||
# 앞의 첫 컬럼은 순서와 관계 없다. 철저히 확률에 따라 속성이 부여될 뿐이다.
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 MAGIC_ATT_GRADE 15 10
|
||||
2 MAGIC_DEF_GRADE 15 10
|
||||
3 SKILL_DAMAGE_BONUS 15 10
|
||||
4 SKILL_DEFEND_BONUS 15 10
|
||||
}
|
||||
Group 화룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 ATT_BONUS 300 10
|
||||
2 DEF_BONUS 200 10
|
||||
3 NORMAL_HIT_DAMAGE_BONUS 15 10
|
||||
4 NORMAL_HIT_DEFEND_BONUS 15 10
|
||||
}
|
||||
Group 풍룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 MAX_HP 3000 10
|
||||
2 HP_REGEN 10 10
|
||||
3 STEAL_HP 10 10
|
||||
4 KILL_HP_RECOVER 5 10
|
||||
5 MAX_HP_PCT 20 10
|
||||
}
|
||||
Group 철룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 ATT_BONUS_TO_WARRIOR 15 10
|
||||
2 ATT_BONUS_TO_ASSASSIN 15 10
|
||||
3 ATT_BONUS_TO_SURA 15 10
|
||||
4 ATT_BONUS_TO_SHAMAN 15 10
|
||||
5 RESIST_WARRIOR 15 10
|
||||
6 RESIST_ASSASSIN 15 10
|
||||
7 RESIST_SURA 15 10
|
||||
8 RESIST_SHAMAN 15 10
|
||||
}
|
||||
Group 뇌룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 MAX_SP 1500 10
|
||||
2 SP_REGEN 10 10
|
||||
3 STEAL_SP 10 10
|
||||
4 KILL_SP_RECOVER 5 10
|
||||
5 MAX_SP_PCT 20 10
|
||||
}
|
||||
Group 흑룡석
|
||||
{
|
||||
#--# Apply_Type Apply_value Prob
|
||||
1 BLOCK 10 10
|
||||
2 DODGE 10 10
|
||||
3 REFLECT_MELEE 10 10
|
||||
4 RESIST_CRITICAL 10 10
|
||||
5 RESIST_PENETRATE 10 10
|
||||
}
|
||||
}
|
||||
|
||||
# 여기부터 Default를 둔다.
|
||||
# Default 값을 모든 용혼석이 따르고,
|
||||
# 특정 값이 있는 용혼석은 Default를 바탕으로 그 값을 덮어쓴다.
|
||||
# 등급에 따른 속성수
|
||||
# 단, basis, add_max는 3보다 크면 안된다.
|
||||
Group ApplyNumSettings
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
#--# GRADE_NORMAL GRADE_BRILLIANT GRADE_RARE GRADE_ANCIENT GRADE_LEGENDARY
|
||||
basis 1 1 1 2 2
|
||||
add_min 0 0 0 0 0
|
||||
add_max 0 1 2 2 3
|
||||
}
|
||||
# Group 백룡석
|
||||
# {
|
||||
# #--# GRADE_NORMAL GRADE_BRILLIANT GRADE_RARE GRADE_ANCIENT GRADE_LEGENDARY
|
||||
# basis 1 1 1 2 2
|
||||
# }
|
||||
}
|
||||
|
||||
# 용혼석 가중치 테이블.
|
||||
# 이 테이블에서 값이 0이라면 그 이상의 강화는 불가능하다고 판단한다.
|
||||
Group WeightTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
Group GRADE_NORMAL
|
||||
{
|
||||
# 단계 강화
|
||||
#--# 0 1 2 3 4 5 6
|
||||
STEP_LOWEST 1 2 3 0 0 0 0
|
||||
STEP_LOW 2 3 4 0 0 0 0
|
||||
STEP_MID 3 4 5 6 0 0 0
|
||||
STEP_HIGH 4 5 6 7 0 0 0
|
||||
STEP_HIGHEST 5 6 7 8 10 0 0
|
||||
}
|
||||
Group GRADE_BRILLIANT
|
||||
{
|
||||
STEP_LOWEST 3 4 5 6 0 0 0
|
||||
STEP_LOW 4 5 6 8 0 0 0
|
||||
STEP_MID 5 6 8 10 0 0 0
|
||||
STEP_HIGH 6 8 10 12 15 0 0
|
||||
STEP_HIGHEST 8 10 12 15 20 0 0
|
||||
}
|
||||
Group GRADE_RARE
|
||||
{
|
||||
#--# 0 1 2 3 4 5 6
|
||||
STEP_LOWEST 6 7 9 11 15 0 0
|
||||
STEP_LOW 7 9 11 15 20 0 0
|
||||
STEP_MID 9 11 15 20 25 0 0
|
||||
STEP_HIGH 11 15 20 25 30 0 0
|
||||
STEP_HIGHEST 15 20 25 30 40 0 0
|
||||
}
|
||||
Group GRADE_ANCIENT
|
||||
{
|
||||
#--# 0 1 2 3 4 5 6
|
||||
STEP_LOWEST 10 12 15 18 20 0 0
|
||||
STEP_LOW 12 15 18 20 25 0 0
|
||||
STEP_MID 15 18 20 25 35 0 0
|
||||
STEP_HIGH 18 20 25 35 40 0 0
|
||||
STEP_HIGHEST 20 25 35 40 60 80 0
|
||||
}
|
||||
Group GRADE_LEGENDARY
|
||||
{
|
||||
#--# 0 1 2 3 4 5 6
|
||||
STEP_LOWEST 30 35 40 45 50 0 0
|
||||
STEP_LOW 35 40 45 50 55 0 0
|
||||
STEP_MID 40 45 50 55 65 0 0
|
||||
STEP_HIGH 45 50 55 65 75 90 0
|
||||
STEP_HIGHEST 50 55 65 75 90 105 120
|
||||
}
|
||||
}
|
||||
# Group 백룡석
|
||||
# {
|
||||
# Group GRADE_NORMAL
|
||||
# {
|
||||
# #--# 0 1 2 3 4 5 6
|
||||
# STEP_LOWEST 10 20 53 0 0 0 0
|
||||
# STEP_HIGHEST 50 60 37 18 10 0 0
|
||||
# }
|
||||
# }
|
||||
}
|
||||
|
||||
# 개량 table
|
||||
Group RefineGradeTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
#--# NEED_COUNT FEE GRADE_NORMAL GRADE_BRILLIANT GRADE_RARE GRADE_ANCIENT GRADE_LEGENDARY
|
||||
GRADE_NORMAL 15 30000 70 25 5 0 0
|
||||
GRADE_BRILLIANT 10 50000 25 70 5 0 0
|
||||
GRADE_RARE 5 70000 8 15 75 2 0
|
||||
GRADE_ANCIENT 3 100000 2 3 8 85 2
|
||||
}
|
||||
}
|
||||
|
||||
Group RefineStepTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
#--# NEED_COUNT FEE STEP_LOWEST STEP_LOW STEP_MID STEP_HIGH STEP_HIGHEST
|
||||
STEP_LOWEST 4 20000 70 25 5 0 0
|
||||
STEP_LOW 3 30000 25 70 5 0 0
|
||||
STEP_MID 2 40000 10 20 80 1 0
|
||||
STEP_HIGH 1 50000 2 3 5 89 1
|
||||
}
|
||||
}
|
||||
|
||||
Group RefineStrengthTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
# MATERIAL_DS_REFINE_NORMAL : GRADE_NORMAL 강화석
|
||||
# MATERIAL_DS_REFINE_BLESSED : 축복의 강화석
|
||||
# MATERIAL_DS_REFINE_HOLLY : 용신의 강화석
|
||||
#--# FEE 0 1 2 3 4 5
|
||||
MATERIAL_DS_REFINE_NORMAL 10000 100 80 70 50 30 20
|
||||
MATERIAL_DS_REFINE_BLESSED 20000 100 88 77 55 33 22
|
||||
MATERIAL_DS_REFINE_HOLLY 30000 100 90 80 60 40 30
|
||||
}
|
||||
}
|
||||
|
||||
# 용심은 100000(임시 vnum)이고, 충전량은 socket (0)에 박아넣는다.
|
||||
# 단, special item group에 vnum 10053으로 정의되어있는 다른 용심들은 Value(0)에 있는 값이 충전량.
|
||||
# 용심 추출 확률 테이블
|
||||
# 충전량이 0이라는 것은 추출 실패라는 거.
|
||||
Group DragonHeartExtTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
#--# 1 2 3 4 5
|
||||
# 용심 충전량(%)
|
||||
CHARGING 0 5 15 30 50
|
||||
# 등급과 충전량에 따른 확률 테이블
|
||||
# 등급 확률
|
||||
GRADE_NORMAL 50 35 12 2 1
|
||||
GRADE_BRILLIANT 35 40 20 4 1
|
||||
GRADE_RARE 20 35 30 12 3
|
||||
GRADE_ANCIENT 15 30 35 15 5
|
||||
GRADE_LEGENDARY 10 20 40 20 10
|
||||
}
|
||||
}
|
||||
|
||||
# 용혼석 추출 확률 테이블.
|
||||
# 이것도 1, 2안이 있어 통합할 수 있는 방안으로 감.
|
||||
# 추출 확률을 정할 수 있고, 실패 부산물도 정할 수 있음.(0이면 안줌)
|
||||
Group DragonSoulExtTables
|
||||
{
|
||||
Group Default
|
||||
{
|
||||
#실패 부산물
|
||||
#--# Prob ByProduct
|
||||
GRADE_NORMAL 50 30270
|
||||
GRADE_BRILLIANT 40 30270
|
||||
GRADE_RARE 30 30270
|
||||
GRADE_ANCIENT 30 30270
|
||||
GRADE_LEGENDARY 20 30270
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user