summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-14 16:40:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-14 16:40:47 +0300
commitb8b4e4c524331b4deb0a6caa8da004430297c98a (patch)
treea2fd6f1db45e76f08c0e5c1b4e57bbb86efba57b /src/actions/commands.cpp
parentc28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1 (diff)
downloadplus-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.gz
plus-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.bz2
plus-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.xz
plus-b8b4e4c524331b4deb0a6caa8da004430297c98a.zip
Replace static members usage from pointers to direct classes.
clang-tidy warning: readability-static-accessed-through-instance
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp17
1 files changed, 5 insertions, 12 deletions
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,