Commit Graph

38 Commits

Author SHA1 Message Date
dongresource 5784e77654 Misc changes.
The first two fixes were caught by infer. The Big Bug(tm) remains
unfixed.

* Fixed the Leech nano power
* Fixed an unlikely nullptr dereference in ItemManager
* /toggleai now makes mobs retreat immediately, instead of waiting for
their next movement tick
* Static path mobs will now stop in place instead of retreating to
their spawn points when AI is disabled
* Changed the misleading config option name from "chunksize" to
"viewdistance", since it's actually only a third of the chunk size
2020-10-14 23:15:02 +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
Jade 7caa73caca Bugfixes
* Groups can now be abandoned using the "leave group" button.
* Non-group passive powers no longer buff the group leader instead of buffing the summoner.
* Adjusted various warning causing code pieces.
* Adjusted potions and battery prices.
2020-10-07 18:25:49 +01: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
Jade 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
CPunch 884b844d65 minor refactoring 2020-09-28 13:11:13 -05:00
dongresource 4fa6618abb Implemented player tick (health/nano stamina).
* The player now heals while not in combat
* Nanos lose stamina while active, regain it while resting
* Using active nano powers drains stamina
* Standing in FM patches/lakes now deals damage
* Fixed a memory error in npcAttackPc()
* Mobs now aggro when a player gets close
* Mobs now give up the chase if the player gets out of the combat zone;
they no longer try chasing until they themselves have left it
* Added a few missing break statements in the loops in BuddyManager

Other players are not yet instantly notified of health/stamina updates,
as finding the correct way to do this has proven tricky. FM patch damage
updates other player's views just fine, though.
2020-09-27 00:16:15 +02: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
dongresource dccd92aff9 The Future is now playable.
* Sync'd tdata so it has all the lair NPCs
* Bypassed Eduardo escort task
* Fixed the level 36 updateFusionMatter() memory error
* Fixed qitems being deleted even if the player fails to complete the
mission due to not having any inventory space, thus softlocking the
mission
2020-09-25 23:10:02 +02: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
dongresource 279cb78d5f Mob-related cleanup.
* NPCs now keep track of their chunk information like PlayerView does
for players
* NPCManager::sendToViewable() parallels PlayerManager::sendToViewable()
* Nano damage and debuffs now count as attacking a mob
* Mobs will de-aggro if something else killed their target
2020-09-25 02:00:26 +02:00
dongresource c722044bf5 The Sleep, Stun and Snare powers now affect mobs.
They currently don't expire after a set amount of time.
Attacking a sleeping monster does wake it up, but doesn't remove the
debuff status client-side yet.
2020-09-22 22:22:10 +02:00
dongresource 12fbdc9621 Wait about 2s before despawning killed mobs.
This gives them enough time to play their death animations before
they disappear.
2020-09-22 00:23:18 +02:00
dongresource 321dca3f79 Use PC_MAXHEALTH() in the rest of the codebase.
+ minor fixups
2020-09-21 19:51:30 +02:00
JadeShrineMaiden 113ecc8f60 Refactored passive nano powers. 2020-09-21 19:51:30 +02:00
dongresource dc9de5a54a Cleaned up implementation of active nano powers. 2020-09-21 19:51:30 +02:00
JadeShrineMaiden 0fc072d591 Initial implementation of nano powers. 2020-09-21 19:51:30 +02:00
CPunch f4db0830ba huge refactoring, chunking added 2020-09-17 17:45:43 -05:00
dongresource 131997f34f Cleaned up all whitespace issues.
The incantation was: sed -i 's/[ \t]*$//g' src/*.[ch]pp
2020-09-14 16:07:05 +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
dongresource c1ac2250a0 Minor changes.
This was me fixing a few bugs and finding that Gent was working on some
of the same ones, then awkwardly merging the changes together.
2020-09-12 22:43:04 +02:00
Gent 4880e4af12 Revamp revival code 2020-09-12 14:21:36 -04:00
Ariii 3865249387 Vendors, set nano skill command + serverside command issues fixed (#74)
Added basic shopkeeper functions, a player can buy the preset 3 items (cannonbolt set), all shopkeepers have the same items atm (need to check the shopkeeper tabledata), setting itemprice is something I didn't figure out.
Added set nano skill command
Implemented a switch for certain commands like health/taros/fusionmatter etc to be handled on the serverside aswell

Co-authored-by: dongresource <dongresource@protonmail.com>
2020-09-11 23:19:03 +02:00
JadeShrineMaiden 29cde56fb1 Levelling up added to /nano
- Using /nano levels up Player, a player cannot level down.
2020-09-10 17:51:52 +01:00
dongresource 41898bb6b7 Fix a bug where nanos aren't unsummoned when unequipped.
Thanks fabriXfinn for reporting it.
Also improved sanity checks.
2020-08-25 20:30:20 +02: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
Onii-chan afbf309c7e
Add player revive, vehicle mount/dismount and more (#33) 2020-08-24 16:04:56 -05:00
dongresource 756074cc62 Remove redundant initialization in nanoSummonHandler(). 2020-08-23 19:46:51 +02:00
CPunch d6b96389be added sanity checks to nanos 2020-08-22 22:15:27 -05:00
dongresource 6129c0b4e2
Players can now see eachother's nanos. (#28) 2020-08-22 19:52:54 -05: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 cd9fb6ec25 added sanity check to exitGame() 2020-08-22 13:08:37 -05:00
Onii-chan 56bf0db20d
Added more nano features (commands, equip & unequip, powers) (#26)
* Revert "fixed window build"

This reverts commit b94f602537.

* Revert "Revert "fixed window build""

This reverts commit dac4457ed2.

* Add nano power feature

* Update CNShardServer.hpp

* Update CNShardServer.hpp

* Test: Add nano power feature

Nano powers are set to the first power in its selection by default.

* Update NanoManager.cpp

* Test: More nano features

* Update NanoManager.hpp

* Update PlayerManager.hpp

* Update PlayerManager.cpp

* Updated indentations

* Update PlayerManager.cpp

* Add DEBUGLOG()

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-22 13:02:08 -05:00
dongresource e044b4251a
Cleanup indentation. (#10) 2020-08-20 19:37:34 -05:00
CPunch 7b085e9c8b added sanity checks 2020-08-20 18:50:30 -05:00
CPunch d6e1f57c23 merged master 2020-08-20 10:43:37 -05:00