summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/serverfeatures.cpp5
-rw-r--r--src/net/eathena/serverfeatures.h2
-rw-r--r--src/net/serverfeatures.h2
-rw-r--r--src/net/tmwa/guildhandler.cpp17
-rw-r--r--src/net/tmwa/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
6 files changed, 30 insertions, 3 deletions
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 1ea480e71..e0fae12bb 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -230,4 +230,9 @@ bool ServerFeatures::haveTeamId() const
return false;
}
+bool ServerFeatures::haveNewGuild() const
+{
+ return false;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index 459271068..291551a89 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -111,6 +111,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveChangePassword() const override final;
bool haveTeamId() const override final;
+
+ bool haveNewGuild() const override final;
};
} // namespace EAthena
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 81146d7a7..df5b6fe3b 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -108,6 +108,8 @@ class ServerFeatures notfinal
virtual bool haveChangePassword() const = 0;
virtual bool haveTeamId() const = 0;
+
+ virtual bool haveNewGuild() const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index 41d169395..4bd0e800c 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -398,9 +398,20 @@ void GuildHandler::processGuildMemberLogin(Net::MessageIn &msg)
void GuildHandler::processGuildExpulsion(Net::MessageIn &msg)
{
- const std::string nick = msg.readString(24, "name");
- msg.readString(40, "reason");
- msg.readString(24, "kicker name");
+ std::string nick;
+ if (serverFeatures->haveNewGuild())
+ {
+ nick = msg.readString(24, "name");
+ msg.readString(40, "reason");
+ msg.readString(24, "kicker name");
+ }
+ else
+ {
+ msg.readInt16("len?");
+ nick = msg.readString(24, "name?");
+ msg.skip(24, "player name");
+ msg.readString(44, "message");
+ }
processGuildExpulsionContinue(nick);
}
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index c32dac11e..a277a15f1 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -229,4 +229,9 @@ bool ServerFeatures::haveTeamId() const
return tmwServerVersion > 0;
}
+bool ServerFeatures::haveNewGuild() const
+{
+ return tmwServerVersion > 0;
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 383d048b4..e13d67250 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -111,6 +111,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveChangePassword() const override final;
bool haveTeamId() const override final;
+
+ bool haveNewGuild() const override final;
};
} // namespace TmwAthena