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:
@@ -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;
|
||||
|
||||
@@ -43,6 +43,8 @@ struct EnemyData {
|
||||
//NOTE: these are lost when unloaded
|
||||
int tableIndex;
|
||||
int atbGauge = 0;
|
||||
|
||||
static int uidCounter;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
int ClientData::uidCounter = 0;
|
||||
int CombatData::uidCounter = 0;
|
||||
int EnemyData::uidCounter = 0;
|
||||
|
||||
//-------------------------
|
||||
//Define the public members
|
||||
|
||||
Reference in New Issue
Block a user