diff --git a/gamefiles/conf/CMD b/gamefiles/conf/CMD index 4e60a9c..701bbbd 100644 --- a/gamefiles/conf/CMD +++ b/gamefiles/conf/CMD @@ -41,8 +41,6 @@ tstr IMPLEMENTOR tint IMPLEMENTOR tcon IMPLEMENTOR mob_ld IMPLEMENTOR -pcbang_check IMPLEMENTOR -pcbang_update IMPLEMENTOR setqf IMPLEMENTOR delqf IMPLEMENTOR effect IMPLEMENTOR diff --git a/src/common/item_length.h b/src/common/item_length.h index 2f44961..7a2083d 100644 --- a/src/common/item_length.h +++ b/src/common/item_length.h @@ -333,6 +333,8 @@ enum ELimitTypes LIMIT_DEX, LIMIT_INT, LIMIT_CON, + + // TODO: Remove this and re-check the validity of item_proto afterwards LIMIT_PCBANG, /// Âø¿ë ¿©ºÎ¿Í »ó°ü ¾øÀÌ ½Ç½Ã°£À¸·Î ½Ã°£ Â÷°¨ (socket0¿¡ ¼Ò¸ê ½Ã°£ÀÌ ¹ÚÈû: unix_timestamp ŸÀÔ) diff --git a/src/common/tables.h b/src/common/tables.h index fae5fb6..9e63d64 100644 --- a/src/common/tables.h +++ b/src/common/tables.h @@ -108,12 +108,6 @@ enum HEADER_GD_BLOCK_CHAT = 110, - // PCBANG_IP_LIST_BY_AUTH - HEADER_GD_PCBANG_REQUEST_IP_LIST = 111, - HEADER_GD_PCBANG_CLEAR_IP_LIST = 112, - HEADER_GD_PCBANG_INSERT_IP = 113, - // END_OF_PCBANG_IP_LIST_BY_AUTH - HEADER_GD_HAMMER_OF_TOR = 114, HEADER_GD_RELOAD_ADMIN = 115, ///<¿î¿µÀÚ Á¤º¸ ¿äû HEADER_GD_BREAK_MARRIAGE = 116, ///< °áÈ¥ Æıâ @@ -1293,15 +1287,6 @@ typedef struct LONG lDuration; } TPacketBlockChat; -// PCBANG_IP_LIST -typedef struct SPacketPCBangIP -{ - DWORD id; - DWORD ip; -} TPacketPCBangIP; -// END_OF_PCBANG_IP_LIST - - //ADMIN_MANAGER typedef struct TAdminInfo { diff --git a/src/game/src/char.cpp b/src/game/src/char.cpp index aa4d61d..3528b97 100644 --- a/src/game/src/char.cpp +++ b/src/game/src/char.cpp @@ -48,7 +48,6 @@ #include "castle.h" #include "arena.h" #include "horsename_manager.h" -#include "pcbang.h" #include "gm.h" #include "map_location.h" #include "BlueDragon_Binder.h" @@ -307,8 +306,6 @@ void CHARACTER::Initialize() memset(m_adwMobSkillCooltime, 0, sizeof(m_adwMobSkillCooltime)); // END_OF_MOB_SKILL_COOLTIME - m_isinPCBang = false; - // ARENA m_pArena = NULL; m_nPotionLimit = quest::CQuestManager::instance().GetEventFlag("arena_potion_limit_count"); @@ -1314,9 +1311,6 @@ void CHARACTER::Disconnect(const char * c_pszReason) { int playTime = GetRealPoint(POINT_PLAYTIME) - m_dwLoginPlayTime; LogManager::instance().LoginLog(false, GetDesc()->GetAccountTable().id, GetPlayerID(), GetLevel(), GetJob(), playTime); - - if (LC_IsBrazil() != true) - CPCBangManager::instance().Log(GetDesc()->GetHostName(), GetPlayerID(), playTime); } if (m_pWarMap) @@ -2242,11 +2236,6 @@ void CHARACTER::ComputePoints() SetPoint(POINT_HP_RECOVERY, lHPRecovery); SetPoint(POINT_SP_RECOVERY, lSPRecovery); - // PC_BANG_ITEM_ADD - SetPoint(POINT_PC_BANG_EXP_BONUS, 0); - SetPoint(POINT_PC_BANG_DROP_BONUS, 0); - // END_PC_BANG_ITEM_ADD - int iMaxHP, iMaxSP; int iMaxStamina; @@ -3478,14 +3467,10 @@ void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast val = GetPoint(type); break; - // PC_BANG_ITEM_ADD - case POINT_PC_BANG_EXP_BONUS : - case POINT_PC_BANG_DROP_BONUS : case POINT_RAMADAN_CANDY_BONUS_EXP: SetPoint(type, amount); val = GetPoint(type); break; - // END_PC_BANG_ITEM_ADD case POINT_EXP_DOUBLE_BONUS: // 71 case POINT_GOLD_DOUBLE_BONUS: // 72 @@ -3759,9 +3744,6 @@ void CHARACTER::ApplyPoint(BYTE bApplyType, int iVal) case APPLY_NORMAL_HIT_DEFEND_BONUS: // END_OF_DEPEND_BONUS_ATTRIBUTES - case APPLY_PC_BANG_EXP_BONUS : - case APPLY_PC_BANG_DROP_BONUS : - case APPLY_RESIST_WARRIOR : case APPLY_RESIST_ASSASSIN : case APPLY_RESIST_SURA : diff --git a/src/game/src/char.h b/src/game/src/char.h index b84c3f1..5e3356b 100644 --- a/src/game/src/char.h +++ b/src/game/src/char.h @@ -260,10 +260,12 @@ enum EPointTypes POINT_NORMAL_HIT_DEFEND_BONUS, // 124 ÆòŸ ¹æ¾î µ¥¹ÌÁö // END_OF_DEFEND_BONUS_ATTRIBUTES - // PC_BANG_ITEM_ADD + // TODO: check if the PC_BANG_* bonuses can be safely removed + // PC_BANG_ITEM_ADD POINT_PC_BANG_EXP_BONUS, // 125 PC¹æ Àü¿ë °æÇèÄ¡ º¸³Ê½º POINT_PC_BANG_DROP_BONUS, // 126 PC¹æ Àü¿ë µå·Ó·ü º¸³Ê½º // END_PC_BANG_ITEM_ADD + POINT_RAMADAN_CANDY_BONUS_EXP, // ¶ó¸¶´Ü »çÅÁ °æÇèÄ¡ Áõ°¡¿ë POINT_ENERGY = 128, // 128 ±â·Â @@ -1745,15 +1747,6 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider static const char msc_szChangeItemAttrCycleFlag[]; ///< ¾ÆÀÌÅÛ ¼Ó¼ºº´°æ °¡´É ÁÖ±âÀÇ Quest Flag À̸§ // END_OF_CHANGE_ITEM_ATTRIBUTES - // PC_BANG_ITEM_ADD - private : - bool m_isinPCBang; - - public : - bool SetPCBang(bool flag) { m_isinPCBang = flag; return m_isinPCBang; } - bool IsPCBang() const { return m_isinPCBang; } - // END_PC_BANG_ITEM_ADD - // NEW_HAIR_STYLE_ADD public : bool ItemProcess_Hair(LPITEM item, int iDestCell); diff --git a/src/game/src/char_battle.cpp b/src/game/src/char_battle.cpp index 86056c9..59de5aa 100644 --- a/src/game/src/char_battle.cpp +++ b/src/game/src/char_battle.cpp @@ -2394,13 +2394,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp) iExp += (iExp * 50 / 100); } - // PC¹æ ¾ÆÅÛ °æÄ¡ º¸³Ê½º - if (to->GetPoint(POINT_PC_BANG_EXP_BONUS) > 0) - { - if (to->IsPCBang() == true) - iExp += (iExp * to->GetPoint(POINT_PC_BANG_EXP_BONUS)/100); - } - // °áÈ¥ º¸³Ê½º iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; } @@ -2417,13 +2410,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp) iExp += iExp; } - // PC¹æ ¾ÆÅÛ °æÄ¡ º¸³Ê½º - if (to->GetPoint(POINT_PC_BANG_EXP_BONUS) > 0) - { - if (to->IsPCBang() == true) - iExp += (iExp * to->GetPoint(POINT_PC_BANG_EXP_BONUS)/100); - } - // °áÈ¥ º¸³Ê½º iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; } @@ -2440,13 +2426,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp) iExp += (iExp * 20 / 100); } - // PC¹æ ¾ÆÅÛ °æÄ¡ º¸³Ê½º - if (to->GetPoint(POINT_PC_BANG_EXP_BONUS) > 0) - { - if (to->IsPCBang() == true) - iExp += (iExp * to->GetPoint(POINT_PC_BANG_EXP_BONUS)/100); - } - // °áÈ¥ º¸³Ê½º iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100; } diff --git a/src/game/src/char_item.cpp b/src/game/src/char_item.cpp index 0992df7..01a9b60 100644 --- a/src/game/src/char_item.cpp +++ b/src/game/src/char_item.cpp @@ -34,7 +34,6 @@ #include "castle.h" #include "BattleArena.h" #include "arena.h" -#include "pcbang.h" #include "threeway_war.h" #include "safebox.h" @@ -2219,19 +2218,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) } else { - // PC_BANG_ITEM_ADD - if (item->IsPCBangItem() == true) - { - // PC¹æÀÎÁö üũÇؼ­ ó¸® - if (CPCBangManager::instance().IsPCBangIP(GetDesc()->GetHostName()) == false) - { - // PC¹æÀÌ ¾Æ´Ô! - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ ¾ÆÀÌÅÛÀº PC¹æ¿¡¼­¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.")); - return false; - } - } - // END_PC_BANG_ITEM_ADD - AddAffect(AFFECT_EXP_BONUS_EURO_FREE, aApplyInfo[item->GetValue(1)].bPointType, item->GetValue(2), 0, item->GetValue(3), 0, false, true); item->SetCount(item->GetCount() - 1); } @@ -4880,19 +4866,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) } else { - // PC_BANG_ITEM_ADD - if (item->IsPCBangItem() == true) - { - // PC¹æÀÎÁö üũÇؼ­ ó¸® - if (CPCBangManager::instance().IsPCBangIP(GetDesc()->GetHostName()) == false) - { - // PC¹æÀÌ ¾Æ´Ô! - ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ ¾ÆÀÌÅÛÀº PC¹æ¿¡¼­¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.")); - return false; - } - } - // END_PC_BANG_ITEM_ADD - AddAffect(item->GetValue(0), aApplyInfo[item->GetValue(1)].bPointType, item->GetValue(2), 0, item->GetValue(3), 0, false); item->SetCount(item->GetCount() - 1); } diff --git a/src/game/src/cmd.cpp b/src/game/src/cmd.cpp index 4b6a112..b9d3bf6 100644 --- a/src/game/src/cmd.cpp +++ b/src/game/src/cmd.cpp @@ -10,9 +10,6 @@ ACMD(do_user_horse_ride); ACMD(do_user_horse_back); ACMD(do_user_horse_feed); -ACMD(do_pcbang_update); -ACMD(do_pcbang_check); - // ADD_COMMAND_SLOW_STUN ACMD(do_slow); ACMD(do_stun); @@ -444,9 +441,6 @@ struct command_info cmd_info[] = { "horse_unsummon", do_horse_unsummon, 0, POS_DEAD, GM_HIGH_WIZARD }, { "horse_set_stat", do_horse_set_stat, 0, POS_DEAD, GM_HIGH_WIZARD }, - { "pcbang_update", do_pcbang_update, 0, POS_DEAD, GM_LOW_WIZARD }, - { "pcbang_check", do_pcbang_check, 0, POS_DEAD, GM_LOW_WIZARD }, - { "emotion_allow", do_emotion_allow, 0, POS_FIGHTING, GM_PLAYER }, { "kiss", do_emotion, 0, POS_FIGHTING, GM_PLAYER }, { "slap", do_emotion, 0, POS_FIGHTING, GM_PLAYER }, diff --git a/src/game/src/cmd_general.cpp b/src/game/src/cmd_general.cpp index 51a9277..1cc6ca1 100644 --- a/src/game/src/cmd_general.cpp +++ b/src/game/src/cmd_general.cpp @@ -2006,8 +2006,6 @@ static const char* FN_point_string(int apply_number) case POINT_NORMAL_HIT_DAMAGE_BONUS: return LC_TEXT("ÆòŸ µ¥¹ÌÁö %d%%"); case POINT_SKILL_DEFEND_BONUS: return LC_TEXT("½ºÅ³ µ¥¹ÌÁö ÀúÇ× %d%%"); case POINT_NORMAL_HIT_DEFEND_BONUS: return LC_TEXT("ÆòŸ µ¥¹ÌÁö ÀúÇ× %d%%"); -// case POINT_PC_BANG_EXP_BONUS: return LC_TEXT(""); -// case POINT_PC_BANG_DROP_BONUS: return LC_TEXT(""); // case POINT_EXTRACT_HP_PCT: return LC_TEXT(""); case POINT_RESIST_WARRIOR: return LC_TEXT("¹«»ç°ø°Ý¿¡ %d%% ÀúÇ×"); case POINT_RESIST_ASSASSIN: return LC_TEXT("ÀÚ°´°ø°Ý¿¡ %d%% ÀúÇ×"); diff --git a/src/game/src/cmd_gm.cpp b/src/game/src/cmd_gm.cpp index 77d49d5..d78d061 100644 --- a/src/game/src/cmd_gm.cpp +++ b/src/game/src/cmd_gm.cpp @@ -32,7 +32,6 @@ #include "BattleArena.h" #include "xmas_event.h" #include "log.h" -#include "pcbang.h" #include "threeway_war.h" #include "unique_item.h" #include "DragonSoul.h" @@ -82,52 +81,6 @@ void Command_ApplyAffect(LPCHARACTER ch, const char* argument, const char* affec } // END_OF_ADD_COMMAND_SLOW_STUN -ACMD(do_pcbang_update) -{ - char arg1[256]; - one_argument(argument, arg1, sizeof(arg1)); - - unsigned int PCBangID = 0; - - if (*arg1 == '\0') - PCBangID = 0; - else - str_to_number(PCBangID, arg1); - - if (PCBangID == 0) - { - CPCBangManager::instance().RequestUpdateIPList(0); - ch->ChatPacket(CHAT_TYPE_INFO, "PCBang Info Update For All"); - } - else - { - CPCBangManager::instance().RequestUpdateIPList(PCBangID); - ch->ChatPacket(CHAT_TYPE_INFO, "PCBang Info Update For %u", PCBangID); - } - - TPacketPCBangUpdate packet; - packet.bHeader = HEADER_GG_PCBANG_UPDATE; - packet.ulPCBangID = PCBangID; - - P2P_MANAGER::instance().Send(&packet, sizeof(TPacketPCBangUpdate)); - -} - -ACMD(do_pcbang_check) -{ - char arg1[256]; - one_argument(argument, arg1, sizeof(arg1)); - - if (CPCBangManager::instance().IsPCBangIP(arg1) == true) - { - ch->ChatPacket(CHAT_TYPE_INFO, "%s is a PCBang IP", arg1); - } - else - { - ch->ChatPacket(CHAT_TYPE_INFO, "%s is not a PCBang IP", arg1); - } -} - ACMD(do_stun) { Command_ApplyAffect(ch, argument, "stun", COMMANDAFFECT_STUN); diff --git a/src/game/src/constants.cpp b/src/game/src/constants.cpp index 9ca411e..da892bd 100644 --- a/src/game/src/constants.cpp +++ b/src/game/src/constants.cpp @@ -893,6 +893,7 @@ const TApplyInfo aApplyInfo[MAX_APPLY_NUM] = { POINT_NORMAL_HIT_DEFEND_BONUS }, // 74 // END_OF_DEFEND_BONUS_ATTRIBUTES + // TODO: check if these can be safely removed // PC_BANG_ITEM_ADD { POINT_PC_BANG_EXP_BONUS }, // 75 { POINT_PC_BANG_DROP_BONUS }, // 76 diff --git a/src/game/src/db.cpp b/src/game/src/db.cpp index 925de5f..54d3f4e 100644 --- a/src/game/src/db.cpp +++ b/src/game/src/db.cpp @@ -17,7 +17,6 @@ #include "log.h" #include "login_data.h" #include "locale_service.h" -#include "pcbang.h" #include "spam.h" extern std::string g_stBlockDate; @@ -996,73 +995,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg) break; // END_OF_BLOCK_CHAT - // PCBANG_IP_LIST - case QID_PCBANG_IP_LIST_CHECK: - { - const std::string PCBANG_IP_TABLE_NAME("pcbang_ip"); - - if (pMsg->Get()->uiNumRows > 0) - { - MYSQL_ROW row; - bool isFinded = false; - - while ((row = mysql_fetch_row(pMsg->Get()->pSQLResult))) - { - const char* c_szName = row[0]; - const char* c_szUpdateTime = row[12]; - - SPDLOG_TRACE("{}:{}", c_szName, c_szUpdateTime); - - if (PCBANG_IP_TABLE_NAME == c_szName) - { - isFinded = true; - - static std::string s_stLastTime; - if (s_stLastTime != c_szUpdateTime) - { - s_stLastTime = c_szUpdateTime; - SPDLOG_DEBUG("'{}' mysql table is UPDATED({})", PCBANG_IP_TABLE_NAME, c_szUpdateTime); - ReturnQuery(QID_PCBANG_IP_LIST_SELECT, 0, NULL, "SELECT pcbang_id, ip FROM %s;", PCBANG_IP_TABLE_NAME.c_str()); - } - else - { - SPDLOG_DEBUG("'{}' mysql table is NOT updated({})", PCBANG_IP_TABLE_NAME, c_szUpdateTime); - } - break; - } - } - - if (!isFinded) - { - SPDLOG_ERROR("'{}' mysql table CANNOT FIND", PCBANG_IP_TABLE_NAME); - } - } - else if (test_server) - { - SPDLOG_ERROR("'{}' mysql table is NOT EXIST", PCBANG_IP_TABLE_NAME); - } - } - break; - - case QID_PCBANG_IP_LIST_SELECT: - { - if (pMsg->Get()->uiNumRows > 0) - { - MYSQL_ROW row; - - while ((row = mysql_fetch_row(pMsg->Get()->pSQLResult))) - { - CPCBangManager::instance().InsertIP(row[0], row[1]); - } - } - else - SPDLOG_TRACE("PCBANG_IP_LIST is EMPTY"); - } - break; - - - // END_OF_PCBANG_IP_LIST - default: SPDLOG_ERROR("FATAL ERROR!!! Unhandled return query id {}", qi->iType); break; diff --git a/src/game/src/db.h b/src/game/src/db.h index 99d0031..650ee33 100644 --- a/src/game/src/db.h +++ b/src/game/src/db.h @@ -23,11 +23,6 @@ enum QID_BLOCK_CHAT_LIST, // END_OF_BLOCK_CHAT - // PCBANG_IP_LIST - QID_PCBANG_IP_LIST_CHECK, - QID_PCBANG_IP_LIST_SELECT, - // END_OF_PCBANG_IP_LIST - // PROTECT_CHILD_FOR_NEWCIBN QID_PROTECT_CHILD, // END_PROTECT_CHILD_FOR_NEWCIBN diff --git a/src/game/src/input.h b/src/game/src/input.h index 9bc3f48..33a117e 100644 --- a/src/game/src/input.h +++ b/src/game/src/input.h @@ -323,7 +323,6 @@ class CInputP2P : public CInputProcessor void XmasWarpSantaReply(const char * c_pData); void LoginPing(LPDESC d, const char * c_pData); void BlockChat(const char * c_pData); - void PCBangUpdate(const char* c_pData); void IamAwake(LPDESC d, const char * c_pData); protected: diff --git a/src/game/src/input_db.cpp b/src/game/src/input_db.cpp index 9fa1dd4..6204ca5 100644 --- a/src/game/src/input_db.cpp +++ b/src/game/src/input_db.cpp @@ -38,7 +38,6 @@ #include "log.h" #include "horsename_manager.h" -#include "pcbang.h" #include "gm.h" #include "panama.h" #include "map_location.h" @@ -420,11 +419,6 @@ void CInputDB::PlayerLoad(LPDESC d, const char * data) { LogManager::instance().LoginLog(true, ch->GetDesc()->GetAccountTable().id, ch->GetPlayerID(), ch->GetLevel(), ch->GetJob(), ch->GetRealPoint(POINT_PLAYTIME)); - - if (LC_IsBrazil() != true ) - { - ch->SetPCBang(CPCBangManager::instance().IsPCBangIP(ch->GetDesc()->GetHostName())); - } } } @@ -997,8 +991,6 @@ void CInputDB::Boot(const char* data) CMobManager::instance().DumpRegenCount("mob_count"); } - CPCBangManager::instance().RequestUpdateIPList(0); - // castle_boot castle_boot(); } diff --git a/src/game/src/input_p2p.cpp b/src/game/src/input_p2p.cpp index b522058..d408f50 100644 --- a/src/game/src/input_p2p.cpp +++ b/src/game/src/input_p2p.cpp @@ -17,7 +17,6 @@ #include "castle.h" #include "locale_service.h" #include "questmanager.h" -#include "pcbang.h" #include "skill.h" #include "threeway_war.h" @@ -396,13 +395,6 @@ void CInputP2P::BlockChat(const char * c_pData) // END_OF_BLOCK_CHAT // -void CInputP2P::PCBangUpdate(const char* c_pData) -{ - TPacketPCBangUpdate* p = (TPacketPCBangUpdate*)c_pData; - - CPCBangManager::instance().RequestUpdateIPList(p->ulPCBangID); -} - void CInputP2P::IamAwake(LPDESC d, const char * c_pData) { std::string hostNames; @@ -522,10 +514,6 @@ int CInputP2P::Analyze(LPDESC d, BYTE bHeader, const char * c_pData) MonarchTransfer(d, c_pData); break; - case HEADER_GG_PCBANG_UPDATE : - PCBangUpdate(c_pData); - break; - case HEADER_GG_CHECK_AWAKENESS: IamAwake(d, c_pData); break; diff --git a/src/game/src/item.cpp b/src/game/src/item.cpp index 116b996..3531419 100644 --- a/src/game/src/item.cpp +++ b/src/game/src/item.cpp @@ -1831,18 +1831,6 @@ bool CItem::CanPutInto(LPITEM item) return 50623 + type == GetVnum(); } -// PC_BANG_ITEM_ADD -bool CItem::IsPCBangItem() -{ - for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) - { - if (m_pProto->aLimits[i].bType == LIMIT_PCBANG) - return true; - } - return false; -} -// END_PC_BANG_ITEM_ADD - bool CItem::CheckItemUseLevel(int nLevel) { for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) diff --git a/src/game/src/item.h b/src/game/src/item.h index 063ef4c..ed8b14a 100644 --- a/src/game/src/item.h +++ b/src/game/src/item.h @@ -18,8 +18,6 @@ class CItem : public CEntity bool CheckItemUseLevel(int nLevel); - bool IsPCBangItem(); - int FindApplyValue(BYTE bApplyType); bool IsStackable() { return (GetFlag() & ITEM_FLAG_STACKABLE)?true:false; } diff --git a/src/game/src/item_manager.cpp b/src/game/src/item_manager.cpp index 90e0d53..9c388ba 100644 --- a/src/game/src/item_manager.cpp +++ b/src/game/src/item_manager.cpp @@ -817,14 +817,6 @@ bool ITEM_MANAGER::GetDropPct(LPCHARACTER pkChr, LPCHARACTER pkKiller, OUT int& iDeltaPercent += iDeltaPercent; // END_OF_ADD_PREMIUM - // PC_BANG_ITEM_ADD - if (pkKiller->GetPoint(POINT_PC_BANG_DROP_BONUS) > 0) - { - if (pkKiller->IsPCBang() == true) - iDeltaPercent += iDeltaPercent * pkKiller->GetPoint(POINT_PC_BANG_DROP_BONUS)/100; - } - // END_PC_BANG_ITEM_ADD - iRandRange = 4000000; iRandRange = iRandRange * 100 / (100 + diff --git a/src/game/src/log.cpp b/src/game/src/log.cpp index f462170..08cf4a7 100644 --- a/src/game/src/log.cpp +++ b/src/game/src/log.cpp @@ -128,12 +128,6 @@ void LogManager::HackCRCLog(const char * c_pszHackName, const char * c_pszLogin, Query("INSERT INTO hack_crc_log (time, login, name, ip, server, why, crc) VALUES(NOW(), '%s', '%s', '%s', '%s', '%s', %u)", c_pszLogin, c_pszName, c_pszIP, g_stHostname.c_str(), c_pszHackName, dwCRC); } -void LogManager::PCBangLoginLog(DWORD dwPCBangID, const char* c_szPCBangIP, DWORD dwPlayerID, DWORD dwPlayTime) -{ - Query("INSERT INTO pcbang_loginlog (time, pcbang_id, ip, pid, play_time) VALUES (NOW(), %u, '%s', %u, %u)", - dwPCBangID, c_szPCBangIP, dwPlayerID, dwPlayTime); -} - void LogManager::GoldBarLog(DWORD dwPID, DWORD dwItemID, GOLDBAR_HOW eHow, const char* c_pszHint) { char szHow[32+1]; diff --git a/src/game/src/log.h b/src/game/src/log.h index f5a119c..cf8bb98 100644 --- a/src/game/src/log.h +++ b/src/game/src/log.h @@ -38,7 +38,6 @@ class LogManager : public singleton void HackLog(const char * c_pszHackName, LPCHARACTER ch); void HackCRCLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP, DWORD dwCRC); void GoldBarLog(DWORD dwPID, DWORD dwItemID, GOLDBAR_HOW eHow, const char * c_pszHint); - void PCBangLoginLog(DWORD dwPCBangID, const char * c_szPCBangIP, DWORD dwPlayerID, DWORD dwPlayTime); void CubeLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, bool success); void GMCommandLog(DWORD dwPID, const char * szName, const char * szIP, BYTE byChannel, const char * szCommand); void SpeedHackLog(DWORD pid, DWORD x, DWORD y, int hack_count); diff --git a/src/game/src/main.cpp b/src/game/src/main.cpp index 7380068..71dc5d4 100644 --- a/src/game/src/main.cpp +++ b/src/game/src/main.cpp @@ -49,7 +49,6 @@ #include "BattleArena.h" #include "over9refine.h" #include "horsename_manager.h" -#include "pcbang.h" #include "MarkManager.h" #include "spam.h" #include "panama.h" @@ -366,7 +365,6 @@ int main(int argc, char **argv) COXEventManager OXEvent_manager; CMonarch Monarch; CHorseNameManager horsename_manager; - CPCBangManager pcbang_manager; DESC_MANAGER desc_manager; diff --git a/src/game/src/packet.h b/src/game/src/packet.h index f906ad9..d33ecf0 100644 --- a/src/game/src/packet.h +++ b/src/game/src/packet.h @@ -306,7 +306,6 @@ enum HEADER_GG_SIEGE = 25, HEADER_GG_MONARCH_NOTICE = 26, HEADER_GG_MONARCH_TRANSFER = 27, - HEADER_GG_PCBANG_UPDATE = 28, HEADER_GG_CHECK_AWAKENESS = 29, }; @@ -2130,12 +2129,6 @@ typedef struct SPacketGGMonarchTransfer LONG y; } TPacketMonarchGGTransfer; -typedef struct SPacketGGPCBangUpdate -{ - BYTE bHeader; - ULONG ulPCBangID; -} TPacketPCBangUpdate; - typedef struct SPacketGGCheckAwakeness { BYTE bHeader; diff --git a/src/game/src/packet_info.cpp b/src/game/src/packet_info.cpp index 2ee3fb4..874dbaf 100644 --- a/src/game/src/packet_info.cpp +++ b/src/game/src/packet_info.cpp @@ -258,7 +258,6 @@ CPacketInfoGG::CPacketInfoGG() Set(HEADER_GG_MONARCH_NOTICE, sizeof(TPacketGGMonarchNotice), "MonarchNotice", false); Set(HEADER_GG_MONARCH_TRANSFER, sizeof(TPacketMonarchGGTransfer), "MonarchTransfer", false); - Set(HEADER_GG_PCBANG_UPDATE, sizeof(TPacketPCBangUpdate), "PCBangUpdate", false); Set(HEADER_GG_CHECK_AWAKENESS, sizeof(TPacketGGCheckAwakeness), "CheckAwakeness", false); } diff --git a/src/game/src/pcbang.cpp b/src/game/src/pcbang.cpp deleted file mode 100644 index a5593c5..0000000 --- a/src/game/src/pcbang.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "stdafx.h" -#include "constants.h" -#include "config.h" -#include "locale_service.h" -#include "log.h" -#include "db.h" -#include "pcbang.h" - -CPCBangManager::CPCBangManager() -{ - m_minSavablePlayTime = 10; - m_map_ip.clear(); -} - -void CPCBangManager::InsertIP(const char* c_szID, const char* c_szIP) -{ - PCBang_IP ip = __GetIPFromString(c_szIP); - PCBang_ID id = __GetIDFromString(c_szID); - - m_map_ip.insert(std::map::value_type(ip, id)); -} - -bool CPCBangManager::Log(const char* c_szIP, DWORD pid, time_t playTime) -{ - if (playTime < m_minSavablePlayTime) - { - return false; - } - - std::map::iterator f = m_map_ip.find(__GetIPFromString(c_szIP)); - - if (m_map_ip.end() == f) - { - return false; - } - - LogManager::instance().PCBangLoginLog(f->second, c_szIP, pid, playTime); - - return true; -} - -void CPCBangManager::RequestUpdateIPList(PCBang_ID id) -{ - if ( LC_IsYMIR() == true || LC_IsKorea() == true ) - { - if ( id == 0 ) - { - DBManager::instance().ReturnQuery(QID_PCBANG_IP_LIST_CHECK, 0, NULL, "show table status"); - } - else - { - DBManager::instance().ReturnQuery(QID_PCBANG_IP_LIST_SELECT, 0, NULL, "SELECT pcbang_id, ip FROM pcbang_ip WHERE pcbang_id=%u", id); - } - } -} - -bool CPCBangManager::IsPCBangIP(const char* c_szIP) -{ - if (!c_szIP) - return false; - - PCBang_IP ip = __GetIPFromString(c_szIP); - std::map::iterator f = m_map_ip.find(ip); - - if (m_map_ip.end() == f) - return false; - - return true; -} - -PCBang_ID CPCBangManager::__GetIDFromString(const char* c_szID) -{ - PCBang_ID id = 0; - str_to_number(id, c_szID); - return id; -} - -PCBang_IP CPCBangManager::__GetIPFromString(const char* c_szIP) -{ - int nums[4]; - sscanf(c_szIP, "%d.%d.%d.%d", nums+0, nums+1, nums+2, nums+3); - - return (nums[0]<<24)|(nums[1]<<16)|(nums[2]<<8)|nums[3]; -} - diff --git a/src/game/src/pcbang.h b/src/game/src/pcbang.h deleted file mode 100644 index d6ebd91..0000000 --- a/src/game/src/pcbang.h +++ /dev/null @@ -1,26 +0,0 @@ - -typedef unsigned int PCBang_IP; -typedef unsigned int PCBang_ID; - -class CPCBangManager : public singleton -{ - private: - std::map m_map_ip; - - time_t m_minSavablePlayTime; - - PCBang_ID __GetIDFromString(const char* c_szID); - PCBang_IP __GetIPFromString(const char* c_szIP); - - public: - CPCBangManager(); - - void InsertIP(const char* c_szID, const char* c_szIP); - - bool Log(const char* c_szIP, DWORD pid, time_t playTime); - - void RequestUpdateIPList(PCBang_ID id); - - bool IsPCBangIP(const char* c_szIP); -}; -