summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/charserverhandler.cpp4
-rw-r--r--src/net/ea/gamehandler.cpp2
-rw-r--r--src/net/ea/gui/guildtab.cpp6
-rw-r--r--src/net/ea/gui/guildtab.h2
-rw-r--r--src/net/ea/gui/partytab.cpp5
-rw-r--r--src/net/ea/gui/partytab.h2
-rw-r--r--src/net/ea/partyhandler.cpp1
-rw-r--r--src/net/ea/partyhandler.h1
-rw-r--r--src/net/ea/playerhandler.cpp13
9 files changed, 29 insertions, 7 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 2dc51acf3..67894b0d9 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -167,7 +167,7 @@ void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg)
errorMessage = _("Incorrect race.");
break;
}
- new OkDialog(_("Error"), errorMessage);
+ new OkDialog(_("Error"), errorMessage, DIALOG_ERROR);
if (mCharCreateDialog)
mCharCreateDialog->unlock();
}
@@ -185,7 +185,7 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED)
void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
{
unlockCharSelectDialog();
- new OkDialog(_("Error"), _("Failed to delete character."));
+ new OkDialog(_("Error"), _("Failed to delete character."), DIALOG_ERROR);
}
void CharServerHandler::clear()
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 6d021d6a9..c8c870dbd 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -101,7 +101,7 @@ void GameHandler::processCharSwitchResponse(Net::MessageIn &msg)
void GameHandler::processMapQuitResponse(Net::MessageIn &msg)
{
if (msg.readInt8())
- new OkDialog(_("Game"), _("Request to quit denied!"), nullptr);
+ new OkDialog(_("Game"), _("Request to quit denied!"), DIALOG_ERROR);
}
} // namespace Ea
diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp
index 87fc34d94..bd1521b21 100644
--- a/src/net/ea/gui/guildtab.cpp
+++ b/src/net/ea/gui/guildtab.cpp
@@ -26,6 +26,7 @@
#include "commandhandler.h"
#include "guild.h"
#include "localplayer.h"
+#include "sound.h"
#include "gui/theme.h"
@@ -151,4 +152,9 @@ void GuildTab::saveToLogFile(std::string &msg)
chatLogger->log("#Guild", msg);
}
+void GuildTab::playNewMessageSound()
+{
+ sound.playGuiSound(SOUND_GUILD);
+}
+
} // namespace Ea
diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h
index 81d971161..22a41ce80 100644
--- a/src/net/ea/gui/guildtab.h
+++ b/src/net/ea/gui/guildtab.h
@@ -47,6 +47,8 @@ class GuildTab : public ChatTab
int getType() const
{ return ChatTab::TAB_GUILD; }
+ void playNewMessageSound();
+
protected:
void handleInput(const std::string &msg);
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp
index d5e344ac2..e69207842 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/ea/gui/partytab.cpp
@@ -26,6 +26,7 @@
#include "commandhandler.h"
#include "localplayer.h"
#include "party.h"
+#include "sound.h"
#include "gui/theme.h"
@@ -241,4 +242,8 @@ void PartyTab::saveToLogFile(std::string &msg)
chatLogger->log("#Party", msg);
}
+void PartyTab::playNewMessageSound()
+{
+ sound.playGuiSound(SOUND_GUILD);
+}
} // namespace Ea
diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h
index 029d71ac7..931b283dd 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/ea/gui/partytab.h
@@ -47,6 +47,8 @@ class PartyTab : public ChatTab
void saveToLogFile(std::string &msg);
+ void playNewMessageSound();
+
protected:
void handleInput(const std::string &msg);
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 556e72c8d..68d712db1 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -1,6 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2008 Lloyd Bryant <lloyd_bryant@netzero.net>
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h
index 596fda4f7..f08930e8c 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/ea/partyhandler.h
@@ -1,6 +1,7 @@
/*
* The ManaPlus Client
* Copyright (C) 2008 Lloyd Bryant <lloyd_bryant@netzero.net>
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 27aa4da80..bfbef0798 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -28,6 +28,7 @@
#include "playerinfo.h"
#include "units.h"
+#include "gui/ministatuswindow.h"
#include "gui/okdialog.h"
#include "gui/skilldialog.h"
#include "gui/statuswindow.h"
@@ -257,7 +258,12 @@ void PlayerHandler::processPlayerWarp(Net::MessageIn &msg)
static_cast<int>(scrollOffsetY));
if (viewport)
+ {
+ viewport->returnCamera();
+ if (miniStatusWindow)
+ miniStatusWindow->updateStatus();
viewport->scrollBy(scrollOffsetX, scrollOffsetY);
+ }
}
void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
@@ -336,7 +342,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
weightNotice = new OkDialog(_("Message"),
_("You are carrying more than "
"half your weight. You are "
- "unable to regain health."), false);
+ "unable to regain health."), DIALOG_OK, false);
weightNotice->addActionListener(
&weightListener);
}
@@ -346,7 +352,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
weightNotice = new OkDialog(_("Message"),
_("You are carrying less than "
"half your weight. You "
- "can regain health."), false);
+ "can regain health."), DIALOG_OK, false);
weightNotice->addActionListener(
&weightListener);
}
@@ -426,8 +432,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
if (PlayerInfo::getAttribute(HP) == 0 && !deathNotice)
{
deathNotice = new OkDialog(_("Message"),
- randomDeathMessage(),
- false);
+ randomDeathMessage(), DIALOG_OK, false);
deathNotice->addActionListener(&deathListener);
player_node->setAction(Being::DEAD);
}