summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/pethandler.cpp6
-rw-r--r--src/resources/notifications.h8
-rw-r--r--src/resources/notifytypes.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 8daa34709..963ef0cc3 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -287,8 +287,12 @@ void PetHandler::processPetStatus(Net::MessageIn &msg)
void PetHandler::processPetFood(Net::MessageIn &msg)
{
// +++ need show notification message about success or fail
- msg.readUInt8("result");
+ const int result = msg.readUInt8("result");
msg.readInt16("food id");
+ if (result)
+ NotifyManager::notify(NotifyTypes::PET_FEED_OK);
+ else
+ NotifyManager::notify(NotifyTypes::PET_FEED_ERROR);
}
void PetHandler::requestStatus() const
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 8bb14291a..428b0da0c 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -493,6 +493,14 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("No store information available."),
NotifyFlags::EMPTY},
+ {"pet feed ok",
+ // TRANSLATORS: notification message
+ N_("Pet feeding success."),
+ NotifyFlags::EMPTY},
+ {"pet feed error",
+ // TRANSLATORS: notification message
+ N_("Pet feeding error."),
+ NotifyFlags::EMPTY},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H
diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h
index 776c9793f..017e61a9d 100644
--- a/src/resources/notifytypes.h
+++ b/src/resources/notifytypes.h
@@ -141,6 +141,8 @@ namespace NotifyTypes
SEARCH_STORE_FAILED_CANT_SEARCH_ANYMORE,
SEARCH_STORE_FAILED_CANT_SEARCH_YET,
SEARCH_STORE_FAILED_NO_INFORMATION,
+ PET_FEED_OK,
+ PET_FEED_ERROR,
TYPE_END
};