summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-30 15:30:18 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-30 15:30:18 -0700
commit197f6fedf46c866123ddb37872708baf9bb2dc3f (patch)
tree6494753c9bc2e449c776e65415d1345a7de0eead /src
parentde0944f0bcbc3107071293c370833c39f71ab33d (diff)
downloadtmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.gz
tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.bz2
tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.tar.xz
tmwa-197f6fedf46c866123ddb37872708baf9bb2dc3f.zip
Finish packet naming
Diffstat (limited to 'src')
-rw-r--r--src/char/int_party.cpp24
-rw-r--r--src/login/login.cpp32
-rw-r--r--src/proto2/char-map.hpp38
-rw-r--r--src/proto2/fwd.hpp10
-rw-r--r--src/proto2/login-char.hpp43
5 files changed, 0 insertions, 147 deletions
diff --git a/src/char/int_party.cpp b/src/char/int_party.cpp
index fc6136b..c9ab5a4 100644
--- a/src/char/int_party.cpp
+++ b/src/char/int_party.cpp
@@ -650,19 +650,6 @@ void mapif_parse_PartyChangeMap(Session *s, PartyId party_id, AccountId account_
}
}
-// パーティ解散要求
-static
-void mapif_parse_BreakParty(Session *, PartyId party_id)
-{
- PartyPair p;
- p.party_most = party_db.search(party_id);
- if (!p)
- return;
-
- party_db.erase(party_id);
- mapif_party_broken(party_id, 0 /*unknown*/);
-}
-
// パーティメッセージ送信
static
void mapif_parse_PartyMessage(Session *, PartyId party_id, AccountId account_id, XString mes)
@@ -790,17 +777,6 @@ RecvResult inter_party_parse_frommap(Session *ms, uint16_t packet_id)
lv);
break;
}
- case 0x3026:
- {
- Packet_Fixed<0x3026> fixed;
- rv = recv_fpacket<0x3026, 6>(ms, fixed);
- if (rv != RecvResult::Complete)
- break;
-
- PartyId party_id = fixed.party_id;
- mapif_parse_BreakParty(ms, party_id);
- break;
- }
case 0x3027:
{
Packet_Head<0x3027> head;
diff --git a/src/login/login.cpp b/src/login/login.cpp
index 82ab89a..a8bc7a0 100644
--- a/src/login/login.cpp
+++ b/src/login/login.cpp
@@ -1097,38 +1097,6 @@ void parse_fromchar(Session *s)
break;
}
- // we receive a e-mail creation of an account with a default e-mail (no answer)
- case 0x2715:
- {
- Packet_Fixed<0x2715> fixed;
- rv = recv_fpacket<0x2715, 46>(s, fixed);
- if (rv != RecvResult::Complete)
- break;
-
- AccountId acc = fixed.account_id;
- AccountEmail email = fixed.email;
- if (!e_mail_check(email))
- LOGIN_LOG("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - e-mail is invalid (account: %d, ip: %s)\n"_fmt,
- server[id].name, acc, ip);
- else
- {
- for (AuthData& ad : auth_data)
- {
- if (ad.account_id == acc
- && (ad.email == DEFAULT_EMAIL || !ad.email))
- {
- ad.email = email;
- LOGIN_LOG("Char-server '%s': Create an e-mail on an account with a default e-mail (account: %d, new e-mail: %s, ip: %s).\n"_fmt,
- server[id].name, acc, email, ip);
- goto x2715_out;
- }
- }
- LOGIN_LOG("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - account doesn't exist or e-mail of account isn't default e-mail (account: %d, ip: %s).\n"_fmt,
- server[id].name, acc, ip);
- }
- x2715_out:
- break;
- }
// We receive an e-mail/limited time request, because a player comes back from a map-server to the char-server
case 0x2716:
{
diff --git a/src/proto2/char-map.hpp b/src/proto2/char-map.hpp
index 23798b2..8a23be6 100644
--- a/src/proto2/char-map.hpp
+++ b/src/proto2/char-map.hpp
@@ -648,16 +648,6 @@ struct Packet_Fixed<0x3025>
};
template<>
-struct Packet_Fixed<0x3026>
-{
- static const uint16_t PACKET_ID = 0x3026;
-
- // TODO remove this
- uint16_t magic_packet_id = PACKET_ID;
- PartyId party_id = {};
-};
-
-template<>
struct Packet_Head<0x3027>
{
static const uint16_t PACKET_ID = 0x3027;
@@ -1663,17 +1653,6 @@ static_assert(sizeof(NetPacket_Fixed<0x3025>) == 29, "sizeof(NetPacket_Fixed<0x3
static_assert(alignof(NetPacket_Fixed<0x3025>) == 1, "alignof(NetPacket_Fixed<0x3025>) == 1");
template<>
-struct NetPacket_Fixed<0x3026>
-{
- Little16 magic_packet_id;
- Little32 party_id;
-};
-static_assert(offsetof(NetPacket_Fixed<0x3026>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3026>, magic_packet_id) == 0");
-static_assert(offsetof(NetPacket_Fixed<0x3026>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3026>, party_id) == 2");
-static_assert(sizeof(NetPacket_Fixed<0x3026>) == 6, "sizeof(NetPacket_Fixed<0x3026>) == 6");
-static_assert(alignof(NetPacket_Fixed<0x3026>) == 1, "alignof(NetPacket_Fixed<0x3026>) == 1");
-
-template<>
struct NetPacket_Head<0x3027>
{
Little16 magic_packet_id;
@@ -3062,23 +3041,6 @@ bool network_to_native(Packet_Fixed<0x3025> *native, NetPacket_Fixed<0x3025> net
}
inline __attribute__((warn_unused_result))
-bool native_to_network(NetPacket_Fixed<0x3026> *network, Packet_Fixed<0x3026> native)
-{
- bool rv = true;
- rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id);
- rv &= native_to_network(&network->party_id, native.party_id);
- return rv;
-}
-inline __attribute__((warn_unused_result))
-bool network_to_native(Packet_Fixed<0x3026> *native, NetPacket_Fixed<0x3026> network)
-{
- bool rv = true;
- rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id);
- rv &= network_to_native(&native->party_id, network.party_id);
- return rv;
-}
-
-inline __attribute__((warn_unused_result))
bool native_to_network(NetPacket_Head<0x3027> *network, Packet_Head<0x3027> native)
{
bool rv = true;
diff --git a/src/proto2/fwd.hpp b/src/proto2/fwd.hpp
index 6077913..e1e0161 100644
--- a/src/proto2/fwd.hpp
+++ b/src/proto2/fwd.hpp
@@ -66,11 +66,6 @@ template<>
struct NetPacket_Fixed<0x2714>;
template<>
-struct Packet_Fixed<0x2715>;
-template<>
-struct NetPacket_Fixed<0x2715>;
-
-template<>
struct Packet_Fixed<0x2716>;
template<>
struct NetPacket_Fixed<0x2716>;
@@ -716,11 +711,6 @@ template<>
struct NetPacket_Fixed<0x3025>;
template<>
-struct Packet_Fixed<0x3026>;
-template<>
-struct NetPacket_Fixed<0x3026>;
-
-template<>
struct Packet_Head<0x3027>;
template<>
struct NetPacket_Head<0x3027>;
diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp
index 6bd939c..00fe2ac 100644
--- a/src/proto2/login-char.hpp
+++ b/src/proto2/login-char.hpp
@@ -103,17 +103,6 @@ struct Packet_Fixed<0x2714>
};
template<>
-struct Packet_Fixed<0x2715>
-{
- static const uint16_t PACKET_ID = 0x2715;
-
- // TODO remove this
- uint16_t magic_packet_id = PACKET_ID;
- AccountId account_id = {};
- AccountEmail email = {};
-};
-
-template<>
struct Packet_Fixed<0x2716>
{
static const uint16_t PACKET_ID = 0x2716;
@@ -430,19 +419,6 @@ static_assert(sizeof(NetPacket_Fixed<0x2714>) == 6, "sizeof(NetPacket_Fixed<0x27
static_assert(alignof(NetPacket_Fixed<0x2714>) == 1, "alignof(NetPacket_Fixed<0x2714>) == 1");
template<>
-struct NetPacket_Fixed<0x2715>
-{
- Little16 magic_packet_id;
- Little32 account_id;
- NetString<sizeof(AccountEmail)> email;
-};
-static_assert(offsetof(NetPacket_Fixed<0x2715>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2715>, magic_packet_id) == 0");
-static_assert(offsetof(NetPacket_Fixed<0x2715>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2715>, account_id) == 2");
-static_assert(offsetof(NetPacket_Fixed<0x2715>, email) == 6, "offsetof(NetPacket_Fixed<0x2715>, email) == 6");
-static_assert(sizeof(NetPacket_Fixed<0x2715>) == 46, "sizeof(NetPacket_Fixed<0x2715>) == 46");
-static_assert(alignof(NetPacket_Fixed<0x2715>) == 1, "alignof(NetPacket_Fixed<0x2715>) == 1");
-
-template<>
struct NetPacket_Fixed<0x2716>
{
Little16 magic_packet_id;
@@ -831,25 +807,6 @@ bool network_to_native(Packet_Fixed<0x2714> *native, NetPacket_Fixed<0x2714> net
}
inline __attribute__((warn_unused_result))
-bool native_to_network(NetPacket_Fixed<0x2715> *network, Packet_Fixed<0x2715> native)
-{
- bool rv = true;
- rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id);
- rv &= native_to_network(&network->account_id, native.account_id);
- rv &= native_to_network(&network->email, native.email);
- return rv;
-}
-inline __attribute__((warn_unused_result))
-bool network_to_native(Packet_Fixed<0x2715> *native, NetPacket_Fixed<0x2715> network)
-{
- bool rv = true;
- rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id);
- rv &= network_to_native(&native->account_id, network.account_id);
- rv &= network_to_native(&native->email, network.email);
- return rv;
-}
-
-inline __attribute__((warn_unused_result))
bool native_to_network(NetPacket_Fixed<0x2716> *network, Packet_Fixed<0x2716> native)
{
bool rv = true;