mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-12 19:31:04 +00:00
Login Location Persistence (#1009)
* database tables and persistence entities; attempt to retrieve values from database and apply them to the player avatar character; resolve spawn options in sanctuary in different manner * minor database table field adjustments; saving to database when account persistence ends; properly loading from and initializing with data queried from the database; suicide better supported * converting the zoning method/status tokens; better support of zoning handling of persistent locations; messages that explain the consequences of login-spawning into an invalid location * adding triggers for the 'saved char' message, both those prompted by game activity and a 'reassurance' message; also, actually save the char data sometimes * intervals for timing charsaved message set by configuration file now * corrections to spawn tests and tables * random sanctuary spawn in more places than one
This commit is contained in:
parent
190a897dd5
commit
1369da22f0
15 changed files with 918 additions and 195 deletions
|
|
@ -1,11 +1,11 @@
|
|||
CREATE TABLE IF NOT EXISTS "friend" (
|
||||
"id" SERIAL PRIMARY KEY NOT NULL,
|
||||
"avatar_id" INT NOT NULL REFERENCES avatar (id),
|
||||
"char_id" INT NOT NULL REFERENCES avatar (id)
|
||||
"char_id" INT NOT NULL REFERENCES avatar (id),
|
||||
UNIQUE(avatar_id, char_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "ignored" (
|
||||
"id" SERIAL PRIMARY KEY NOT NULL,
|
||||
"avatar_id" INT NOT NULL REFERENCES avatar (id),
|
||||
"char_id" INT NOT NULL REFERENCES avatar (id)
|
||||
"char_id" INT NOT NULL REFERENCES avatar (id),
|
||||
UNIQUE(avatar_id, char_id)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
CREATE TABLE IF NOT EXISTS "savedplayer" (
|
||||
"avatar_id" INT NOT NULL PRIMARY KEY REFERENCES avatar (id),
|
||||
"px" INT NOT NULL,
|
||||
"py" INT NOT NULL,
|
||||
"pz" INT NOT NULL,
|
||||
"orientation" INT NOT NULL,
|
||||
"zone_num" SMALLINT NOT NULL,
|
||||
"health" SMALLINT NOT NULL,
|
||||
"armor" SMALLINT NOT NULL,
|
||||
"exosuit_num" SMALLINT NOT NULL,
|
||||
"loadout" TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "savedavatar" (
|
||||
"avatar_id" INT NOT NULL PRIMARY KEY REFERENCES avatar (id),
|
||||
"forget_cooldown" TIMESTAMP NOT NULL,
|
||||
"purchase_cooldowns" TEXT NOT NULL,
|
||||
"use_cooldowns" TEXT NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE account
|
||||
ADD COLUMN last_faction_id SMALLINT DEFAULT 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue