Commit Graph

99 Commits

Author SHA1 Message Date
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 609d3cdb99 Remove redundant instance deletion 2020-10-25 18:14:35 -04: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 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
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
Gent 2b650b0bed Cleaned up warp code. 2020-10-22 13:14:24 -04: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
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 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 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 d4aed0abf4 Add support for unique instances 2020-10-15 11:46:53 -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
dongresource 5a80c53e79 Remove the pointer to the deallocated chunk from the current player/NPC.
This fixes the Great Crash Bug(tm).
2020-10-15 04:36:38 +02:00
Jade d99dad261c Bugfixes + Damage Formula Adjustment
* Entering/exiting groups should apply/remove group buffs.
* Fixed issues with nanos losing all stamina from various revives/warp away.
* Heavily tweaked damage formula, nano types now boost/decrease damage.
* Weapons can consume battery returning extra damage, battery consumed depends on enemy level.
2020-10-11 18:39:52 +01:00
dongresource 606384445c Added /summonW and /unsummonW gruntwork commands.
Also:
* Filled in the battery fileds in the REWARD_ITEM packets in
MissionManager.
* Removed redundant NPC_ENTER in npcSummonHandler()
2020-10-07 19:29:59 +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
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
Gent a9837d6c1b Finish MSS commands + convert stack to vector 2020-10-03 11:24:45 -04:00
CPunch f5939353b1 added basic command handler 2020-10-02 18:50:47 -05: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
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 4cd7b7cb53 added basework for instancing 2020-09-30 20:44:37 -05:00
CPunch 884b844d65 minor refactoring 2020-09-28 13:11:13 -05:00
dongresource 4079806436 Support the /batteryN and /batteryW commands.
Also up the PVP damage to 700.
2020-09-28 18:54:39 +02:00
JadeShrineMaiden efb3df7133 Implemented GM SpecialState Handling
Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-27 22:19:21 +02:00
dongresource a324f3fda9
Merge pull request #118 from JadeShrineMaiden/moblocomotion
Greased up enemies
2020-09-27 20:02:52 +02:00
CPunch 062302a7aa fixed potential threading/socket issue 2020-09-27 00:12:26 -05:00
Jade 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
dongresource 9657aaf202 Tuned various values.
* The player no longer receives the Blossom nano mission until they've
left the future
* As a temporary measure for the sake of the public server, Fusions in
respawn in their lairs after 2.5 minutes
* Changed default player damage value to 150
* Mobs now drop the correct amount of FM, as well as a close
approximation of the correct amount of taros
* You can no longer break the FM cap in the Future zone
* Fixed the updateFusionMatter() bug the right way this time
* Completing a nano mission now subtracts FM as it should
* Setting a Nano's power no longer reports 0 FM to the client
2020-09-26 03:48:45 +02:00
Gent 0931cf1fbc Fix client/server summoned nano discrepancy on revive 2020-09-25 10:57:32 -04: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
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
CPunch 4caca07856
Merge pull request #109 from gsemaj/slider
Basic slider implementation
2020-09-23 14:49:26 -05:00
CPunch 63c14aff58
Merge pull request #110 from kamilprzyb/vehicles_pr
Fixed Time and implemented vehicles expiring
2020-09-23 14:48:38 -05: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
kamilprzyb 5a58908462 vehicle has a proper expiration day when bought, implemented checking expired vehicles while login 2020-09-22 13:16:09 +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
dongresource a768a4f539 Fixed halved NPC distance and renamed config option to chunksize. 2020-09-21 23:30:05 +02:00
CPunch 4cc1cf4f7e minor chunk refactor 2020-09-21 14:55:34 -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
dongresource 321dca3f79 Use PC_MAXHEALTH() in the rest of the codebase.
+ minor fixups
2020-09-21 19:51:30 +02:00