]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/extern.h
Added code for the start of the DataLayer format as well as a basic FilePlayerDAO...
[irc/gameservirc.git] / gameserv / extern.h
index 43ae018340934f487702dd8147a63c23dcabd42c..9b55dbf2aecbb78ad186473b2cc7530ff9aef31e 100644 (file)
 
 #include <stdarg.h>
 #include <list>
-#include "player.h"
-#include "level.h"
+#include <string>
+
 #include "config.h"
 #include "options.h"
-#include "item.h"
+
+using namespace std;
 
 #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);
@@ -103,6 +117,31 @@ E unsigned int maxnicklen;
 E list<Player*> players[U_TABLE_SIZE];
 E list<aClient*> clients[U_TABLE_SIZE];
 E list<string> todaysnews;
+E list<item*> store;              // The list of items available at the store
+
+/* misc.cpp begin */
+E void end_turn(aClient *user);
+E void see_master(char *u);
+
+/* misc.cpp end   */
+/* find.cpp begin */
+E item *findItemByID(int id);
+E item *findStoreItemByID(int id);
+E tavernItem *findTavernItemByID(int id);
+/* find.cpp end   */
+
+/* messages.cpp begin */
+E void display_help(char *u, char *file);
+E void display_monster(char *u);
+E void display_players(char *u);
+E void display_players(aClient *user);
+E void showBankBalance(const char *u);
+void showTavern(aClient *user);
+/* messages.cpp end   */
+
+/* boolean.cpp begin */
+E bool check_password(char *name, char *plaintext);
+/* boolean.cpp end   */
 
 /** tcpclient.cpp **/
 E void check_idles();
@@ -128,13 +167,44 @@ E void raw(const char *fmt, ...);
 
 /** news.cpp **/
 E void addNews(list<string> &news, const char *fmt, ...);
-E void do_news(char *u);
+
 E void clearNews(list<string> &news);
 E void loadNews(char *filename, list<string> &news);
 E void saveNews(char *filename, list<string> &news);
 E void showNews(char *nick, list<string> &news);
 
 /** gameserv.cpp **/
+E void do_admin(char *u);
+E void do_attack(char *u);
+E void do_bank(char *u);
+E void do_check(char *u);
+E void do_equip(char *u);
+E void do_fight(char *u);
+E void do_heal(char *u);
+E void do_help(char *u);
+E void do_identify(char *u);
+E void do_inventory(char *u);
+E void do_refresh(char *u);
+E void do_register(char *u);
+E void do_list(char *u);
+E void do_load(char *u);
+E void do_logout(char *u);
+E void do_master(char *u);
+E void do_news(char *u);
+E void do_dragon(char *u);
+E void do_play(char *u);
+E void do_quitg(char *u);
+E void do_raw(char *u);
+E void do_reset(char *u);
+E void do_run(char *u);
+E void do_save(char *u);
+E void do_set(char *u);
+E void do_shutdown(char *u);
+E void do_stats(char *u);
+E void do_store(char *u);
+E void do_tavern(char *u);
+E void do_use(char *u);
+
 E item *findItemByID(int id);
 E int hpbonus[LEVELS - 1];
 E int strbonus[LEVELS - 1];
@@ -143,6 +213,7 @@ E void gameserv(char *source, char *buf);
 E Level levels[LEVELS];
 E list<item*> Items;
 E list<tavernItem> tavern;
+E toplist myToplist;
 
 /** forest.cpp **/
 E void forest(char *source, char *buf);
@@ -170,9 +241,7 @@ E char *strtok(char *str, const char *delim);
 #endif
 
 E char *spaces(int len, char *seperator);
-E void display_monster(char *u);
-E void display_players(char *u);
-E void display_players(aClient *user);
+
 E int stricmp(const char *s1, const char *s2);
 E int strnicmp(const char *s1, const char *s2, size_t len);
 E long int chartoint(char ch);
@@ -184,7 +253,6 @@ E bool load_monsters();
 E bool load_levels();
 E void delete_monsters();
 E void delete_masters();
-E Monster *getNewMonster(Monster *m);
 E void deleteMonster(Monster *m);
 E void refresh(Player *p);
 E void refreshall();
@@ -203,7 +271,6 @@ E void do_equip(char *u);
 E void do_fight(char *u);
 E void do_forest(char *u);
 E void do_heal(char *u);
-E void do_identify(char *u);
 E void do_invenory(char *u);
 E void do_list(char *u);
 E void do_logout(char *u);