Merge branch 'player-sqlite'
This commit is contained in:
@@ -19,9 +19,9 @@ PROFILE =
|
||||
|
||||
BINDIR = ../bin
|
||||
|
||||
CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE)
|
||||
CFLAGS = @CFLAGS@ @SQLITE3_CFLAGS@ $(MYFLAGS) $(PROFILE)
|
||||
|
||||
LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@
|
||||
LIBS = @LIBS@ @SQLITE3_LIBS@ @CRYPTLIB@ @NETLIB@
|
||||
|
||||
OBJFILES = act.comm.o act.informative.o act.item.o act.movement.o \
|
||||
act.offensive.o act.other.o act.social.o act.wizard.o alias.o ban.o \
|
||||
@@ -29,7 +29,7 @@ OBJFILES = act.comm.o act.informative.o act.item.o act.movement.o \
|
||||
graph.o handler.o house.o interpreter.o limits.o magic.o mail.o \
|
||||
mobact.o modify.o objsave.o olc.o random.o shop.o spec_assign.o \
|
||||
spec_procs.o spell_parser.o spells.o utils.o weather.o \
|
||||
bsd-snprintf.o
|
||||
bsd-snprintf.o races.o
|
||||
|
||||
CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
|
||||
act.offensive.c act.other.c act.social.c act.wizard.c alias.c ban.c \
|
||||
@@ -37,7 +37,7 @@ CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
|
||||
graph.c handler.c house.c interpreter.c limits.c magic.c mail.c \
|
||||
mobact.c modify.c objsave.c olc.c random.c shop.c spec_assign.c\
|
||||
spec_procs.c spell_parser.c spells.c utils.c weather.c \
|
||||
bsd-snprintf.c
|
||||
bsd-snprintf.c races.c
|
||||
|
||||
default: all
|
||||
|
||||
@@ -179,6 +179,8 @@ objsave.o: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \
|
||||
olc.o: olc.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h \
|
||||
olc.h
|
||||
$(CC) -c $(CFLAGS) olc.c
|
||||
races.o: races.c conf.h sysdep.h structs.h interpreter.h utils.h
|
||||
$(CC) -c $(CFLAGS) races.c
|
||||
random.o: random.c utils.h
|
||||
$(CC) -c $(CFLAGS) random.c
|
||||
shop.o: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \
|
||||
|
105
src/players_sqlite3.sql
Normal file
105
src/players_sqlite3.sql
Normal file
@@ -0,0 +1,105 @@
|
||||
CREATE TABLE preferences (
|
||||
id integer NOT NULL PRIMARY KEY,
|
||||
internal_name varchar(20) NOT NULL UNIQUE,
|
||||
description varchar(240) NOT NULL,
|
||||
);
|
||||
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (1, 'BRIEF', 'Room descriptions won''t normally be shown');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (2, 'COMPACT', 'No extra CRLF pair before prompt');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (3, 'DEAF', 'Can''t hear shouts');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (4, 'NO_TELL', 'Can''t receive tells');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (5, 'D_HP', 'Display Hit Points in prompt');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (6, 'D_MANA', 'Display Mana Points in prompt');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (7, 'D_MOVE', 'Display Move Points in prompt');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (8, 'AUTOEX', 'Display exits in a room');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (9, 'NO_HASS', 'Aggressive mobs won''t attack');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (10, 'QUEST', 'Player is on a quest');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (11, 'SUMN', 'Can be summoned');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (12, 'NO_REP', 'No repetition of comm commands');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (13, 'LIGHT', 'Holy Light enabled');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (14, 'C1', 'Color (low bit)');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (15, 'C2', 'Color (high bit)');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (16, 'NO_WIZ', 'Can''t hear wizline');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (17, 'L1', 'Online system log (low bit)');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (18, 'L2', 'Online system log (high bit)');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (19, 'NO_AUC', 'Can''t hear auction channel');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (20, 'NO_GOS', 'Can''t hear gossip channel');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (21, 'NO_GTZ', 'Can''t hear grats channel');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (22, 'RMFLG', 'Can see room flags');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (23, 'DISPAUTO', 'Show prompt HP, MP, MV when < 30%');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (23, 'AUTOLOOT', 'Automatically loot corpses on kill');
|
||||
INSERT INTO preferences (id, internal_name, description) VALUES (24, 'AUTODRAIN', 'Automatically drain corpses on kill');
|
||||
|
||||
CREATE TABLE affections (
|
||||
id integer NOT NULL PRIMARY KEY,
|
||||
spell_type integer NOT NULL UNIQUE,
|
||||
duration integer,
|
||||
modifier int2,
|
||||
location int2,
|
||||
bitvector unsigned big int
|
||||
);
|
||||
|
||||
CREATE TABLE players (
|
||||
id integer NOT NULL, -- Used to be idnum!
|
||||
name varchar(20) UNIQUE NOT NULL PRIMARY KEY,
|
||||
description varchar(240),
|
||||
title varchar(80),
|
||||
sex int2 NOT NULL,
|
||||
class int2 NOT NULL,
|
||||
race int2 NOT NULL,
|
||||
level int2 NOT NULL DEFAULT 1,
|
||||
hometown unsigned big int NOT NULL,
|
||||
birth datetime NOT NULL,
|
||||
played unsigned big int NOT NULL DEFAULT 0,
|
||||
weight integer NOT NULL,
|
||||
height integer NOT NULL,
|
||||
pwd varchar(10) NOT NULL,
|
||||
alignment integer NOT NULL,
|
||||
long /*bitvector_t*/ act; /* act flag for NPC's; player flag for PC's */
|
||||
long /*bitvector_t*/ affected_by; /* Bitvector for spells/skills affected by */
|
||||
sh_int apply_saving_throw[5]; /* Saving throw (Bonuses) */
|
||||
|
||||
byte skills[201]; /* array of skills plus skill 0 */
|
||||
bool talks[3]; /* PC s Tongues 0 for NPC */
|
||||
wimp integer,
|
||||
freeze_level int2,
|
||||
invis_level int2,
|
||||
load_room unsigned big int,
|
||||
bad_pws integer NOT NULL DEFAULT 0,
|
||||
drunk_level int2,
|
||||
hunger_level int2,
|
||||
thirst_level int2,
|
||||
spells_to_learn integer,
|
||||
strength int2,
|
||||
strength_add int2,
|
||||
intelligence int2,
|
||||
wisdom int2,
|
||||
dexterity int2,
|
||||
constitution int2,
|
||||
charisma int2,
|
||||
cur_mana integer,
|
||||
max_mana integer,
|
||||
cur_hit integer,
|
||||
max_hit integer,
|
||||
cur_move integer,
|
||||
max_move integer,
|
||||
armour int2,
|
||||
gold bigint,
|
||||
bank bigint,
|
||||
experience bigint,
|
||||
hitroll int2,
|
||||
damroll int2,
|
||||
last_logon datetime,
|
||||
last_host varchar(100)
|
||||
);
|
||||
|
||||
CREATE TABLE player_preferences (
|
||||
player_id integer NOT NULL REFERENCES players(id),
|
||||
preference_id integer NOT NULL REFERENCES preferences(id)
|
||||
);
|
||||
|
||||
CREATE TABLE player_affections (
|
||||
player_id integer NOT NULL REFERENCES players(id),
|
||||
affection_id integer NOT NULL REFERENCES affenctions(id)
|
||||
);
|
||||
|
@@ -19,7 +19,9 @@ BINDIR = ../../bin
|
||||
# location of Circle include files
|
||||
INCDIR = ..
|
||||
|
||||
CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE) -I$(INCDIR)
|
||||
CFLAGS = @CFLAGS@ @SQLITE3_CFLAGS@ $(MYFLAGS) $(PROFILE) -I$(INCDIR)
|
||||
|
||||
LIBS = @LIBS@ @SQLITE3_LIBS@
|
||||
|
||||
default: all
|
||||
|
||||
@@ -52,40 +54,40 @@ wld2html: $(BINDIR)/wld2html
|
||||
|
||||
$(BINDIR)/autowiz: autowiz.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h $(INCDIR)/db.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/autowiz autowiz.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/autowiz autowiz.c
|
||||
|
||||
$(BINDIR)/delobjs: delobjs.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/delobjs delobjs.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/delobjs delobjs.c
|
||||
|
||||
$(BINDIR)/listrent: listrent.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/listrent listrent.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/listrent listrent.c
|
||||
|
||||
$(BINDIR)/mudpasswd: mudpasswd.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/mudpasswd mudpasswd.c @CRYPTLIB@
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/mudpasswd mudpasswd.c @CRYPTLIB@
|
||||
|
||||
$(BINDIR)/play2to3: play2to3.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/play2to3 play2to3.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/play2to3 play2to3.c
|
||||
|
||||
$(BINDIR)/purgeplay: purgeplay.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/purgeplay purgeplay.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/purgeplay purgeplay.c
|
||||
|
||||
$(BINDIR)/shopconv: shopconv.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/db.h $(INCDIR)/utils.h $(INCDIR)/shop.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/shopconv shopconv.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/shopconv shopconv.c
|
||||
|
||||
$(BINDIR)/showplay: showplay.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/showplay showplay.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/showplay showplay.c
|
||||
|
||||
$(BINDIR)/sign: sign.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/sign sign.c @NETLIB@
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/sign sign.c @NETLIB@
|
||||
|
||||
$(BINDIR)/split: split.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/split split.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/split split.c
|
||||
|
||||
$(BINDIR)/wld2html: wld2html.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/wld2html wld2html.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $(BINDIR)/wld2html wld2html.c
|
||||
|
Reference in New Issue
Block a user