5068b38c5e
Merge pull request #100 from SengokuNadeko/master
...
Buddy System
2020-09-25 00:48:01 -05:00
231a4a441b
Merge pull request #112 from gsemaj/slider
...
Load NPC paths from JSON + update submodule ref
2020-09-25 00:37:53 -05:00
kamilprzyb
d4f1515f5d
Time to go, gumballs and nano potions ( #113 )
...
* set up "go to the time machine" button working
* warping to the past now sets PayZoneFlag and removes all active missions
* added gumballs functionality
* added nano potions functionality
* formatting fix
2020-09-25 00:35:27 -05:00
e5a24bcb70
Merge pull request #114 from gsemaj/bugfix1
...
Prevent player position from updating when flying on monkey
2020-09-25 00:33:42 -05:00
874479d1cf
fixed NPC spawning bug
2020-09-24 21:32:14 -05:00
8f84c4c2f8
updateNPCPosition now tracks chunks
2020-09-24 20:58:20 -05:00
279cb78d5f
Mob-related cleanup.
...
* NPCs now keep track of their chunk information like PlayerView does
for players
* NPCManager::sendToViewable() parallels PlayerManager::sendToViewable()
* Nano damage and debuffs now count as attacking a mob
* Mobs will de-aggro if something else killed their target
2020-09-25 02:00:26 +02:00
72d625fd8d
Summoned mobs are now actually treated as mobs.
...
Unfortunetly, this necessitated keeping around yet more JSON objects for
the duration of the server's runtime.
It also involved unifying the way NPC IDs are handled, such that they
may be allocated and deallocated out of order.
If any NPCID-related bugs occour, this commit should be regarded as
the prime suspect.
2020-09-25 00:51:18 +02:00
Gent
db33ca2bbb
Prevent player position from updating when flying
...
Only chunk is updated instead to maintain visibility
2020-09-24 18:43:58 -04:00
cfb3d25bc5
Lerp mob movement a little.
...
We'll lerp a little harder later. Also retreat if kited
too far.
2020-09-24 23:11:14 +02:00
1f18104a6f
Mobs fight back now.
...
There is still a lot of tuning, lerping and cleanup to do.
2020-09-24 23:11:14 +02:00
006d1000c7
Add Address Sanitizer suppression list.
...
This replaces the unnecessary deallocations on program termination.
Passing in the suppression list environment variable via setenv()
doesn't seem to work, so I've added a comment in the Makefile to explain
invocation.
2020-09-24 23:11:14 +02:00
Gent
72c16587e0
Load NPC paths from JSON
2020-09-24 10:32:46 -04:00
c33f218e56
updateFusionMatter now sets fusion matter
2020-09-23 16:04:58 -05:00
4caca07856
Merge pull request #109 from gsemaj/slider
...
Basic slider implementation
2020-09-23 14:49:26 -05:00
63c14aff58
Merge pull request #110 from kamilprzyb/vehicles_pr
...
Fixed Time and implemented vehicles expiring
2020-09-23 14:48:38 -05:00
78930916ad
added support for nano missions
2020-09-23 14:44:27 -05:00
SengokuNadeko
9cfced88c9
Stubbed buddy warping
...
After testing warping a lot I saw how buggy it is. I decided to stub it for this PR and work on it in a later PR.
2020-09-23 13:52:21 -04:00
Gent
f2596bfb6a
Add NPC chunk management + Generalize lerp
2020-09-23 12:06:25 -04:00
Gent
65bd2d120b
Add NPC pathing queues
2020-09-23 10:29:29 -04:00
kamilprzyb
7bcdc111da
fixed comments formating, added zeroing out player->toRemoveVehicle after removing vehicle
2020-09-23 11:21:32 +02:00
kamilprzyb
016c48645e
adjusted timestamp function to always return value in seconds
2020-09-23 11:05:18 +02:00
kamilprzyb
09f1f67778
implemented checking vehicle time limit on use
2020-09-23 10:20:47 +02:00
Gent
7dfc888552
Basic slider implementation
2020-09-23 00:08:51 -04:00
Gent
6f05f0f2c8
Add NPCClass enum
2020-09-22 23:41:43 -04:00
c722044bf5
The Sleep, Stun and Snare powers now affect mobs.
...
They currently don't expire after a set amount of time.
Attacking a sleeping monster does wake it up, but doesn't remove the
debuff status client-side yet.
2020-09-22 22:22:10 +02:00
kamilprzyb
076f89927d
changed vehicle iTimeLimit to be stored in seconds instead of miliseconds
2020-09-22 21:49:24 +02:00
95a79ec815
Switched MobManager::step() to the timer.
...
It doesn't really need to run on every shard step. This makes it a lot
less hot.
2020-09-22 21:31:08 +02:00
kamilprzyb
7ba9b9a54f
replaced high_resolution_clock with system_time for timestamps
2020-09-22 21:15:47 +02:00
ba5998d53a
Added a config option to disable mob movement and combat.
...
This will come in handy when gruntwork starts.
Also fixed a bug where the ACCLEVEL setting was read as a boolean.
2020-09-22 20:53:44 +02:00
ac1fd1e5be
Implemented mob roaming.
...
Will likely need further tuning.
Mobs in vacant chunks are skipped.
2020-09-22 20:33:10 +02:00
94ab5b8b64
Seed the random number generator.
2020-09-22 20:32:40 +02:00
SengokuNadeko
e0e474924d
Implemented buddy warping
...
Buddy warping now works, if anything else needs to be added/redone in regards to this feel free to let me know ^
2020-09-22 13:02:00 -04:00
kamilprzyb
0931c88541
fixed size bug
2020-09-22 13:41:28 +02:00
kamilprzyb
5a58908462
vehicle has a proper expiration day when bought, implemented checking expired vehicles while login
2020-09-22 13:16:09 +02:00
kamilprzyb
00f64ce992
added sanity check for killing mission mobs
2020-09-22 10:18:29 +02:00
Gent
153b3a9ef5
Sync tabledata submodule + fix transportation bugs
2020-09-22 00:42:46 -04:00
CakeLancelot
adf017b07c
Move from isGM to Account Levels ( #106 )
...
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-22 04:26:12 +02:00
5d8bb7f8a5
Merge pull request #95 from gsemaj/monkeys
...
Paths framework + Monkey Skyway System framework
2020-09-22 03:54:01 +02:00
Gent
2c8243e136
General MSS fixes + tweaks
...
Add alert message for unpathed skyway routes
Fix overflow during lerp + add Future routes
Add documentation for MSS
Fix potential MSS registration bug
Minor tweaks + styling
Update packet broadcast
2020-09-21 21:43:39 -04:00
12fbdc9621
Wait about 2s before despawning killed mobs.
...
This gives them enough time to play their death animations before
they disappear.
2020-09-22 00:23:18 +02:00
a768a4f539
Fixed halved NPC distance and renamed config option to chunksize.
2020-09-21 23:30:05 +02:00
d6357197d3
Use the chunk's visibility lists when respawning mobs.
2020-09-21 23:13:13 +02:00
4cc1cf4f7e
minor chunk refactor
2020-09-21 14:55:34 -05:00
b67a0b6946
removed usewebapi
2020-09-21 14:49:08 -05:00
kamilprzyb
5e0948ea93
Database saving update ( #104 )
...
* implemented saving BatteryN and BatteryW
* implemented saving mentor
* moved int64->blob parsing to a separate function
* moved parsing blob->int64 to a separate function
* added functions for parsing int32->blob and vice versa
* added functions for parsing int16->blob and vice versa
* WIP saving quest items and active tasks
* Quest items are stored in inventory table instead of blob
* added sanity check for missionId
* saving active missions works
* removed unneccesary include
* implemented saving warplocationflag, skywaylocationflag and currentmissionid in database
* INFO DB message now shows how many accounts and player characters are in the database
* fixed dbsaveinterval being in [login] instead of [shard]
* fixed mission quit:
- fixed wrong json name, causing qitems not deleting properly
- quitting mission now resets npc kill count
* adjusted saving active missions
* removed blob parsing functions that ended up being unused
* removed accidentaly added include
* removed sending PCStyle2 on Player Enter
* added a sanity check in itemMoveHandler
* removed MapNum from PCLoad, as client doesn't even read it
* set BuddyWarpCooldown to 60s on PCLoad
* fixed a bug causing EXIT DUPLICATE not working
* added creation and last login timestamps to accounts and players
* added a sanity check for P_CL2LS_REQ_PC_EXIT_DUPLICATE
* implemented web api support, toggled by new setting (off by default)
* add usewebapi to config
Co-authored-by: Gent <gentsemaj@live.com>
2020-09-21 14:43:53 -05:00
SengokuNadeko
90134cd1fa
Buddy deleting/blocking works and code clean up
...
Added in buddy deleting and buddy blocking. I also cleaned up some of the code and added some comments to the code.
2020-09-21 14:28:04 -04:00
321dca3f79
Use PC_MAXHEALTH() in the rest of the codebase.
...
+ minor fixups
2020-09-21 19:51:30 +02:00
113ecc8f60
Refactored passive nano powers.
2020-09-21 19:51:30 +02:00
dc9de5a54a
Cleaned up implementation of active nano powers.
2020-09-21 19:51:30 +02:00
0fc072d591
Initial implementation of nano powers.
2020-09-21 19:51:30 +02:00
Gent
135424b855
Update player visibility on skyway
2020-09-20 15:24:17 -04:00
Gent
a5ffe26c44
Move lerp to td init, add variable gap size
2020-09-20 15:24:17 -04:00
Gent
6a78a301c9
Skyway lerp tuning
2020-09-20 15:24:17 -04:00
Gent
a5c40b66f5
Add basic Monkey Skyway functionality
2020-09-20 15:24:17 -04:00
CakeLancelot
94583e534b
Merge pull request #102 from darkredtitan/LoadisGMfromConfig.ini
...
Respect config.ini GM settings
Upon character creation, the GM value from the config will now be used instead of always being set to false. The default in Settings.cpp has also been changed to be consistent with the config.ini in the repo.
2020-09-20 14:04:33 -05:00
darkredtitan
ff7c78d545
Change default value for GM to true
2020-09-20 20:50:58 +02:00
CakeLancelot
77df7b7160
Merge pull request #92 from gsemaj/crocpot
...
Implement Croc Pot item combining
Fix vehicle type override
2020-09-20 13:40:36 -05:00
darkredtitan
6eb21e6d67
Respect config.ini GM settings
2020-09-20 19:53:33 +02:00
228a181b74
removed ChunkManager::removeNPC()
2020-09-20 10:34:43 -05:00
Gent
c6ec1c46c2
Add documentation for getItemType()
2020-09-19 16:38:50 -04:00
Gent
d1c5e272a8
Fix vehicle type override
2020-09-19 15:26:16 -04:00
SengokuNadeko
9bb19efc99
Updated main.cpp for buddy manager init function
2020-09-19 15:08:03 -04:00
SengokuNadeko
7757238a47
Buddy System draft (W.I.P)
...
The w.i.p buddy system
2020-09-19 15:07:09 -04:00
CakeLancelot
4d437bcb34
Merge pull request #97 from gsemaj/bugfix1
...
Preventing spawning of invalid items using /itemN
Fix fusion matter amount not displaying on enter
2020-09-19 07:46:56 -05:00
Gent
5dbca0b7b1
Fix fusion matter amount not displaying on enter
2020-09-18 23:26:20 -04:00
ce9285bab5
support for /unsummon
2020-09-18 16:24:15 -05:00
Gent
cd7fec2d5b
Fix invalid item bug
2020-09-18 14:45:51 -04:00
d9d781c37d
whoops, everyone had gm
2020-09-18 02:10:30 -05:00
Gent
b929d12902
Implement Croc Pot item combining
2020-09-17 23:55:57 -04:00
9f78735caa
fixed socket reference bug
2020-09-17 22:44:37 -05:00
31ef03610d
temp fix and small refactor
2020-09-17 21:41:09 -05:00
22e3e9e4de
fixed 'player clone' bug
2020-09-17 18:03:23 -05:00
f4db0830ba
huge refactoring, chunking added
2020-09-17 17:45:43 -05:00
001564a257
Hotfix to stop crashing the server.
...
This will need to be fixed properly; probably while we implement
chunking.
2020-09-17 21:22:31 +02:00
e79f179628
Mobs respawn now.
...
Began work on mob logic. Also cleaned up TableData a little.
2020-09-17 01:43:48 +02:00
e03da83ff3
Rearranged the codebase a little.
...
* Deleted empty Player.cpp
* Moved the helper functions from the obsolete CNStructs.cpp into
main.cpp and deleted it
* Renamed CombatManager to MobManager, as that will likely become it's
main focus soon
2020-09-16 21:46:15 +02:00
5efc8ac089
Switched getTime() to std::chrono on all platforms.
2020-09-16 20:14:00 +02:00
efda6673b5
Print server version when starting up.
...
Also added -ldl to fix cmake compilation on Unix systems.
2020-09-16 20:12:56 +02:00
f7571607ba
Only send live checks when the connection has been silent for a while.
...
Also:
* Made the timeout configurable
* Removed the stale randomcharacters config option
* Switched to time_t for time values, even though it doesn't really
matter that much
* Halved the keepAliveTimer frequency
2020-09-16 17:45:53 +02:00
Gent
148d90f4f1
"Boosts and potions!"
...
Fixed crate opening such that the item has an iOpt of 1.
2020-09-14 18:36:50 +02:00
Gent
a976fef2b4
Implement vendor stack logic
2020-09-14 10:25:15 -04:00
Gent
da8c833587
Implement buyback
...
Sellability tweak
Add additional item categories
2020-09-14 10:25:15 -04:00
Gent
c91022030c
Load item tables + price implementation
2020-09-14 10:25:15 -04:00
Gent
f55cc8f36d
Load vendor tables
2020-09-14 10:24:55 -04:00
9cc5f3e4d5
Cleaned up comment formatting.
...
The incantation was: sed -i 's://\([^ ]\):// \1:' src/*.[ch]pp
Lines of code that was commented out were then manually reverted.
2020-09-14 16:07:05 +02:00
131997f34f
Cleaned up all whitespace issues.
...
The incantation was: sed -i 's/[ \t]*$//g' src/*.[ch]pp
2020-09-14 16:07:05 +02:00
ed86bc9160
Assorted cleanups and fixes.
...
* Clean up spacing/indentation
* Proper enum formatting
* Fix nano dismissal (for real this time)
* Do not copy Player struct when a pointer is right there
* Stop looking after the trade partner has been found
* Make sure we're shifting unsigned values (and 64-bit when they need to be)
* Look for JSONs in tdata/
* Add a dbsaveinterval to the example config.ini, in the login category
2020-09-14 16:07:05 +02:00
darkredtitan
38d5998a6e
Sanity checks for creating and deleting characters.
...
Co-authored-by: kamilprzyb <kamilprzybspam@wp.pl>
2020-09-14 16:07:02 +02:00
kamilprzyb
c7189a5cef
added saving missions
2020-09-14 16:07:02 +02:00
kamilprzyb
de15e2004b
added bank functionality, refactored itemMoveHandler
...
Co-authored-by: Cake Lancelot <CakeLancelot@users.noreply.github.com>
2020-09-14 16:07:02 +02:00
darkredtitan
480cca82fa
Make name checking case insensitive.
...
Co-authored-by: kamilprzyb <kamilprzybspam@wp.pl>
2020-09-14 16:06:57 +02:00
kamilprzyb
3d83f93167
added periodic DB saves, fixed some settings
2020-09-14 01:38:27 +02:00
kamilprzyb
1d9a7139a8
deleteing player deletes inventory and nanos, minor tweaks to settings
2020-09-14 01:38:27 +02:00
kamilprzyb
2fd7a8c6fc
Implemented saving inventory and nanos
2020-09-14 01:38:27 +02:00
kamilprzyb
fc57cae37d
added saving character when a connection with shard is killed
2020-09-14 01:38:04 +02:00
Gent Semaj
3cfec7aab3
Implement transportation framework + full S.C.A.M.P.E.R. functionality ( #86 )
...
* Add transportation registration
* Add S.C.A.M.P.E.R. functionality
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-13 22:26:16 +02:00
CakeLancelot
29e53117e7
Merge pull request #72 from FinnHornhoover/msys-mingw-compile-fix
...
Warnings and compile errors for MSYS2 MinGW64
2020-09-13 07:35:32 -05:00
c1ac2250a0
Minor changes.
...
This was me fixing a few bugs and finding that Gent was working on some
of the same ones, then awkwardly merging the changes together.
2020-09-12 22:43:04 +02:00
Gent
4880e4af12
Revamp revival code
2020-09-12 14:21:36 -04:00
Gent
2b1a028b3d
Validate cookie data
2020-09-12 11:41:31 -04:00
be99714495
Possible fix for the login error bug.
2020-09-12 17:09:11 +02:00
4c06163b51
Properly validate vendor logic.
...
Also, iTimeLimit should be 0.
2020-09-12 16:10:53 +02:00
Gent
4e7352da66
Add sell functionality to vendors
2020-09-11 22:04:23 -04:00
5747c24479
[bugfix] Don't set iType on empty item slots.
...
This confuses ItemManager::findFreeSlot().
2020-09-12 02:25:45 +02:00
579aa9d31d
Save pointer to Player struct in CNSocket.
...
This is an insignificant optimization now, but will be necessary when we
start switching around the the algorithms and datastructures used in
proximity detection.
2020-09-12 01:22:58 +02:00
Ariii
3865249387
Vendors, set nano skill command + serverside command issues fixed ( #74 )
...
Added basic shopkeeper functions, a player can buy the preset 3 items (cannonbolt set), all shopkeepers have the same items atm (need to check the shopkeeper tabledata), setting itemprice is something I didn't figure out.
Added set nano skill command
Implemented a switch for certain commands like health/taros/fusionmatter etc to be handled on the serverside aswell
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-11 23:19:03 +02:00
468840c9ea
Fixed gcc vs clang preprocessor tomfoolery.
2020-09-11 00:19:21 +02:00
52f02168bc
Implemented quest item cleanup and fixed a few bugs.
2020-09-11 00:19:21 +02:00
ddb5f782b7
Refactored mission data and implemented quest item mob drops.
...
Most future missions are now playable.
Quest items aren't being properly cleaned up yet.
2020-09-11 00:19:21 +02:00
3665dc2c93
[WIP] Incremental mission save 2
...
This commit (and the previous one) exist to document the first approach I
took to storing mission data. It's only here for posterity. This comment
was added while rebasing.
2020-09-11 00:19:19 +02:00
ae654f996c
[WIP] Incremental mission save 1
...
This commit (and the next one) exist to document the first approach I
took to storing mission data. It's only here for posterity. This comment
was added while rebasing.
2020-09-11 00:19:16 +02:00
e33b7f20e9
[bugfix] Preserve Taros and FM when opening Crates.
2020-09-11 00:08:26 +02:00
5b49e71de7
Implemented mission rewards.
...
Might need to refactor item drops, especially after implementing
task-result quest item drops.
2020-09-11 00:08:26 +02:00
3172724596
Implemented the mob kill counter in missions and fixed a bug.
2020-09-11 00:08:26 +02:00
8887c6349b
Add support for cookie-based login back in.
2020-09-11 00:08:26 +02:00
29cde56fb1
Levelling up added to /nano
...
- Using /nano levels up Player, a player cannot level down.
2020-09-10 17:51:52 +01:00
eb1ad6bb37
switched to dumped XDT & moved to a submodule
2020-09-09 12:06:22 -05:00
45a33758a5
Account for the size of packet length and ID in validation functions.
2020-09-08 03:06:55 +02:00
FinnHornhoover
266fddbffa
fixed warnings and compile errors for msys2
2020-09-08 03:41:13 +03:00
e90ae10746
Summoned NPC are now visible to other players.
2020-09-07 22:12:53 +02:00
df655dfe29
added mobdata to config
2020-09-07 12:54:40 -05:00
c8c4ec7d01
updated readme & small refactor
2020-09-07 12:23:00 -05:00
458843958b
Merge pull request #69 from SengokuNadeko/master
...
Adjustments made to regex
2020-09-06 14:06:37 -05:00
SengokuNadeko
361c069d0c
Adjustments to the regex
...
I made the regex a bit less restrictive. If you want, you can push this if it seems appropriate.
Username should be at least 4 characters and max 32
Password should be at least 8 characters and max 32
Usernames can be any combination of letters and numbers, with no special characters except for dash and underscore.
Passwords can use any of the alphanumeric/special characters specified in the regex.
2020-09-06 10:49:14 -05:00
SengokuNadeko
3876e0537e
Small regex fix
...
Old regex had some problems (a bit too restrictive). If you want, you can push this to loosen up the restrictions a little.
2020-09-06 10:42:07 -05:00
CakeLancelot
8a481acdae
Stub npcBarkHandler for now
2020-09-06 09:59:43 -05:00
darkredtitan
589da3f714
Fix social distancing bug (name trademarked by kamilprzyb)
2020-09-05 19:53:16 +02:00
00c5e07f4f
small memory bugs fixed
2020-09-03 15:29:29 -05:00
063d302bd5
Merge pull request #62 from kamilprzyb/master
...
Rewrote DB and finished LoginServer
2020-09-02 22:49:08 -05:00
7e9793bf90
Merge pull request #59 from JadeShrineMaiden/additions
...
Colliding NPC IID quickfix
2020-09-02 22:48:09 -05:00
CakeLancelot
fa6b0b178c
Remove unnecessary bracket in include statements
2020-09-02 21:25:09 -05:00
CakeLancelot
dadf1c5bcf
Change sqlite3.h path in sqlite_orm.h
...
Should fix Appveyor compilation
2020-09-02 21:11:50 -05:00
kamilprzyb
260759c20b
replaced tabs with 4 spaces
2020-09-02 17:53:39 +02:00
kamilprzyb
1ff5694960
Fix APPROVEALLNAMES setting
...
fixed GetInteger->GetBoolean
Co-authored-by: FinnHornhoover <30576665+FinnHornhoover@users.noreply.github.com>
2020-09-02 17:47:10 +02:00
kamilprzyb
11801c1f89
Rewrote DB to use ORM, added all remaining features to LoginServer and refactored it
2020-09-02 00:37:09 +02:00
4f6c77be4f
minor cleanup
2020-08-31 17:54:49 -05:00
d7a41d40ab
Replace signal() with sigaction().
2020-08-31 22:40:33 +02:00
1e344c2dd8
Small tweak
2020-08-31 01:36:29 +01:00
fdd0160248
Colliding NPC IID quickfix
2020-08-30 23:29:28 +01:00
Eperty123
da293ba9b3
Add DB prefix to db stuff
2020-08-29 13:47:39 +02:00
Eperty123
437063d78a
Add experimental TransportManager
2020-08-29 13:43:33 +02:00
Eperty123
b239fb9331
Add NPC barking, seeing saved characters
2020-08-29 13:14:21 +02:00
50431024c9
Merge pull request #55 from dongresource/combat1
...
Implemented combat, drops, crates and the guide changer
2020-08-28 19:11:56 -05:00
2a258a80f0
Database.cpp refactoring
2020-08-28 19:10:26 -05:00
a067975f27
Players can now see eachother fight monsters.
2020-08-28 22:22:24 +02:00
72a811d6ab
Implemented guide changing.
...
This means the Time Machine works as well.
2020-08-28 22:22:24 +02:00
3b35e0017a
Moved all JSON files into a dedicated data directory.
2020-08-28 22:22:24 +02:00
4df812f996
Implemented crates (dropping and opening).
...
Also fixed a bug in vaildOutVarPacket().
2020-08-28 22:22:24 +02:00
67d899efe6
Implemented proper validation of variable-length packets.
...
Also changed output buffer in pcAttackNpcs() from dynamically to
statically allocated. This in itself is temporary as I have a better
idea as to how we can allocate buffers with a bit less boilerplate.
2020-08-28 22:18:28 +02:00