summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp11
-rw-r--r--src/actormanager.cpp4
-rw-r--r--src/actormanager.h2
-rw-r--r--src/being/being.cpp2
-rw-r--r--src/gui/viewport.cpp5
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/net/eathena/beingrecv.cpp6
7 files changed, 31 insertions, 1 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index cf82dc8e6..b2760a482 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -499,6 +499,7 @@ impHandler(dropItemInvAll)
return true;
}
+#ifdef TMWA_SUPPORT
impHandler(heal)
{
if (Net::getNetworkType() != ServerType::TMWATHENA)
@@ -549,9 +550,17 @@ impHandler(heal)
}
return false;
}
+#else // TMWA_SUPPORT
+
+impHandler0(heal)
+{
+ return false;
+}
+#endif // TMWA_SUPPORT
impHandler0(healmd)
{
+#ifdef TMWA_SUPPORT
if (Net::getNetworkType() != ServerType::TMWATHENA)
return false;
if (actorManager)
@@ -578,6 +587,8 @@ impHandler0(healmd)
Game::instance()->setValidSpeed();
return true;
}
+#endif // TMWA_SUPPORT
+
return false;
}
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 59bfb9708..be9f6e7a6 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -309,7 +309,9 @@ Being *ActorManager::createBeing(const BeingId id,
break;
default:
case ActorType::FloorItem:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
case ActorType::Unknown:
reportAlways("CreateBeing for unknown type %d", CAST_S32(type));
@@ -1391,6 +1393,7 @@ bool ActorManager::validateBeing(const Being *const aroundBeing,
|| localPlayer->isReachable(being, maxCost));
}
+#ifdef TMWA_SUPPORT
void ActorManager::healTarget() const
{
if (!localPlayer)
@@ -1482,6 +1485,7 @@ void ActorManager::heal(const Being *const target) const
}
}
}
+#endif // TMWA_SUPPORT
Being* ActorManager::findMostDamagedPlayer(const int maxTileDist) const
{
diff --git a/src/actormanager.h b/src/actormanager.h
index 20daab2cc..dea704e48 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -218,6 +218,7 @@ class ActorManager final: public ConfigListener
*/
Being *findNearestPvpPlayer() const A_WARN_UNUSED;
+#ifdef TMWA_SUPPORT
/**
* Heal all players in distance.
*
@@ -231,7 +232,6 @@ class ActorManager final: public ConfigListener
void heal(const Being *const target) const;
-#ifdef TMWA_SUPPORT
void itenplz() const;
#endif
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 725bf0f80..a663a4d98 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -291,7 +291,9 @@ Being::Being(const BeingId id,
case ActorType::Npc:
case ActorType::Monster:
case ActorType::FloorItem:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
break;
}
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 3a61e0f65..e476e4b38 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -440,8 +440,11 @@ bool Viewport::leftMouseAction()
validateSpeed();
if (actorManager)
{
+#ifdef TMWA_SUPPORT
if (localPlayer != mHoverBeing || mSelfMouseHeal)
actorManager->heal(mHoverBeing);
+#endif // TMWA_SUPPORT
+
if (localPlayer == mHoverBeing && mHoverItem)
localPlayer->pickUp(mHoverItem);
return true;
@@ -484,7 +487,9 @@ bool Viewport::leftMouseAction()
case ActorType::Elemental:
break;
case ActorType::Unknown:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
default:
reportAlways("Left click on unknown actor type: %d",
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 9919a10d3..e4c5d3e93 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -613,6 +613,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
const MouseButtonT eventButton = event.getButton();
if (eventButton == MouseButton::LEFT)
{
+#ifdef TMWA_SUPPORT
if (type == MapItemType::EMPTY)
{
const Being *const being = actorManager->findBeingByName(
@@ -621,6 +622,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
actorManager->heal(being);
}
else
+#endif // TMWA_SUPPORT
{
localPlayer->navigateTo(ava->getX(), ava->getY());
}
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index a9d5f380d..915be5cbd 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -451,7 +451,9 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
case ActorType::Elemental:
break;
case ActorType::FloorItem:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
case ActorType::Unknown:
reportAlways("Wrong being type detected: %d",
@@ -669,7 +671,9 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
case ActorType::Elemental:
break;
case ActorType::FloorItem:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
case ActorType::Unknown:
reportAlways("Wrong being type detected: %d",
@@ -883,7 +887,9 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
case ActorType::Elemental:
break;
case ActorType::FloorItem:
+#ifdef TMWA_SUPPORT
case ActorType::LocalPet:
+#endif
case ActorType::Avatar:
case ActorType::Unknown:
reportAlways("Wrong being type detected: %d",