From d85ef28eace2b76e7e61b1e711d89a1bd5670d19 Mon Sep 17 00:00:00 2001 From: Exynox Date: Sat, 30 Mar 2024 21:14:50 +0200 Subject: [PATCH] Removed messenger SMS --- src/common/length.h | 2 -- src/common/tables.h | 10 ---------- src/db/src/ClientManager.cpp | 20 -------------------- src/db/src/ClientManager.h | 1 - src/db/src/ClientManagerPlayer.cpp | 9 ++------- src/game/src/char.cpp | 12 ------------ src/game/src/char.h | 2 -- src/game/src/cmd.cpp | 2 -- src/game/src/input.h | 1 - src/game/src/messenger_manager.cpp | 1 - src/game/src/packet.h | 16 +--------------- src/game/src/packet_info.cpp | 1 - 12 files changed, 3 insertions(+), 74 deletions(-) diff --git a/src/common/length.h b/src/common/length.h index 82eca5d..8bd31a4 100644 --- a/src/common/length.h +++ b/src/common/length.h @@ -16,8 +16,6 @@ enum EMisc ABILITY_MAX_NUM = 50, EMPIRE_MAX_NUM = 4, BANWORD_MAX_LEN = 24, - SMS_MAX_LEN = 80, - MOBILE_MAX_LEN = 32, SOCIAL_ID_MAX_LEN = 18, MAP_ALLOW_MAX_LEN = 128, diff --git a/src/common/tables.h b/src/common/tables.h index 2a6663d..ce4e54b 100644 --- a/src/common/tables.h +++ b/src/common/tables.h @@ -62,7 +62,6 @@ enum HEADER_GD_RELOAD_PROTO = 43, HEADER_GD_CHANGE_NAME = 44, - HEADER_GD_SMS = 45, HEADER_GD_GUILD_CHANGE_LADDER_POINT = 46, HEADER_GD_GUILD_USE_SKILL = 47, @@ -421,7 +420,6 @@ typedef struct SPlayerTable BYTE skill_group; LONG lAlignment; - char szMobile[MOBILE_MAX_LEN + 1]; WORD stat_reset_count; @@ -969,14 +967,6 @@ typedef struct SPacketGuildLadderPoint LONG lChange; } TPacketGuildLadderPoint; -typedef struct SPacketGDSMS -{ - char szFrom[CHARACTER_NAME_MAX_LEN + 1]; - char szTo[CHARACTER_NAME_MAX_LEN + 1]; - char szMobile[MOBILE_MAX_LEN + 1]; - char szMsg[SMS_MAX_LEN + 1]; -} TPacketGDSMS; - typedef struct SPacketGuildUseSkill { DWORD dwGuild; diff --git a/src/db/src/ClientManager.cpp b/src/db/src/ClientManager.cpp index 1ed17d6..8ed96d4 100644 --- a/src/db/src/ClientManager.cpp +++ b/src/db/src/ClientManager.cpp @@ -1665,22 +1665,6 @@ void CClientManager::QUERY_FLUSH_CACHE(CPeer * pkPeer, const char * c_pData) delete pkCache; } -void CClientManager::QUERY_SMS(CPeer * pkPeer, TPacketGDSMS * pack) -{ - char szQuery[QUERY_MAX_LEN]; - - char szMsg[256+1]; - //unsigned int len = CDBManager::instance().EscapeString(szMsg, pack->szMsg, strlen(pack->szMsg), SQL_ACCOUNT); - unsigned int len = CDBManager::instance().EscapeString(szMsg, pack->szMsg, strlen(pack->szMsg)); - szMsg[len] = '\0'; - - snprintf(szQuery, sizeof(szQuery), - "INSERT INTO sms_pool (server, sender, receiver, mobile, msg) VALUES(%d, '%s', '%s', '%s', '%s')", - (m_iPlayerIDStart + 2) / 3, pack->szFrom, pack->szTo, pack->szMobile, szMsg); - - CDBManager::instance().AsyncQuery(szQuery); -} - void CClientManager::QUERY_RELOAD_PROTO() { if (!InitializeTables()) @@ -2314,10 +2298,6 @@ void CClientManager::ProcessPackets(CPeer * peer) QUERY_CHANGE_NAME(peer, dwHandle, (TPacketGDChangeName *) data); break; - case HEADER_GD_SMS: - QUERY_SMS(peer, (TPacketGDSMS *) data); - break; - case HEADER_GD_AUTH_LOGIN: QUERY_AUTH_LOGIN(peer, dwHandle, (TPacketGDAuthLogin *) data); break; diff --git a/src/db/src/ClientManager.h b/src/db/src/ClientManager.h index 3b9d0bf..a6782d4 100644 --- a/src/db/src/ClientManager.h +++ b/src/db/src/ClientManager.h @@ -324,7 +324,6 @@ class CClientManager : public singleton void QUERY_CHANGE_NAME(CPeer * peer, DWORD dwHandle, TPacketGDChangeName * p); void GetPlayerFromRes(TPlayerTable * player_table, MYSQL_RES* res); - void QUERY_SMS(CPeer * pkPeer, TPacketGDSMS * p); void QUERY_LOGIN_KEY(CPeer * pkPeer, TPacketGDLoginKey * p); void AddGuildPriv(TPacketGiveGuildPriv* p); diff --git a/src/db/src/ClientManagerPlayer.cpp b/src/db/src/ClientManagerPlayer.cpp index 55f4bd5..70c94e8 100644 --- a/src/db/src/ClientManagerPlayer.cpp +++ b/src/db/src/ClientManagerPlayer.cpp @@ -357,7 +357,7 @@ void CClientManager::QUERY_PLAYER_LOAD(CPeer * peer, DWORD dwHandle, TPlayerLoad "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime," "gold,level,level_step,st,ht,dx,iq,exp," "stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair," - "skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina," + "skill_level,quickslot,skill_group,alignment,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina," "UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play),horse_skill_point FROM player%s WHERE id=%d", GetTablePostfix(), packet->player_id); @@ -447,7 +447,7 @@ bool CreatePlayerTableFromRes(MYSQL_RES * res, TPlayerTable * pkTab) // "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime," // "gold,level,level_step,st,ht,dx,iq,exp," // "stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair," - // "skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_stamina FROM player%s WHERE id=%d", + // "skill_level,quickslot,skill_group,alignment,horse_level,horse_riding,horse_hp,horse_stamina FROM player%s WHERE id=%d", str_to_number(pkTab->id, row[col++]); strlcpy(pkTab->name, row[col++], sizeof(pkTab->name)); str_to_number(pkTab->job, row[col++]); @@ -498,11 +498,6 @@ bool CreatePlayerTableFromRes(MYSQL_RES * res, TPlayerTable * pkTab) str_to_number(pkTab->skill_group, row[col++]); str_to_number(pkTab->lAlignment, row[col++]); - if (row[col]) - { - strlcpy(pkTab->szMobile, row[col], sizeof(pkTab->szMobile)); - } - col++; str_to_number(pkTab->horse.bLevel, row[col++]); diff --git a/src/game/src/char.cpp b/src/game/src/char.cpp index 3528b97..afe96ac 100644 --- a/src/game/src/char.cpp +++ b/src/game/src/char.cpp @@ -258,8 +258,6 @@ void CHARACTER::Initialize() m_dwQuestByVnum = 0; m_pQuestItem = NULL; - m_szMobileAuth[0] = '\0'; - m_dwUnderGuildWarInfoMessageTime = get_dword_time()-60000; m_bUnderRefine = false; @@ -1219,9 +1217,6 @@ void CHARACTER::CreatePlayerProto(TPlayerTable & tab) for (int i = 0; i < QUICKSLOT_MAX_NUM; ++i) tab.quickslot[i] = m_quickslot[i]; - if (m_stMobile.length() && !*m_szMobileAuth) - strlcpy(tab.szMobile, m_stMobile.c_str(), sizeof(tab.szMobile)); - memcpy(tab.parts, m_pointsInstant.parts, sizeof(tab.parts)); // REMOVE_REAL_SKILL_LEVLES @@ -1549,8 +1544,6 @@ void CHARACTER::MainCharacterPacket() strlcpy(mainChrPacket.szBGMName, bgmInfo.name.c_str(), sizeof(mainChrPacket.szBGMName)); GetDesc()->Packet(&mainChrPacket, sizeof(TPacketGCMainCharacter3_BGM)); } - //if (m_stMobile.length()) - // ChatPacket(CHAT_TYPE_COMMAND, "sms"); } // END_OF_SUPPORT_BGM else @@ -1568,9 +1561,6 @@ void CHARACTER::MainCharacterPacket() pack.skill_group = GetSkillGroup(); strlcpy(pack.szName, GetName(), sizeof(pack.szName)); GetDesc()->Packet(&pack, sizeof(TPacketGCMainCharacter)); - - if (m_stMobile.length()) - ChatPacket(CHAT_TYPE_COMMAND, "sms"); } } @@ -1790,8 +1780,6 @@ void CHARACTER::SetPlayerProto(const TPlayerTable * t) if (GetLevel() < PK_PROTECT_LEVEL) m_bPKMode = PK_MODE_PROTECT; - m_stMobile = t->szMobile; - SetHorseData(t->horse); if (GetHorseLevel() > 0) diff --git a/src/game/src/char.h b/src/game/src/char.h index 5e3356b..0450720 100644 --- a/src/game/src/char.h +++ b/src/game/src/char.h @@ -790,8 +790,6 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider DWORD m_dwPlayStartTime; BYTE m_bAddChrState; bool m_bSkipSave; - std::string m_stMobile; - char m_szMobileAuth[5]; BYTE m_bChatCounter; // End of Basic Points diff --git a/src/game/src/cmd.cpp b/src/game/src/cmd.cpp index b9d3bf6..0b25b1c 100644 --- a/src/game/src/cmd.cpp +++ b/src/game/src/cmd.cpp @@ -111,8 +111,6 @@ ACMD(do_cancel_guild_war); ACMD(do_guild_state); ACMD(do_pkmode); -ACMD(do_mobile); -ACMD(do_mobile_auth); ACMD(do_messenger_auth); ACMD(do_getqf); diff --git a/src/game/src/input.h b/src/game/src/input.h index dbb9d01..38a7608 100644 --- a/src/game/src/input.h +++ b/src/game/src/input.h @@ -308,7 +308,6 @@ class CInputP2P : public CInputProcessor void Disconnect(const char * c_pData); void MessengerAdd(const char * c_pData); void MessengerRemove(const char * c_pData); - void MessengerMobile(const char * c_pData); void FindPosition(LPDESC d, const char* c_pData); void WarpCharacter(const char* c_pData); void GuildWarZoneMapIndex(const char* c_pData); diff --git a/src/game/src/messenger_manager.cpp b/src/game/src/messenger_manager.cpp index e30b7b5..f1b2078 100644 --- a/src/game/src/messenger_manager.cpp +++ b/src/game/src/messenger_manager.cpp @@ -109,7 +109,6 @@ void MessengerManager::Logout(MessengerManager::keyA account) } m_Relation.erase(account); - //m_map_stMobile.erase(account); } void MessengerManager::RequestToAdd(LPCHARACTER ch, LPCHARACTER target) diff --git a/src/game/src/packet.h b/src/game/src/packet.h index d33ecf0..f602fb3 100644 --- a/src/game/src/packet.h +++ b/src/game/src/packet.h @@ -293,7 +293,6 @@ enum HEADER_GG_MESSENGER_REMOVE = 11, HEADER_GG_FIND_POSITION = 12, HEADER_GG_WARP_CHARACTER = 13, - HEADER_GG_MESSENGER_MOBILE = 14, HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15, HEADER_GG_TRANSFER = 16, HEADER_GG_XMAS_WARP_SANTA = 17, @@ -430,11 +429,6 @@ typedef struct SPacketGGXmasWarpSantaReply BYTE bChannel; } TPacketGGXmasWarpSantaReply; -typedef struct SMessengerData -{ - char szMobile[MOBILE_MAX_LEN + 1]; -} TMessengerData; - typedef struct SPacketGGMessenger { BYTE bHeader; @@ -442,13 +436,6 @@ typedef struct SPacketGGMessenger char szCompanion[CHARACTER_NAME_MAX_LEN + 1]; } TPacketGGMessenger; -typedef struct SPacketGGMessengerMobile -{ - BYTE bHeader; - char szName[CHARACTER_NAME_MAX_LEN + 1]; - char szMobile[MOBILE_MAX_LEN + 1]; -} TPacketGGMessengerMobile; - typedef struct SPacketGGFindPosition { BYTE header; @@ -1436,8 +1423,7 @@ enum MESSENGER_SUBHEADER_GC_LIST, MESSENGER_SUBHEADER_GC_LOGIN, MESSENGER_SUBHEADER_GC_LOGOUT, - MESSENGER_SUBHEADER_GC_INVITE, - MESSENGER_SUBHEADER_GC_MOBILE + MESSENGER_SUBHEADER_GC_INVITE }; typedef struct packet_messenger diff --git a/src/game/src/packet_info.cpp b/src/game/src/packet_info.cpp index 874dbaf..88f4744 100644 --- a/src/game/src/packet_info.cpp +++ b/src/game/src/packet_info.cpp @@ -242,7 +242,6 @@ CPacketInfoGG::CPacketInfoGG() Set(HEADER_GG_MESSENGER_REMOVE, sizeof(TPacketGGMessenger), "MessengerRemove", false); Set(HEADER_GG_FIND_POSITION, sizeof(TPacketGGFindPosition), "FindPosition", false); Set(HEADER_GG_WARP_CHARACTER, sizeof(TPacketGGWarpCharacter), "WarpCharacter", false); - Set(HEADER_GG_MESSENGER_MOBILE, sizeof(TPacketGGMessengerMobile), "MessengerMobile", false); Set(HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX, sizeof(TPacketGGGuildWarMapIndex), "GuildWarMapIndex", false); Set(HEADER_GG_TRANSFER, sizeof(TPacketGGTransfer), "Transfer", false); Set(HEADER_GG_XMAS_WARP_SANTA, sizeof(TPacketGGXmasWarpSanta), "XmasWarpSanta", false);