Commit Graph

115 Commits

Author SHA1 Message Date
FinnHornhoover 78b17aea72 added better drop handling, parsing, rng 2021-04-26 11:26:00 -04:00
gsemaj 80d965944c Fix naming scheme in NPCs.json 2021-04-24 11:36:33 -04:00
gsemaj fa7c88e214 Rename Vendor.Xpp -> Vendors.Xpp 2021-04-16 13:37:18 -04:00
CPunch 9b84d9dc4d [refactor] BaseNPC now uses Entity XYZ fields for handling positions
- fixed many references to Entity.appearanceData.i[XYZ] to use the base Entity XYZ values
- BaseNPC::enterIntoViewOf grabs the position from the base Entity XYZ values
- NPCManager::updateNPCPosition updates the base Entity XYZ values
- MobAI.c/deadStep() also sends it's packet based on the Entity XYZ values
2021-04-13 20:03:51 -05:00
gsemaj fd965fbf03 Remove redundant Mob map 2021-04-07 03:03:43 +02:00
dongresource 3325397d17 Remove Eggs::Eggs and rearrange Entity members a bit 2021-03-31 22:28:27 +02:00
dongresource 0c8e209360 [WIP] Convert all chunk-related logic to the new system's semantics
Replaced all references to chunk->players and chunk->NPCs with
chunk->entities and all instances of the old NPCClass enum with
EntityType.

The server compiles but will not yet run properly.
2021-03-31 22:28:27 +02:00
dongresource 610a683804 [refactor] E g g s 2021-03-17 22:28:24 +01:00
dongresource e9bc2fe561 [refactor] Remove the word 'Manager' from most source files/namespaces
ChatManager -> Chat
MissionManager -> Missions
NanoManager -> Nanos
TransportManager -> Transport
ChunkManager -> Chunking
BuddyManager -> Buddies
GroupManager -> Groups
RacingManager -> Racing
ItemManager -> Items

NPCManager and PlayerManager remain.

Note: You can use git log --follow src/file.cpp to trace the history of
a file from before it was renamed.
2021-03-17 20:16:43 +01:00
dongresource cee09f6344 [refactor] Mark all internal functions static
All packet handlers and helper functions that are only used in the
source file they're declared in have been taken out of the namespaces in
the corresponding header files, have been marked static, and have been
reordered to avoid the need for declarations at the top of each source
file.

Each source file now contains a "using namespace" directive so that the
static functions don't need to prefix the source file's symbols with
their namespace. All redundant namespace prefixes found have been
removed.

An unused nano power resetting function in NanoManager has been removed.
2021-03-16 22:54:41 +01:00
dongresource 2017b38e23 [refactor] Move mob drop logic from Combat to ItemManager 2021-03-16 19:50:33 +01:00
dongresource 2024fb4969 [refactor] Split MobManager.cpp into MobAI.cpp and Combat.cpp
This is terrible. It was a mistake to do this before cleaning up the
actual code. It might be better not to use this commit and to do this
refactor in a different order or something.
2021-03-13 23:55:16 +01:00
dongresource ae279100d7 [refactor] Extract Abilities.cpp from {Nano,Mob}Manager.cpp
I've kept all the functions in their original namespaces for now, since
putting them all into the same one will cause collissions, and this is
all getting rewritten soon anyway.
2021-03-13 21:22:29 +01:00
CPunch e92a5a2f8b [refactor] Split ItemManager.cpp into Vendor.cpp & Trading.cpp
- added sources to Makefile
- Added Trading::init() to main.cpp
2021-03-12 20:09:45 -06:00
dongresource 4cd3a3dabd [refactor] src/contrib, src/mingw -> vendor 2021-03-13 02:58:57 +01:00
dongresource 0fbdb1dad2 Improve sanity checks when opening crates and combining items
And ignore ITEM_MOVE packets while trading.
2021-03-08 22:31:25 +01:00
Jade ddc7caf959 Basic Anti rapidfire 2021-01-04 23:57:50 +01:00
Gent S 954cfabde5 Add ID gaps for missing NPCs in Academy 2020-12-31 11:26:17 -05:00
dongresource dab204ddaf If compiled for Academy, do not spawn NPCs in the Future zone 2020-12-31 14:13:08 +01:00
Gent S 82d5455da6 Ignore race rewards for EPs that aren't found 2020-12-23 14:53:56 -05:00
Kamil 5f82658c8d adjusted item codes logic to handle multiple items per code 2020-12-23 13:50:12 -05:00
Jade 50b2bdcb16 Fixed Nano Style Issues 2020-12-23 13:50:12 -05:00
Kamil 34dbb59fb1 Implement redeem codes 2020-12-23 13:50:12 -05:00
Kamil a74c9be2ff Implement Nano capsules 2020-12-23 13:50:12 -05:00
dongresource 90191fd494 Add academy.json loading to TableData
This is where the permanent Academy-exclusive NPCs and mobs will be
loaded from. Resurrect 'Ems work now.
2020-12-23 13:50:12 -05:00
dongresource 322e354f5b Fix indentation in RacingManager.cpp and compilation on Linux 2020-12-22 14:46:09 +01:00
Gent S e953b51229 Add reward tables for racing 2020-12-22 00:36:39 -05:00
Gent S b81a3761b6 Load instance data from XDT 2020-12-21 16:18:08 -05:00
Gent S 2f44243abb Please.... please take the slider.... 2020-12-18 20:48:09 -05:00
Gent S d3e5b9c485 Potentially fix slider collisions
- Lerp circuit once instead of on a per-slider basis to avoid FPE differences
- Spawn sliders every k points instead of once per stop
2020-12-16 20:37:12 -05:00
Gent S f1a2723274 Don't write mob HP to gruntwork 2020-12-14 10:00:07 -05:00
Gent S 5431d21d27 Always grab mob HP from XDT 2020-12-14 00:26:17 -05:00
dongresource 8ebabac7c0 Various bugfixes
* Fixed Nano stamina not being halved on respawn
* Reverted the default argument to terminate() change because MSVC is
undable to disambiguate the function pointer passed to sigaction()
* Fatal errors during init (like in TableData) can just call exit(1)
directly anyway (missing "OpenFusion: terminated." be damned)
* Switched to a slightly more portable syntax for getting the version
in the Makefile
* We shouldn't join the shard thread in the signal handler because the
thread the signal handler ends up running in is undefined behaviour and
we don't strictly need to join it anyway

Many of these issues were discovered on OpenBSD.
2020-12-06 05:25:23 +01:00
dongresource dd6fbfb683 Tweak terminate() slightly
* Gave it a default argument, since we never actually care about it, but
it needs to have it to conform to the signal handler prototype
* Constricted the area locked by activeCrit to only the block that deals
with the connections vector, to lower the chance of a future badly
placed call to terminate() deadlocking the server instead
2020-12-06 02:20:46 +01:00
Gent S b04c377d7c Properly implement item types. 2020-12-04 16:42:58 -05:00
Gent S 794856a63c Clean up item loading from XDT. 2020-12-04 13:57:08 -05:00
Gent S c9754902b9 Instance fusion lair NPCs, remove non-mob fusions, stub non-mob paths 2020-12-01 06:07:10 -05:00
Jade 166eb5125f Group Heal Range Limit 2020-11-26 23:01:19 -05:00
Jade 299fc1b461 Refactored Nano Powers
* All nano power functions have been merged into one goliath of a function.
* Nano powers consume the correct amount of stamina.
* Bugfixed gumball issues, gumballed nanos now perform better.
* Revive powers now work correctly.
* Recall powers both self and group are functional.
* Removed nanoBuff.
* Added a new applyBuff function, this allows for quick and easy application of nano skills.
* Numerous other bugfixes.
2020-11-26 23:01:19 -05:00
Jade 2acb90f2d2 Initial tabledata implementation 2020-11-26 23:01:19 -05:00
Gent S 98ae236c08 Load gruntwork group mobs hierarchically 2020-11-25 11:09:05 -05:00
Gent S 6ff762ba57 Save gruntwork group mobs hierarchically 2020-11-25 10:41:10 -05:00
Gent S 73ef5fa5ff Load mob groups hierarchically 2020-11-23 19:28:22 -05:00
Gent S 8a0d0e0e4c Restructure tdata 2020-11-23 18:45:28 -05:00
Gent S dab536cb6a Grouped mobs adjustment 2020-11-22 19:14:22 -05:00
Jade 5e8b6eec6e Grouped Mobs are gruntworkable
* Using /summonGroupW
2020-11-22 16:53:03 -05:00
Jade 883a1c17e6 Group Mobs Initial Implementation
* For now only mob.json is read for grouped mobs.
* Grouped mobs are fully functional granted the mobs.json is prepared correctly.
* Removed redundant move packet.
2020-11-22 16:53:03 -05:00
Gent S 665f28313a Clean up redundant forced chunk updates for NPCs 2020-11-21 11:53:48 -05:00
Gent S dae3b24093 Reimplement chunk position caching 2020-11-19 17:37:07 -05:00
Gent S e50a4c2edd Experimental chunk refactor. 2020-11-19 17:37:02 -05:00