summaryrefslogtreecommitdiff
path: root/src/mmo/mmo.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-05-27 13:33:54 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-05-27 13:33:54 -0700
commitaf4acff261d579428e8eef042cc5359fa392f725 (patch)
treeca73d54da799c3751e87ec88a785d60e7561a2f0 /src/mmo/mmo.hpp
parentcac49afdef0992b93d8718fd928d73d721d434f4 (diff)
downloadtmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.gz
tmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.bz2
tmwa-af4acff261d579428e8eef042cc5359fa392f725.tar.xz
tmwa-af4acff261d579428e8eef042cc5359fa392f725.zip
Generate the char server protocol
Diffstat (limited to 'src/mmo/mmo.hpp')
-rw-r--r--src/mmo/mmo.hpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mmo/mmo.hpp b/src/mmo/mmo.hpp
index d96e619..89aef6d 100644
--- a/src/mmo/mmo.hpp
+++ b/src/mmo/mmo.hpp
@@ -44,7 +44,7 @@ constexpr int MAX_ZENY = 1000000000; // 1G zeny
constexpr int TRADE_MAX = 10;
constexpr int GLOBAL_REG_NUM = 96;
-constexpr int ACCOUNT_REG_NUM = 16;
+constexpr size_t ACCOUNT_REG_NUM = 16;
constexpr size_t ACCOUNT_REG2_NUM = 16;
constexpr interval_t DEFAULT_WALK_SPEED = std::chrono::milliseconds(150);
constexpr interval_t MIN_WALK_SPEED = interval_t::zero();
@@ -147,7 +147,7 @@ struct CharPair
{}
};
-struct storage
+struct Storage
{
bool dirty;
AccountId account_id;
@@ -171,13 +171,23 @@ struct party_member
struct map_session_data *sd;
};
-struct party
+struct PartyMost
{
- PartyId party_id;
PartyName name;
int exp;
int item;
Array<struct party_member, MAX_PARTY> member;
};
+struct PartyPair
+{
+ PartyId party_id = {};
+ PartyMost *party_most = {};
+
+ explicit
+ operator bool() const { return party_most; }
+ bool operator !() const { return !party_most; }
+ PartyMost *operator->() const { return party_most; }
+};
+
#endif // TMWA_MMO_MMO_HPP