Gent S
772f80188e
Prevent duplicate running tasks from loading into the Player struct
2020-12-23 13:50:12 -05:00
kamilprzyb
f28c643b48
Allow permanent vehicles
2020-12-23 13:50:12 -05:00
0a9f637123
Do not give the Lightning Gun and Buttercup Nano to new Academy players
...
And do not mark the two missions from the old Tutorial as completed.
2020-12-23 13:50:12 -05:00
027f513a23
Save Academy Nanos to DB
2020-12-23 13:50:12 -05:00
322e354f5b
Fix indentation in RacingManager.cpp and compilation on Linux
2020-12-22 14:46:09 +01:00
Gent S
b9013149f3
Racing cleanup
2020-12-21 21:02:19 -05:00
Gent S
598c7ce1d0
Add racing-related DB functions
2020-12-21 16:18:08 -05:00
c3d9883ddb
Fix migration on Linux
2020-12-20 23:09:10 +01:00
Gent S
ea12ec9607
Use binary streams to make DB backups, since filesystem has low compat
2020-12-20 15:52:34 -05:00
Gent S
2e173df2ca
DB v2 Tweaks
2020-12-19 21:17:07 -05:00
Kamil
1fb48536c2
created external sql file for tables and 1st migration
2020-12-19 20:00:47 -05:00
Kamil
002bfffb62
implemented db migration system
2020-12-19 19:15:14 -05:00
Kamil
140227406c
implemented custom error messages in login screen for regex fail or banned account
2020-12-19 19:15:14 -05:00
26d0623d07
Fix Database::sendEmail()
...
* Do not define an sqlite_stmt* named stmt in a loop such that it shadows
an outer variable of the same name.
* Do not re-prepare a statement that has been reset.
2020-12-19 05:51:06 +01:00
80dabf4406
Finalize ALL the statements
...
* Fixed not being able to modify the DB externally while the script is
running
* Made most DB-related errors print the appropriate error string
* Fixed the settings looking for dbsaveinterval in the shard category
instead of the login category
* Added -shr and -wal to .gitignore (even though we're not actually
using WAL mode)
Hopefully the DB code is now free of resource leaks and undefined
behaviour.
2020-12-18 00:17:35 +01:00
fcd9b55ea7
Clean up formatting in Database.cpp
...
* Single quotes for strings
* Semicolons at the end of all commands
* No double colons around identifiers
* Spaces for alignment
* Some parts indented for readability
Not everything is perfectly consistent, but it should all be pretty
readable now.
Non-SQL changes:
* Opening braces shouldn't be on their own line
* Removed trailing spaces
* exit(1) should be used instead of terminate(0) during server init
2020-12-14 22:41:28 +01:00
454e0284af
Remove vendored libsqlite from the repository
...
We now link to the system's library.
Windows implementation pending. MSVC build will be broken for a short
while.
2020-12-14 03:44:58 +01:00
Gent S
94b7864b02
Shut up warnings
2020-12-13 20:52:59 -05:00
Gent S
166bfdfc4f
Terminate if existing DB doesn't have meta table
2020-12-13 20:43:24 -05:00
Gent S
ec23e72215
Notify client of email send failure
2020-12-13 19:51:31 -05:00
Gent S
a1274756ce
Fix guide not getting updated in new DB
2020-12-13 19:51:09 -05:00
Kamil
05f4746af4
"Created" meta column + cleanup
2020-12-13 19:51:09 -05:00
Kamil
bd3a91e530
Properly implement first use flags
2020-12-13 19:51:09 -05:00
Kamil
66ecc45fce
Change SkyWayFlags to blob for consistency
2020-12-13 19:51:09 -05:00
Kamil
7aef973ef1
Add meta table to DB
2020-12-13 19:51:09 -05:00
Kamil
a12faac0e2
Account level changes
...
tied account levels to accounts instead of players. implemented account banning logic in db
2020-12-13 19:51:09 -05:00
Kamil
4dc48198ab
Implement player blocking
2020-12-13 19:51:09 -05:00
Kamil
3e855cbdac
Close DB properly
2020-12-13 19:51:09 -05:00
Kamil
889fc985c4
Reimplement the bank
2020-12-13 19:51:09 -05:00
Kamil
c709d458f4
Fix iterators and query typo
2020-12-13 19:51:09 -05:00
Kamil
0e016646ef
Properly implement PayZoneFlag and fix safe coord loading
...
implemented saving PayZoneFlag (is player in the past) and fixed saving coordinates properly with monkeys/instances
2020-12-13 19:51:09 -05:00
Kamil
960f2dd10c
Adjust login server logic to new DB
2020-12-13 19:51:09 -05:00
Kamil
2bad1252d3
Small DB fixes
2020-12-13 19:51:09 -05:00
Kamil
31ac9d2e3b
Reimplement DB functions 2/2
...
implemented getCharInfo
implemented delete character
implemented evaluateCustomName
implemented name change function
implemented getPlayer function
implemented functions for buddies
implemented emails
2020-12-13 19:51:09 -05:00
Kamil
eeb3b1ee61
fixed a lot of queries
2020-12-13 19:51:09 -05:00
Kamil
4bf35e5239
added some unique constraints
2020-12-13 19:51:09 -05:00
Kamil
2f5c2a8764
Reimplement DB functions 1/2
...
implemented addAccount
implemented updateSelected
implemented findAccount validateCharacter isNameFree and isSlotFree
implemented getTableSize function
implemented functions for name save, character creation and finishing tutorial
2020-12-13 19:51:09 -05:00
Kamil
34ca36062c
Create basic tables
2020-12-13 19:51:09 -05:00
Kamil
a1062f220b
Open DB from settings path
2020-12-13 19:51:09 -05:00
Kamil
c2f640fd97
RIP ORM
2020-12-13 19:51:09 -05:00
Gent S
faf2a0ee7d
Fix freefalling after MSS DC
2020-11-26 10:01:48 -05:00
Gent S
872425640d
Prevent DB players from occupying same slot
2020-11-25 19:25:20 -05:00
Gent S
ea5b7104be
moved name checks to name save and name change packets
...
added a TODO
Formatting + sizeof in login server
2020-11-25 19:25:20 -05:00
Kamil
51a687c7db
hugely simplified managing player characters in login server
2020-11-25 19:25:20 -05:00
Kamil
eee8aab888
refactored and cleaned up login function
2020-11-25 19:25:20 -05:00
Kamil
5c6d7d6055
added a sanity check for entering invalid characters
2020-11-25 19:25:20 -05:00
Gent
4454faffc3
Add garbage collection for non-existent players
2020-11-10 18:16:06 -05:00
Gent
34f2aef248
Fix seg fault in buddy data for deleted player
2020-11-10 18:00:34 -05:00
Gent
f53de8d521
Explicitly update buddy records in DB
...
this should fix the bug where removing a buddy while they're offline won't take you off their list until you disconnect
2020-11-09 05:04:06 -05:00
Gent
d505b09e98
Email bugfixes
...
- Fix item flag not getting updated
- Fix attachments getting written to the same slot
2020-11-08 14:58:51 -05:00