summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-24 01:48:07 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-24 01:48:07 +0300
commit6a67f52f6b82bb8c6259eb0b9282ab543347b9ee (patch)
treebd0741506b3f69e98cdcaa99d2ccb40db86291d5
parente22f6d0070ea2b0102caf3b738fba703606e6bd4 (diff)
downloadmanaverse-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.gz
manaverse-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.bz2
manaverse-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.xz
manaverse-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.zip
Remove unused pet handler methods and fields.
-rw-r--r--src/actions/pets.cpp28
-rw-r--r--src/actions/pets.h2
-rw-r--r--src/being/crazymoves.cpp2
-rw-r--r--src/dyetool/actions/pets.cpp2
-rw-r--r--src/gui/shortcut/emoteshortcut.cpp2
-rw-r--r--src/input/inputactionmap.h8
-rw-r--r--src/net/eathena/pethandler.cpp17
-rw-r--r--src/net/eathena/pethandler.h13
-rw-r--r--src/net/pethandler.h13
-rw-r--r--src/net/tmwa/pethandler.cpp16
-rw-r--r--src/net/tmwa/pethandler.h13
11 files changed, 27 insertions, 89 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 0aa0f29be..b978b26b5 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -76,9 +76,7 @@ static const Being *getPet()
impHandler(commandEmotePet)
{
- // need use actual pet id
- petHandler->emote(CAST_U8(
- atoi(event.args.c_str())), 0);
+ petHandler->emote(CAST_U8(atoi(event.args.c_str())));
return true;
}
@@ -123,7 +121,7 @@ impHandler(petEmote)
{
const int emotion = event.action - InputAction::PET_EMOTE_1;
if (emoteShortcut)
- petHandler->emote(emoteShortcut->getEmote(emotion), 0);
+ petHandler->emote(emoteShortcut->getEmote(emotion));
if (Game::instance())
Game::instance()->setValidSpeed();
return true;
@@ -166,7 +164,7 @@ impHandler0(petMoveUp)
const Being *const pet = getPet();
if (!pet)
return false;
- petHandler->move(0, pet->getTileX(), pet->getTileY() - 1);
+ petHandler->move(pet->getTileX(), pet->getTileY() - 1);
return true;
}
@@ -175,7 +173,7 @@ impHandler0(petMoveDown)
const Being *const pet = getPet();
if (!pet)
return false;
- petHandler->move(0, pet->getTileX(), pet->getTileY() + 1);
+ petHandler->move(pet->getTileX(), pet->getTileY() + 1);
return true;
}
@@ -184,7 +182,7 @@ impHandler0(petMoveLeft)
const Being *const pet = getPet();
if (!pet)
return false;
- petHandler->move(0, pet->getTileX() - 1, pet->getTileY());
+ petHandler->move(pet->getTileX() - 1, pet->getTileY());
return true;
}
@@ -193,7 +191,7 @@ impHandler0(petMoveRight)
const Being *const pet = getPet();
if (!pet)
return false;
- petHandler->move(0, pet->getTileX() + 1, pet->getTileY());
+ petHandler->move(pet->getTileX() + 1, pet->getTileY());
return true;
}
@@ -221,18 +219,6 @@ impHandler0(petDirectRight)
return true;
}
-impHandler0(petAiStart)
-{
- petHandler->startAi(true);
- return true;
-}
-
-impHandler0(petAiStop)
-{
- petHandler->startAi(false);
- return true;
-}
-
impHandler(petMove)
{
int x = 0;
@@ -240,7 +226,7 @@ impHandler(petMove)
if (parse2Int(event.args, x, y))
{
- petHandler->move(0, x, y);
+ petHandler->move(x, y);
return true;
}
return false;
diff --git a/src/actions/pets.h b/src/actions/pets.h
index cd3535fa2..e27d5abde 100644
--- a/src/actions/pets.h
+++ b/src/actions/pets.h
@@ -40,8 +40,6 @@ namespace Actions
decHandler(petDirectDown);
decHandler(petDirectLeft);
decHandler(petDirectRight);
- decHandler(petAiStart);
- decHandler(petAiStop);
decHandler(petMove);
} // namespace Actions
diff --git a/src/being/crazymoves.cpp b/src/being/crazymoves.cpp
index 9e7d6b8fe..9f5471973 100644
--- a/src/being/crazymoves.cpp
+++ b/src/being/crazymoves.cpp
@@ -753,7 +753,7 @@ void CrazyMoves::crazyMoveAe() const
if (mMoveProgram[settings.crazyMoveState - 1] == 'e')
localPlayer->emote(emoteId);
else if (PacketLimiter::limitPackets(PacketType::PACKET_CHAT))
- petHandler->emote(emoteId, 0);
+ petHandler->emote(emoteId);
settings.crazyMoveState ++;
}
diff --git a/src/dyetool/actions/pets.cpp b/src/dyetool/actions/pets.cpp
index 3de9a5228..ad25cbf26 100644
--- a/src/dyetool/actions/pets.cpp
+++ b/src/dyetool/actions/pets.cpp
@@ -40,8 +40,6 @@ impHandlerVoid(petDirectUp)
impHandlerVoid(petDirectDown)
impHandlerVoid(petDirectLeft)
impHandlerVoid(petDirectRight)
-impHandlerVoid(petAiStart)
-impHandlerVoid(petAiStop)
impHandlerVoid(petMove)
} // namespace Actions
diff --git a/src/gui/shortcut/emoteshortcut.cpp b/src/gui/shortcut/emoteshortcut.cpp
index 981a5c4e7..fac69323f 100644
--- a/src/gui/shortcut/emoteshortcut.cpp
+++ b/src/gui/shortcut/emoteshortcut.cpp
@@ -106,7 +106,7 @@ void EmoteShortcut::useEmote(const int index) const
localPlayer->emote(emote);
break;
case EmoteType::Pet:
- petHandler->emote(emote, 0);
+ petHandler->emote(emote);
break;
case EmoteType::Homunculus:
homunculusHandler->emote(emote);
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 2d56aafec..af6c8b151 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -4401,15 +4401,15 @@ static const InputActionData inputActionData
UseArgs_false,
Protected_false},
{"keyPetAiStart",
- defaultAction(&Actions::petAiStart),
+ defaultAction(nullptr),
InputCondition::INGAME,
- "petaistart|startpetai|enablepetai|petaienable",
+ "",
UseArgs_false,
Protected_false},
{"keyPetAiStop",
- defaultAction(&Actions::petAiStop),
+ defaultAction(nullptr),
InputCondition::INGAME,
- "petaistop|stoppetai|disablepetai|petaidisable",
+ "",
UseArgs_false,
Protected_false},
{"keyGeneralTab",
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 06e9985fe..8ae6a169b 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -39,8 +39,8 @@ PetHandler::PetHandler()
petHandler = this;
}
-void PetHandler::move(const int petId A_UNUSED,
- const int x, const int y) const
+void PetHandler::move(const int x,
+ const int y) const
{
if (!serverFeatures->haveMovePet())
return;
@@ -50,14 +50,7 @@ void PetHandler::move(const int petId A_UNUSED,
outMsg.writeInt16(CAST_S16(y), "y");
}
-void PetHandler::spawn(const Being *const being A_UNUSED,
- const int petId A_UNUSED,
- const int x A_UNUSED, const int y A_UNUSED) const
-{
-}
-
-void PetHandler::emote(const uint8_t emoteId,
- const int petId A_UNUSED)
+void PetHandler::emote(const uint8_t emoteId)
{
createOutPacket(CMSG_PET_EMOTE);
outMsg.writeInt8(emoteId, "emote id");
@@ -127,8 +120,4 @@ void PetHandler::setDirection(const unsigned char type) const
"pet direction");
}
-void PetHandler::startAi(const bool start A_UNUSED) const
-{
-}
-
} // namespace EAthena
diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h
index ab5eaded6..32ff49984 100644
--- a/src/net/eathena/pethandler.h
+++ b/src/net/eathena/pethandler.h
@@ -33,15 +33,10 @@ class PetHandler final : public Net::PetHandler
A_DELETE_COPY(PetHandler)
- void move(const int petId,
- const int x, const int y) const override final;
+ void move(const int x,
+ const int y) const override final;
- void spawn(const Being *const being,
- const int petId,
- const int x, const int y) const override final A_CONST;
-
- void emote(const uint8_t emoteId,
- const int petId) override final;
+ void emote(const uint8_t emoteId) override final;
void catchPet(const Being *const being) const override final;
@@ -60,8 +55,6 @@ class PetHandler final : public Net::PetHandler
void unequip() const override final;
void setDirection(const unsigned char type) const override final;
-
- void startAi(const bool start) const override final A_CONST;
};
} // namespace EAthena
diff --git a/src/net/pethandler.h b/src/net/pethandler.h
index 5c9099afa..b33e8b8db 100644
--- a/src/net/pethandler.h
+++ b/src/net/pethandler.h
@@ -32,15 +32,10 @@ class PetHandler notfinal
virtual ~PetHandler()
{ }
- virtual void move(const int petId,
- const int x, const int y) const = 0;
+ virtual void move(const int x,
+ const int y) const = 0;
- virtual void spawn(const Being *const being,
- const int petId,
- const int x, const int y) const = 0;
-
- virtual void emote(const uint8_t emoteId,
- const int petId) = 0;
+ virtual void emote(const uint8_t emoteId) = 0;
virtual void catchPet(const Being *const being) const = 0;
@@ -59,8 +54,6 @@ class PetHandler notfinal
virtual void unequip() const = 0;
virtual void setDirection(const unsigned char type) const = 0;
-
- virtual void startAi(const bool start) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp
index 4f82a6e59..328b0ed99 100644
--- a/src/net/tmwa/pethandler.cpp
+++ b/src/net/tmwa/pethandler.cpp
@@ -40,20 +40,12 @@ PetHandler::PetHandler() :
petHandler = this;
}
-void PetHandler::move(const int petId A_UNUSED,
- const int x A_UNUSED,
+void PetHandler::move(const int x A_UNUSED,
const int y A_UNUSED) const
{
}
-void PetHandler::spawn(const Being *const being A_UNUSED,
- const int petId A_UNUSED,
- const int x A_UNUSED, const int y A_UNUSED) const
-{
-}
-
-void PetHandler::emote(const uint8_t emoteId A_UNUSED,
- const int petId A_UNUSED)
+void PetHandler::emote(const uint8_t emoteId A_UNUSED)
{
}
@@ -93,8 +85,4 @@ void PetHandler::setDirection(const unsigned char type A_UNUSED) const
{
}
-void PetHandler::startAi(const bool start A_UNUSED) const
-{
-}
-
} // namespace TmwAthena
diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h
index 6362151cd..ababc2fee 100644
--- a/src/net/tmwa/pethandler.h
+++ b/src/net/tmwa/pethandler.h
@@ -33,15 +33,10 @@ class PetHandler final : public Net::PetHandler
A_DELETE_COPY(PetHandler)
- void move(const int petId,
- const int x, const int y) const override final;
+ void move(const int x,
+ const int y) const override final;
- void spawn(const Being *const being,
- const int petId,
- const int x, const int y) const override final A_CONST;
-
- void emote(const uint8_t emoteId,
- const int petId) override final;
+ void emote(const uint8_t emoteId) override final;
void catchPet(const Being *const being) const override final A_CONST;
@@ -61,8 +56,6 @@ class PetHandler final : public Net::PetHandler
void setDirection(const unsigned char type) const override final;
- void startAi(const bool start) const override final;
-
protected:
int mRandCounter;
};