From 6ae2001e91eaaeb8b72031e96f88820711bb1ca0 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 9 Sep 2011 02:35:25 +0200 Subject: Add persistent items support based on seeseekey's work. Also made some random changes where useful, including: - Code formatting fixes, - Design fix about the fact that only the game config option should be checked. - Fixed the size of the values sent and receive to follow the rest of the development. - Fixed variables names to make them show what they are, and not why they are used. Resolves: Mana-Mantis #142. --- src/account-server/storage.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/account-server/storage.h') diff --git a/src/account-server/storage.h b/src/account-server/storage.h index a44156a4..3c629920 100644 --- a/src/account-server/storage.h +++ b/src/account-server/storage.h @@ -32,6 +32,7 @@ class Account; class Character; class ChatChannel; +class FloorItem; class Guild; class Letter; class Post; @@ -287,6 +288,38 @@ class Storage */ std::list getGuildList(); + /** + * Add a floor item to map. + * + * Used to keep the floor item persistently between two server restart. + * + * @param mapId The map id + * @param itemId The item id + * @param posX Position X of the item in pixels + * @param posY Position Y of the item in pixels + */ + void addFloorItem(int mapId, int itemId, int amount, + int posX, int posY); + + /** + * Remove item from map persistence + * + * @param mapId The map id + * @param itemId The item id + * @param posX Position X of the item in pixels + * @param posY Position Y of the item in pixels + */ + void removeFloorItem(int mapId, int itemId, int amount, + int posX, int posY); + + + /** + * Get all persistent items from the given map id + * + * @param mapId The map id + */ + std::list getFloorItemsFromMap(int mapId); + /** * Update an account to the database. * -- cgit v1.2.3-60-g2f50