remove unnecessary leftover closures

This commit is contained in:
Tr0n 2024-04-07 22:11:12 +02:00
parent dbcabd7fa9
commit 0a907f41d2
No known key found for this signature in database
8 changed files with 95 additions and 120 deletions

View File

@ -215,9 +215,7 @@ EVENTFUNC(oxevent_timer)
SendNoticeMap(LC_TEXT("No (X)"), OXEVENT_MAP_INDEX, true); SendNoticeMap(LC_TEXT("No (X)"), OXEVENT_MAP_INDEX, true);
} }
{
SendNoticeMap(LC_TEXT("In 5 sec. everyone who gave an incorrect answer will be removed."), OXEVENT_MAP_INDEX, true); SendNoticeMap(LC_TEXT("In 5 sec. everyone who gave an incorrect answer will be removed."), OXEVENT_MAP_INDEX, true);
}
flag++; flag++;
return PASSES_PER_SEC(5); return PASSES_PER_SEC(5);

View File

@ -205,20 +205,15 @@ int CalcMagicDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim)
float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating) float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating)
{ {
int iARSrc; int iARSrc = std::min(90, (attacker_dx * 4 + attacker_lv * 2) / 6);
int iERSrc; int iERSrc = std::min(90, (victim_dx * 4 + victim_lv * 2) / 6);
{
int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX); int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
int attacker_lv = pkAttacker->GetLevel(); int attacker_lv = pkAttacker->GetLevel();
int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX); int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX);
int victim_lv = pkAttacker->GetLevel(); int victim_lv = pkAttacker->GetLevel();
iARSrc = std::min(90, (attacker_dx * 4 + attacker_lv * 2) / 6);
iERSrc = std::min(90, (victim_dx * 4 + victim_lv * 2) / 6);
}
float fAR = ((float) iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0 float fAR = ((float) iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0
if (bIgnoreTargetRating) if (bIgnoreTargetRating)

View File

@ -2112,10 +2112,8 @@ void CHARACTER::ComputeBattlePoints()
iArmor += GetPoint(POINT_PARTY_DEFENDER_BONUS); iArmor += GetPoint(POINT_PARTY_DEFENDER_BONUS);
// INTERNATIONAL_VERSION // INTERNATIONAL_VERSION
{
PointChange(POINT_DEF_GRADE, iDef + iArmor); PointChange(POINT_DEF_GRADE, iDef + iArmor);
PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE)); PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE));
}
// END_OF_INTERNATIONAL_VERSION // END_OF_INTERNATIONAL_VERSION
PointChange(POINT_MAGIC_ATT_GRADE, GetLevel() * 2 + GetPoint(POINT_IQ) * 2 + GetPoint(POINT_MAGIC_ATT_GRADE_BONUS)); PointChange(POINT_MAGIC_ATT_GRADE, GetLevel() * 2 + GetPoint(POINT_IQ) * 2 + GetPoint(POINT_MAGIC_ATT_GRADE_BONUS));
@ -5124,11 +5122,9 @@ bool CHARACTER::WarpSet(int x, int y, int lPrivateMapIndex)
GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
{
char buf[256]; char buf[256];
snprintf(buf, sizeof(buf), "%s MapIdx %d DestMapIdx%d DestX%d DestY%d Empire%d", GetName(), GetMapIndex(), lPrivateMapIndex, x, y, GetEmpire()); snprintf(buf, sizeof(buf), "%s MapIdx %d DestMapIdx%d DestX%d DestY%d Empire%d", GetName(), GetMapIndex(), lPrivateMapIndex, x, y, GetEmpire());
LogManager::instance().CharLog(this, 0, "WARP", buf); LogManager::instance().CharLog(this, 0, "WARP", buf);
}
return true; return true;
} }

View File

@ -473,7 +473,6 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb)
SPDLOG_DEBUG("LearnSkillByBook {} table idx {} value {}", GetName(), idx, aiSkillBookCountForLevelUp[idx]); SPDLOG_DEBUG("LearnSkillByBook {} table idx {} value {}", GetName(), idx, aiSkillBookCountForLevelUp[idx]);
{
int need_bookcount = GetSkillLevel(dwSkillVnum) - 20; int need_bookcount = GetSkillLevel(dwSkillVnum) - 20;
PointChange(POINT_EXP, -need_exp); PointChange(POINT_EXP, -need_exp);
@ -538,7 +537,6 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb)
// 사용자의 퀘스트 정보 로드 실패 // 사용자의 퀘스트 정보 로드 실패
} }
} }
}
if (bLastLevel != GetSkillLevel(dwSkillVnum)) if (bLastLevel != GetSkillLevel(dwSkillVnum))
{ {

View File

@ -271,7 +271,6 @@ EVENTFUNC(timed_event)
{ {
ch->m_pkTimedEvent = NULL; ch->m_pkTimedEvent = NULL;
{
switch (info->subcmd) switch (info->subcmd)
{ {
case SCMD_LOGOUT: case SCMD_LOGOUT:
@ -287,7 +286,6 @@ EVENTFUNC(timed_event)
} }
break; break;
} }
}
switch (info->subcmd) switch (info->subcmd)
{ {
@ -2233,7 +2231,6 @@ ACMD(do_cube)
ACMD(do_in_game_mall) ACMD(do_in_game_mall)
{ {
{
char country_code[3]; char country_code[3];
country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0'; country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0';
@ -2243,7 +2240,6 @@ ACMD(do_in_game_mall)
g_strWebMallURL.c_str(), ch->GetPlayerID(), country_code, g_server_id); g_strWebMallURL.c_str(), ch->GetPlayerID(), country_code, g_server_id);
ch->ChatPacket(CHAT_TYPE_COMMAND, buf); ch->ChatPacket(CHAT_TYPE_COMMAND, buf);
}
} }
// 주사위 // 주사위

View File

@ -355,7 +355,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
char szCreateDate[256] = "00000000"; char szCreateDate[256] = "00000000";
{
str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]); str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]);
str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]); str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]);
str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]); str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]);
@ -374,7 +373,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate); SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate);
SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8)); SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8));
}
int nPasswordDiff = strcmp(szEncrytPassword, szPassword); int nPasswordDiff = strcmp(szEncrytPassword, szPassword);

View File

@ -1085,10 +1085,8 @@ void CItem::SetOwnership(LPCHARACTER ch, int iSec)
if (m_pkOwnershipEvent) if (m_pkOwnershipEvent)
return; return;
{
if (iSec <= 10) if (iSec <= 10)
iSec = 30; iSec = 30;
}
m_dwOwnershipPID = ch->GetPlayerID(); m_dwOwnershipPID = ch->GetPlayerID();

View File

@ -228,11 +228,7 @@ CCI * P2P_MANAGER::FindByPID(DWORD pid)
CCI * P2P_MANAGER::Find(const char * c_pszName) CCI * P2P_MANAGER::Find(const char * c_pszName)
{ {
TCCIMap::const_iterator it; TCCIMap::const_iterator it = m_map_pkCCI.find(c_pszName);
{
it = m_map_pkCCI.find(c_pszName);
}
if (it == m_map_pkCCI.end()) if (it == m_map_pkCCI.end())
return NULL; return NULL;