diff --git a/src/common/length.h b/src/common/length.h index a22cea8..c49d348 100644 --- a/src/common/length.h +++ b/src/common/length.h @@ -664,16 +664,6 @@ enum SPECIAL_EFFECT SE_EQUIP_LOVE_PENDANT, // 발렌타인 사랑의 팬던트(71145) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님) } ; -enum ETeenFlags -{ - TEENFLAG_NONE = 0, - TEENFLAG_1HOUR, - TEENFLAG_2HOUR, - TEENFLAG_3HOUR, - TEENFLAG_4HOUR, - TEENFLAG_5HOUR, -}; - #include "item_length.h" // inventory의 position을 나타내는 구조체 diff --git a/src/common/teen_packet.h b/src/common/teen_packet.h deleted file mode 100644 index 0c85886..0000000 --- a/src/common/teen_packet.h +++ /dev/null @@ -1,20 +0,0 @@ -/********************************************************************* - * date : 2007.06.07 - * file : teen_packet.h - * author : mhh - * description : - */ - -#ifndef _teen_packet_h_ -#define _teen_packet_h_ - -#define HEADER_GT_LOGIN 0x10 -#define HEADER_GT_LOGOUT 0x11 - - -#define HEADER_TG_TEEN_NOTICE 0x12 -#define HEADER_TG_FORCE_LOGOUT 0x13 -#define HEADER_TG_LOGIN_NOTICE 0x14 - -#endif /* _teen_packet_h_ */ - diff --git a/src/game/src/OXEvent.cpp b/src/game/src/OXEvent.cpp index a63e3ba..2156afb 100644 --- a/src/game/src/OXEvent.cpp +++ b/src/game/src/OXEvent.cpp @@ -215,14 +215,7 @@ EVENTFUNC(oxevent_timer) SendNoticeMap(LC_TEXT("No (X)"), OXEVENT_MAP_INDEX, true); } - if (LC_IsJapan()) - { - SendNoticeMap("??????X??O??????????B", OXEVENT_MAP_INDEX, true); - } - else - { - 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++; return PASSES_PER_SEC(5); diff --git a/src/game/src/arena.cpp b/src/game/src/arena.cpp index 60f7e9a..e3172bd 100644 --- a/src/game/src/arena.cpp +++ b/src/game/src/arena.cpp @@ -1097,38 +1097,3 @@ bool CArena::RegisterObserverPtr(LPCHARACTER pChar) return true; } -bool CArenaManager::IsLimitedItem( int lMapIndex, DWORD dwVnum ) -{ - if ( IsArenaMap( lMapIndex ) == true ) - { - if ( LC_IsCanada() == true ) - { - switch ( dwVnum ) - { - case 50020: - case 50021: - case 50022: - case 50801: - case 50802: - case 50813: - case 50814: - case 50817: - case 50818: - case 50819: - case 50820: - case 50821: - case 50822: - case 50823: - case 50824: - case 50825: - case 50826: - case 71044: - case 71055: - return true; - } - } - } - - return false; -} - diff --git a/src/game/src/arena.h b/src/game/src/arena.h index 7d683d8..833655a 100644 --- a/src/game/src/arena.h +++ b/src/game/src/arena.h @@ -131,8 +131,6 @@ class CArenaManager : public singleton bool IsArenaMap(DWORD dwMapIndex); MEMBER_IDENTITY IsMember(DWORD dwMapIndex, DWORD PID); - - bool IsLimitedItem( int lMapIndex, DWORD dwVnum ); }; #endif /*__CLASS_ARENA_MANAGER__*/ diff --git a/src/game/src/battle.cpp b/src/game/src/battle.cpp index 5430d96..d30fd28 100644 --- a/src/game/src/battle.cpp +++ b/src/game/src/battle.cpp @@ -205,25 +205,14 @@ int CalcMagicDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim) float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating) { - int iARSrc; - int iERSrc; + int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX); + int attacker_lv = pkAttacker->GetLevel(); - if (LC_IsYMIR()) // 천마 - { - iARSrc = std::min(90, pkAttacker->GetPolymorphPoint(POINT_DX)); - iERSrc = std::min(90, pkVictim->GetPolymorphPoint(POINT_DX)); - } - else - { - int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX); - int attacker_lv = pkAttacker->GetLevel(); + int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX); + int victim_lv = pkAttacker->GetLevel(); - int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX); - 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); - } + int iARSrc = std::min(90, (attacker_dx * 4 + attacker_lv * 2) / 6); + int iERSrc = std::min(90, (victim_dx * 4 + victim_lv * 2) / 6); float fAR = ((float) iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0 diff --git a/src/game/src/char.cpp b/src/game/src/char.cpp index 1fd2070..ae92060 100644 --- a/src/game/src/char.cpp +++ b/src/game/src/char.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" -#include #include #include "char.h" @@ -598,7 +597,6 @@ void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE if (m_stShopSign.length() == 0) return; - if (LC_IsCanada() == false) { if (CBanwordManager::instance().CheckString(m_stShopSign.c_str(), m_stShopSign.length())) { @@ -714,8 +712,7 @@ void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE RemoveAffect(AFFECT_MOUNT); RemoveAffect(AFFECT_MOUNT_BONUS); } - //if (!LC_IsNewCIBN()) - SetPolymorph(30000, true); + SetPolymorph(30000, true); } @@ -735,8 +732,7 @@ void CHARACTER::CloseMyShop() PacketAround(&p, sizeof(p)); - //if (!LC_IsNewCIBN()) - SetPolymorph(GetJob(), true); + SetPolymorph(GetJob(), true); } } @@ -861,47 +857,24 @@ void CHARACTER::EncodeInsertPacket(LPENTITY entity) addPacket.dwMountVnum = GetMountVnum(); addPacket.bEmpire = m_bEmpire; - if (IsPC() == true && (LC_IsEurope() == true || LC_IsCanada() == true || LC_IsSingapore() == true)) + if (IsPC() == true) { addPacket.dwLevel = GetLevel(); } - else - { - addPacket.dwLevel = 0; - } - if (false) - { - LPCHARACTER ch = (LPCHARACTER) entity; + strlcpy(addPacket.name, GetName(), sizeof(addPacket.name)); - if (GetEmpire() == ch->GetEmpire() || ch->GetGMLevel() > GM_PLAYER || m_bCharType == CHAR_TYPE_NPC) - { - goto show_all_info; - } - else - { - memset(addPacket.name, 0, CHARACTER_NAME_MAX_LEN); - addPacket.dwGuildID = 0; - addPacket.sAlignment = 0; - } + if (GetGuild() != NULL) + { + addPacket.dwGuildID = GetGuild()->GetID(); } else { - show_all_info: - strlcpy(addPacket.name, GetName(), sizeof(addPacket.name)); - - if (GetGuild() != NULL) - { - addPacket.dwGuildID = GetGuild()->GetID(); - } - else - { - addPacket.dwGuildID = 0; - } - - addPacket.sAlignment = m_iAlignment / 10; + addPacket.dwGuildID = 0; } + addPacket.sAlignment = m_iAlignment / 10; + d->Packet(&addPacket, sizeof(TPacketGCCharacterAdditionalInfo)); } @@ -1302,12 +1275,6 @@ void CHARACTER::Disconnect(const char * c_pszReason) LogManager::instance().CharLog(this, 0, "LOGOUT", buf); - if (LC_IsYMIR() || LC_IsKorea() || LC_IsBrazil()) - { - int playTime = GetRealPoint(POINT_PLAYTIME) - m_dwLoginPlayTime; - LogManager::instance().LoginLog(false, GetDesc()->GetAccountTable().id, GetPlayerID(), GetLevel(), GetJob(), playTime); - } - if (m_pWarMap) SetWarMap(NULL); @@ -1356,24 +1323,6 @@ void CHARACTER::Disconnect(const char * c_pszReason) MessengerManager::instance().Logout(GetName()); - if (g_TeenDesc) - { - int offset = 0; - char buf[245] = {0}; - - buf[0] = HEADER_GT_LOGOUT; - offset += 1; - - memset(buf+offset, 0x00, 2); - offset += 2; - - TAccountTable &acc_table = GetDesc()->GetAccountTable(); - memcpy(buf+offset, &acc_table.id, 4); - offset += 4; - - g_TeenDesc->Packet(buf, offset); - } - if (GetDesc()) { GetDesc()->BindCharacter(NULL); @@ -1880,10 +1829,7 @@ void CHARACTER::SetProto(const CMob * pkMob) if (GetRaceNum() == xmas::MOB_SANTA_VNUM) { SetPoint(POINT_ATT_GRADE_BONUS, 10); - if (g_iUseLocale) - SetPoint(POINT_DEF_GRADE_BONUS, 6); - else - SetPoint(POINT_DEF_GRADE_BONUS, 15); + SetPoint(POINT_DEF_GRADE_BONUS, 6); //산타용 //m_dwPlayStartTime = get_dword_time() + 10 * 60 * 1000; @@ -2146,15 +2092,8 @@ void CHARACTER::ComputeBattlePoints() iArmor += GetPoint(POINT_PARTY_DEFENDER_BONUS); // INTERNATIONAL_VERSION - if (LC_IsYMIR()) - { - PointChange(POINT_DEF_GRADE, iShowDef + iArmor); - } - else - { - PointChange(POINT_DEF_GRADE, iDef + iArmor); - PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE)); - } + PointChange(POINT_DEF_GRADE, iDef + iArmor); + PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE)); // END_OF_INTERNATIONAL_VERSION PointChange(POINT_MAGIC_ATT_GRADE, GetLevel() * 2 + GetPoint(POINT_IQ) * 2 + GetPoint(POINT_MAGIC_ATT_GRADE_BONUS)); @@ -3020,25 +2959,6 @@ void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast DWORD exp = GetExp(); DWORD next_exp = GetNextExp(); - // 청소년보호 - if (LC_IsNewCIBN()) - { - if (IsOverTime(OT_NONE)) - { - SPDLOG_TRACE(" {} = NONE", GetName()); - } - else if (IsOverTime(OT_3HOUR)) - { - amount = (amount / 2); - SPDLOG_TRACE(" {} = 3HOUR", GetName()); - } - else if (IsOverTime(OT_5HOUR)) - { - amount = 0; - SPDLOG_TRACE(" {} = 5HOUR", GetName()); - } - } - // exp가 0 이하로 가지 않도록 한다 if (amount < 0 && exp < -amount) { @@ -3294,25 +3214,6 @@ void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast return; } - // 청소년보호 - if (LC_IsNewCIBN() && amount > 0) - { - if (IsOverTime(OT_NONE)) - { - SPDLOG_TRACE(" {} = NONE", GetName()); - } - else if (IsOverTime(OT_3HOUR)) - { - amount = (amount / 2); - SPDLOG_TRACE(" {} = 3HOUR", GetName()); - } - else if (IsOverTime(OT_5HOUR)) - { - amount = 0; - SPDLOG_TRACE(" {} = 5HOUR", GetName()); - } - } - SetGold(GetGold() + amount); val = GetGold(); } @@ -4646,17 +4547,9 @@ CHARACTER::PartyJoinErrCode CHARACTER::IsPartyJoinableCondition(const LPCHARACTE static bool __party_can_join_by_level(LPCHARACTER leader, LPCHARACTER quest) { + //TODO: make the group level limit configurable int level_limit = 30; - if (LC_IsCanada()) - level_limit = 15; - else if (LC_IsBrazil() == true) - { - level_limit = 10; - } - else - level_limit = 30; - return (abs(leader->GetLevel() - quest->GetLevel()) <= level_limit); } @@ -4881,22 +4774,6 @@ void CHARACTER::OnClick(LPCHARACTER pkChrCauser) } } - // 청소년은 퀘스트 못함 - if (LC_IsNewCIBN()) - { - if (pkChrCauser->IsOverTime(OT_3HOUR)) - { - SPDLOG_DEBUG("Teen OverTime : name = {}, hour = {})", pkChrCauser->GetName(), 3); - return; - } - else if (pkChrCauser->IsOverTime(OT_5HOUR)) - { - SPDLOG_DEBUG("Teen OverTime : name = {}, hour = {})", pkChrCauser->GetName(), 5); - return; - } - } - - pkChrCauser->SetQuestNPCID(GetVID()); if (quest::CQuestManager::instance().Click(pkChrCauser->GetPlayerID(), this)) @@ -5225,12 +5102,9 @@ bool CHARACTER::WarpSet(int x, int y, int lPrivateMapIndex) GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); - //if (!LC_IsNewCIBN()) - { - char buf[256]; - 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); - } + char buf[256]; + 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); return true; } @@ -5695,10 +5569,7 @@ bool CHARACTER::BuildUpdatePartyPacket(TPacketGCPartyUpdate & out) if (l && DISTANCE_APPROX(GetX() - l->GetX(), GetY() - l->GetY()) < PARTY_DEFAULT_RANGE) { - if (g_iUseLocale) - out.affects[0] = GetParty()->GetPartyBonusExpPercent(); - else - out.affects[0] = GetParty()->GetExpBonusPercent(); + out.affects[0] = GetParty()->GetPartyBonusExpPercent(); out.affects[1] = GetPoint(POINT_PARTY_ATTACKER_BONUS); out.affects[2] = GetPoint(POINT_PARTY_TANKER_BONUS); out.affects[3] = GetPoint(POINT_PARTY_BUFFER_BONUS); @@ -6925,18 +6796,6 @@ EVENTFUNC(check_speedhack_event) { // write hack log LogManager::instance().SpeedHackLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), ch->m_speed_hack_count); - - if (false == LC_IsEurope()) - { - // close connection - LPDESC desc = ch->GetDesc(); - - if (desc) - { - DESC_MANAGER::instance().DestroyDesc(desc); - return 0; - } - } } ch->m_speed_hack_count = 0; diff --git a/src/game/src/char_affect.cpp b/src/game/src/char_affect.cpp index ec775cc..cd5cb4c 100644 --- a/src/game/src/char_affect.cpp +++ b/src/game/src/char_affect.cpp @@ -99,16 +99,7 @@ bool CHARACTER::UpdateAffect() } else { - int iVal = 0; - - if (LC_IsYMIR()) - { - iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 9 / 100); - } - else - { - iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 7 / 100); - } + int iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 7 / 100);; PointChange(POINT_HP, iVal); PointChange(POINT_HP_RECOVERY, -iVal); @@ -121,12 +112,7 @@ bool CHARACTER::UpdateAffect() PointChange(POINT_SP_RECOVERY, -GetPoint(POINT_SP_RECOVERY)); else { - int iVal; - - if (!g_iUseLocale) - iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100); - else - iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100); + int iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100); PointChange(POINT_SP, iVal); PointChange(POINT_SP_RECOVERY, -iVal); diff --git a/src/game/src/char_battle.cpp b/src/game/src/char_battle.cpp index c91f6ac..a7979cb 100644 --- a/src/game/src/char_battle.cpp +++ b/src/game/src/char_battle.cpp @@ -302,17 +302,7 @@ void CHARACTER::DeathPenalty(BYTE bTown) REMOVE_BIT(m_pointsInstant.instant_flag, INSTANT_FLAG_DEATH_PENALTY); // NO_DEATH_PENALTY_BUG_FIX - if (LC_IsYMIR()) // 천마 버전에서는 언제나 용신의 가호 아이템을 체크한다. - { - if (FindAffect(AFFECT_NO_DEATH_PENALTY)) - { - SPDLOG_DEBUG("NO_DEATH_PENALTY_AFFECT({})", GetName()); - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You did not lose any Experience because of the Blessing of the Dragon God.")); - RemoveAffect(AFFECT_NO_DEATH_PENALTY); - return; - } - } - else if (!bTown) // 국제 버전에서는 제자리 부활시만 용신의 가호를 사용한다. (마을 복귀시는 경험치 패널티 없음) + if (!bTown) // 국제 버전에서는 제자리 부활시만 용신의 가호를 사용한다. (마을 복귀시는 경험치 패널티 없음) { if (FindAffect(AFFECT_NO_DEATH_PENALTY)) { @@ -326,32 +316,11 @@ void CHARACTER::DeathPenalty(BYTE bTown) int iLoss = ((GetNextExp() * aiExpLossPercents[std::clamp(GetLevel(), 1, PLAYER_EXP_TABLE_MAX)]) / 100); - if (true == LC_IsYMIR()) - { - if (PLAYER_EXP_TABLE_MAX < GetLevel()) - { - iLoss = std::min(500000, iLoss); - } - else - { - iLoss = std::min(200000, iLoss); - } - } - else if (true == LC_IsEurope()) - { - iLoss = std::min(800000, iLoss); - } + iLoss = std::min(800000, iLoss); if (bTown) { - if (g_iUseLocale) - { iLoss = 0; - } - else - { - iLoss -= iLoss / 3; - } } if (IsEquipUniqueItem(UNIQUE_ITEM_TEARDROP_OF_GODNESS)) @@ -681,7 +650,7 @@ void CHARACTER::RewardGold(LPCHARACTER pkAttacker) int iSplitCount; - if (iGold >= 3 && !LC_IsYMIR()) + if (iGold >= 3) iSplitCount = Random::get(1, 3); else if (GetMobRank() >= MOB_RANK_BOSS) { @@ -977,11 +946,8 @@ void CHARACTER::ItemDropPenalty(LPCHARACTER pkKiller) if (GetMyShop()) return; - if (false == LC_IsYMIR()) - { - if (GetLevel() < 50) - return; - } + if (GetLevel() < 50) + return; if (CBattleArena::instance().IsBattleArenaMap(GetMapIndex()) == true) { @@ -1321,19 +1287,16 @@ void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) { int iNoPenaltyProb = 0; - if (g_iUseLocale) - { - if (pkKiller->GetAlignment() >= 0) // 1/3 percent down - iNoPenaltyProb = 33; - else // 4/5 percent down - iNoPenaltyProb = 20; - } + if (pkKiller->GetAlignment() >= 0) // 1/3 percent down + iNoPenaltyProb = 33; + else // 4/5 percent down + iNoPenaltyProb = 20; if (Random::get(1, 100) < iNoPenaltyProb) pkKiller->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You did not drop any Item(s) as you are protected by the Dragon God.")); else { - if (g_iUseLocale && pkKiller->GetParty()) + if (pkKiller->GetParty()) { FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); @@ -1348,8 +1311,6 @@ void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) pkKiller->GetParty()->ForEachOnlineMember(f); } } - else - pkKiller->UpdateAlignment(-20000); } } @@ -2070,14 +2031,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu int lMapIndex = GetMapIndex(); int iMapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(lMapIndex); - if (LC_IsYMIR() == true) - { - if (iEmpire && iMapEmpire && iEmpire != iMapEmpire) - { - dam += (dam * 30) / 100; - } - } - if (pAttacker->IsPC()) { iEmpire = pAttacker->GetEmpire(); @@ -2087,22 +2040,7 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu // 다른 제국 사람인 경우 데미지 10% 감소 if (iEmpire && iMapEmpire && iEmpire != iMapEmpire) { - int percent = 10; - - if (184 <= lMapIndex && lMapIndex <= 189) - { - if (LC_IsYMIR() == true) - percent = 7; - else - percent = 9; - } - else - { - if (LC_IsYMIR() == true) - percent = 8; - else - percent = 9; - } + const int percent = 9; dam = dam * percent / 10; } @@ -2177,15 +2115,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu } } - // ------------------------ - // 독일 프리미엄 모드 - // ----------------------- - if (LC_IsGermany() && pAttacker && pAttacker->IsPC()) - { - int iDmgPct = CHARACTER_MANAGER::instance().GetUserDamageRate(pAttacker); - dam = dam * iDmgPct / 100; - } - // STONE SKIN : 피해 반으로 감소 if (IsMonster() && IsStoneSkinner()) { @@ -2381,7 +2310,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp) } // 아이템 몰 판매 경험치 보너스 - if (LC_IsHongKong() || LC_IsEurope() || LC_IsCanada()) { // 아이템 몰: 경험치 결제 if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0) @@ -2397,38 +2325,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp) // 결혼 보너스 iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; } - else if (/*LC_IsNewCIBN() || */LC_IsBrazil()) - { - // 아이템 몰: 경험치 결제 - if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0) - { - iExp += iExp; - } - - if (to->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_EXP) == true) - { - iExp += iExp; - } - - // 결혼 보너스 - iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; - } - else - { - // 아이템 몰: 경험치 결제 - if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0) - { - iExp += (iExp * 20 / 100); - } - - if (to->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_EXP) == true) - { - iExp += (iExp * 20 / 100); - } - - // 결혼 보너스 - iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; - } iExp += (iExp * to->GetPoint(POINT_RAMADAN_CANDY_BONUS_EXP)/100); iExp += (iExp * to->GetPoint(POINT_MALL_EXPBONUS)/100); @@ -2502,11 +2398,7 @@ namespace NPartyExpDistribute { if (DISTANCE_APPROX(ch->GetX() - x, ch->GetY() - y) <= PARTY_DEFAULT_RANGE) { - if (LC_IsYMIR()) - total += ch->GetLevel(); - else - total += party_exp_distribute_table[ch->GetLevel()]; - + total += party_exp_distribute_table[ch->GetLevel()]; ++member_count; } } @@ -2537,10 +2429,7 @@ namespace NPartyExpDistribute switch (m_iMode) { case PARTY_EXP_DISTRIBUTION_NON_PARITY: - if (LC_IsYMIR()) - iExp2 = (DWORD) ((_iExp * ch->GetLevel()) / total); - else - iExp2 = (DWORD) (_iExp * (float) party_exp_distribute_table[ch->GetLevel()] / total); + iExp2 = (DWORD) (_iExp * (float) party_exp_distribute_table[ch->GetLevel()] / total); break; case PARTY_EXP_DISTRIBUTION_PARITY: @@ -3293,7 +3182,7 @@ void CHARACTER::UpdateKillerMode() if (!IsKillerMode()) return; - int iKillerSeconds = ! LC_IsYMIR() ? 30 : 60; + int iKillerSeconds = 30; if (thecore_pulse() - m_iKillerModePulse >= PASSES_PER_SEC(iKillerSeconds)) SetKillerMode(false); diff --git a/src/game/src/char_horse.cpp b/src/game/src/char_horse.cpp index 05317a7..258d268 100644 --- a/src/game/src/char_horse.cpp +++ b/src/game/src/char_horse.cpp @@ -36,11 +36,6 @@ bool CHARACTER::StartRiding() return false; } - if (LC_IsCanada() == true) - { - if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true) - return false; - } DWORD dwMountVnum = m_chHorse ? m_chHorse->GetRaceNum() : GetMyHorseVnum(); diff --git a/src/game/src/char_item.cpp b/src/game/src/char_item.cpp index 3b149c8..995a8ee 100644 --- a/src/game/src/char_item.cpp +++ b/src/game/src/char_item.cpp @@ -146,24 +146,6 @@ bool IS_SUMMONABLE_ZONE(int map_index) return true; } -bool IS_BOTARYABLE_ZONE(int nMapIndex) -{ - if (LC_IsYMIR() == false && LC_IsKorea() == false) return true; - - switch (nMapIndex) - { - case 1 : - case 3 : - case 21 : - case 23 : - case 41 : - case 43 : - return true; - } - - return false; -} - // item socket 이 프로토타입과 같은지 체크 -- by mhh static bool FN_check_item_socket(LPITEM item) { @@ -861,26 +843,6 @@ bool CHARACTER::DoRefine(LPITEM item, bool bMoneyOnly) return false; } - // Check level limit in korea only - if (!g_iUseLocale) - { - for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) - { - int limit = pProto->aLimits[i].lValue; - - switch (pProto->aLimits[i].bType) - { - case LIMIT_LEVEL: - if (GetLevel() < limit) - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your level is too low to use this item.")); - return false; - } - break; - } - } - } - // REFINE_COST if (GetGold() < cost) { @@ -1066,26 +1028,6 @@ bool CHARACTER::DoRefineWithScroll(LPITEM item) return false; } - // Check level limit in korea only - if (!g_iUseLocale) - { - for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) - { - int limit = pProto->aLimits[i].lValue; - - switch (pProto->aLimits[i].bType) - { - case LIMIT_LEVEL: - if (GetLevel() < limit) - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your level is too low to use this item.")); - return false; - } - break; - } - } - } - if (GetGold() < prt->cost) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You do not have enough Yang to use this item.")); @@ -1126,16 +1068,10 @@ bool CHARACTER::DoRefineWithScroll(LPITEM item) if (pkItemScroll->GetValue(0) == YONGSIN_SCROLL) { - if (LC_IsYMIR() == true || LC_IsKorea() == true) - success_prob = hyuniron_prob_euckr[std::clamp(item->GetRefineLevel(), 0, 8)]; - else success_prob = hyuniron_prob[std::clamp(item->GetRefineLevel(), 0, 8)]; } else if (pkItemScroll->GetValue(0) == YAGONG_SCROLL) { - if (LC_IsYMIR() == true || LC_IsKorea() == true) - success_prob = yagong_prob_euckr[std::clamp(item->GetRefineLevel(), 0, 8)]; - else success_prob = yagong_prob[std::clamp(item->GetRefineLevel(), 0, 8)]; } else @@ -1696,12 +1632,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) SPDLOG_TRACE("USE_ITEM {}, Inven {}, Cell {}, ItemType {}, SubType {}", item->GetName(), bDestInven, wDestCell, item->GetType(), item->GetSubType()); - if ( CArenaManager::instance().IsLimitedItem( GetMapIndex(), item->GetVnum() ) == true ) - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot use this item in a duel.")); - return false; - } - // 아이템 최초 사용 이후부터는 사용하지 않아도 시간이 차감되는 방식 처리. if (-1 != iLimitRealtimeStartFirstUseFlagIndex) { @@ -1854,21 +1784,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) switch (item->GetVnum()) { case 71049: // 비단보따리 - if (LC_IsYMIR() == true || LC_IsKorea() == true) - { - if (IS_BOTARYABLE_ZONE(GetMapIndex()) == true) - { - UseSilkBotary(); - } - else - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't open a personal shop in this region")); - } - } - else - { - UseSilkBotary(); - } + UseSilkBotary(); break; } } @@ -2026,15 +1942,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) std::vector item_gets; int count = 0; - if (dwBoxVnum == 50033 && LC_IsYMIR()) // 알수없는 상자 - { - if (GetLevel() < 15) - { - ChatPacket(CHAT_TYPE_INFO, "Not available at level 15 and below."); - return false; - } - } - if( (dwBoxVnum > 51500 && dwBoxVnum < 52000) || (dwBoxVnum >= 50255 && dwBoxVnum <= 50260) ) // 용혼원석들 { if( !(this->DragonSoul_IsQualified()) ) @@ -2148,10 +2055,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) if (distribution_test_server) iReadDelay /= 3; - //한국 본섭의 경우에는 시간을 24시간 고정 - if (LC_IsKorea()) - iReadDelay = 86400; - SetSkillNextReadTime(dwVnum, get_global_time() + iReadDelay); } } @@ -2546,7 +2449,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) DWORD count; int prob; DWORD vnum; - } b1[MAX_BAG_INFO] = + } bi[MAX_BAG_INFO] = { { 1000, 302, 1 }, { 10, 150, 27002 }, @@ -2576,42 +2479,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) { 1, 1, 11882 }, }; - struct LuckyBagInfo b2[MAX_BAG_INFO] = - { - { 1000, 302, 1 }, - { 10, 150, 27002 }, - { 10, 75, 27002 }, - { 10, 100, 27005 }, - { 10, 50, 27005 }, - { 10, 80, 27001 }, - { 10, 50, 27002 }, - { 10, 80, 27004 }, - { 10, 50, 27005 }, - { 1, 10, 50300 }, - { 1, 6, 92 }, - { 1, 2, 132 }, - { 1, 6, 1052 }, - { 1, 2, 1092 }, - { 1, 6, 2082 }, - { 1, 2, 2122 }, - { 1, 6, 3082 }, - { 1, 2, 3122 }, - { 1, 6, 5052 }, - { 1, 2, 5082 }, - { 1, 6, 7082 }, - { 1, 2, 7122 }, - { 1, 1, 11282 }, - { 1, 1, 11482 }, - { 1, 1, 11682 }, - { 1, 1, 11882 }, - }; - - LuckyBagInfo * bi = NULL; - if (LC_IsHongKong()) - bi = b2; - else - bi = b1; - int pct = Random::get(1, 1000); int i; @@ -2970,7 +2837,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) 95, 97, 99 }; - const int * prob_table = !g_iUseLocale ? prob_table_euckr : prob_table_gb2312; + const int * prob_table = prob_table_gb2312; if (r <= prob_table[0]) { @@ -3012,21 +2879,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) break; case 50200: // 보따리 - if (LC_IsYMIR() == true || LC_IsKorea() == true) - { - if (IS_BOTARYABLE_ZONE(GetMapIndex()) == true) - { - __OpenPrivateShop(); - } - else - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't open a personal shop in this region")); - } - } - else - { - __OpenPrivateShop(); - } + __OpenPrivateShop(); break; case fishing::FISH_MIND_PILL_VNUM: @@ -3803,10 +3656,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) case 71051 : // 진재가 { - // 유럽, 싱가폴, 베트남 진재가 사용금지 - if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam()) - return false; - LPITEM item2; if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell))) @@ -3850,10 +3699,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) case 71052 : // 진재경 { - // 유럽, 싱가폴, 베트남 진재가 사용금지 - if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam()) - return false; - LPITEM item2; if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell))) @@ -5354,11 +5199,6 @@ bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) SPDLOG_TRACE("[DROP_ITEM] drop item count == 0"); return false; } - - // check non-split items for china - //if (LC_IsNewCIBN()) - // if (item->GetVnum() == 71095 || item->GetVnum() == 71050 || item->GetVnum() == 70038) - // return false; item->SetCount(item->GetCount() - bCount); ITEM_MANAGER::instance().FlushDelayedSave(item); @@ -5377,11 +5217,6 @@ bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos)) { - // 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서 - // 아이템을 바닥에 버릴 시 속성로그를 남긴다. - if (LC_IsYMIR()) - item->AttrLog(); - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in 5 minutes.")); pkItemToDrop->StartDestroyEvent(); @@ -5426,32 +5261,12 @@ bool CHARACTER::DropGold(int gold) //Motion(MOTION_PICKUP); PointChange(POINT_GOLD, -gold, true); - // 브라질에 돈이 없어진다는 버그가 있는데, - // 가능한 시나리오 중에 하나는, - // 메크로나, 핵을 써서 1000원 이하의 돈을 계속 버려 골드를 0으로 만들고, - // 돈이 없어졌다고 복구 신청하는 것일 수도 있다. - // 따라서 그런 경우를 잡기 위해 낮은 수치의 골드에 대해서도 로그를 남김. - if (LC_IsBrazil() == true) - { - if (gold >= 213) - LogManager::instance().CharLog(this, gold, "DROP_GOLD", ""); - } - else - { - if (gold > 1000) // 천원 이상만 기록한다. - LogManager::instance().CharLog(this, gold, "DROP_GOLD", ""); - } - - if (false == LC_IsBrazil()) - { - item->StartDestroyEvent(150); - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 150/60); - } - else - { - item->StartDestroyEvent(60); - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 1); - } + + if (gold > 1000) // 천원 이상만 기록한다. + LogManager::instance().CharLog(this, gold, "DROP_GOLD", ""); + + item->StartDestroyEvent(150); + ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 150/60); } Save(); @@ -5579,15 +5394,6 @@ bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, BYTE count) } else if (count < item->GetCount()) { - //check non-split items - //if (LC_IsNewCIBN()) - //{ - // if (item->GetVnum() == 71095 || item->GetVnum() == 71050 || item->GetVnum() == 70038) - // { - // return false; - // } - //} - SPDLOG_DEBUG("{}: ITEM_SPLIT {} (window: {}, cell : {}) -> (window:{}, cell {}) count {}", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, count); @@ -5707,21 +5513,8 @@ void CHARACTER::GiveGold(int iAmount) { PointChange(POINT_GOLD, iAmount, true); - // 브라질에 돈이 없어진다는 버그가 있는데, - // 가능한 시나리오 중에 하나는, - // 메크로나, 핵을 써서 1000원 이하의 돈을 계속 버려 골드를 0으로 만들고, - // 돈이 없어졌다고 복구 신청하는 것일 수도 있다. - // 따라서 그런 경우를 잡기 위해 낮은 수치의 골드에 대해서도 로그를 남김. - if (LC_IsBrazil() == true) - { - if (iAmount >= 213) - LogManager::instance().CharLog(this, iAmount, "GET_GOLD", ""); - } - else - { - if (iAmount > 1000) // 천원 이상만 기록한다. - LogManager::instance().CharLog(this, iAmount, "GET_GOLD", ""); - } + if (iAmount > 1000) // 천원 이상만 기록한다. + LogManager::instance().CharLog(this, iAmount, "GET_GOLD", ""); } } @@ -7150,16 +6943,7 @@ bool CHARACTER::ItemProcess_Polymorph(LPITEM item) int iDuration = GetSkillLevel(POLYMORPH_SKILL_ID) == 0 ? 5 : (5 + (5 + GetSkillLevel(POLYMORPH_SKILL_ID)/40 * 25)); iDuration *= 60; - DWORD dwBonus = 0; - - if (true == LC_IsYMIR() || true == LC_IsKorea()) - { - dwBonus = GetSkillLevel(POLYMORPH_SKILL_ID) + 60; - } - else - { - dwBonus = (2 + GetSkillLevel(POLYMORPH_SKILL_ID)/40) * 100; - } + DWORD dwBonus = (2 + GetSkillLevel(POLYMORPH_SKILL_ID)/40) * 100; AddAffect(AFFECT_POLYMORPH, POINT_POLYMORPH, dwVnum, AFF_POLYMORPH, iDuration, 0, true); AddAffect(AFFECT_POLYMORPH, POINT_ATT_BONUS, dwBonus, AFF_POLYMORPH, iDuration, 0, false); diff --git a/src/game/src/char_manager.cpp b/src/game/src/char_manager.cpp index 7724f2f..f475753 100644 --- a/src/game/src/char_manager.cpp +++ b/src/game/src/char_manager.cpp @@ -923,21 +923,6 @@ LPCHARACTER CHARACTER_MANAGER::FindSpecifyPC(unsigned int uiJobFlag, int lMapInd int CHARACTER_MANAGER::GetMobItemRate(LPCHARACTER ch) { - //PREVENT_TOXICATION_FOR_CHINA - if ( LC_IsNewCIBN() ) - { - if ( ch->IsOverTime( OT_3HOUR ) ) - { - if (ch && ch->GetPremiumRemainSeconds(PREMIUM_ITEM) > 0) - return m_iMobItemRatePremium/2; - return m_iMobItemRate/2; - } - else if ( ch->IsOverTime( OT_5HOUR ) ) - { - return 0; - } - } - //END_PREVENT_TOXICATION_FOR_CHINA if (ch && ch->GetPremiumRemainSeconds(PREMIUM_ITEM) > 0) return m_iMobItemRatePremium; return m_iMobItemRate; @@ -953,21 +938,6 @@ int CHARACTER_MANAGER::GetMobGoldAmountRate(LPCHARACTER ch) if ( !ch ) return m_iMobGoldAmountRate; - //PREVENT_TOXICATION_FOR_CHINA - if ( LC_IsNewCIBN() ) - { - if ( ch->IsOverTime( OT_3HOUR ) ) - { - if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0) - return m_iMobGoldAmountRatePremium/2; - return m_iMobGoldAmountRate/2; - } - else if ( ch->IsOverTime( OT_5HOUR ) ) - { - return 0; - } - } - //END_PREVENT_TOXICATION_FOR_CHINA if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0) return m_iMobGoldAmountRatePremium; return m_iMobGoldAmountRate; @@ -977,22 +947,6 @@ int CHARACTER_MANAGER::GetMobGoldDropRate(LPCHARACTER ch) { if ( !ch ) return m_iMobGoldDropRate; - - //PREVENT_TOXICATION_FOR_CHINA - if ( LC_IsNewCIBN() ) - { - if ( ch->IsOverTime( OT_3HOUR ) ) - { - if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0) - return m_iMobGoldDropRatePremium/2; - return m_iMobGoldDropRate/2; - } - else if ( ch->IsOverTime( OT_5HOUR ) ) - { - return 0; - } - } - //END_PREVENT_TOXICATION_FOR_CHINA if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0) return m_iMobGoldDropRatePremium; @@ -1004,19 +958,6 @@ int CHARACTER_MANAGER::GetMobExpRate(LPCHARACTER ch) if ( !ch ) return m_iMobExpRate; - if ( LC_IsNewCIBN() ) - { - if ( ch->IsOverTime( OT_3HOUR ) ) - { - if (ch && ch->GetPremiumRemainSeconds(PREMIUM_EXP) > 0) - return m_iMobExpRatePremium/2; - return m_iMobExpRate/2; - } - else if ( ch->IsOverTime( OT_5HOUR ) ) - { - return 0; - } - } if (ch && ch->GetPremiumRemainSeconds(PREMIUM_EXP) > 0) return m_iMobExpRatePremium; return m_iMobExpRate; diff --git a/src/game/src/char_resist.cpp b/src/game/src/char_resist.cpp index 4eb411e..5baa0cc 100644 --- a/src/game/src/char_resist.cpp +++ b/src/game/src/char_resist.cpp @@ -18,10 +18,7 @@ int GetPoisonDamageRate(LPCHARACTER ch) if (ch->IsPC()) { - if (LC_IsYMIR()) - iRate = 40; - else - iRate = 50; + iRate = 50; } else iRate = poison_damage_rate[ch->GetMobRank()]; diff --git a/src/game/src/char_skill.cpp b/src/game/src/char_skill.cpp index bdbdcf5..6fa3643 100644 --- a/src/game/src/char_skill.cpp +++ b/src/game/src/char_skill.cpp @@ -331,28 +331,6 @@ bool CHARACTER::LearnGrandMasterSkill(DWORD dwSkillVnum) int iBookCount = aiGrandMasterSkillBookCountForLevelUp[idx]; - if ( LC_IsYMIR() == true || LC_IsKorea() == true ) - { - const int aiGrandMasterSkillBookCountForLevelUp_euckr[10] = - { - 3, 3, 4, 5, 6, 7, 8, 9, 10, 15, - }; - - const int aiGrandMasterSkillBookMinCount_euckr[10] = - { - 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 - }; - - const int aiGrandMasterSkillBookMaxCount_euckr[10] = - { - 5, 7, 9, 11, 13, 15, 18, 23, 25, 30 - }; - - iMinReadCount = aiGrandMasterSkillBookMinCount_euckr[idx]; - iMaxReadCount = aiGrandMasterSkillBookMaxCount_euckr[idx]; - iBookCount = aiGrandMasterSkillBookCountForLevelUp_euckr[idx]; - } - if (FindAffect(AFFECT_SKILL_BOOK_BONUS)) { if (iBookCount&1) @@ -400,18 +378,6 @@ bool CHARACTER::LearnGrandMasterSkill(DWORD dwSkillVnum) } // END_OF_ADD_GRANDMASTER_SKILL -static bool FN_should_check_exp(LPCHARACTER ch) -{ - if (LC_IsCanada()) - return ch->GetLevel() < gPlayerMaxLevel; - - if (!LC_IsYMIR()) - return true; - - return false; -} - - bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb) { const CSkillProto* pkSk = CSkillManager::instance().Get(dwSkillVnum); @@ -425,17 +391,12 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb) return false; } - DWORD need_exp = 0; + DWORD need_exp = 20000; - if (FN_should_check_exp(this)) + if ( GetExp() < need_exp ) { - need_exp = 20000; - - if ( GetExp() < need_exp ) - { - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot read this due to your lack of experience.")); - return false; - } + ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot read this due to your lack of experience.")); + return false; } // bType이 0이면 처음부터 책으로 수련 가능 @@ -501,103 +462,69 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb) SPDLOG_DEBUG("LearnSkillByBook {} table idx {} value {}", GetName(), idx, aiSkillBookCountForLevelUp[idx]); - if (!LC_IsYMIR()) + int need_bookcount = GetSkillLevel(dwSkillVnum) - 20; + + PointChange(POINT_EXP, -need_exp); + + quest::CQuestManager& q = quest::CQuestManager::instance(); + quest::PC* pPC = q.GetPC(GetPlayerID()); + + if (pPC) { - int need_bookcount = GetSkillLevel(dwSkillVnum) - 20; + char flag[128+1]; + memset(flag, 0, sizeof(flag)); + snprintf(flag, sizeof(flag), "traning_master_skill.%u.read_count", dwSkillVnum); - PointChange(POINT_EXP, -need_exp); - - quest::CQuestManager& q = quest::CQuestManager::instance(); - quest::PC* pPC = q.GetPC(GetPlayerID()); - - if (pPC) - { - char flag[128+1]; - memset(flag, 0, sizeof(flag)); - snprintf(flag, sizeof(flag), "traning_master_skill.%u.read_count", dwSkillVnum); - - int read_count = pPC->GetFlag(flag); - int percent = 65; - - if (FindAffect(AFFECT_SKILL_BOOK_BONUS)) - { - percent = 0; - RemoveAffect(AFFECT_SKILL_BOOK_BONUS); - } - - if (Random::get(1, 100) > percent) - { - // 책읽기에 성공 - if (read_count >= need_bookcount) - { - SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK); - pPC->SetFlag(flag, 0); - - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have successfully finished your training with the Book.")); - LogManager::instance().CharLog(this, dwSkillVnum, "READ_SUCCESS", ""); - return true; - } - else - { - pPC->SetFlag(flag, read_count + 1); - - switch (Random::get(1, 3)) - { - case 1: - ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("I'm making progress, but I still haven't understood everything.")); - break; - - case 2: - ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("These instructions are difficult to understand. I have to carry on studying.")); - break; - - case 3: - default: - ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("I understand this chapter. But I've got to carry on working hard.")); - break; - } - - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have to read %d more skill books to improve this skill."), need_bookcount - read_count); - return true; - } - } - } - else - { - // 사용자의 퀘스트 정보 로드 실패 - } - } - // INTERNATIONAL_VERSION - else - { - int iBookCount = 99; - - if (LC_IsYMIR() == true) - { - const int aiSkillBookCountForLevelUp_euckr[10] = - { - 2, 2, 3, 3, 3, 3, 3, 3, 4, 5 - }; - - iBookCount = aiSkillBookCountForLevelUp_euckr[idx]; - } - else - iBookCount = aiSkillBookCountForLevelUp[idx]; + int read_count = pPC->GetFlag(flag); + int percent = 65; if (FindAffect(AFFECT_SKILL_BOOK_BONUS)) { - if (iBookCount & 1) // iBookCount % 2 - iBookCount = iBookCount / 2 + 1; - else - iBookCount = iBookCount / 2; - + percent = 0; RemoveAffect(AFFECT_SKILL_BOOK_BONUS); } - if (Random::get(1, iBookCount) == 2) - SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK); + if (Random::get(1, 100) > percent) + { + // 책읽기에 성공 + if (read_count >= need_bookcount) + { + SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK); + pPC->SetFlag(flag, 0); + + ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have successfully finished your training with the Book.")); + LogManager::instance().CharLog(this, dwSkillVnum, "READ_SUCCESS", ""); + return true; + } + else + { + pPC->SetFlag(flag, read_count + 1); + + switch (Random::get(1, 3)) + { + case 1: + ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("I'm making progress, but I still haven't understood everything.")); + break; + + case 2: + ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("These instructions are difficult to understand. I have to carry on studying.")); + break; + + case 3: + default: + ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("I understand this chapter. But I've got to carry on working hard.")); + break; + } + + ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You have to read %d more skill books to improve this skill."), need_bookcount - read_count); + return true; + } + } + } + else + { + // 사용자의 퀘스트 정보 로드 실패 } - // END_OF_INTERNATIONAL_VERSION } if (bLastLevel != GetSkillLevel(dwSkillVnum)) @@ -1197,10 +1124,6 @@ struct FuncSplashDamage if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER) { - //if (!g_iUseLocale) - if ( LC_IsYMIR() ) - adjust += 1.0f; - else adjust += 0.5f; } } @@ -1208,14 +1131,11 @@ struct FuncSplashDamage { adjust = 1.0f; - if ( !LC_IsYMIR() ) - { - if (bUnderEunhyung) - adjust += 0.5f; + if (bUnderEunhyung) + adjust += 0.5f; - if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER) - adjust += 0.5f; - } + if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER) + adjust += 0.5f; } iAmount = (int) (iAmount * adjust); @@ -1226,11 +1146,7 @@ struct FuncSplashDamage if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER) { - //if (!g_iUseLocale) - if ( LC_IsYMIR() ) - adjust = 1.4f; - else - adjust = 1.35f; + adjust = 1.35f; } iAmount = (int) (iAmount * adjust); @@ -1480,11 +1396,7 @@ struct FuncSplashDamage if (m_pkChr->IsPC() && m_pkChr->m_SkillUseInfo[m_pkSk->dwVnum].GetMainTargetVID() == (DWORD) pkChrVictim->GetVID()) { - //if (!g_iUseLocale) - if (LC_IsYMIR()) - SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 3, m_pkSk->szName); - else - SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName); + SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName); } else { @@ -2277,17 +2189,10 @@ int CHARACTER::ComputeSkill(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel DWORD affact_flag = pkSk->dwAffectFlag; // ADD_GRANDMASTER_SKILL - //if (g_iUseLocale) - if ( !LC_IsYMIR() ) { if ((pkSk->dwVnum == SKILL_CHUNKEON && GetUsedSkillMasterType(pkSk->dwVnum) < SKILL_GRAND_MASTER)) affact_flag = AFF_CHEONGEUN_WITH_FALL; } - else - { - if ((pkSk->dwVnum == SKILL_CHUNKEON && GetUsedSkillMasterType(pkSk->dwVnum) < SKILL_MASTER)) - affact_flag = AFF_CHEONGEUN_WITH_FALL; - } // END_OF_ADD_GRANDMASTER_SKILL pkVictim->AddAffect(pkSk->dwVnum, diff --git a/src/game/src/char_state.cpp b/src/game/src/char_state.cpp index 38e8310..854ac9c 100644 --- a/src/game/src/char_state.cpp +++ b/src/game/src/char_state.cpp @@ -555,11 +555,7 @@ void CHARACTER::__StateIdle_NPC() { // 이곳입니다. M2_DESTROY_CHARACTER(this); - int iNextSpawnDelay = 0; - if (LC_IsYMIR()) - iNextSpawnDelay = 20 * 60; - else - iNextSpawnDelay = 50 * 60; + int iNextSpawnDelay = 50 * 60; xmas::SpawnSanta(lNextMapIndex, iNextSpawnDelay); } diff --git a/src/game/src/cmd.cpp b/src/game/src/cmd.cpp index 5284a53..cbf67e5 100644 --- a/src/game/src/cmd.cpp +++ b/src/game/src/cmd.cpp @@ -711,13 +711,10 @@ void interpret_command(LPCHARACTER ch, const char * argument, size_t len) { if (cmd_info[icmd].gm_level >= GM_LOW_WIZARD) { - if (LC_IsEurope() == true || /*LC_IsNewCIBN() == true || */LC_IsCanada() == true || LC_IsBrazil() == true || LC_IsSingapore() == true ) - { - char buf[1024]; - snprintf( buf, sizeof(buf), "%s", argument ); + char buf[1024]; + snprintf( buf, sizeof(buf), "%s", argument ); - LogManager::instance().GMCommandLog(ch->GetPlayerID(), ch->GetName(), ch->GetDesc()->GetHostName(), g_bChannel, buf); - } + LogManager::instance().GMCommandLog(ch->GetPlayerID(), ch->GetName(), ch->GetDesc()->GetHostName(), g_bChannel, buf); } } } diff --git a/src/game/src/cmd_general.cpp b/src/game/src/cmd_general.cpp index daf541d..9af2aba 100644 --- a/src/game/src/cmd_general.cpp +++ b/src/game/src/cmd_general.cpp @@ -271,23 +271,20 @@ EVENTFUNC(timed_event) { ch->m_pkTimedEvent = NULL; - if (true == LC_IsEurope() || true == LC_IsYMIR() || true == LC_IsKorea()) + switch (info->subcmd) { - switch (info->subcmd) - { - case SCMD_LOGOUT: - case SCMD_QUIT: - case SCMD_PHASE_SELECT: - { - TPacketNeedLoginLogInfo acc_info; - acc_info.dwPlayerID = ch->GetDesc()->GetAccountTable().id; + case SCMD_LOGOUT: + case SCMD_QUIT: + case SCMD_PHASE_SELECT: + { + TPacketNeedLoginLogInfo acc_info; + acc_info.dwPlayerID = ch->GetDesc()->GetAccountTable().id; - db_clientdesc->DBPacket( HEADER_GD_VALID_LOGOUT, 0, &acc_info, sizeof(acc_info) ); + db_clientdesc->DBPacket( HEADER_GD_VALID_LOGOUT, 0, &acc_info, sizeof(acc_info) ); - LogManager::instance().DetailLoginLog( false, ch ); - } - break; - } + LogManager::instance().DetailLoginLog( false, ch ); + } + break; } switch (info->subcmd) @@ -903,21 +900,6 @@ ACMD(do_safebox_change_password) return; } - if (LC_IsBrazil() == true) - { - for (int i = 0; i < 6; ++i) - { - if (arg2[i] == '\0') - break; - - if (isalpha(arg2[i]) == false) - { - ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Storeroom] The password must be alphanumeric.")); - return; - } - } - } - TSafeboxChangePasswordPacket p; p.dwID = ch->GetDesc()->GetAccountTable().id; @@ -1443,9 +1425,6 @@ ACMD(do_party_request_deny) ACMD(do_monarch_warpto) { - if (true == LC_IsYMIR() || true == LC_IsKorea()) - return; - if (!CMonarch::instance().IsMonarch(ch->GetPlayerID(), ch->GetEmpire())) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This function can only be used by the emperor.")); @@ -1559,9 +1538,6 @@ ACMD(do_monarch_warpto) ACMD(do_monarch_transfer) { - if (true == LC_IsYMIR() || true == LC_IsKorea()) - return; - char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); @@ -1845,15 +1821,6 @@ ACMD(do_monarch_mob) BYTE pcEmpire = ch->GetEmpire(); BYTE mapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(ch->GetMapIndex()); - if (LC_IsYMIR() == true || LC_IsKorea() == true) - { - if (mapEmpire != pcEmpire && mapEmpire != 0) - { - ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This feature is only available in your home territory")); - return; - } - } - // 군주 몹 소환 비용 const int SummonPrice = 5000000; @@ -2264,92 +2231,15 @@ ACMD(do_cube) ACMD(do_in_game_mall) { - if (LC_IsYMIR() == true || LC_IsKorea() == true) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://metin2.co.kr/04_mall/mall/login.htm"); - return; - } + char country_code[3]; + country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0'; - if (true == LC_IsTaiwan()) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://203.69.141.203/mall/mall/item_main.htm"); - return; - } + char buf[512+1]; - // ㅠ_ㅠ 쾌도서버 아이템몰 URL 하드코딩 추가 - if (true == LC_IsWE_Korea()) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://metin2.co.kr/50_we_mall/mall/login.htm"); - return; - } + snprintf(buf, sizeof(buf), "mall http://%s/ishop?pid=%u&c=%s&sid=%d", + g_strWebMallURL.c_str(), ch->GetPlayerID(), country_code, g_server_id); - if (LC_IsJapan() == true) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://mt2.oge.jp/itemmall/itemList.php"); - return; - } - - if (LC_IsNewCIBN() == true && test_server) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://218.99.6.51/04_mall/mall/login.htm"); - return; - } - - if (LC_IsSingapore() == true) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://www.metin2.sg/ishop.php"); - return; - } - - /* - if (LC_IsCanada() == true) - { - ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://mall.z8games.com/mall_entry.aspx?tb=m2"); - return; - }*/ - - if (LC_IsEurope() == true) - { - char country_code[3]; - - switch (LC_GetLocalType()) - { - case LC_GERMANY: country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0'; break; - case LC_FRANCE: country_code[0] = 'f'; country_code[1] = 'r'; country_code[2] = '\0'; break; - case LC_ITALY: country_code[0] = 'i'; country_code[1] = 't'; country_code[2] = '\0'; break; - case LC_SPAIN: country_code[0] = 'e'; country_code[1] = 's'; country_code[2] = '\0'; break; - case LC_UK: country_code[0] = 'e'; country_code[1] = 'n'; country_code[2] = '\0'; break; - case LC_TURKEY: country_code[0] = 't'; country_code[1] = 'r'; country_code[2] = '\0'; break; - case LC_POLAND: country_code[0] = 'p'; country_code[1] = 'l'; country_code[2] = '\0'; break; - case LC_PORTUGAL: country_code[0] = 'p'; country_code[1] = 't'; country_code[2] = '\0'; break; - case LC_GREEK: country_code[0] = 'g'; country_code[1] = 'r'; country_code[2] = '\0'; break; - case LC_RUSSIA: country_code[0] = 'r'; country_code[1] = 'u'; country_code[2] = '\0'; break; - case LC_DENMARK: country_code[0] = 'd'; country_code[1] = 'k'; country_code[2] = '\0'; break; - case LC_BULGARIA: country_code[0] = 'b'; country_code[1] = 'g'; country_code[2] = '\0'; break; - case LC_CROATIA: country_code[0] = 'h'; country_code[1] = 'r'; country_code[2] = '\0'; break; - case LC_MEXICO: country_code[0] = 'm'; country_code[1] = 'x'; country_code[2] = '\0'; break; - case LC_ARABIA: country_code[0] = 'a'; country_code[1] = 'e'; country_code[2] = '\0'; break; - case LC_CZECH: country_code[0] = 'c'; country_code[1] = 'z'; country_code[2] = '\0'; break; - case LC_ROMANIA: country_code[0] = 'r'; country_code[1] = 'o'; country_code[2] = '\0'; break; - case LC_HUNGARY: country_code[0] = 'h'; country_code[1] = 'u'; country_code[2] = '\0'; break; - case LC_NETHERLANDS: country_code[0] = 'n'; country_code[1] = 'l'; country_code[2] = '\0'; break; - case LC_USA: country_code[0] = 'u'; country_code[1] = 's'; country_code[2] = '\0'; break; - case LC_CANADA: country_code[0] = 'c'; country_code[1] = 'a'; country_code[2] = '\0'; break; - default: - if (test_server == true) - { - country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0'; - } - break; - } - - char buf[512+1]; - - snprintf(buf, sizeof(buf), "mall http://%s/ishop?pid=%u&c=%s&sid=%d", - g_strWebMallURL.c_str(), ch->GetPlayerID(), country_code, g_server_id); - - ch->ChatPacket(CHAT_TYPE_COMMAND, buf); - } + ch->ChatPacket(CHAT_TYPE_COMMAND, buf); } // 주사위 diff --git a/src/game/src/cmd_gm.cpp b/src/game/src/cmd_gm.cpp index 0a8ba5c..ef48beb 100644 --- a/src/game/src/cmd_gm.cpp +++ b/src/game/src/cmd_gm.cpp @@ -3267,17 +3267,8 @@ ACMD(do_duel) if (set > 5) set = 5; if (!str_to_number(minute, szMinute)) - { - // 캐나다는 기본 10분. - if (LC_IsCanada() == true) - { - minute = 10; - } - else - { - minute = 5; - } - } + minute = 5; + if (minute < 5) minute = 5; diff --git a/src/game/src/config.cpp b/src/game/src/config.cpp index eacad23..c093fd7 100644 --- a/src/game/src/config.cpp +++ b/src/game/src/config.cpp @@ -31,9 +31,6 @@ WORD p2p_port = 50900; char db_addr[ADDRESS_MAX_LEN + 1]; WORD db_port = 0; - -char teen_addr[ADDRESS_MAX_LEN + 1] = {0}; -WORD teen_port = 0; // End of networking BYTE g_bChannel = 0; @@ -933,24 +930,6 @@ void config_init(const string& st_localeServiceName) } } - TOKEN("teen_addr") - { - strlcpy(teen_addr, value_string, sizeof(teen_addr)); - - for (int n =0; n < ADDRESS_MAX_LEN; ++n) - { - if (teen_addr[n] == ' ') - teen_addr[n] = '\0'; - } - - continue; - } - - TOKEN("teen_port") - { - str_to_number(teen_port, value_string); - } - TOKEN("synchack_limit_count") { str_to_number(g_iSyncHackLimitCount, value_string); @@ -1179,14 +1158,7 @@ bool LoadClientVersion() void CheckClientVersion() { - if (LC_IsEurope()) - { - g_bCheckClientVersion = true; - } - else - { - g_bCheckClientVersion = false; - } + g_bCheckClientVersion = true; const DESC_MANAGER::DESC_SET & set = DESC_MANAGER::instance().GetClientSet(); DESC_MANAGER::DESC_SET::const_iterator it = set.begin(); @@ -1218,8 +1190,7 @@ void LoadStateUserCount() if (!fp) return; - if (!LC_IsHongKong()) - fscanf(fp, " %d %d ", &g_iFullUserCount, &g_iBusyUserCount); + fscanf(fp, " %d %d ", &g_iFullUserCount, &g_iBusyUserCount); fclose(fp); } diff --git a/src/game/src/config.h b/src/game/src/config.h index 0853a37..468b56b 100644 --- a/src/game/src/config.h +++ b/src/game/src/config.h @@ -20,9 +20,6 @@ extern WORD p2p_port; extern char db_addr[ADDRESS_MAX_LEN + 1]; extern WORD db_port; -extern char teen_addr[ADDRESS_MAX_LEN + 1]; -extern WORD teen_port; - extern int passes_per_sec; extern int save_event_second_cycle; extern int ping_event_second_cycle; diff --git a/src/game/src/db.cpp b/src/game/src/db.cpp index e039e49..37bda7d 100644 --- a/src/game/src/db.cpp +++ b/src/game/src/db.cpp @@ -355,48 +355,27 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg) char szCreateDate[256] = "00000000"; - if (!g_iUseLocale) - { - str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_AUTOLOOT], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_FISH_MIND], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]); - } - else - { - str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_AUTOLOOT], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_FISH_MIND], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]); - str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_AUTOLOOT], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_FISH_MIND], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]); + str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]); - if (LC_IsEurope() || test_server) - { - int retValue = 0; - str_to_number(retValue, row[col]); + int retValue = 0; + str_to_number(retValue, row[col]); - time_t create_time = retValue; - struct tm * tm1; - tm1 = localtime(&create_time); - strftime(szCreateDate, 255, "%Y%m%d", tm1); + time_t create_time = retValue; + struct tm * tm1; + tm1 = localtime(&create_time); + strftime(szCreateDate, 255, "%Y%m%d", tm1); - SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate); - SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8)); - } - } + SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate); + SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8)); int nPasswordDiff = strcmp(szEncrytPassword, szPassword); - if (true == LC_IsBrazil()) - { - nPasswordDiff = 0; // 브라질 버전에서는 비밀번호 체크를 하지 않는다. - } - if (nPasswordDiff) { LoginFailure(d, "WRONGPWD"); @@ -423,22 +402,20 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg) } else { - if (LC_IsEurope()) + //stBlockData >= 0 == 날짜가 BlockDate 보다 미래 + if (strncmp(szCreateDate, g_stBlockDate.c_str(), 8) >= 0) { - //stBlockData >= 0 == 날짜가 BlockDate 보다 미래 - if (strncmp(szCreateDate, g_stBlockDate.c_str(), 8) >= 0) - { - LoginFailure(d, "BLKLOGIN"); - SPDLOG_DEBUG(" BLKLOGIN"); - M2_DELETE(pinfo); - break; - } - - char szQuery[1024]; - snprintf(szQuery, sizeof(szQuery), "UPDATE account SET last_play=NOW() WHERE id=%u", dwID); - std::unique_ptr msg( DBManager::instance().DirectQuery(szQuery) ); + LoginFailure(d, "BLKLOGIN"); + SPDLOG_DEBUG(" BLKLOGIN"); + M2_DELETE(pinfo); + break; } + char szQuery[1024]; + snprintf(szQuery, sizeof(szQuery), "UPDATE account SET last_play=NOW() WHERE id=%u", dwID); + std::unique_ptr msg( DBManager::instance().DirectQuery(szQuery) ); + + TAccountTable & r = d->GetAccountTable(); r.id = dwID; diff --git a/src/game/src/desc.cpp b/src/game/src/desc.cpp index 5dabf35..cf71d43 100644 --- a/src/game/src/desc.cpp +++ b/src/game/src/desc.cpp @@ -48,11 +48,6 @@ void DescWriteHandler(bufferevent *bev, void *ctx) { evbuffer *output = bufferevent_get_output(bev); size_t buf_size = evbuffer_get_length(output); } - else if (g_TeenDesc==d) - { - evbuffer *output = bufferevent_get_output(bev); - size_t buf_size = evbuffer_get_length(output); - } } void DescEventHandler(bufferevent *bev, short events, void *ctx) { diff --git a/src/game/src/desc_client.cpp b/src/game/src/desc_client.cpp index cbb76be..38aa84b 100644 --- a/src/game/src/desc_client.cpp +++ b/src/game/src/desc_client.cpp @@ -14,7 +14,6 @@ LPCLIENT_DESC db_clientdesc = NULL; LPCLIENT_DESC g_pkAuthMasterDesc = NULL; LPCLIENT_DESC g_NetmarbleDBDesc = NULL; -LPCLIENT_DESC g_TeenDesc = NULL; static const char* GetKnownClientDescName(LPCLIENT_DESC desc) { if (desc == db_clientdesc) { @@ -23,9 +22,7 @@ static const char* GetKnownClientDescName(LPCLIENT_DESC desc) { return "g_pkAuthMasterDesc"; } else if (desc == g_NetmarbleDBDesc) { return "g_NetmarbleDBDesc"; - } else if (desc == g_TeenDesc) { - return "g_TeenDesc"; - } + } return "unknown"; } @@ -243,11 +240,6 @@ void CLIENT_DESC::SetPhase(int iPhase) m_pInputProcessor = NULL; break; - case PHASE_TEEN: - m_inputTeen.SetStep(0); - m_pInputProcessor = &m_inputTeen; - break; - } m_iPhase = iPhase; @@ -333,4 +325,4 @@ void CLIENT_DESC::Reset() m_evbase = evbase; m_stHost = host; m_wPort = port; -} \ No newline at end of file +} diff --git a/src/game/src/desc_client.h b/src/game/src/desc_client.h index 03169a1..e8ad34c 100644 --- a/src/game/src/desc_client.h +++ b/src/game/src/desc_client.h @@ -42,13 +42,11 @@ class CLIENT_DESC : public DESC CInputDB m_inputDB; CInputP2P m_inputP2P; - CInputTeen m_inputTeen; }; extern LPCLIENT_DESC db_clientdesc; extern LPCLIENT_DESC g_pkAuthMasterDesc; extern LPCLIENT_DESC g_NetmarbleDBDesc; -extern LPCLIENT_DESC g_TeenDesc; #endif diff --git a/src/game/src/empire_text_convert.cpp b/src/game/src/empire_text_convert.cpp index fd7178c..c5814c5 100644 --- a/src/game/src/empire_text_convert.cpp +++ b/src/game/src/empire_text_convert.cpp @@ -54,35 +54,10 @@ void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct) { if (*pbText & 0x80) { - if (g_iUseLocale) - { - static char s_cChinaTable[][3] = {"\xA1\xF2","\xA3\xA3","\xA3\xA4","\xA1\xF9","\xA1\xF0" }; - int n = Random::get(0, 4); - pbText[0] = s_cChinaTable[n][0]; - pbText[1] = s_cChinaTable[n][1]; - } - else - { - if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE) - { - UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1); - pbText[0] = rkTextConvTable.aacHan[uHanPos][0]; - pbText[1] = rkTextConvTable.aacHan[uHanPos][1]; - } - else if ( pbText[0] == 0xA4 ) - { - if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE ) - { - pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0]; - pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1]; - } - else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 ) - { - pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0]; - pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1]; - } - } - } + static char s_cChinaTable[][3] = {"\xA1\xF2","\xA3\xA3","\xA3\xA4","\xA1\xF9","\xA1\xF0" }; + int n = Random::get(0, 4); + pbText[0] = s_cChinaTable[n][0]; + pbText[1] = s_cChinaTable[n][1]; ++pbText; --len; diff --git a/src/game/src/exchange.cpp b/src/game/src/exchange.cpp index 9095d41..8707a67 100644 --- a/src/game/src/exchange.cpp +++ b/src/game/src/exchange.cpp @@ -253,13 +253,11 @@ bool CExchange::AddGold(int gold) return false; } - if ( LC_IsCanada() == true || LC_IsEurope() == true ) + if ( m_lGold > 0 ) { - if ( m_lGold > 0 ) - { - return false; - } + return false; } + Accept(false); GetCompany()->Accept(false); diff --git a/src/game/src/fishing.cpp b/src/game/src/fishing.cpp index da7dd92..6ab79c3 100644 --- a/src/game/src/fishing.cpp +++ b/src/game/src/fishing.cpp @@ -387,20 +387,10 @@ int DetermineFish(LPCHARACTER ch) int * p = std::lower_bound(g_prob_accumulate[prob_idx], g_prob_accumulate[prob_idx] + MAX_FISH, rv); int fish_idx = p - g_prob_accumulate[prob_idx]; - //if (!g_iUseLocale) - if ( LC_IsYMIR() ) - { - if (fish_info[fish_idx].vnum >= 70040 && fish_info[fish_idx].vnum <= 70052) - return 0; - } + DWORD vnum = fish_info[fish_idx].vnum; - if (g_iUseLocale) // 중국에서는 금덩어리, 금열쇠, 은열쇠 나오지 않게 함 - { - DWORD vnum = fish_info[fish_idx].vnum; - - if (vnum == 50008 || vnum == 50009 || vnum == 80008) - return 0; - } + if (vnum == 50008 || vnum == 50009 || vnum == 80008) + return 0; return (fish_idx); } @@ -772,11 +762,6 @@ void UseFish(LPCHARACTER ch, LPITEM item) break; case USED_SHELLFISH: // 1 - if ( LC_IsCanada() == true ) - { - if ( Random::get(0, 2) != 2 ) return; - } - ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("There is a Clam inside the Fish.")); ch->AutoGiveItem(SHELLFISH_VNUM); break; diff --git a/src/game/src/gm.cpp b/src/game/src/gm.cpp index 68d0499..bc05cb8 100644 --- a/src/game/src/gm.cpp +++ b/src/game/src/gm.cpp @@ -64,49 +64,16 @@ BYTE gm_new_get_level( const char * name, const char * host, const char* account if (g_map_GM.end() == it) return GM_PLAYER; - // GERMAN_GM_NOT_CHECK_HOST - // 독일 버전은 호스트 체크를 하지 않는다. - if ( LC_IsEurope() && !LC_IsTaiwan() || LC_IsSingapore() ) + if (account) { - if (account) - { - if ( strcmp ( it->second.Info.m_szAccount, account ) != 0 ) + if ( strcmp ( it->second.Info.m_szAccount, account ) != 0 ) { - SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD ACCOUNT [ACCOUNT:{}/{}", it->second.Info.m_szAccount, account); - return GM_PLAYER; + SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD ACCOUNT [ACCOUNT:{}/{}", it->second.Info.m_szAccount, account); + return GM_PLAYER; } - } - SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND ACCOUNT"); - return it->second.Info.m_Authority; } - // END_OF_GERMAN_GM_NOT_CHECK_HOST - else - { - - if ( host ) - { - if ( it->second.pset_Host ) - { - if ( it->second.pset_Host->end() == it->second.pset_Host->find( host ) ) - { - SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD HOST IN HOST_LIST"); - return GM_PLAYER; - } - } - else - { - if ( strcmp ( it->second.Info.m_szContactIP, host ) != 0 ) - { - SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD HOST IN GMLIST"); - return GM_PLAYER; - } - } - } - SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND HOST"); - - return it->second.Info.m_Authority; - } - return GM_PLAYER; + SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND ACCOUNT"); + return it->second.Info.m_Authority; } //END_ADMIN_MANAGER diff --git a/src/game/src/guild.cpp b/src/game/src/guild.cpp index 854dca5..d26805c 100644 --- a/src/game/src/guild.cpp +++ b/src/game/src/guild.cpp @@ -228,11 +228,6 @@ bool CGuild::RemoveMember(DWORD pid) ch->SetGuild(NULL); } - if ( LC_IsBrazil() == true ) - { - DBManager::instance().Query("REPLACE INTO guild_invite_limit VALUES(%d, %d)", GetID(), get_global_time()); - } - return true; } @@ -1470,14 +1465,7 @@ void CGuild::UpdateSkill(BYTE skill_point, BYTE* skill_levels) static DWORD __guild_levelup_exp(int level) { - if (LC_IsYMIR()) - { - return guild_exp_table[level]; - } - else - { - return guild_exp_table2[level]; - } + return guild_exp_table2[level]; } void CGuild::GuildPointChange(BYTE type, int amount, bool save) @@ -1776,19 +1764,6 @@ int CGuild::GetMaxMemberCount() m_iMemberCountBonus = 0; // END_GUILD_IS_FULL_BUG_FIX - if ( LC_IsHongKong() == true ) - { - quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetMasterPID()); - - if ( pPC != NULL ) - { - if ( pPC->GetFlag("guild.is_unlimit_member") == 1 ) - { - return INT_MAX; - } - } - } - return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus; } // END_OF_GUILD_MEMBER_COUNT_BONUS @@ -2086,28 +2061,6 @@ CGuild::GuildJoinErrCode CGuild::VerifyGuildJoinableCondition( const LPCHARACTER { return GERR_GUILD_IS_IN_WAR; } - else if ( LC_IsBrazil() == true ) - { - std::unique_ptr pMsg( DBManager::instance().DirectQuery("SELECT value FROM guild_invite_limit WHERE id=%d", GetID()) ); - - if ( pMsg->Get()->uiNumRows > 0 ) - { - MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult); - time_t limit_time=0; - str_to_number( limit_time, row[0] ); - - if ( test_server == true ) - { - limit_time += quest::CQuestManager::instance().GetEventFlag("guild_invite_limit") * 60; - } - else - { - limit_time += quest::CQuestManager::instance().GetEventFlag("guild_invite_limit") * 24 * 60 * 60; - } - - if ( get_global_time() < limit_time ) return GERR_INVITE_LIMIT; - } - } return GERR_NONE; } diff --git a/src/game/src/guild_manager.cpp b/src/game/src/guild_manager.cpp index 8145d09..2212392 100644 --- a/src/game/src/guild_manager.cpp +++ b/src/game/src/guild_manager.cpp @@ -538,12 +538,9 @@ void CGuildManager::DeclareWar(DWORD guild_id1, DWORD guild_id2, BYTE bType) if (g1->DeclareWar(guild_id2, bType, GUILD_WAR_SEND_DECLARE) && g2->DeclareWar(guild_id1, bType, GUILD_WAR_RECV_DECLARE)) { - if (false == LC_IsGermany()) - { - char buf[256]; - snprintf(buf, sizeof(buf), LC_TEXT("The guild %s has declared war on %s!"), TouchGuild(guild_id1)->GetName(), TouchGuild(guild_id2)->GetName()); - SendNotice(buf); - } + char buf[256]; + snprintf(buf, sizeof(buf), LC_TEXT("The guild %s has declared war on %s!"), TouchGuild(guild_id1)->GetName(), TouchGuild(guild_id2)->GetName()); + SendNotice(buf); } } diff --git a/src/game/src/input.h b/src/game/src/input.h index 8f6a237..e660e8a 100644 --- a/src/game/src/input.h +++ b/src/game/src/input.h @@ -13,7 +13,6 @@ enum INPROC_DB, INPROC_P2P, INPROC_AUTH, - INPROC_TEEN, }; void LoginFailure(LPDESC d, const char * c_pszStatus); @@ -335,23 +334,5 @@ class CInputAuth : public CInputProcessor void Login(LPDESC d, const char * c_pData); }; -class CInputTeen : public CInputProcessor -{ - public : - virtual BYTE GetType() { return INPROC_TEEN; } - - void SetStep(int step); - - protected : - virtual bool Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed); - virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData) { return 0; }; - - private: - int m_step; - - bool ProcessHandshake(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed); - bool ProcessMain(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed); -}; - #endif /* __INC_METIN_II_GAME_INPUT_PROCESSOR__ */ diff --git a/src/game/src/input_auth.cpp b/src/game/src/input_auth.cpp index 31f7509..a11a1d7 100644 --- a/src/game/src/input_auth.cpp +++ b/src/game/src/input_auth.cpp @@ -27,62 +27,6 @@ bool FN_IS_VALID_LOGIN_STRING(const char *str) if (isdigit(*tmp) || isalpha(*tmp)) continue; - // 캐나다는 몇몇 특수문자 허용 - if (LC_IsCanada()) - { - switch (*tmp) - { - case ' ': - case '_': - case '-': - case '.': - case '!': - case '@': - case '#': - case '$': - case '%': - case '^': - case '&': - case '*': - case '(': - case ')': - continue; - } - } - - if (LC_IsYMIR() == true || LC_IsKorea() == true) - { - switch (*tmp) - { - case '-' : - case '_' : - continue; - } - } - - if (LC_IsBrazil() == true) - { - switch (*tmp) - { - case '_' : - case '-' : - case '=' : - continue; - } - } - - if (LC_IsJapan() == true) - { - switch (*tmp) - { - case '-' : - case '_' : - case '@': - case '#': - continue; - } - } - return false; } diff --git a/src/game/src/input_db.cpp b/src/game/src/input_db.cpp index 70e4e33..9ee7b68 100644 --- a/src/game/src/input_db.cpp +++ b/src/game/src/input_db.cpp @@ -414,12 +414,6 @@ void CInputDB::PlayerLoad(LPDESC d, const char * data) snprintf(buf, sizeof(buf), "%s %d %d %d %d", ch->GetDesc()->GetHostName(), ch->GetGold(), g_bChannel, ch->GetMapIndex(), ch->GetAlignment()); LogManager::instance().CharLog(ch, 0, "LOGIN", buf); - - if (LC_IsYMIR() || LC_IsKorea() || LC_IsBrazil() || LC_IsJapan()) - { - LogManager::instance().LoginLog(true, - ch->GetDesc()->GetAccountTable().id, ch->GetPlayerID(), ch->GetLevel(), ch->GetJob(), ch->GetRealPoint(POINT_PLAYTIME)); - } } d->SetPhase(PHASE_LOADING); @@ -2414,14 +2408,11 @@ void CInputDB::GuildChangeMaster(TPacketChangeGuildMaster* p) void CInputDB::DetailLog(const TPacketNeedLoginLogInfo* info) { - if (true == LC_IsEurope() || true == LC_IsYMIR() || true == LC_IsKorea() ) - { - LPCHARACTER pChar = CHARACTER_MANAGER::instance().FindByPID( info->dwPlayerID ); + LPCHARACTER pChar = CHARACTER_MANAGER::instance().FindByPID( info->dwPlayerID ); - if (NULL != pChar) - { - LogManager::instance().DetailLoginLog(true, pChar); - } + if (NULL != pChar) + { + LogManager::instance().DetailLoginLog(true, pChar); } } diff --git a/src/game/src/input_login.cpp b/src/game/src/input_login.cpp index f6b9ad3..d60747c 100644 --- a/src/game/src/input_login.cpp +++ b/src/game/src/input_login.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" #include "constants.h" -#include #include "config.h" #include "utils.h" #include "input.h" @@ -91,7 +90,7 @@ void CInputLogin::Login(LPDESC d, const char * data) TPacketGCLoginFailure failurePacket; - if (g_iUseLocale && !test_server) + if (!test_server) { failurePacket.header = HEADER_GC_LOGIN_FAILURE; strlcpy(failurePacket.szStatus, "VERSION", sizeof(failurePacket.szStatus)); @@ -431,33 +430,20 @@ void CInputLogin::CharacterCreate(LPDESC d, const char * data) // 사용할 수 없는 이름이거나, 잘못된 평상복이면 생설 실패 if (!check_name(pinfo->name) || pinfo->shape > 1) { - if (LC_IsCanada() == true) - { - TPacketGCCreateFailure pack; - pack.header = HEADER_GC_CHARACTER_CREATE_FAILURE; - pack.bType = 1; - - d->Packet(&pack, sizeof(pack)); - return; - } - d->Packet(&packFailure, sizeof(packFailure)); return; } - if (LC_IsEurope() == true) + const TAccountTable & c_rAccountTable = d->GetAccountTable(); + + if (0 == strcmp(c_rAccountTable.login, pinfo->name)) { - const TAccountTable & c_rAccountTable = d->GetAccountTable(); + TPacketGCCreateFailure pack; + pack.header = HEADER_GC_CHARACTER_CREATE_FAILURE; + pack.bType = 1; - if (0 == strcmp(c_rAccountTable.login, pinfo->name)) - { - TPacketGCCreateFailure pack; - pack.header = HEADER_GC_CHARACTER_CREATE_FAILURE; - pack.bType = 1; - - d->Packet(&pack, sizeof(pack)); - return; - } + d->Packet(&pack, sizeof(pack)); + return; } memset(&player_create_packet, 0, sizeof(TPlayerCreatePacket)); @@ -469,8 +455,6 @@ void CInputLogin::CharacterCreate(LPDESC d, const char * data) return; } - const TAccountTable & c_rAccountTable = d->GetAccountTable(); - trim_and_lower(c_rAccountTable.login, player_create_packet.login, sizeof(player_create_packet.login)); strlcpy(player_create_packet.passwd, c_rAccountTable.passwd, sizeof(player_create_packet.passwd)); @@ -620,52 +604,42 @@ void CInputLogin::Entergame(LPDESC d, const char * data) SPDLOG_DEBUG("PREMIUM: {} type {} {}min", ch->GetName(), i, remain); } - if (LC_IsEurope()) + if (g_bCheckClientVersion) { - if (g_bCheckClientVersion) + int version = atoi(g_stClientVersion.c_str()); + int date = atoi(d->GetClientVersion()); + + SPDLOG_DEBUG("VERSION CHECK {} {} {} {}", version, date, g_stClientVersion.c_str(), d->GetClientVersion()); + + if (!d->GetClientVersion()) { - int version = atoi(g_stClientVersion.c_str()); - int date = atoi(d->GetClientVersion()); - - SPDLOG_DEBUG("VERSION CHECK {} {} {} {}", version, date, g_stClientVersion.c_str(), d->GetClientVersion()); - - if (!d->GetClientVersion()) - { - d->DelayedDisconnect(10); - } - else - { - //if (0 != g_stClientVersion.compare(d->GetClientVersion())) - if (version > date) - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You do not have the correct client version. Please install the normal patch.")); - d->DelayedDisconnect(10); - LogManager::instance().HackLog("VERSION_CONFLICT", ch); - - SPDLOG_WARN("VERSION : WRONG VERSION USER : account:{} name:{} hostName:{} server_version:{} client_version:{}", - d->GetAccountTable().login, - ch->GetName(), - d->GetHostName(), - g_stClientVersion.c_str(), - d->GetClientVersion()); - } - } + d->DelayedDisconnect(10); } else { - SPDLOG_WARN("VERSION : NO CHECK"); + //if (0 != g_stClientVersion.compare(d->GetClientVersion())) + if (version > date) + { + ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You do not have the correct client version. Please install the normal patch.")); + d->DelayedDisconnect(10); + LogManager::instance().HackLog("VERSION_CONFLICT", ch); + + SPDLOG_WARN("VERSION : WRONG VERSION USER : account:{} name:{} hostName:{} server_version:{} client_version:{}", + d->GetAccountTable().login, + ch->GetName(), + d->GetHostName(), + g_stClientVersion.c_str(), + d->GetClientVersion()); + } } } else { - SPDLOG_WARN("VERSION : NO LOGIN"); + SPDLOG_WARN("VERSION : NO CHECK"); } - if (LC_IsEurope() == true) - { - if (ch->IsGM() == true) - ch->ChatPacket(CHAT_TYPE_COMMAND, "ConsoleEnable"); - } + if (ch->IsGM() == true) + ch->ChatPacket(CHAT_TYPE_COMMAND, "ConsoleEnable"); if (ch->GetMapIndex() >= 10000) { @@ -752,19 +726,6 @@ void CInputLogin::Entergame(LPDESC d, const char * data) } } - // 청소년 보호 - if (g_TeenDesc) // RawPacket 사용 금지 - { - TPacketGTLogin p; - - p.header = HEADER_GT_LOGIN; - p.empty = 0; - p.id = d->GetAccountTable().id; - - g_TeenDesc->Packet(&p, sizeof(p)); - SPDLOG_DEBUG("TEEN_SEND: ({}, {})", d->GetAccountTable().id, ch->GetName()); - } - if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); diff --git a/src/game/src/input_main.cpp b/src/game/src/input_main.cpp index 62f48bc..a97934b 100644 --- a/src/game/src/input_main.cpp +++ b/src/game/src/input_main.cpp @@ -411,10 +411,7 @@ int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes) return iExtraLen; } - if (LC_IsCanada() == false) - { - CBanwordManager::instance().ConvertString(buf, buflen); - } + CBanwordManager::instance().ConvertString(buf, buflen); if (g_bEmpireWhisper) if (!ch->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE)) @@ -495,11 +492,6 @@ int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes) tmpbuf.write(buf, buflen); pkDesc->Packet(tmpbuf.read_peek(), tmpbuf.size()); - - if (LC_IsEurope() != true) - { - SPDLOG_DEBUG("WHISPER: {} -> {} : {}", ch->GetName(), pinfo->szNameTo, buf); - } } } } @@ -695,10 +687,7 @@ int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes) LogManager::instance().ShoutLog(g_bChannel, ch->GetEmpire(), chatbuf); } - if (LC_IsCanada() == false) - { - CBanwordManager::instance().ConvertString(buf, buflen); - } + CBanwordManager::instance().ConvertString(buf, buflen); if (len < 0 || len >= (int) sizeof(chatbuf)) len = sizeof(chatbuf) - 1; @@ -722,7 +711,7 @@ int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes) if (pinfo->type == CHAT_TYPE_SHOUT) { - const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3; + const int SHOUT_LIMIT_LEVEL = 15; if (ch->GetLevel() < SHOUT_LIMIT_LEVEL) { @@ -1539,14 +1528,6 @@ void CInputMain::Move(LPCHARACTER ch, const char * data) if (((false == ch->IsRiding() && fDist > 25) || fDist > 40) && OXEVENT_MAP_INDEX != ch->GetMapIndex()) { - if( false == LC_IsEurope() ) - { - const PIXEL_POSITION & warpPos = ch->GetWarpPosition(); - - if (warpPos.x == 0 && warpPos.y == 0) - LogManager::instance().HackLog("Teleport", ch); // 부정확할 수 있음 - } - SPDLOG_WARN("MOVE: {} trying to move too far (dist: {:.1f}m) Riding({})", ch->GetName(), fDist, ch->IsRiding()); ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ()); @@ -2436,14 +2417,7 @@ void CInputMain::AnswerMakeGuild(LPCHARACTER ch, const char* c_pData) int GuildCreateFee; - if (LC_IsBrazil()) - { - GuildCreateFee = 500000; - } - else - { - GuildCreateFee = 200000; - } + GuildCreateFee = 200000; ch->PointChange(POINT_GOLD, -GuildCreateFee); DBManager::instance().SendMoneyLog(MONEY_LOG_GUILD, ch->GetPlayerID(), -GuildCreateFee); @@ -2452,9 +2426,7 @@ void CInputMain::AnswerMakeGuild(LPCHARACTER ch, const char* c_pData) snprintf(Log, sizeof(Log), "GUILD_NAME %s MASTER %s", cp.name, ch->GetName()); LogManager::instance().CharLog(ch, 0, "MAKE_GUILD", Log); - if (g_iUseLocale) - ch->RemoveSpecifyItem(GUILD_CREATE_ITEM_VNUM, 1); - //ch->SendGuildName(dwGuildID); + ch->RemoveSpecifyItem(GUILD_CREATE_ITEM_VNUM, 1); } else ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Creation of the guild has failed.")); @@ -2606,15 +2578,6 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes) if (!ch->IsPC()) return SubPacketLen; - if (LC_IsCanada() == true) - { - if (newmember->GetQuestFlag("change_guild_master.be_other_member") > get_global_time()) - { - ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] This character can't join yet")); - return SubPacketLen; - } - } - pGuild->Invite(ch, newmember); } return SubPacketLen; @@ -2651,11 +2614,6 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes) member->SetQuestFlag("guild_manage.new_withdraw_time", get_global_time()); pGuild->RequestRemoveMember(member->GetPlayerID()); - - if (LC_IsBrazil() == true) - { - DBManager::instance().Query("REPLACE INTO guild_invite_limit VALUES(%d, %d)", pGuild->GetID(), get_global_time()); - } } else { @@ -2728,7 +2686,7 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes) { DWORD offer = *reinterpret_cast(c_pData); - if (pGuild->GetLevel() >= GUILD_MAX_LEVEL && LC_IsHongKong() == false) + if (pGuild->GetLevel() >= GUILD_MAX_LEVEL) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Your guild is already the highest level.")); } @@ -3050,28 +3008,17 @@ int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData) case HEADER_CG_MOVE: Move(ch, c_pData); - if (LC_IsEurope()) + if (g_bCheckClientVersion) { - if (g_bCheckClientVersion) - { - int version = atoi(g_stClientVersion.c_str()); - int date = atoi(d->GetClientVersion()); + int version = atoi(g_stClientVersion.c_str()); + int date = atoi(d->GetClientVersion()); - //if (0 != g_stClientVersion.compare(d->GetClientVersion())) - if (version > date) - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You do not have the correct client version. Please install the normal patch.")); - d->DelayedDisconnect(10); - LogManager::instance().HackLog("VERSION_CONFLICT", d->GetAccountTable().login, ch->GetName(), d->GetHostName()); - } - } - } - else - { - if (!*d->GetClientVersion()) - { - SPDLOG_ERROR("Version not recieved name {}", ch->GetName()); - d->SetPhase(PHASE_CLOSE); + //if (0 != g_stClientVersion.compare(d->GetClientVersion())) + if (version > date) + { + ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You do not have the correct client version. Please install the normal patch.")); + d->DelayedDisconnect(10); + LogManager::instance().HackLog("VERSION_CONFLICT", d->GetAccountTable().login, ch->GetName(), d->GetHostName()); } } break; diff --git a/src/game/src/input_p2p.cpp b/src/game/src/input_p2p.cpp index 87c0225..0de7eab 100644 --- a/src/game/src/input_p2p.cpp +++ b/src/game/src/input_p2p.cpp @@ -329,12 +329,7 @@ void CInputP2P::XmasWarpSanta(const char * c_pData) if (p->bChannel == g_bChannel && map_allow_find(p->lMapIndex)) { - int iNextSpawnDelay = 60; - - if (LC_IsYMIR()) - iNextSpawnDelay = 20 * 60; - else - iNextSpawnDelay = 50 * 60; + int iNextSpawnDelay = 50 * 60; xmas::SpawnSanta(p->lMapIndex, iNextSpawnDelay); // 50분있다가 새로운 산타가 나타남 (한국은 20분) diff --git a/src/game/src/input_teen.cpp b/src/game/src/input_teen.cpp deleted file mode 100644 index ea4d8b5..0000000 --- a/src/game/src/input_teen.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/********************************************************************* - * date : 2007.06.07 - * file : input_teen.cpp - * author : mhh - * description : - */ - -#define _input_teen_cpp_ - -#include "stdafx.h" -#include "constants.h" -#include -#include "input.h" -#include "desc.h" -#include "desc_manager.h" -#include "db.h" -#include "protocol.h" -#include "char.h" - -#define HANDSHAKE_XOR 0x6AB3D224 - -void CInputTeen::SetStep(int step) -{ - m_step = step; -} - -bool CInputTeen::Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed) -{ - switch (m_step) - { - case 0: - return this->ProcessHandshake(lpDesc, c_pvOrig, iBytes, r_iBytesProceed); - break; - case 1: - return this->ProcessMain(lpDesc, c_pvOrig, iBytes, r_iBytesProceed); - break; - } - return false; -} /* end of CInputTeen::Process() */ - -bool CInputTeen::ProcessHandshake(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed) -{ - const char *c_pData = (const char*) c_pvOrig; - size_t packet_len = sizeof(DWORD); - - if (uiBytes < packet_len) - return false; - - DWORD handshake = decode_4bytes(c_pData); - - c_pData += packet_len; - m_iBufferLeft -= packet_len; - r_iBytesProceed += packet_len; - - this->SetStep(1); - - char buf[256]; - *((DWORD *) buf) = handshake ^ HANDSHAKE_XOR; - lpDesc->Packet(buf, sizeof(DWORD)); - - return true; -} - - -static int __packet_len(BYTE header) -{ - const int header_size = sizeof(BYTE) + sizeof(WORD); - - switch (header) - { - case HEADER_TG_TEEN_NOTICE: return (header_size + LOGIN_MAX_LEN + 4); - case HEADER_TG_FORCE_LOGOUT: return (header_size + LOGIN_MAX_LEN); - case HEADER_TG_LOGIN_NOTICE: return (header_size + LOGIN_MAX_LEN + 4 + 4); - } - return 0; -} - - -static void __proc_teen_notice(char *login, int hour) -{ - LPDESC desc = DESC_MANAGER::instance().FindByLoginName(login); - if (NULL==desc) return; - - LPCHARACTER ch = desc->GetCharacter(); - if (NULL==ch) return; - - switch (hour) - { - case 0: - { - SET_OVER_TIME(ch, OT_NONE); - return; - } - break; - case 1: - case 2: - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time is already %d hours."), hour); - SET_OVER_TIME(ch, OT_NONE); - } - break; - case 3: - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time has already reached %d hours,"), hour); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Please disconnect as soon as possible and get some rest for your health.")); - SET_OVER_TIME(ch, OT_3HOUR); - } - break; - case 4: - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You have already entered game fatigue,")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("your in-game earnings are reduced to 50%% of normal.")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("For your own health, please disconnect as soon as possible")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("and focus on resting and studying.")); - SET_OVER_TIME(ch, OT_3HOUR); - } - break; - default: - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You have already entered an unhealthy game time.")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("For your health, please disconnect and rest as soon as possible,")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("otherwise you may suffer health damage and your in-game numbers will be zeroed out.")); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You will return to normal when your cumulative offline time reaches 5 hours.")); - SET_OVER_TIME(ch, OT_5HOUR); - } - break; - } -} - -static inline void __sec_to_timestring(int sec, char *buf, size_t buflen) -{ - int hour = (sec/60)/60; - int min = (sec/60); - - if (hour>0) - snprintf(buf, buflen, LC_TEXT("%dh"), hour); - else - snprintf(buf, buflen, LC_TEXT("%dm"), min); -} - -static void __proc_login_notice(char *login, int on_time, int off_time) -{ - //{ check player's name - LPDESC desc = DESC_MANAGER::instance().FindByLoginName(login); - if (NULL==desc) return; - - LPCHARACTER ch = desc->GetCharacter(); - if (NULL==ch) return; - //} check player's name - - char on_time_string[64]; - char off_time_string[64]; - - __sec_to_timestring(on_time, on_time_string, sizeof(on_time_string)); - __sec_to_timestring(off_time, off_time_string, sizeof(off_time_string)); - - if (0==on_time) - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative offline time is %s."), off_time_string); - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time is now zero. You are 100%% effective.")); - return; - } - else - { - ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative offline time is %s, and your cumulative online time is %s."), - off_time_string, on_time_string); - } -} - - -static void __input_teen(BYTE header, WORD desc_num, char *body) -{ - switch (header) - { - case HEADER_TG_FORCE_LOGOUT: - { - char *data = body; - char login[LOGIN_MAX_LEN+1] = {0}; - memcpy(login, data, LOGIN_MAX_LEN); - data += LOGIN_MAX_LEN; - LPDESC d = DESC_MANAGER::instance().FindByLoginName(login); - - if (NULL==d) - return; - - d->SetPhase(PHASE_CLOSE); - } - break; - case HEADER_TG_TEEN_NOTICE: - { - char *data = body; - char login[LOGIN_MAX_LEN+1] = {0}; - memcpy(login, data, LOGIN_MAX_LEN); - data += LOGIN_MAX_LEN; - int hour = decode_4bytes(data); - data += 4; - - __proc_teen_notice(login, hour); - } - break; - case HEADER_TG_LOGIN_NOTICE: - { - char *data = body; - char login[LOGIN_MAX_LEN+1] = {0}; - memcpy(login, data, LOGIN_MAX_LEN); - data += LOGIN_MAX_LEN; - int on_time = decode_4bytes(data); - data += 4; - int off_time = decode_4bytes(data); - data += 4; - - __proc_login_notice(login, on_time, off_time); - } - break; - } -} - - -bool CInputTeen::ProcessMain(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed) -{ - const char *c_pData = (const char*) c_pvOrig; - const size_t header_size = sizeof(BYTE) + sizeof(WORD); - - if (uiBytes < header_size) - return false; - - for (m_iBufferLeft = uiBytes; m_iBufferLeft > 0;) - { - BYTE header = decode_byte(c_pData); - WORD desc_num = decode_2bytes(c_pData+sizeof(BYTE)); - char *body = (char*) c_pData + header_size; - - int packet_len = __packet_len(header); - - if (m_iBufferLeft < packet_len) - return true; - - c_pData += packet_len; - m_iBufferLeft -= packet_len; - r_iBytesProceed += packet_len; - - __input_teen(header, desc_num, body); - } - - return true; -} - diff --git a/src/game/src/item.cpp b/src/game/src/item.cpp index b604459..7fa631f 100644 --- a/src/game/src/item.cpp +++ b/src/game/src/item.cpp @@ -1085,11 +1085,8 @@ void CItem::SetOwnership(LPCHARACTER ch, int iSec) if (m_pkOwnershipEvent) return; - if (true == LC_IsEurope()) - { - if (iSec <= 10) - iSec = 30; - } + if (iSec <= 10) + iSec = 30; m_dwOwnershipPID = ch->GetPlayerID(); @@ -1154,60 +1151,31 @@ void CItem::AlterToMagicItem() int iSecondPct; int iThirdPct; - if (g_iUseLocale) + switch (GetType()) { - switch (GetType()) - { - case ITEM_WEAPON: - iSecondPct = 20; - iThirdPct = 5; - break; + case ITEM_WEAPON: + iSecondPct = 20; + iThirdPct = 5; + break; - case ITEM_ARMOR: - case ITEM_COSTUME: - if (GetSubType() == ARMOR_BODY) - { - iSecondPct = 10; - iThirdPct = 2; - } - else - { - iSecondPct = 10; - iThirdPct = 1; - } - break; + case ITEM_ARMOR: + case ITEM_COSTUME: + if (GetSubType() == ARMOR_BODY) + { + iSecondPct = 10; + iThirdPct = 2; + } + else + { + iSecondPct = 10; + iThirdPct = 1; + } + break; - default: - return; - } - } - else - { - switch (GetType()) - { - case ITEM_WEAPON: - iSecondPct = 30; - iThirdPct = 15; - break; - - case ITEM_ARMOR: - case ITEM_COSTUME: - if (GetSubType() == ARMOR_BODY) - { - iSecondPct = 20; - iThirdPct = 10; - } - else - { - iSecondPct = 10; - iThirdPct = 5; - } - break; - - default: - return; - } + default: + return; } + // 100% 확률로 좋은 속성 하나 PutAttribute(aiItemMagicAttributePercentHigh); diff --git a/src/game/src/item_manager.cpp b/src/game/src/item_manager.cpp index 09912a4..2846e98 100644 --- a/src/game/src/item_manager.cpp +++ b/src/game/src/item_manager.cpp @@ -151,29 +151,6 @@ LPITEM ITEM_MANAGER::CreateItem(DWORD vnum, DWORD count, DWORD id, bool bTryMagi dwMaskVnum = GetMaskVnum(vnum); } - if (LC_IsKorea() || LC_IsYMIR()) - { - if (vnum == 50300 && bTryMagic) - { - // 수련서를 아이템 번호를 다르게 만들어 준다. - DWORD dwSkillVnum; - - do - { - dwSkillVnum = Random::get(1, 111); - - CSkillProto * pkSk = CSkillManager::instance().Get(dwSkillVnum); - - if (!pkSk) - continue; - - break; - } while (1); - - vnum = 50400 + dwSkillVnum; - } - } - const TItemTable* table = GetTable(vnum); if (NULL == table) @@ -768,7 +745,7 @@ int GetDropPerKillPct(int iMinimum, int iDefault, int iDeltaPercent, const char if ((iVal = quest::CQuestManager::instance().GetEventFlag(c_pszFlag))) { - if (!test_server && !LC_IsJapan()) + if (!test_server) { if (iVal < iMinimum) iVal = iDefault; @@ -1055,55 +1032,6 @@ bool ITEM_MANAGER::CreateDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, std:: DBManager::instance().SendMoneyLog(MONEY_LOG_DROP, item->GetVnum(), item->GetCount()); } - // - // 승룡곡 천의동굴 2층에서만 수룡방 입장권 - // - if (LC_IsYMIR() || LC_IsKorea()) - { - if (73 == pkKiller->GetMapIndex()) - { - int per = 25; // 0.25% - if (Random::get(1, 10000) <= per) - { - LPITEM item = 0; - if ((item = CreateItem(71122, 1, 0, true))) - vec_item.push_back(item); - } - } - } - - // - // 승룡곡 1층, 2층에서만 7,8 스킬입문서 드롭 - // - if (LC_IsYMIR() || LC_IsKorea()) - { - switch (pkKiller->GetMapIndex()) - { - case 72: // 천의동굴 1층 - case 73: // 천의동굴 2층 - { - int vnum = 0; - - if (2403 == pkChr->GetRaceNum()) // 천의법사 - vnum = 69200; // 7스킬 입문서 - else if (2411 == pkChr->GetRaceNum()) // 진천의병사 - vnum = 69201; // 8스킬 입문서 - else - break; - - int per = 5; // 0.05% - if (Random::get(1, 10000) <= per) - { - LPITEM item = 0; - item = CreateItem(vnum, 1, 0, true); - if (item) - vec_item.push_back(item); - } - } - break; - } - } - return vec_item.size(); } @@ -1175,9 +1103,6 @@ static void __DropEvent_CharStone_DropItem(CHARACTER & killer, CHARACTER & victi int MaxRange = 10000; - if (LC_IsCanada() == true) - MaxRange = 20000; - if (Random::get(1, MaxRange) <= dropPercent) { int victim_level = victim.GetLevel(); @@ -1386,16 +1311,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, // 크리스마스 양말 if (quest::CQuestManager::instance().GetEventFlag("xmas_sock")) { - //const DWORD SOCK_ITEM_VNUM = 50010; - DWORD SOCK_ITEM_VNUM = 0; - if (LC_IsKorea() || LC_IsYMIR()) - { - SOCK_ITEM_VNUM = (Random::get(1,100)<=50) ? 50010 : 71111; - } - else - { - SOCK_ITEM_VNUM = 50010; - } + const DWORD SOCK_ITEM_VNUM = 50010; int iDropPerKill[MOB_RANK_MAX_NUM] = { @@ -1411,12 +1327,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, { int iPercent = 40000 * iDeltaPercent / iDropPerKill[pkChr->GetMobRank()]; - if ( LC_IsHongKong() ) - { - iPercent *= 10; - } - - SPDLOG_DEBUG("SOCK DROP {} {}", iPercent, iRandRange); + SPDLOG_DEBUG("SOCK DROP {} {}", iPercent, iRandRange); if (iPercent >= Random::get(1, iRandRange)) { if ((item = CreateItem(SOCK_ITEM_VNUM, 1, 0, true))) @@ -1452,27 +1363,24 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } } - if (LC_IsEurope()) + if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5) { - if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5) + int pct = quest::CQuestManager::instance().GetEventFlag("hc_drop"); + + if (pct > 0) { - int pct = quest::CQuestManager::instance().GetEventFlag("hc_drop"); + const DWORD ITEM_VNUM = 30178; - if (pct > 0) + if (Random::get(1,100) <= pct) { - const DWORD ITEM_VNUM = 30178; - - if (Random::get(1,100) <= pct) - { - if ((item = CreateItem(ITEM_VNUM, 1, 0, true))) - vec_item.push_back(item); - } + if ((item = CreateItem(ITEM_VNUM, 1, 0, true))) + vec_item.push_back(item); } } } //육각보합 - if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "2006_drop") >= Random::get(1, iRandRange)) + if (GetDropPerKillPct(100, 2000, iDeltaPercent, "2006_drop") >= Random::get(1, iRandRange)) { SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT "); @@ -1484,7 +1392,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } //육각보합+ - if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "2007_drop") >= Random::get(1, iRandRange)) + if (GetDropPerKillPct(100, 2000, iDeltaPercent, "2007_drop") >= Random::get(1, iRandRange)) { SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT "); @@ -1498,7 +1406,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, if (GetDropPerKillPct(/* minimum */ 100, /* default */ 1000, iDeltaPercent, "newyear_fire") >= Random::get(1, iRandRange)) { // 중국은 폭죽, 한국 팽이 - const DWORD ITEM_VNUM_FIRE = g_iUseLocale ? 50107 : 50108; + const DWORD ITEM_VNUM_FIRE = 50107; if ((item = CreateItem(ITEM_VNUM_FIRE, 1, 0, true))) vec_item.push_back(item); @@ -1517,7 +1425,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } // 발렌타인 데이 이벤트. OGE의 요구에 따라 event 최소값을 1로 변경.(다른 이벤트는 일단 그대로 둠.) - if (GetDropPerKillPct(1, g_iUseLocale ? 2000 : 800, iDeltaPercent, "valentine_drop") >= Random::get(1, iRandRange)) + if (GetDropPerKillPct(1, 2000, iDeltaPercent, "valentine_drop") >= Random::get(1, iRandRange)) { SPDLOG_DEBUG("EVENT VALENTINE_DROP"); @@ -1529,7 +1437,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } // 아이스크림 이벤트 - if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "icecream_drop") >= Random::get(1, iRandRange)) + if (GetDropPerKillPct(100, 2000, iDeltaPercent, "icecream_drop") >= Random::get(1, iRandRange)) { const static DWORD icecream = 50123; @@ -1558,7 +1466,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, // vec_item.push_back(item); //} - if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "halloween_drop") >= Random::get(1, iRandRange) ) + if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "halloween_drop") >= Random::get(1, iRandRange) ) { const static DWORD halloween_item = 30321; @@ -1566,7 +1474,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, vec_item.push_back(item); } - if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "ramadan_drop") >= Random::get(1, iRandRange) ) + if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "ramadan_drop") >= Random::get(1, iRandRange) ) { const static DWORD ramadan_item = 30315; @@ -1574,7 +1482,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, vec_item.push_back(item); } - if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "easter_drop") >= Random::get(1, iRandRange) ) + if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "easter_drop") >= Random::get(1, iRandRange) ) { const static DWORD easter_item_base = 50160; @@ -1583,7 +1491,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } // 월드컵 이벤트 - if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "football_drop") >= Random::get(1, iRandRange) ) + if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "football_drop") >= Random::get(1, iRandRange) ) { const static DWORD football_item = 50096; @@ -1592,7 +1500,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, } // 화이트 데이 이벤트 - if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "whiteday_drop") >= Random::get(1, iRandRange)) + if (GetDropPerKillPct(100, 2000, iDeltaPercent, "whiteday_drop") >= Random::get(1, iRandRange)) { SPDLOG_DEBUG("EVENT WHITEDAY_DROP"); const static DWORD whiteday_items[2] = { ITEM_WHITEDAY_ROSE, ITEM_WHITEDAY_CANDY }; diff --git a/src/game/src/item_manager_read_tables.cpp b/src/game/src/item_manager_read_tables.cpp index 97a4dc7..69586be 100644 --- a/src/game/src/item_manager_read_tables.cpp +++ b/src/game/src/item_manager_read_tables.cpp @@ -495,14 +495,7 @@ bool ITEM_MANAGER::ReadMonsterDropItemGroup(const char * c_pszFileName) if (strncmp (stName.c_str(), "kr_", 3) == 0) { - if (LC_IsYMIR()) - { - stName.assign(stName, 3, stName.size() - 3); - } - else - { - continue; - } + continue; } loader.SetChildNode(i); diff --git a/src/game/src/locale.cpp b/src/game/src/locale.cpp index 8477317..3a9a740 100644 --- a/src/game/src/locale.cpp +++ b/src/game/src/locale.cpp @@ -20,7 +20,7 @@ void locale_add(const char **strings) const char * locale_find(const char *string) { - if (0 == g_iUseLocale || LC_IsKorea() || LC_IsWE_Korea()) + if (0 == g_iUseLocale) { return (string); } diff --git a/src/game/src/locale_service.cpp b/src/game/src/locale_service.cpp index fde3eb7..aa85c81 100644 --- a/src/game/src/locale_service.cpp +++ b/src/game/src/locale_service.cpp @@ -390,18 +390,6 @@ void LocaleService_LoadEmpireTextConvertTables() } } -static void __LocaleService_Init_DEFAULT() -{ - g_stLocaleFilename = ""; - - g_stServiceBasePath = "locale/" + g_stServiceName; - g_stServiceMapPath = g_stServiceBasePath + "/map"; - g_stQuestDir = g_stServiceBasePath + "/quest"; - - g_setQuestObjectDir.clear(); - g_setQuestObjectDir.insert(g_stQuestDir + "/object"); -} - static void __LocaleService_Init_JAPAN() { g_stLocale = "sjis"; @@ -431,7 +419,6 @@ static void __LocaleService_Init_English() g_setQuestObjectDir.insert("locale/english/quest/object"); g_stLocaleFilename = "locale/english/locale_string.txt"; - g_iUseLocale = true; check_name = check_name_alphabet; } @@ -978,6 +965,11 @@ static void __LocaleService_Init_Taiwan() PK_PROTECT_LEVEL = 15; } +static void __LocaleService_Init_DEFAULT() +{ + __LocaleService_Init_English(); +} + static void __CheckPlayerSlot(const std::string& service_name) { if (PLAYER_PER_ACCOUNT != 4) @@ -1263,67 +1255,3 @@ eLocalization LC_GetLocalType() { return g_eLocalType; } - -bool LC_IsLocale( const eLocalization t ) -{ - return LC_GetLocalType() == t ? true : false; -} - -bool LC_IsYMIR() { return LC_GetLocalType() == LC_YMIR ? true : false; } -bool LC_IsJapan() { return LC_GetLocalType() == LC_JAPAN ? true : false; } -bool LC_IsEnglish() { return LC_GetLocalType() == LC_ENGLISH ? true : false; } -bool LC_IsHongKong() { return LC_GetLocalType() == LC_HONGKONG ? true : false; } -bool LC_IsNewCIBN() { return LC_GetLocalType() == LC_NEWCIBN ? true : false; } -bool LC_IsGermany() { return LC_GetLocalType() == LC_GERMANY ? true : false; } -bool LC_IsKorea() { return LC_GetLocalType() == LC_KOREA ? true : false; } -bool LC_IsCanada() { return LC_GetLocalType() == LC_CANADA ? false : false; } -bool LC_IsBrazil() { return LC_GetLocalType() == LC_BRAZIL ? true : false; } -bool LC_IsSingapore() { return LC_GetLocalType() == LC_SINGAPORE ? true : false; } -bool LC_IsVietnam() { return LC_GetLocalType() == LC_VIETNAM ? true : false; } -bool LC_IsThailand() { return LC_GetLocalType() == LC_THAILAND ? true : false; } -bool LC_IsWE_Korea() { return LC_GetLocalType() == LC_WE_KOREA ? true : false; } -bool LC_IsTaiwan() { return LC_GetLocalType() == LC_TAIWAN ? true : false; } - -bool LC_IsWorldEdition() -{ - return LC_IsWE_Korea() || LC_IsEurope(); -} - -bool LC_IsEurope() -{ - eLocalization val = LC_GetLocalType(); - - switch ((int) val) - { - case LC_ENGLISH: - case LC_GERMANY: - case LC_FRANCE: - case LC_ITALY: - case LC_TURKEY: - case LC_POLAND: - case LC_UK: - case LC_SPAIN: - case LC_PORTUGAL: - case LC_GREEK: - case LC_RUSSIA: - case LC_DENMARK: - case LC_BULGARIA: - case LC_CROATIA: - case LC_MEXICO: // 남미지만 GF에서 서비스 하므로 여기 넣음 - case LC_ARABIA: // 중동이지만 GF에서 서비스 하므로 여기 넣음 - case LC_CZECH: - case LC_ROMANIA: - case LC_HUNGARY: - case LC_NETHERLANDS: - case LC_USA: - case LC_WE_KOREA: // 한국이지만 UK 버전 기반이므로 여기 넣음 - case LC_TAIWAN: // 대만이지만 WE_KOREA 버전 기반이므로 여기 넣음 - case LC_JAPAN: // 일본이지만 WE(World Edition -_-) 버전이므로 여기 넣음 - case LC_NEWCIBN: - case LC_CANADA: // 캐나다 GF에서 서비스 시작 - return true; - } - - return false; -} - diff --git a/src/game/src/log.cpp b/src/game/src/log.cpp index 6aa1671..c1e8241 100644 --- a/src/game/src/log.cpp +++ b/src/game/src/log.cpp @@ -219,7 +219,6 @@ void LogManager::ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText) void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour) { - if (true == LC_IsEurope()) { DWORD aid = 0; @@ -231,11 +230,6 @@ void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int pl Query("REPLACE INTO levellog%s (name, level, time, account_id, pid, playtime) VALUES('%s', %u, NOW(), %u, %u, %d)", get_table_postfix(), pChar->GetName(), level, aid, pChar->GetPlayerID(), playhour); } - else - { - Query("REPLACE INTO levellog%s (name, level, time, playtime) VALUES('%s', %u, NOW(), %d)", - get_table_postfix(), pChar->GetName(), level, playhour); - } } void LogManager::BootLog(const char * c_pszHostName, BYTE bChannel) diff --git a/src/game/src/main.cpp b/src/game/src/main.cpp index 4425765..92ba44e 100644 --- a/src/game/src/main.cpp +++ b/src/game/src/main.cpp @@ -676,13 +676,10 @@ int start(int argc, char **argv) { SPDLOG_INFO("MasterAuth {}", (int) LC_GetLocalType()); } - } - /* game server to teen server */ + } + /* game server to spam server */ else { - if (teen_addr[0] && teen_port) - g_TeenDesc = DESC_MANAGER::instance().CreateConnectionDesc(ev_base, dns_base, teen_addr, teen_port, PHASE_TEEN, true); - extern unsigned int g_uiSpamBlockDuration; extern unsigned int g_uiSpamBlockScore; extern unsigned int g_uiSpamReloadCycle; diff --git a/src/game/src/p2p.cpp b/src/game/src/p2p.cpp index a596ce4..48759b6 100644 --- a/src/game/src/p2p.cpp +++ b/src/game/src/p2p.cpp @@ -141,10 +141,7 @@ void P2P_MANAGER::Login(LPDESC d, const TPacketGGLogin * p) UpdateP2P = true; pkCCI = M2_NEW CCI; - if (false == LC_IsBrazil()) - strlcpy(pkCCI->szName, p->szName, sizeof(pkCCI->szName)); - else - trim_and_lower(p->szName, pkCCI->szName, sizeof(pkCCI->szName)); + strlcpy(pkCCI->szName, p->szName, sizeof(pkCCI->szName)); pkCCI->dwPID = p->dwPID; pkCCI->bEmpire = p->bEmpire; @@ -231,19 +228,7 @@ CCI * P2P_MANAGER::FindByPID(DWORD pid) CCI * P2P_MANAGER::Find(const char * c_pszName) { - TCCIMap::const_iterator it; - - if( false == LC_IsBrazil() ) - { - it = m_map_pkCCI.find(c_pszName); - } - else - { - char szName[CHARACTER_NAME_MAX_LEN + 1]; - trim_and_lower(c_pszName, szName, sizeof(szName)); - - it = m_map_pkCCI.find(szName); - } + TCCIMap::const_iterator it = m_map_pkCCI.find(c_pszName); if (it == m_map_pkCCI.end()) return NULL; diff --git a/src/game/src/packet.h b/src/game/src/packet.h index be9e28a..e925e01 100644 --- a/src/game/src/packet.h +++ b/src/game/src/packet.h @@ -820,7 +820,6 @@ enum EPhase PHASE_DBCLIENT, PHASE_P2P, PHASE_AUTH, - PHASE_TEEN, }; typedef struct packet_phase diff --git a/src/game/src/party.cpp b/src/game/src/party.cpp index 469b647..063c809 100644 --- a/src/game/src/party.cpp +++ b/src/game/src/party.cpp @@ -1356,7 +1356,7 @@ void CParty::Update() bool bLongTimeExpBonusChanged = false; // 파티 결성 후 충분한 시간이 지나면 경험치 보너스를 받는다. - if (!m_iLongTimeExpBonus && (get_dword_time() - m_dwPartyStartTime > PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS * 60 * 1000 / (g_iUseLocale?1:2))) + if (!m_iLongTimeExpBonus && (get_dword_time() - m_dwPartyStartTime > PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS * 60 * 1000)) { bLongTimeExpBonusChanged = true; m_iLongTimeExpBonus = 5; @@ -1681,21 +1681,10 @@ int CParty::ComputePartyBonusExpPercent() if (leader && (leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP) || leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_MALL) || leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_GIFT) || leader->IsEquipUniqueGroup(10010))) { - // 중국측 육도 적용을 확인해야한다. - if (g_iUseLocale) - { - iBonusPartyExpFromItem = 30; - } - else - { - iBonusPartyExpFromItem = KOR_aiUniqueItemPartyBonusExpPercentByMemberCount[iMemberCount]; - } + iBonusPartyExpFromItem = 30; } - if (g_iUseLocale) - return iBonusPartyExpFromItem + CHN_aiPartyBonusExpPercentByMemberCount[iMemberCount]; - else - return iBonusPartyExpFromItem + KOR_aiPartyBonusExpPercentByMemberCount[iMemberCount]; + return iBonusPartyExpFromItem + CHN_aiPartyBonusExpPercentByMemberCount[iMemberCount]; // END_OF_UPGRADE_PARTY_BONUS } diff --git a/src/game/src/pvp.cpp b/src/game/src/pvp.cpp index e2b83f8..7fb961a 100644 --- a/src/game/src/pvp.cpp +++ b/src/game/src/pvp.cpp @@ -431,14 +431,6 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) if (pkChr->GetEmpire() != pkVictim->GetEmpire()) { - if ( LC_IsYMIR() == true || LC_IsKorea() == true ) - { - if ( pkChr->GetPKMode() == PK_MODE_PROTECT || pkVictim->GetPKMode() == PK_MODE_PROTECT ) - { - return false; - } - } - return true; } @@ -477,51 +469,19 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) if (pkChr->GetPKMode() == PK_MODE_REVENGE) { - //if (!g_iUseLocale) - if (1) + if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0) { - if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0) - { - pkChr->SetKillerMode(true); - return true; - } - else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() < 0) - return true; - } - else - { - if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0) - break; - else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() >= 0) - break; - - beKillerMode = true; + pkChr->SetKillerMode(true); + return true; } + else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() < 0) + return true; } break; case PK_MODE_GUILD: // Same implementation from PK_MODE_FREE except for attacking same guild if (!pkChr->GetGuild() || (pkVictim->GetGuild() != pkChr->GetGuild())) - { - if (1) - //if (!g_iUseLocale) - { - if (pkVictim->GetAlignment() >= 0) - pkChr->SetKillerMode(true); - else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0) - pkChr->SetKillerMode(true); - - return true; - } - else - beKillerMode = true; - } - break; - - case PK_MODE_FREE: - //if (!g_iUseLocale) - if (1) { if (pkVictim->GetAlignment() >= 0) pkChr->SetKillerMode(true); @@ -530,9 +490,15 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) return true; } - else - beKillerMode = true; break; + + case PK_MODE_FREE: + if (pkVictim->GetAlignment() >= 0) + pkChr->SetKillerMode(true); + else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0) + pkChr->SetKillerMode(true); + + return true; } } diff --git a/src/game/src/questlua.cpp b/src/game/src/questlua.cpp index 6e55692..4dc4fc4 100644 --- a/src/game/src/questlua.cpp +++ b/src/game/src/questlua.cpp @@ -510,7 +510,7 @@ namespace quest } } - if (LC_IsEurope()) + { char translateFileName[256]; snprintf(translateFileName, sizeof(translateFileName), "%s/translate.lua", LocaleService_GetBasePath().c_str()); @@ -526,14 +526,7 @@ namespace quest { char questLocaleFileName[256]; - if (LC_IsEurope()) - { - snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale.lua", g_stQuestDir.c_str()); - } - else - { - snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale_%s.lua", g_stQuestDir.c_str(), g_stLocale.c_str()); - } + snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale.lua", g_stQuestDir.c_str()); int questLocaleLoadingResult = lua_dofile(L, questLocaleFileName); SPDLOG_DEBUG("LoadQuestLocale({}), returns {}", questLocaleFileName, questLocaleLoadingResult); diff --git a/src/game/src/questlua_arena.cpp b/src/game/src/questlua_arena.cpp index 563d78c..5bc2c5c 100644 --- a/src/game/src/questlua_arena.cpp +++ b/src/game/src/questlua_arena.cpp @@ -5,8 +5,6 @@ #include "char_manager.h" #include "arena.h" -extern bool LC_IsCanada(); - namespace quest { int arena_start_duel(lua_State * L) @@ -39,15 +37,6 @@ namespace quest lua_pushnumber(L, 2); return 1; } - if (LC_IsCanada() == true) - { - if ( CArenaManager::instance().StartDuel(ch, ch2, nSetPoint, 10) == false ) - { - lua_pushnumber(L, 3); - return 1; - } - } - else { if ( CArenaManager::instance().StartDuel(ch, ch2, nSetPoint) == false ) { diff --git a/src/game/src/questlua_pc.cpp b/src/game/src/questlua_pc.cpp index 205831f..8d53904 100644 --- a/src/game/src/questlua_pc.cpp +++ b/src/game/src/questlua_pc.cpp @@ -2063,11 +2063,6 @@ teleport_area: // 3: 이미 같은 이름이 사용중 // 4: 성공 // 5: 해당 기능 지원하지 않음 - if ( LC_IsEurope() ) - { - lua_pushnumber(L, 5); - return 1; - } LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); diff --git a/src/game/src/questmanager.cpp b/src/game/src/questmanager.cpp index bc2d1dc..d1065f0 100644 --- a/src/game/src/questmanager.cpp +++ b/src/game/src/questmanager.cpp @@ -133,16 +133,8 @@ namespace quest m_mapNPC[0].Set(0, "notarget"); } - if (g_iUseLocale) - { - SetEventFlag("guild_withdraw_delay", 1); - SetEventFlag("guild_disband_delay", 1); - } - else - { - SetEventFlag("guild_withdraw_delay", 3); - SetEventFlag("guild_disband_delay", 7); - } + SetEventFlag("guild_withdraw_delay", 1); + SetEventFlag("guild_disband_delay", 1); return true; } @@ -1319,7 +1311,7 @@ namespace quest } } } - else if (name == "pre_event_hc" && true == LC_IsEurope()) + else if (name == "pre_event_hc") { const DWORD EventNPC = 20090; diff --git a/src/game/src/sectree_manager.cpp b/src/game/src/sectree_manager.cpp index 498d5af..202c8e1 100644 --- a/src/game/src/sectree_manager.cpp +++ b/src/game/src/sectree_manager.cpp @@ -76,67 +76,6 @@ LPSECTREE SECTREE_MAP::Find(DWORD x, DWORD y) void SECTREE_MAP::Build() { - // 클라이언트에게 반경 150m 캐릭터의 정보를 주기위해 - // 3x3칸 -> 5x5 칸으로 주변sectree 확대(한국) - if (LC_IsYMIR() || LC_IsKorea()) - { -#define NEIGHBOR_LENGTH 5 -#define NUM_OF_NEIGHBORS (NEIGHBOR_LENGTH * NEIGHBOR_LENGTH - 1) - int width = NEIGHBOR_LENGTH / 2; - struct neighbor_coord_s - { - int x; - int y; - } neighbor_coord[NUM_OF_NEIGHBORS]; - - { - int i = 0; - for (int x = -width; x <= width; ++x) - { - for (int y = -width; y <= width; ++y) - { - if (x == 0 && y == 0) - continue; - - neighbor_coord[i].x = x * SECTREE_SIZE; - neighbor_coord[i].y = y * SECTREE_SIZE; - ++i; - } - } - } - - // - // 모든 sectree에 대해 주위 sectree들 리스트를 만든다. - // - MapType::iterator it = map_.begin(); - - while (it != map_.end()) - { - LPSECTREE tree = it->second; - - tree->m_neighbor_list.push_back(tree); // 자신을 넣는다. - - SPDLOG_TRACE("{}x{}", (int) tree->m_id.coord.x, (int) tree->m_id.coord.y); - - int x = tree->m_id.coord.x * SECTREE_SIZE; - int y = tree->m_id.coord.y * SECTREE_SIZE; - - for (DWORD i = 0; i < NUM_OF_NEIGHBORS; ++i) - { - LPSECTREE tree2 = Find(x + neighbor_coord[i].x, y + neighbor_coord[i].y); - - if (tree2) - { - SPDLOG_TRACE(" {} {}x{}", i, (int) tree2->m_id.coord.x, (int) tree2->m_id.coord.y); - tree->m_neighbor_list.push_back(tree2); - } - } - - ++it; - } - } - else - { struct neighbor_coord_s { int x; @@ -181,7 +120,6 @@ void SECTREE_MAP::Build() ++it; } - } } SECTREE_MANAGER::SECTREE_MANAGER() diff --git a/src/game/src/shop.cpp b/src/game/src/shop.cpp index 4b55903..4547462 100644 --- a/src/game/src/shop.cpp +++ b/src/game/src/shop.cpp @@ -294,40 +294,21 @@ int CShop::Buy(LPCHARACTER ch, BYTE pos) DWORD dwTax = 0; int iVal = 0; - if (LC_IsYMIR() || LC_IsKorea()) - { - if (0 < (iVal = quest::CQuestManager::instance().GetEventFlag("trade_tax"))) - { - if (iVal > 100) - iVal = 100; - dwTax = dwPrice * iVal / 100; - dwPrice = dwPrice - dwTax; - } - else - { - iVal = 3; - dwTax = dwPrice * iVal / 100; - dwPrice = dwPrice - dwTax; - } + iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop"); + + if (0 < iVal) + { + if (iVal > 100) + iVal = 100; + + dwTax = dwPrice * iVal / 100; + dwPrice = dwPrice - dwTax; } else { - iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop"); - - if (0 < iVal) - { - if (iVal > 100) - iVal = 100; - - dwTax = dwPrice * iVal / 100; - dwPrice = dwPrice - dwTax; - } - else - { - iVal = 0; - dwTax = 0; - } + iVal = 0; + dwTax = 0; } // 상점에서 살?? 세금 5% diff --git a/src/game/src/shopEx.cpp b/src/game/src/shopEx.cpp index fedcd70..4137daa 100644 --- a/src/game/src/shopEx.cpp +++ b/src/game/src/shopEx.cpp @@ -218,18 +218,8 @@ int CShopEx::Buy(LPCHARACTER ch, BYTE pos) if (item) SPDLOG_DEBUG("ShopEx: BUY: name {} {}(x {}):{} price {}", ch->GetName(), item->GetName(), item->GetCount(), item->GetID(), dwPrice); - if (LC_IsBrazil()) - { - ch->SaveReal(); - db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD)); - DWORD pid = ch->GetPlayerID(); - db_clientdesc->Packet(&pid, sizeof(DWORD)); - } - else - { - ch->Save(); - } + ch->Save(); - return (SHOP_SUBHEADER_GC_OK); + return (SHOP_SUBHEADER_GC_OK); } diff --git a/src/game/src/shop_manager.cpp b/src/game/src/shop_manager.cpp index 0cb59ff..3ffca46 100644 --- a/src/game/src/shop_manager.cpp +++ b/src/game/src/shop_manager.cpp @@ -317,18 +317,10 @@ void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) DWORD dwTax = 0; int iVal = 3; - if (LC_IsYMIR() || LC_IsKorea()) - { - dwTax = dwPrice * iVal / 100; - dwPrice -= dwTax; - } - else - { - dwTax = dwPrice * iVal/100; - dwPrice -= dwTax; - } + dwTax = dwPrice * iVal/100; + dwPrice -= dwTax; - SPDLOG_TRACE("Sell Item price id {} {} itemid {}", ch->GetPlayerID(), ch->GetName(), item->GetID()); + SPDLOG_TRACE("Sell Item price id {} {} itemid {}", ch->GetPlayerID(), ch->GetName(), item->GetID()); const int64_t nTotalMoney = static_cast(ch->GetGold()) + static_cast(dwPrice); @@ -349,11 +341,6 @@ void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) if (bCount == item->GetCount()) { - // 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서 - // 상점 판매시 속성로그를 남긴다. - if (LC_IsYMIR()) - item->AttrLog(); - ITEM_MANAGER::instance().RemoveItem(item, "SELL"); } else diff --git a/src/game/src/start_position.h b/src/game/src/start_position.h index 6b90645..5cab096 100644 --- a/src/game/src/start_position.h +++ b/src/game/src/start_position.h @@ -57,9 +57,6 @@ inline DWORD CREATE_START_X(BYTE e) { if (1 <= e && e <= 3) { - if (LC_IsCanada() == true) - return g_create_position_canada[e][0]; - return g_create_position[e][0]; } @@ -70,9 +67,6 @@ inline DWORD CREATE_START_Y(BYTE e) { if (1 <= e && e <= 3) { - if (LC_IsCanada() == true) - return g_create_position_canada[e][1]; - return g_create_position[e][1]; } diff --git a/src/game/src/threeway_war.cpp b/src/game/src/threeway_war.cpp index d622e23..6fed00d 100644 --- a/src/game/src/threeway_war.cpp +++ b/src/game/src/threeway_war.cpp @@ -269,24 +269,9 @@ int GetKillValue(int level) int iMinLevelFor2Point, iMaxLevelFor2Point; int iMinLevelFor3Point, iMaxLevelFor3Point; - if (LC_IsBrazil() == true) - { - iMinLevelFor1Point = 35; iMaxLevelFor1Point = 50; - iMinLevelFor2Point = 51; iMaxLevelFor2Point = 70; - iMinLevelFor3Point = 71; iMaxLevelFor3Point = 99; - } - else if (LC_IsYMIR() == false) - { - iMinLevelFor1Point = 30; iMaxLevelFor1Point = 39; - iMinLevelFor2Point = 40; iMaxLevelFor2Point = 49; - iMinLevelFor3Point = 50; iMaxLevelFor3Point = 99; - } - else - { - iMinLevelFor1Point = 50; iMaxLevelFor1Point = 59; - iMinLevelFor2Point = 60; iMaxLevelFor2Point = 69; - iMinLevelFor3Point = 70; iMaxLevelFor3Point = 99; - } + iMinLevelFor1Point = 50; iMaxLevelFor1Point = 59; + iMinLevelFor2Point = 60; iMaxLevelFor2Point = 69; + iMinLevelFor3Point = 70; iMaxLevelFor3Point = 99; if (iMinLevelFor1Point <= level && level <= iMaxLevelFor1Point) {