summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/skilldialog.cpp4
-rw-r--r--src/net/net.cpp6
-rw-r--r--src/net/net.h2
-rw-r--r--src/net/skillhandler.h2
4 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 759efe7cf..07a60b594 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -505,13 +505,13 @@ void SkillDialog::useSkill(const SkillInfo *const info)
const Being *const being = localPlayer->getTarget();
if (being)
{
- Net::getSkillHandler()->useBeing(info->level,
+ skillHandler->useBeing(info->level,
info->id, being->getId());
}
break;
}
case SkillType::Self:
- Net::getSkillHandler()->useBeing(info->level,
+ skillHandler->useBeing(info->level,
info->id, localPlayer->getId());
break;
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 268f41180..5dcbad577 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -59,6 +59,7 @@ namespace Net
class PlayerHandler;
class QuestHandler;
class ServerFeatures;
+ class SkillHandler;
}
Net::AdminHandler *adminHandler = nullptr;
@@ -85,11 +86,6 @@ Net::FamilyHandler *familyHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
Net::QuestHandler *questHandler = nullptr;
-Net::SkillHandler *Net::getSkillHandler()
-{
- return skillHandler;
-}
-
Net::TradeHandler *Net::getTradeHandler()
{
return tradeHandler;
diff --git a/src/net/net.h b/src/net/net.h
index a289d45df..4ec729cb3 100644
--- a/src/net/net.h
+++ b/src/net/net.h
@@ -36,10 +36,8 @@
namespace Net
{
-class SkillHandler;
class TradeHandler;
-SkillHandler *getSkillHandler() A_WARN_UNUSED;
TradeHandler *getTradeHandler() A_WARN_UNUSED;
ServerInfo::Type getNetworkType() A_WARN_UNUSED;
diff --git a/src/net/skillhandler.h b/src/net/skillhandler.h
index 929629db4..83f5a338c 100644
--- a/src/net/skillhandler.h
+++ b/src/net/skillhandler.h
@@ -50,4 +50,6 @@ class SkillHandler notfinal
} // namespace Net
+extern Net::SkillHandler *skillHandler;
+
#endif // NET_SKILLHANDLER_H