Commit Graph

30 Commits

Author SHA1 Message Date
Gent efd729710f Kick players out of instances when they leave 2020-10-15 17:07:58 -04:00
dongresource 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
dongresource 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
dongresource 21b7500e13 Define NOMINMAX globally to work around VS nonsense. 2020-10-02 22:04:23 +02:00
dongresource 35a2110698 Save connected players to DB when gracefully terminating the server. 2020-10-02 19:34:09 +02:00
CPunch 839f9a813c remove player from map in weird edgecase 2020-10-01 19:20:44 -05:00
dongresource 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
CPunch 884b844d65 minor refactoring 2020-09-28 13:11:13 -05:00
dongresource 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
Gent cd7fec2d5b Fix invalid item bug 2020-09-18 14:45:51 -04:00
CPunch 31ef03610d temp fix and small refactor 2020-09-17 21:41:09 -05:00
dongresource e79f179628 Mobs respawn now.
Began work on mob logic. Also cleaned up TableData a little.
2020-09-17 01:43:48 +02:00
dongresource 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
dongresource 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
kamilprzyb 3d83f93167 added periodic DB saves, fixed some settings 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
CPunch 4f6c77be4f minor cleanup 2020-08-31 17:54:49 -05:00
JadeShrineMaiden 5c8a0069fc
Vehicle and trading bugfixes (#51)
* Sanity checks + Starting level changes

- Item movement handler checks to make sure items aren't moved from equipment slot to equipment slot.
- Item give command checks to make sure an out of bounds item is not spawned (Below iType 0 or above iType 8)
- Players now begin at level 36, consequently the item give command does not level you up now.

* Initial Trade Implementation

* Sanity Check

- Prevents out of bounds item movement by comparing it to AINVEN_COUNT.

* Taros and Trading

* Update ItemManager.cpp

* Update ItemManager.cpp

* working trading system

* Trading system code pointerified

- It works with the recent pointer changes needed.

* Vehicles and Trading bugfixes
2020-08-26 21:35:13 -05:00
dongresource 14bc368073 Dynamically allocate the Player struct in PlayerView.
This way we're not always passing it around by value.
Note that the Player structs in CNSharedData are still
pass-by-reference. Will probably change this later.
2020-08-25 00:59:55 +02:00
CPunch 6d3868349d removed debug output in keepAliveTimer 2020-08-24 16:12:49 -05:00
CPunch 16bca39dae added simple timer system to CNShardServer 2020-08-24 16:11:40 -05:00
dongresource e99feb03d5 Add verbosity levels. 2020-08-23 23:09:31 +02:00
CPunch 88953541ef added INITSTRUCT to zero-out data 2020-08-22 19:26:18 -05:00
CPunch 94b0dc724e major refactoring 2020-08-22 18:31:09 -05:00
CPunch 35b424c531 fixed warnings for VC++ 2020-08-22 13:38:27 -05:00
dongresource 35c622d8a2 Add support for verbose logging. 2020-08-22 19:39:13 +02:00
dongresource 43f2def80b Report unhandled packets in string form. 2020-08-22 19:19:46 +02:00
CPunch 24d30a05bf added heartbeat support 2020-08-18 20:34:39 -05:00
CPunch 47b76b422c added sanity checks 2020-08-18 19:11:31 -05:00
CPunch 9d366e3720 inital commit 2020-08-18 15:42:30 -05:00