forked from metin2/server
Applied changes on the game executable.
This commit is contained in:
@ -147,7 +147,7 @@ bool DSManager::RefreshItemAttributes(LPITEM pDS)
|
||||
{
|
||||
if (!pDS->IsDragonSoul())
|
||||
{
|
||||
sys_err ("This item(ID : %d) is not DragonSoul.", pDS->GetID());
|
||||
SPDLOG_ERROR("This item(ID : {}) is not DragonSoul.", pDS->GetID());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -159,13 +159,13 @@ bool DSManager::RefreshItemAttributes(LPITEM pDS)
|
||||
|
||||
if (!m_pTable->GetBasicApplys(ds_type, vec_basic_applys))
|
||||
{
|
||||
sys_err ("There is no BasicApply about %d type dragon soul.", ds_type);
|
||||
SPDLOG_ERROR("There is no BasicApply about {} type dragon soul.", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pTable->GetAdditionalApplys(ds_type, vec_addtional_applys))
|
||||
{
|
||||
sys_err ("There is no AdditionalApply about %d type dragon soul.", ds_type);
|
||||
SPDLOG_ERROR("There is no AdditionalApply about {} type dragon soul.", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ bool DSManager::RefreshItemAttributes(LPITEM pDS)
|
||||
int basic_apply_num, add_min, add_max;
|
||||
if (!m_pTable->GetApplyNumSettings(ds_type, grade_idx, basic_apply_num, add_min, add_max))
|
||||
{
|
||||
sys_err ("In ApplyNumSettings, INVALID VALUES Group type(%d), GRADE idx(%d)", ds_type, grade_idx);
|
||||
SPDLOG_ERROR("In ApplyNumSettings, INVALID VALUES Group type({}), GRADE idx({})", ds_type, grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ bool DSManager::PutAttributes(LPITEM pDS)
|
||||
{
|
||||
if (!pDS->IsDragonSoul())
|
||||
{
|
||||
sys_err ("This item(ID : %d) is not DragonSoul.", pDS->GetID());
|
||||
SPDLOG_ERROR("This item(ID : {}) is not DragonSoul.", pDS->GetID());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -229,12 +229,12 @@ bool DSManager::PutAttributes(LPITEM pDS)
|
||||
|
||||
if (!m_pTable->GetBasicApplys(ds_type, vec_basic_applys))
|
||||
{
|
||||
sys_err ("There is no BasicApply about %d type dragon soul.", ds_type);
|
||||
SPDLOG_ERROR("There is no BasicApply about {} type dragon soul.", ds_type);
|
||||
return false;
|
||||
}
|
||||
if (!m_pTable->GetAdditionalApplys(ds_type, vec_addtional_applys))
|
||||
{
|
||||
sys_err ("There is no AdditionalApply about %d type dragon soul.", ds_type);
|
||||
SPDLOG_ERROR("There is no AdditionalApply about {} type dragon soul.", ds_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ bool DSManager::PutAttributes(LPITEM pDS)
|
||||
int basic_apply_num, add_min, add_max;
|
||||
if (!m_pTable->GetApplyNumSettings(ds_type, grade_idx, basic_apply_num, add_min, add_max))
|
||||
{
|
||||
sys_err ("In ApplyNumSettings, INVALID VALUES Group type(%d), GRADE idx(%d)", ds_type, grade_idx);
|
||||
SPDLOG_ERROR("In ApplyNumSettings, INVALID VALUES Group type({}), GRADE idx({})", ds_type, grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ bool DSManager::PutAttributes(LPITEM pDS)
|
||||
}
|
||||
if (!MakeDistinctRandomNumberSet(list_probs, random_set))
|
||||
{
|
||||
sys_err ("MakeDistinctRandomNumberSet error.");
|
||||
SPDLOG_ERROR("MakeDistinctRandomNumberSet error.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ bool DSManager::ExtractDragonHeart(LPCHARACTER ch, LPITEM pItem, LPITEM pExtract
|
||||
float sum = 0.f;
|
||||
if (-1 == idx)
|
||||
{
|
||||
sys_err ("Gamble is failed. ds_type(%d), grade_idx(%d)", ds_type, grade_idx);
|
||||
SPDLOG_ERROR("Gamble is failed. ds_type({}), grade_idx({})", ds_type, grade_idx);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -375,8 +375,8 @@ bool DSManager::ExtractDragonHeart(LPCHARACTER ch, LPITEM pItem, LPITEM pExtract
|
||||
|
||||
if (NULL == pDH)
|
||||
{
|
||||
sys_err ("Cannot create DRAGON_HEART(%d).", DRAGON_HEART_VNUM);
|
||||
return NULL;
|
||||
SPDLOG_ERROR("Cannot create DRAGON_HEART({}).", (int) DRAGON_HEART_VNUM);
|
||||
return false;
|
||||
}
|
||||
|
||||
pItem->SetCount(pItem->GetCount() - 1);
|
||||
@ -402,7 +402,7 @@ bool DSManager::PullOut(LPCHARACTER ch, TItemPos DestCell, LPITEM& pItem, LPITEM
|
||||
{
|
||||
if (NULL == ch || NULL == pItem)
|
||||
{
|
||||
sys_err ("NULL POINTER. ch(%p) or pItem(%p)", ch, pItem);
|
||||
SPDLOG_ERROR("NULL POINTER. ch({}) or pItem({})", (void*) ch, (void*) pItem);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ bool DSManager::DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL
|
||||
|
||||
if (!ch->DragonSoul_RefineWindow_CanRefine())
|
||||
{
|
||||
sys_err ("%s do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
SPDLOG_ERROR("{} do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, "[SYSTEM ERROR]You cannot upgrade dragon soul without refine window.");
|
||||
return false;
|
||||
}
|
||||
@ -595,7 +595,7 @@ bool DSManager::DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL
|
||||
// Ŭ<><EFBFBD> <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9> <20>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> count != need_count<6E><74><EFBFBD><EFBFBD> invalid Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD> ũ<><C5A9>.
|
||||
if (count != need_count)
|
||||
{
|
||||
sys_err ("Possiblity of invalid client. Name %s", ch->GetName());
|
||||
SPDLOG_ERROR("Possiblity of invalid client. Name {}", ch->GetName());
|
||||
BYTE bSubHeader = count < need_count? DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MATERIAL : DS_SUB_HEADER_REFINE_FAIL_TOO_MUCH_MATERIAL;
|
||||
SendRefineResultPacket(ch, bSubHeader, NPOS);
|
||||
return false;
|
||||
@ -610,7 +610,7 @@ bool DSManager::DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL
|
||||
|
||||
if (-1 == (result_grade = Gamble(vec_probs)))
|
||||
{
|
||||
sys_err ("Gamble failed. See RefineGardeTables' probabilities");
|
||||
SPDLOG_ERROR("Gamble failed. See RefineGardeTables' probabilities");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ bool DSManager::DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL
|
||||
|
||||
if (NULL == pResultItem)
|
||||
{
|
||||
sys_err ("INVALID DRAGON SOUL(%d)", MakeDragonSoulVnum(ds_type, (BYTE)result_grade, 0, 0));
|
||||
SPDLOG_ERROR("INVALID DRAGON SOUL({})", MakeDragonSoulVnum(ds_type, (BYTE)result_grade, 0, 0));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -674,7 +674,7 @@ bool DSManager::DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_
|
||||
|
||||
if (!ch->DragonSoul_RefineWindow_CanRefine())
|
||||
{
|
||||
sys_err ("%s do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
SPDLOG_ERROR("{} do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, "[SYSTEM ERROR]You cannot use dragon soul refine window.");
|
||||
return false;
|
||||
}
|
||||
@ -747,7 +747,7 @@ bool DSManager::DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_
|
||||
// Ŭ<><EFBFBD> <20>ѹ<EFBFBD> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9> <20>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> count != need_count<6E><74><EFBFBD><EFBFBD> invalid Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD> ũ<><C5A9>.
|
||||
if (count != need_count)
|
||||
{
|
||||
sys_err ("Possiblity of invalid client. Name %s", ch->GetName());
|
||||
SPDLOG_ERROR("Possiblity of invalid client. Name {}", ch->GetName());
|
||||
BYTE bSubHeader = count < need_count? DS_SUB_HEADER_REFINE_FAIL_NOT_ENOUGH_MATERIAL : DS_SUB_HEADER_REFINE_FAIL_TOO_MUCH_MATERIAL;
|
||||
SendRefineResultPacket(ch, bSubHeader, NPOS);
|
||||
return false;
|
||||
@ -764,7 +764,7 @@ bool DSManager::DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_
|
||||
|
||||
if (-1 == (result_step = Gamble(vec_probs)))
|
||||
{
|
||||
sys_err ("Gamble failed. See RefineStepTables' probabilities");
|
||||
SPDLOG_ERROR("Gamble failed. See RefineStepTables' probabilities");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ bool DSManager::DoRefineStep(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_
|
||||
|
||||
if (NULL == pResultItem)
|
||||
{
|
||||
sys_err ("INVALID DRAGON SOUL(%d)", MakeDragonSoulVnum(ds_type, grade_idx, (BYTE)result_step, 0));
|
||||
SPDLOG_ERROR("INVALID DRAGON SOUL({})", MakeDragonSoulVnum(ds_type, grade_idx, (BYTE)result_step, 0));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ bool DSManager::DoRefineStrength(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_S
|
||||
|
||||
if (!ch->DragonSoul_RefineWindow_CanRefine())
|
||||
{
|
||||
sys_err ("%s do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
SPDLOG_ERROR("{} do not activate DragonSoulRefineWindow. But how can he come here?", ch->GetName());
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, "[SYSTEM ERROR]You cannot use dragon soul refine window.");
|
||||
return false;
|
||||
}
|
||||
@ -953,7 +953,7 @@ bool DSManager::DoRefineStrength(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_S
|
||||
pResult = ITEM_MANAGER::instance().CreateItem(MakeDragonSoulVnum(bType, bGrade, bStep, bStrength + 1));
|
||||
if (NULL == pResult)
|
||||
{
|
||||
sys_err ("INVALID DRAGON SOUL(%d)", MakeDragonSoulVnum(bType, bGrade, bStep, bStrength + 1));
|
||||
SPDLOG_ERROR("INVALID DRAGON SOUL({})", MakeDragonSoulVnum(bType, bGrade, bStep, bStrength + 1));
|
||||
return false;
|
||||
}
|
||||
pDragonSoul->RemoveFromCharacter();
|
||||
@ -978,7 +978,7 @@ bool DSManager::DoRefineStrength(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_S
|
||||
pResult = ITEM_MANAGER::instance().CreateItem(MakeDragonSoulVnum(bType, bGrade, bStep, bStrength - 1));
|
||||
if (NULL == pResult)
|
||||
{
|
||||
sys_err ("INVALID DRAGON SOUL(%d)", MakeDragonSoulVnum(bType, bGrade, bStep, bStrength - 1));
|
||||
SPDLOG_ERROR("INVALID DRAGON SOUL({})", MakeDragonSoulVnum(bType, bGrade, bStep, bStrength - 1));
|
||||
return false;
|
||||
}
|
||||
pDragonSoul->CopyAttributeTo(pResult);
|
||||
|
Reference in New Issue
Block a user