Peoplemon  0.1.0
Peoplemon 3 game source documentation
Store.hpp
Go to the documentation of this file.
1 #ifndef CORE_EVVENTS_STORE_HPP
2 #define CORE_EVVENTS_STORE_HPP
3 
4 #include <Core/Items/Id.hpp>
5 #include <vector>
6 
7 namespace core
8 {
9 namespace event
10 {
17 struct StoreOpened {
24  StoreOpened(const std::vector<std::pair<item::Id, int>>& items,
25  const std::vector<std::pair<item::Id, int>>& sellPrices)
26  : items(items)
28 
29  const std::vector<std::pair<item::Id, int>>& items;
30  const std::vector<std::pair<item::Id, int>>& sellPrices;
31 };
32 
39 struct ItemPurchased {
47  : item(item)
48  , qty(qty) {}
49 
50  const item::Id item;
51  const int qty;
52 };
53 
58 struct StoreClosed {};
59 
60 } // namespace event
61 } // namespace core
62 
63 #endif
Id
Represents an item in its simplist form.
Definition: Id.hpp:24
Core classes and functionality for both the editor and game.
Event that is fired by the Core module to signal to the game to open a store.
Definition: Store.hpp:17
const std::vector< std::pair< item::Id, int > > & items
Definition: Store.hpp:29
const std::vector< std::pair< item::Id, int > > & sellPrices
Definition: Store.hpp:30
StoreOpened(const std::vector< std::pair< item::Id, int >> &items, const std::vector< std::pair< item::Id, int >> &sellPrices)
Construct a new Store Opened event.
Definition: Store.hpp:24
Event that is fired when an item is purchased in a store.
Definition: Store.hpp:39
const item::Id item
Definition: Store.hpp:50
ItemPurchased(item::Id item, int qty)
Construct a new Item Purchased event.
Definition: Store.hpp:46
Event that is fired when a store is closed.
Definition: Store.hpp:58