YAPOG  0.0.1
Yet Another Pokemon Online Game
PlayerDataTable.cpp
Go to the documentation of this file.
2 #include "Account/PlayerData.hpp"
4 
5 namespace yse
6 {
8  : accountID_ (accountID)
9  , position_ (PlayerData::DEFAULT_POSITION)
10  , mapID_ (PlayerData::DEFAULT_MAP_ID)
11  , playTime_ (0)
12  , stepCount_ (0)
13  , respawnSpot_ (PlayerData::DEFAULT_RESPAWN_SPOT)
14  , fleeCount_ (0)
15  , boxNumber_ (PlayerData::DEFAULT_BOX_NUMBER)
16  , battleCount_ (0)
17  , money_ (PlayerData::DEFAULT_MONEY)
18  {
19  }
20 
22  {
23  SetAccountID (playerData.GetAccountID ());
24  SetPosition (playerData.GetPosition ());
25  SetMapID (playerData.GetMapID ());
26  SetPlayTime (playerData.GetPlayTime ().GetValue ());
27  SetStepCount (playerData.GetStepCount ());
28  SetRespawnSpot (playerData.GetRespawnSpot ());
29  SetFleeCount (playerData.GetFleeCount ());
30  SetBoxNumber (playerData.GetBoxNumber ());
31  SetBattleCount (playerData.GetBattleCount ());
32  SetMoney (playerData.GetMoney ());
33  }
34 
37  { return accountID_; }
39  { return position_; }
41  { return mapID_; }
43  { return playTime_; }
45  { return stepCount_; }
47  { return respawnSpot_; }
49  { return fleeCount_; }
51  { return boxNumber_; }
53  { return battleCount_; }
55  { return money_; }
56 
59  { accountID_ = value; }
61  { position_ = value; }
62  void PlayerDataTable::SetMapID (const yap::ID& value)
63  { mapID_ = value; }
65  { playTime_ = value; }
67  { stepCount_ = value; }
69  { respawnSpot_ = value; }
71  { fleeCount_ = value; }
73  { boxNumber_ = value; }
75  { battleCount_ = value; }
76  void PlayerDataTable::SetMoney (int value)
77  { money_ = value; }
78 
80  {
81  yap::String position
82  ("(" + yap::StringHelper::ToString (position_.x) + ", " +
84 
85  std::cout << "/** Player Data Information **/" << std::endl
86  << "ID: " << accountID_.GetValue () << std::endl
87  << "Position: " << position << std::endl
88  << "/****/" << std::endl;
89  }
90 } // namespace yse