summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp4
-rw-r--r--src/actions/chat.cpp4
-rw-r--r--src/actions/commands.cpp17
3 files changed, 9 insertions, 16 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 87c63407d..6c1025650 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -420,9 +420,9 @@ impHandler0(quit)
{
if (Game::instance() == nullptr)
return false;
- if ((popupManager != nullptr) && popupManager->isPopupMenuVisible())
+ if (PopupManager::isPopupMenuVisible())
{
- popupManager->closePopupMenu();
+ PopupManager::closePopupMenu();
return true;
}
else if (quitDialog == nullptr)
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index e1f801c0b..442597849 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -415,7 +415,7 @@ impHandler(guild)
if (guild->getServerGuild())
guildHandler->invite(args);
else if (guildManager != nullptr)
- guildManager->invite(args);
+ GuildManager::invite(args);
#else // TMWA_SUPPORT
guildHandler->invite(args);
@@ -530,7 +530,7 @@ impHandler(kickGuild)
#ifdef TMWA_SUPPORT
else if (guildManager != nullptr)
{
- guildManager->kick(event.args);
+ GuildManager::kick(event.args);
}
#endif // TMWA_SUPPORT
}
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 03278c47f..af7fecf23 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -406,12 +406,8 @@ impHandler(commandOutfit)
impHandler(commandEmote)
{
- if (localPlayer != nullptr)
- {
- localPlayer->emote(CAST_U8(atoi(event.args.c_str())));
- return true;
- }
- return false;
+ LocalPlayer::emote(CAST_U8(atoi(event.args.c_str())));
+ return true;
}
impHandler(awayMessage)
@@ -428,7 +424,7 @@ impHandler(pseudoAway)
{
if (localPlayer != nullptr)
{
- localPlayer->setPseudoAway(event.args);
+ LocalPlayer::setPseudoAway(event.args);
localPlayer->updateStatus();
return true;
}
@@ -1141,9 +1137,6 @@ impHandler(selectSkillLevel)
impHandler(skill)
{
- if (skillDialog == nullptr)
- return false;
-
StringVect vect;
splitToStringVector(vect, event.args, ' ');
const int sz = CAST_S32(vect.size());
@@ -1161,7 +1154,7 @@ impHandler(skill)
// +++ add here also cast type and offsets
if (text.empty())
{
- skillDialog->useSkill(skillId,
+ SkillDialog::useSkill(skillId,
AutoTarget_true,
level,
false,
@@ -1172,7 +1165,7 @@ impHandler(skill)
}
else
{
- skillDialog->useSkill(skillId,
+ SkillDialog::useSkill(skillId,
AutoTarget_true,
level,
true,