#include <stdarg.h>
#include <list>
-#include "player.h"
-#include "level.h"
+#include <string>
+
#include "config.h"
#include "options.h"
-#include "item.h"
+
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# endif
#endif
+// Forward declarations
+class toplist;
+class Player;
+class aClient;
+class Level;
+class item;
+class itemContainer;
+class weapon;
+class armor;
+class potion;
+class tavernItem;
+class Monster;
+
// Hash.cpp stuff start
#define U_TABLE_SIZE 1999
E unsigned long sHASH(const unsigned char *name);
E Level levels[LEVELS];
E list<item*> Items;
E list<tavernItem> tavern;
+E toplist myToplist;
/** forest.cpp **/
E void forest(char *source, char *buf);
#include "sockhelp.h"
#include "item.h"
#include "script.h"
+#include "toplist.h"
#include <algorithm>
#include <cctype>
list<item*> Items; // The master list of items
list<tavernItem> tavern; // The list of items available at the tavern
list<item*> store; // The list of items available at the store
+toplist myToplist; // List of the top 10 players
// Database functions
int save_gs_dbase();
// Add the player to the list
players[hv].push_back(user->stats);
+
+ // Attempt to add the player to the top list
+ // The class takes care of pruning the user out if they don't deserve to be in the list
+ myToplist.insertPlayer(user->stats);
}
else
{