Commit Graph

484 Commits

Author SHA1 Message Date
Gent 803f1a246a Buddy code cleanup
- Get rid of buddyCnt, self-nullptr checks, and redundant playermap loops in chat handlers
- Add helper function to find available buddy slot
- Reorganize a bit
2020-11-08 00:08:43 -05:00
SengokuNadeko 262dca7dd6 Buddy rework, adjustments, and fixes
I cleaned up the code a bit (I'll clean it up more as I make more progress) and fixed a bug with buddy slots. Now buddies aren't overwritten!
A few reworks and adjustments

I reworked the buddyIDs array to store only player UIDs instead of IDs. I also reworked buddy deleting so that it deletes buddies from the array.
Code cleanup

Cleaned up some of the code. I mainly just removed useless helper methods.
2020-11-07 23:39:41 -05:00
Gent 26460c0167 Add battery caps for combat rewards & commands 2020-11-07 21:51:16 -05:00
Jade 83c378c9c2 Added /notify and /players admin commands
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-11-03 21:07:59 +01:00
dongresource a1145aced4 Chat strings are now sanitized.
* Only plain, printable ASCII is allowed for now.
* Local chat is now printed to the server console, but group chat is
still private
* Added a helper function to print character names and IDs
2020-10-31 21:31:25 +01:00
dongresource 1a405034af
Merge pull request #143 from JadeShrineMaiden/bugfixes
Moved Debuff handling to Combat + Bugfixes
2020-10-31 19:21:50 +01:00
Jade d21f727e9d Moved Debuff handling to Combat + Bugfixes
* Majority of mob debuff handling is moved to combatStep().
* Drain now kills the mob and does 40% overall damage.
* Bumped up active nano debuff durations, debuffs like drain linger longer but damage less.
* Debuffs are cleared upon mob death and retreating.
* Patched out vehicle off success packet spam
* Boosts and potions now cost the right amount (100 taros) and give the right quantity (100).
* Damage was tweaked slightly. At higher levels you are more likely to fall prey to rand().
* Enemies now use run animations during combat and retreating.
2020-10-31 15:55:44 +00:00
CakeLancelot 7b4fab8c6b
Update client/server bundle link in README 2020-10-29 23:49:25 -05:00
Gent S 2af33da4e8 Suppress unordered_map leak in doDebuff 2020-10-26 23:23:29 -04:00
Gent S f3b9ecd791 Add missing sanity checks to quitTask and useItem 2020-10-25 18:33:02 -04:00
Gent S 609d3cdb99 Remove redundant instance deletion 2020-10-25 18:14:35 -04:00
CakeLancelot d840b0bbd0 Update tdata ref 2020-10-25 13:14:08 -05:00
CakeLancelot 4da178d16c
Remove mention of random characters from README
The random characters feature hasn't been available for a while now. I also clarified some information regarding usage and the public server.
2020-10-24 23:57:17 -05:00
CakeLancelot 0d65fc2653 Update tdata submodule 2020-10-24 18:34:47 -05:00
Titan 6d97aaa1d0 Make nano skill change consume FM & power items 2020-10-24 18:31:07 -04:00
Gent 4ab686bc46 Fix abused unordered map 2020-10-24 18:30:02 -04:00
CakeLancelot 2302c28ac5
Merge pull request #141 from CakeLancelot/orm-update
Update sqlite_orm to 1.6
2020-10-24 14:31:57 -05:00
Jade c8497a4856
Implement two more mission types + tweaks & fixes
* Weapons will consume your batteries fully.
* Nerfed enemy damage at lower levels.
* Further reworked drain, uses a static variable as a timer (lastDrainTime)
* resendMobHP has been repurposed to drainMobHP.
* Players heal faster after a sizable cooldown.
* Nano type advantage is more noticeable during combat.

Implemented two more mission types + Tweaks

* Item delivery quests now work.
* Timed missions now work.
* All escort missions (type 6) are skipped.
* /minfo now also prints the terminator npc.
* Weapon battery consumption tweaked
* Fixed indentations.
* Heal nanos have better output (25% -> 35%)
* Damage formula had a slight tweak.
* Bugfixed weapon equipping.
* Other tweaks
2020-10-24 14:04:42 -04:00
Jade 177c5f0f17
Nano Drain, Debuffs are timed
* Nano drain power works, currently does 30% damage over a period of 3 seconds.
* Stun, Sleep and Snare powers will now run out of time on mobs.
* A few other adjustments to mob mobility.
2020-10-24 14:00:00 -04:00
Jade 2782706355
Group warping & mob movement smoothing
* Warping into IZs and Fusion Lairs now will also take into account your group members.
* MobManager lerp does not confusingly divide speed by 2 anymore.
* Mobs pursue their targets more smoothly, they will avoid phasing into the player during combat.
* Nerfed retreat speed by a factor of 1.5, normal mobs retreated way too quickly however mobs like Don Doom and Bad Max do not retreat fast enough.
* Bugfixed sendPlayerTo, it did not call updatePlayerPosition leaving undesirable anomalies.
2020-10-24 14:00:00 -04:00
CakeLancelot a969988b5c Update sqlite_orm to 1.6 2020-10-24 09:47:46 -05:00
CakeLancelot bf3c19764b
Merge pull request #140 from JadeShrineMaiden/chunk-desync-fix
Possibly fixed all chunking desyncs
2020-10-23 22:06:20 -05:00
Jade cc06fdcf60 Possibly fixed all chunking desyncs
* Players/NPCs that initialize chunks now correctly pull their main chunk into their viewdata.
* Tested on the public server, seems to have solved the chunking issues.
2020-10-24 03:47:34 +01:00
dongresource 3b5af415fb Fixed the NULL Player* in PlayerManager::players bug. 2020-10-23 05:32:14 +02:00
Gent 2b650b0bed Cleaned up warp code. 2020-10-22 13:14:24 -04:00
CakeLancelot 512647974d Fix Numbuh 3's sneak and revive abilities being swapped
Also fix a small typo
2020-10-21 10:05:48 -05:00
dongresource c9f9b093f4 Bugfixes.
* Add newly created chunks to nearby players and NPCs. This fixes the
slider/static path mob pop-in problem.
* Update a player's chunks when resurrecting. This fixes a mob desync
problem.
* Use a private instance for the Time Lab
* Spawn a slider for every stop
* Fix mobs in private lairs using the template chunk mobs's current
health for their max health
* Don't call into the JSON lib in the loop in aggroCheck(). This is an
optimization found after using gprof.
* Don't print NPC deletions to console. This stops the spam when a
private instance is deleted.
* Changed default view distance to half the length of a map tile, so
chunks are aligned to map tiles
* Update tdata reference
2020-10-21 02:38:30 +02:00
Gent 49d8ed2e36 Slider path, fixes, tweaks 2020-10-20 10:40:50 -04:00
dongresource 10534886b8 Cleanup for 1.2.
Cleaned up whitespace, comments, brace style, etc.
Updated tdata reference.
2020-10-19 20:48:57 +02:00
Gent d713fafb1c Add missing MSS routes 2020-10-18 22:35:17 -04:00
dongresource e97b58ccaf Fixed private instance memory leaks. 2020-10-19 04:30:12 +02:00
dongresource 55be58cc24 /summonW now supports summoning non-mob NPCs.
/npcr will now rotate gruntwork NPCs in-place instead of making separate
rotation entries that wouldn't have been loaded properly anyway.
2020-10-19 03:45:58 +02:00
JadeShrineMaiden deb3e5b897
Added /minfo and /tasks (#137)
* /minfo returns your current active mission's: id, task id, task type, task objective marker id and enemy ids if applicable.
* /tasks returns all the active mission ids and task ids.
2020-10-18 23:02:51 +02:00
dongresource 4a5857a126 QoL improvements.
* Use macros for extracting map numbers and player IDs from instance IDs
* Add docstrings to all commands
* Remove /test command
* Sync with tdata
2020-10-18 22:43:22 +02:00
Gent f7e7f99017 Skyway tweaks. 2020-10-17 23:23:35 -04:00
Gent 6d9d66954e M O N K E 2020-10-17 22:33:59 -04:00
dongresource bbd695cad1 Minor tweaks.
* The server now refuses to start if any JSONs fail to load
* Mobs now take height into account when losing aggro on a player
* Mobs now aggro on the closest player in range, rather then on the
earliest one to connect to the server of the ones in range
* /summonW now works in IZs and Lairs as well
* Lowered the extra height that mobs spawn at with /summonW to prevent
glitching problems
2020-10-18 04:17:52 +02:00
dongresource 3ce8cf2129 Cleaned up item drop logic.
* Replaced bad exception logic with C-style error returns in ItemManager
* Removed unnecessary instances of objects being passed by value
* Fixed whitespace problems
* Added new config options to the default config.ini
* Updated tabledata reference
2020-10-18 01:30:37 +02:00
dongresource 7f716c7278 Fixed exception usage in TableData. 2020-10-18 01:30:37 +02:00
kamilprzyb dd54668697 functional crates (no more plungers) (#133)
* FM, Taros and Boosts awards from killing mobs should be pretty
accurate now. A temporary formula for adjusting player/mob level gap is
implemented, but it will probably need to be adjusted in the future

* Mobs now drop correct crates

* Crates can be opened and give you correct items This includes
regular mob crates, world boss crates, mission crates, IZ race crates,
E.G.G.E.R.s, golden Eggs, and Event Crates.  Keep in mind that neither
IZ races or golden Eggs are implemented, but if you spawn such a crate
it can be opened.

* All data is read from a json file, for which I'm going to release a
tool soon so it's easily adjustable

* There is a new setting for enabling events, which enables dropping
extra event crates These are Knishmas, Halloween and Easter
2020-10-18 01:30:37 +02:00
Gent ab5857e7e2 Fix re-crocpotting (#134) 2020-10-16 19:54:05 -04:00
Gent da725d21e6 Delete instances with no players 2020-10-16 11:50:03 -04:00
Gent 6473951b9a Instance tweaks + fixes
Instanced mobs tick, fusions stay dead, missions reset on enter
2020-10-15 17:07:58 -04:00
Gent 3050801399 Make /warp and /goto put you in the overworld 2020-10-15 17:07:58 -04:00
Gent efd729710f Kick players out of instances when they leave 2020-10-15 17:07:58 -04:00
Gent 85530ef57f Implement instance copying
and make respawn points match the player instance
2020-10-15 17:07:58 -04:00
Gent b87f20e2dc Make instance missions reset upon warping out 2020-10-15 17:04:38 -04:00
Gent d4aed0abf4 Add support for unique instances 2020-10-15 11:46:53 -04:00
Gent c1fd51b721 Expand gruntwork to instances
Add NPC instance gruntwork data

Add instance-related commands
- /instance (instance ID)
- /npci [instance ID]
2020-10-15 11:44:15 -04:00
Zenpock bd34bb294c Instance Stuff
custom instance commands
warping takes you into instances
npcs show up only in the instance they are supposed to be inside.
2020-10-15 11:44:15 -04:00