aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index f8adb12..9ea2839 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -106,13 +106,6 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
destruct_courtroom();
destruct_lobby();
}
- else if (header == "DOOM")
- {
- call_notice("You have been exiled from AO."
- "Have a nice day.");
- destruct_courtroom();
- destruct_lobby();
- }
end:
@@ -398,16 +391,9 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
}
else
{
- if (f_music.endsWith(".wav") ||
- f_music.endsWith(".mp3") ||
- f_music.endsWith(".mp4") ||
- f_music.endsWith(".ogg") ||
- f_music.endsWith(".opus"))
+ if (f_contents.at(n_element) == "===MUSIC START===.mp3")
{
musics_time = true;
- areas--;
- w_courtroom->fix_last_area();
- w_courtroom->append_music(f_music);
}
else
{
@@ -493,16 +479,9 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
}
else
{
- if (f_contents.at(n_element).endsWith(".wav") ||
- f_contents.at(n_element).endsWith(".mp3") ||
- f_contents.at(n_element).endsWith(".mp4") ||
- f_contents.at(n_element).endsWith(".ogg") ||
- f_contents.at(n_element).endsWith(".opus"))
+ if (f_contents.at(n_element) == "===MUSIC START===.mp3")
{
musics_time = true;
- w_courtroom->fix_last_area();
- w_courtroom->append_music(f_contents.at(n_element));
- areas--;
}
else
{
@@ -538,6 +517,16 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
destruct_lobby();
}
+ else if (header == "REFMUSIC")
+ {
+ if (courtroom_constructed)
+ w_courtroom->reset_music_list();
+ for (int n_element = 0 ; n_element < f_contents.size() ; ++n_element)
+ {
+ w_courtroom->append_music(f_contents.at(n_element));
+ }
+ w_courtroom->list_music();
+ }
else if (header == "BN")
{
if (f_contents.size() < 1)
@@ -618,6 +607,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
}
}
}
+ else if (header == "FAILEDLOGIN")
+ {
+ if (courtroom_constructed)
+ w_courtroom->handle_failed_login();
+ }
else if (header == "IL")
{
if (courtroom_constructed && f_contents.size() > 0)