Implemented SharedParameters system in the client (read more)

Here are more tweaks:
* InWorld's quit event now exits to the main menu, bypassing a relayed disconnect message
* InWorld's disconnect hander no longer throws exceptions (dropped creation packet bugfix)
* CombatData's internals now point to std::pair objects
* Enemies are stored in a global list
This commit is contained in:
Kayne Ruse
2014-05-26 17:11:26 +10:00
parent a47e76845f
commit 0a71f43ef3
13 changed files with 119 additions and 58 deletions
+4 -3
View File
@@ -30,13 +30,14 @@
#include <chrono>
#include <list>
#include <utility>
struct CombatData {
typedef std::chrono::steady_clock Clock;
//combatants
std::list<CharacterData*> characterList;
std::list<EnemyData> enemyList;
//combatants, point to the std::map's internal pairs
std::list<std::pair<const int, CharacterData>*> characterList;
std::list<std::pair<const int, EnemyData>*> enemyList;
//world interaction
int mapIndex = 0;
+2
View File
@@ -43,6 +43,8 @@ struct EnemyData {
//NOTE: these are lost when unloaded
int tableIndex;
int atbGauge = 0;
static int uidCounter;
};
#endif
+1
View File
@@ -106,6 +106,7 @@ private:
std::map<int, AccountData> accountMap;
std::map<int, CharacterData> characterMap;
std::map<int, CombatData> combatMap;
std::map<int, EnemyData> enemyMap;
//maps
//TODO: I need to handle multiple map objects
+1
View File
@@ -33,6 +33,7 @@
int ClientData::uidCounter = 0;
int CombatData::uidCounter = 0;
int EnemyData::uidCounter = 0;
//-------------------------
//Define the public members