forked from metin2/server
Removed messenger SMS
This commit is contained in:
parent
01cc27a7df
commit
d85ef28eac
@ -16,8 +16,6 @@ enum EMisc
|
|||||||
ABILITY_MAX_NUM = 50,
|
ABILITY_MAX_NUM = 50,
|
||||||
EMPIRE_MAX_NUM = 4,
|
EMPIRE_MAX_NUM = 4,
|
||||||
BANWORD_MAX_LEN = 24,
|
BANWORD_MAX_LEN = 24,
|
||||||
SMS_MAX_LEN = 80,
|
|
||||||
MOBILE_MAX_LEN = 32,
|
|
||||||
SOCIAL_ID_MAX_LEN = 18,
|
SOCIAL_ID_MAX_LEN = 18,
|
||||||
MAP_ALLOW_MAX_LEN = 128,
|
MAP_ALLOW_MAX_LEN = 128,
|
||||||
|
|
||||||
|
@ -62,7 +62,6 @@ enum
|
|||||||
HEADER_GD_RELOAD_PROTO = 43,
|
HEADER_GD_RELOAD_PROTO = 43,
|
||||||
|
|
||||||
HEADER_GD_CHANGE_NAME = 44,
|
HEADER_GD_CHANGE_NAME = 44,
|
||||||
HEADER_GD_SMS = 45,
|
|
||||||
|
|
||||||
HEADER_GD_GUILD_CHANGE_LADDER_POINT = 46,
|
HEADER_GD_GUILD_CHANGE_LADDER_POINT = 46,
|
||||||
HEADER_GD_GUILD_USE_SKILL = 47,
|
HEADER_GD_GUILD_USE_SKILL = 47,
|
||||||
@ -421,7 +420,6 @@ typedef struct SPlayerTable
|
|||||||
|
|
||||||
BYTE skill_group;
|
BYTE skill_group;
|
||||||
LONG lAlignment;
|
LONG lAlignment;
|
||||||
char szMobile[MOBILE_MAX_LEN + 1];
|
|
||||||
|
|
||||||
WORD stat_reset_count;
|
WORD stat_reset_count;
|
||||||
|
|
||||||
@ -969,14 +967,6 @@ typedef struct SPacketGuildLadderPoint
|
|||||||
LONG lChange;
|
LONG lChange;
|
||||||
} TPacketGuildLadderPoint;
|
} 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
|
typedef struct SPacketGuildUseSkill
|
||||||
{
|
{
|
||||||
DWORD dwGuild;
|
DWORD dwGuild;
|
||||||
|
@ -1665,22 +1665,6 @@ void CClientManager::QUERY_FLUSH_CACHE(CPeer * pkPeer, const char * c_pData)
|
|||||||
delete pkCache;
|
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()
|
void CClientManager::QUERY_RELOAD_PROTO()
|
||||||
{
|
{
|
||||||
if (!InitializeTables())
|
if (!InitializeTables())
|
||||||
@ -2314,10 +2298,6 @@ void CClientManager::ProcessPackets(CPeer * peer)
|
|||||||
QUERY_CHANGE_NAME(peer, dwHandle, (TPacketGDChangeName *) data);
|
QUERY_CHANGE_NAME(peer, dwHandle, (TPacketGDChangeName *) data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HEADER_GD_SMS:
|
|
||||||
QUERY_SMS(peer, (TPacketGDSMS *) data);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HEADER_GD_AUTH_LOGIN:
|
case HEADER_GD_AUTH_LOGIN:
|
||||||
QUERY_AUTH_LOGIN(peer, dwHandle, (TPacketGDAuthLogin *) data);
|
QUERY_AUTH_LOGIN(peer, dwHandle, (TPacketGDAuthLogin *) data);
|
||||||
break;
|
break;
|
||||||
|
@ -324,7 +324,6 @@ class CClientManager : public singleton<CClientManager>
|
|||||||
void QUERY_CHANGE_NAME(CPeer * peer, DWORD dwHandle, TPacketGDChangeName * p);
|
void QUERY_CHANGE_NAME(CPeer * peer, DWORD dwHandle, TPacketGDChangeName * p);
|
||||||
void GetPlayerFromRes(TPlayerTable * player_table, MYSQL_RES* res);
|
void GetPlayerFromRes(TPlayerTable * player_table, MYSQL_RES* res);
|
||||||
|
|
||||||
void QUERY_SMS(CPeer * pkPeer, TPacketGDSMS * p);
|
|
||||||
void QUERY_LOGIN_KEY(CPeer * pkPeer, TPacketGDLoginKey * p);
|
void QUERY_LOGIN_KEY(CPeer * pkPeer, TPacketGDLoginKey * p);
|
||||||
|
|
||||||
void AddGuildPriv(TPacketGiveGuildPriv* p);
|
void AddGuildPriv(TPacketGiveGuildPriv* p);
|
||||||
|
@ -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,"
|
"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,"
|
"gold,level,level_step,st,ht,dx,iq,exp,"
|
||||||
"stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
|
"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",
|
"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play),horse_skill_point FROM player%s WHERE id=%d",
|
||||||
GetTablePostfix(), packet->player_id);
|
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,"
|
// "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,"
|
// "gold,level,level_step,st,ht,dx,iq,exp,"
|
||||||
// "stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
|
// "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++]);
|
str_to_number(pkTab->id, row[col++]);
|
||||||
strlcpy(pkTab->name, row[col++], sizeof(pkTab->name));
|
strlcpy(pkTab->name, row[col++], sizeof(pkTab->name));
|
||||||
str_to_number(pkTab->job, row[col++]);
|
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->skill_group, row[col++]);
|
||||||
str_to_number(pkTab->lAlignment, row[col++]);
|
str_to_number(pkTab->lAlignment, row[col++]);
|
||||||
|
|
||||||
if (row[col])
|
|
||||||
{
|
|
||||||
strlcpy(pkTab->szMobile, row[col], sizeof(pkTab->szMobile));
|
|
||||||
}
|
|
||||||
|
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
str_to_number(pkTab->horse.bLevel, row[col++]);
|
str_to_number(pkTab->horse.bLevel, row[col++]);
|
||||||
|
@ -258,8 +258,6 @@ void CHARACTER::Initialize()
|
|||||||
m_dwQuestByVnum = 0;
|
m_dwQuestByVnum = 0;
|
||||||
m_pQuestItem = NULL;
|
m_pQuestItem = NULL;
|
||||||
|
|
||||||
m_szMobileAuth[0] = '\0';
|
|
||||||
|
|
||||||
m_dwUnderGuildWarInfoMessageTime = get_dword_time()-60000;
|
m_dwUnderGuildWarInfoMessageTime = get_dword_time()-60000;
|
||||||
|
|
||||||
m_bUnderRefine = false;
|
m_bUnderRefine = false;
|
||||||
@ -1219,9 +1217,6 @@ void CHARACTER::CreatePlayerProto(TPlayerTable & tab)
|
|||||||
for (int i = 0; i < QUICKSLOT_MAX_NUM; ++i)
|
for (int i = 0; i < QUICKSLOT_MAX_NUM; ++i)
|
||||||
tab.quickslot[i] = m_quickslot[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));
|
memcpy(tab.parts, m_pointsInstant.parts, sizeof(tab.parts));
|
||||||
|
|
||||||
// REMOVE_REAL_SKILL_LEVLES
|
// REMOVE_REAL_SKILL_LEVLES
|
||||||
@ -1549,8 +1544,6 @@ void CHARACTER::MainCharacterPacket()
|
|||||||
strlcpy(mainChrPacket.szBGMName, bgmInfo.name.c_str(), sizeof(mainChrPacket.szBGMName));
|
strlcpy(mainChrPacket.szBGMName, bgmInfo.name.c_str(), sizeof(mainChrPacket.szBGMName));
|
||||||
GetDesc()->Packet(&mainChrPacket, sizeof(TPacketGCMainCharacter3_BGM));
|
GetDesc()->Packet(&mainChrPacket, sizeof(TPacketGCMainCharacter3_BGM));
|
||||||
}
|
}
|
||||||
//if (m_stMobile.length())
|
|
||||||
// ChatPacket(CHAT_TYPE_COMMAND, "sms");
|
|
||||||
}
|
}
|
||||||
// END_OF_SUPPORT_BGM
|
// END_OF_SUPPORT_BGM
|
||||||
else
|
else
|
||||||
@ -1568,9 +1561,6 @@ void CHARACTER::MainCharacterPacket()
|
|||||||
pack.skill_group = GetSkillGroup();
|
pack.skill_group = GetSkillGroup();
|
||||||
strlcpy(pack.szName, GetName(), sizeof(pack.szName));
|
strlcpy(pack.szName, GetName(), sizeof(pack.szName));
|
||||||
GetDesc()->Packet(&pack, sizeof(TPacketGCMainCharacter));
|
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)
|
if (GetLevel() < PK_PROTECT_LEVEL)
|
||||||
m_bPKMode = PK_MODE_PROTECT;
|
m_bPKMode = PK_MODE_PROTECT;
|
||||||
|
|
||||||
m_stMobile = t->szMobile;
|
|
||||||
|
|
||||||
SetHorseData(t->horse);
|
SetHorseData(t->horse);
|
||||||
|
|
||||||
if (GetHorseLevel() > 0)
|
if (GetHorseLevel() > 0)
|
||||||
|
@ -790,8 +790,6 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider
|
|||||||
DWORD m_dwPlayStartTime;
|
DWORD m_dwPlayStartTime;
|
||||||
BYTE m_bAddChrState;
|
BYTE m_bAddChrState;
|
||||||
bool m_bSkipSave;
|
bool m_bSkipSave;
|
||||||
std::string m_stMobile;
|
|
||||||
char m_szMobileAuth[5];
|
|
||||||
BYTE m_bChatCounter;
|
BYTE m_bChatCounter;
|
||||||
|
|
||||||
// End of Basic Points
|
// End of Basic Points
|
||||||
|
@ -111,8 +111,6 @@ ACMD(do_cancel_guild_war);
|
|||||||
ACMD(do_guild_state);
|
ACMD(do_guild_state);
|
||||||
|
|
||||||
ACMD(do_pkmode);
|
ACMD(do_pkmode);
|
||||||
ACMD(do_mobile);
|
|
||||||
ACMD(do_mobile_auth);
|
|
||||||
ACMD(do_messenger_auth);
|
ACMD(do_messenger_auth);
|
||||||
|
|
||||||
ACMD(do_getqf);
|
ACMD(do_getqf);
|
||||||
|
@ -308,7 +308,6 @@ class CInputP2P : public CInputProcessor
|
|||||||
void Disconnect(const char * c_pData);
|
void Disconnect(const char * c_pData);
|
||||||
void MessengerAdd(const char * c_pData);
|
void MessengerAdd(const char * c_pData);
|
||||||
void MessengerRemove(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 FindPosition(LPDESC d, const char* c_pData);
|
||||||
void WarpCharacter(const char* c_pData);
|
void WarpCharacter(const char* c_pData);
|
||||||
void GuildWarZoneMapIndex(const char* c_pData);
|
void GuildWarZoneMapIndex(const char* c_pData);
|
||||||
|
@ -109,7 +109,6 @@ void MessengerManager::Logout(MessengerManager::keyA account)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_Relation.erase(account);
|
m_Relation.erase(account);
|
||||||
//m_map_stMobile.erase(account);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessengerManager::RequestToAdd(LPCHARACTER ch, LPCHARACTER target)
|
void MessengerManager::RequestToAdd(LPCHARACTER ch, LPCHARACTER target)
|
||||||
|
@ -293,7 +293,6 @@ enum
|
|||||||
HEADER_GG_MESSENGER_REMOVE = 11,
|
HEADER_GG_MESSENGER_REMOVE = 11,
|
||||||
HEADER_GG_FIND_POSITION = 12,
|
HEADER_GG_FIND_POSITION = 12,
|
||||||
HEADER_GG_WARP_CHARACTER = 13,
|
HEADER_GG_WARP_CHARACTER = 13,
|
||||||
HEADER_GG_MESSENGER_MOBILE = 14,
|
|
||||||
HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15,
|
HEADER_GG_GUILD_WAR_ZONE_MAP_INDEX = 15,
|
||||||
HEADER_GG_TRANSFER = 16,
|
HEADER_GG_TRANSFER = 16,
|
||||||
HEADER_GG_XMAS_WARP_SANTA = 17,
|
HEADER_GG_XMAS_WARP_SANTA = 17,
|
||||||
@ -430,11 +429,6 @@ typedef struct SPacketGGXmasWarpSantaReply
|
|||||||
BYTE bChannel;
|
BYTE bChannel;
|
||||||
} TPacketGGXmasWarpSantaReply;
|
} TPacketGGXmasWarpSantaReply;
|
||||||
|
|
||||||
typedef struct SMessengerData
|
|
||||||
{
|
|
||||||
char szMobile[MOBILE_MAX_LEN + 1];
|
|
||||||
} TMessengerData;
|
|
||||||
|
|
||||||
typedef struct SPacketGGMessenger
|
typedef struct SPacketGGMessenger
|
||||||
{
|
{
|
||||||
BYTE bHeader;
|
BYTE bHeader;
|
||||||
@ -442,13 +436,6 @@ typedef struct SPacketGGMessenger
|
|||||||
char szCompanion[CHARACTER_NAME_MAX_LEN + 1];
|
char szCompanion[CHARACTER_NAME_MAX_LEN + 1];
|
||||||
} TPacketGGMessenger;
|
} TPacketGGMessenger;
|
||||||
|
|
||||||
typedef struct SPacketGGMessengerMobile
|
|
||||||
{
|
|
||||||
BYTE bHeader;
|
|
||||||
char szName[CHARACTER_NAME_MAX_LEN + 1];
|
|
||||||
char szMobile[MOBILE_MAX_LEN + 1];
|
|
||||||
} TPacketGGMessengerMobile;
|
|
||||||
|
|
||||||
typedef struct SPacketGGFindPosition
|
typedef struct SPacketGGFindPosition
|
||||||
{
|
{
|
||||||
BYTE header;
|
BYTE header;
|
||||||
@ -1436,8 +1423,7 @@ enum
|
|||||||
MESSENGER_SUBHEADER_GC_LIST,
|
MESSENGER_SUBHEADER_GC_LIST,
|
||||||
MESSENGER_SUBHEADER_GC_LOGIN,
|
MESSENGER_SUBHEADER_GC_LOGIN,
|
||||||
MESSENGER_SUBHEADER_GC_LOGOUT,
|
MESSENGER_SUBHEADER_GC_LOGOUT,
|
||||||
MESSENGER_SUBHEADER_GC_INVITE,
|
MESSENGER_SUBHEADER_GC_INVITE
|
||||||
MESSENGER_SUBHEADER_GC_MOBILE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct packet_messenger
|
typedef struct packet_messenger
|
||||||
|
@ -242,7 +242,6 @@ CPacketInfoGG::CPacketInfoGG()
|
|||||||
Set(HEADER_GG_MESSENGER_REMOVE, sizeof(TPacketGGMessenger), "MessengerRemove", false);
|
Set(HEADER_GG_MESSENGER_REMOVE, sizeof(TPacketGGMessenger), "MessengerRemove", false);
|
||||||
Set(HEADER_GG_FIND_POSITION, sizeof(TPacketGGFindPosition), "FindPosition", false);
|
Set(HEADER_GG_FIND_POSITION, sizeof(TPacketGGFindPosition), "FindPosition", false);
|
||||||
Set(HEADER_GG_WARP_CHARACTER, sizeof(TPacketGGWarpCharacter), "WarpCharacter", 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_GUILD_WAR_ZONE_MAP_INDEX, sizeof(TPacketGGGuildWarMapIndex), "GuildWarMapIndex", false);
|
||||||
Set(HEADER_GG_TRANSFER, sizeof(TPacketGGTransfer), "Transfer", false);
|
Set(HEADER_GG_TRANSFER, sizeof(TPacketGGTransfer), "Transfer", false);
|
||||||
Set(HEADER_GG_XMAS_WARP_SANTA, sizeof(TPacketGGXmasWarpSanta), "XmasWarpSanta", false);
|
Set(HEADER_GG_XMAS_WARP_SANTA, sizeof(TPacketGGXmasWarpSanta), "XmasWarpSanta", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user