- 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
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.
* 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.