Commit Graph

754 Commits

Author SHA1 Message Date
d4d0f388c4 Implemented saving gruntwork results to file.
* Monkey Skyway paths are now saved in a format compatible with
paths.json
* flush() is called on every periodic DB save in addition to the /flush
and /mss N export commands
* Monkeys now accept WIP routes
2020-10-06 21:53:21 +02:00
ce58411ff8 Added /population and /level commands.
Also made /mss an access level 30 command, for safety.
2020-10-05 02:33:30 +02:00
661070dc3a Cleaned up whitespace.
Incantation: sed -i 's/[ \t]*$//g' src/*.[ch]pp

Also switched BuddyManager from tabs to spaces using vim's :retab command.
2020-10-05 02:03:13 +02:00
JadeShrineMaiden
b8f586bc10
Groups, Group Nano powers and Revive (#129)
* Initial Group Implementation

* Request/refuse/join and leave groups.
* Chat into groups.
* Get status updates on every group member each tick.
* Owner leaving the group destroys the entire group.

* Added more nano powers

* Revive for both variants work.
* Many nano powers now have a group variant working.
* Enemy checks for aggro before retreating.
* Enemies keep aggro on dead players with revive nanos out.

* Further Nano powers + Bugfixes

* Infection damage now relies on bitcondition flags.
* Antidote power now works.
* Improved how groups handle leaving players.
* Fixed mob aggro range.
* Group Healing is now functional.
* Possibly fixed the player being unselectable bug.
* Fixed indentations.

* Dismiss nano when starting a MSS ride

* Sneak, Invisibility and Bugfixes

* Sneak and invisibility affect mob aggro.
* Possibly bugfixed equips not showing to other players.
* Aggro checking is less likely to cause nullptr related crashes.

* Group PR cleanup.

* Made sure to label all hacky workarounds
* Implemented the Antidote nano power the right way
* Cleaned up the way various little things are written

Didn't have the opportunity to actually test groups.

Co-authored-by: CakeLancelot <CakeLancelot@users.noreply.github.com>
Co-authored-by: CPunch <sethtstubbs@gmail.com>
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-10-05 01:54:08 +02:00
131eb94919 removed stale comment 2020-10-04 12:52:16 -05:00
755bb75306 U8toU16 now respects buffer sizes 2020-10-04 12:50:58 -05:00
5015e2575d
Merge pull request #128 from gsemaj/monkeys
Add MSS gruntwork commands
2020-10-04 18:33:32 +02:00
Gent
a9837d6c1b Finish MSS commands + convert stack to vector 2020-10-03 11:24:45 -04:00
Gent
47da895544 Add basic MSS gruntwork commands 2020-10-03 11:20:51 -04:00
a852c26e5e minor command refactor 2020-10-02 19:20:59 -05:00
316239dadc comments + better test command 2020-10-02 18:59:07 -05:00
f5939353b1 added basic command handler 2020-10-02 18:50:47 -05:00
f82d203377
Merge pull request #127 from gsemaj/nanos
Fix nano buffs remaining after nano stamina runs out
2020-10-02 23:26:36 +02:00
Gent
cbd04c2ce6 Unsummon nano when stamina runs out 2020-10-02 17:03:11 -04:00
Gent
1b55ab44e3 Add helper function to get socket from player ID
Co-authored-by: Jade <jadeshrinemaiden@gmail.com>
2020-10-02 17:02:31 -04:00
21b7500e13 Define NOMINMAX globally to work around VS nonsense. 2020-10-02 22:04:23 +02:00
35a2110698 Save connected players to DB when gracefully terminating the server. 2020-10-02 19:34:09 +02:00
8a144a359f It hasn't been a landwalker for a while now. 2020-10-02 19:34:09 +02:00
2fe4b2bac1 Rewrote quest bitfield char[128] <-> int64_t[16] logic.
* This should fix the problem with some completed missions being
forgotten
* We no longer explicitly shuffle bits around. Instead we just cast
and copy the full buffer
* Character creation initializes the quest blob with 128 zeroes, since
that happens later on anyway, but we're robust against different quest
flag sizes just in case
* I haven't looked at the actual flag-setting logic, so if the bug is in
there, this won't fix that one, but it does fix the one where the least
significant bit of every 64-bit flag doesn't get saved to the blob
* I'm still cautious about storing the various bitfields as signed
values even though the client does it that way, since while shifting
into the sign bit is undefined behaviour in C/C++, it may *not* be in
C#. And of course the client implementation may just be buggy as well.
2020-10-02 19:34:09 +02:00
839f9a813c remove player from map in weird edgecase 2020-10-01 19:20:44 -05:00
4fe4aeb0d3 Properly clean up players that have been kicked as duplicates.
This should fix the issue with null pointers in PlayerManager::players.
2020-10-02 01:37:50 +02:00
600c26024b
Merge pull request #124 from gsemaj/bugfix1
Fixed crash on killing summoned NPC
2020-10-01 17:03:40 +02:00
Gent
3c734e3e76 Fixed crash on killing summoned NPC 2020-10-01 10:36:52 -04:00
4cd7b7cb53 added basework for instancing 2020-09-30 20:44:37 -05:00
8ff97ec0b3
Merge pull request #123 from gsemaj/items
Add simple item stacking logic
2020-09-30 18:37:31 -05:00
5f65c1530b
Merge pull request #122 from JadeShrineMaiden/bugfix
Various bugfixes and adjustments
2020-09-30 18:37:16 -05:00
Gent
2c831ee115 Match maxed stack behavior to OG 2020-09-30 16:23:46 -04:00
Gent
941e986ee1 Fix incorrectly set item cost 2020-09-30 13:30:19 -04:00
Gent
1eb806af58 Add item stacking logic 2020-09-30 13:29:56 -04:00
ab990116a2 Various bugfixes and adjustments
* Nano missions should now stop repeating.
* Bitwise operators are now used to handle buff/debuff bitfields.
* Changing nano powers will no longer grant you infinite buffs.
* Mobs now heal up client-side after retreating, this comes with candy effect being played however.
* Lower level mobs now hit harder.
* Nanos drain stamina quicker when they grant passive powers.
* Healing, damage and leech powers scale up with your level.
* Player on player damage now accounts for damage and armor.
2020-09-29 22:27:48 +01:00
fb281b0237 Lock all Database operations.
All DB functions that are called outside of Database.cpp are now locked
by the same mutex. This might be a bit overkill, but it's not a hot code
path, so it doesn't matter. Better to avoid the potential deadlocks if
we made it too granular.

From now on a clear distinction must be made between external and
internal functions in Database.cpp, or else deadlock will occur.

Note that sqlite database operations are already locked, but if execute
multiple transactions within the same operation, it could have still
caused problems.

I also removed the DbPlayer fetch when writing to DB by making it a part
of the Player struct. This, by itself, should have fixed the crash we found.
2020-09-29 16:47:39 +02:00
3f35d2e960 sanity check to fix possible FPE 2020-09-28 15:31:01 -05:00
884b844d65 minor refactoring 2020-09-28 13:11:13 -05:00
4079806436 Support the /batteryN and /batteryW commands.
Also up the PVP damage to 700.
2020-09-28 18:54:39 +02:00
efb3df7133 Implemented GM SpecialState Handling
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-27 22:19:21 +02:00
c9be0e5402 Do not tick dead players.
This fixes the "dancing in Fusion Matter" bug.
Also (temporarily?) added updateNPCPosition() to the suppression list.
Might want to take it out again (along with some of the other ones) if
we do end up implementing Chunk GC.
2020-09-27 20:29:26 +02:00
97c2c532f1
Merge pull request #117 from gsemaj/slider
Load sliders from paths.json
2020-09-27 20:03:41 +02:00
a324f3fda9
Merge pull request #118 from JadeShrineMaiden/moblocomotion
Greased up enemies
2020-09-27 20:02:52 +02:00
6ea47ddb56 Fixes.
* Mobs should account for height when aggroing on nearby players
* We don't need to keep track of lastHealTime for each player separately
* Warp attendants no longer steal the players weapon and money
2020-09-27 19:58:37 +02:00
2b4a1387f9 stubbed BuddyManager 2020-09-27 12:23:49 -05:00
dacae8d6de
Merge pull request #120 from gsemaj/bugfix1
Combat bug fixes
2020-09-27 02:09:01 -05:00
Gent Semaj
b03cc563eb Fix mobs not aggroing 2020-09-27 03:05:55 -04:00
Gent Semaj
dd374b2ea1 Fix boosts and potions not updating on reward 2020-09-27 03:05:55 -04:00
f8f2088e38 fixed player health regen 2020-09-27 01:13:27 -05:00
062302a7aa fixed potential threading/socket issue 2020-09-27 00:12:26 -05:00
a5d3160588 Mob movement smoothening + Bugfixes
* Mobs now move at a tickrate per second of 2 as opposed to less than 1 before.
* How lerping works was changed slightly, mobs are bumped down to half the speed to account for the higher tickrate.
* Damage formula was altered to more closely match the OG game.
2020-09-27 05:43:50 +01:00
4fea2ae896 Variable damage to/from mobs
* Player weapons and armor ratings are taken into account when damaging/getting damaged by mobs.
* Players have a 5% chance to critical strike mobs, this doubles the player's weapon power.
* Aside from player and mob stat based damage variance, there is also an inherent 20% variance to any damage.
2020-09-27 02:53:03 +01:00
Gent
56a92d302f Add curve parameter to lerp 2020-09-26 19:24:07 -04:00
Gent
0ea5712f8c Load sliders from paths.json 2020-09-26 19:24:07 -04:00
b4fb449e69 Fix VS build. 2020-09-27 01:00:31 +02:00