Commit Graph

394 Commits

Author SHA1 Message Date
kamilprzyb c7006b46ed EggBuffs now stores debuff timestamp instead of remaining time 2020-11-11 23:19:07 -05:00
kamilprzyb 45ed99ae35 implemented player debuff 2020-11-11 23:19:07 -05:00
kamilprzyb f2ff4c7f4d added basic player buffs implementation 2020-11-11 23:19:07 -05:00
dongresource 2744ed64e3 Fix a bug where the server would crash if Drain killed a mob. 2020-11-11 23:35:00 +01:00
Gent 90754665a0 Refactor buddy request-by-name 2020-11-11 09:06:41 -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 121c65d7ea Fix not being able to attach weapons to emails 2020-11-09 21:33:02 -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 8a68958ed4 Fix players being able to become buddies twice 2020-11-09 04:41:20 -05:00
Gent d7a8d2d453 Sanitize email subject + body 2020-11-08 15:37:17 -05:00
darkredtitan 5293573116
Allow period and numbers in firstname/lastname regex check (#144)
* Remove unnecessary whitespace check in regex
* Allow dot characters in names (except at the beginning of a name)
* Allow numbers in names
2020-11-08 14:34:02 -06: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
Gent 8f90fdaac4 Integrate email handlers with DB 2020-11-08 14:39:17 -05:00
Gent 3a55a9b66f Add email structs and functions to DB
Mutex locks included
2020-11-08 14:37:33 -05:00
Gent 36e9370ff4 Add email packet handlers w/ sample data 2020-11-08 14:26:03 -05:00
Gent 3f5a9c8811 Fix buddy list not syncing properly
I couldn't reproduce this on my public server, but the list would show up empty sometimes on initial login on my local server, so I threw it in for good measure.
2020-11-08 13:58:44 -05:00
Gent 30de5c1734 Sanitize buddy chat strings 2020-11-08 13:31:10 -05:00
Gent c7591c6ce2 Implement buddy warp 2020-11-08 12:54:05 -05:00
Gent 7be79010fc Buddy DB integration 2020-11-08 12:42:27 -05:00
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
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
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
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
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
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
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