Commit Graph

50 Commits

Author SHA1 Message Date
David Markowitz
2cc13c6499
chore: Make serialize actually virtual (#1156)
* Make serialize actually virtual

* fix serialize and make update virutal

* Update VendorComponent.h

* Remove flag var

* Update SoundTriggerComponent.h

---------

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-08-10 14:33:15 -07:00
David Markowitz
3e3148e910
Move dZoneManager to game namespace (#1143)
* convert zone manager to game namespace

* Destroy logger last
2023-07-17 17:55:33 -05:00
David Markowitz
455f9470a5
Move EntityManager to Game namespace (#1140)
* Move EntityManager to Game namespace

* move initialization to later

Need to wait for dZoneManager to be initialized.

* Fix bugs

- Cannot delete from a RandomAccessIterator while in a range based for loop.

Touchup zone manager initialize

replace magic numbers with better named constants
replace magic zonecontrol id with a more readable hex alternative
condense stack variables
move initializers closer to their use
initialize entity manager with zone control

change initialize timings

If zone is not zero we expect to initialize the entity manager during zone manager initialization

Add constexpr for zone control LOT

* Add proper error handling

* revert vanity changes

* Update WorldServer.cpp

* Update dZoneManager.cpp
2023-07-15 13:56:33 -07:00
David Markowitz
2a0f63c0a1
Fix all smashables not playing animations (#1112)
Fixes an issue where most smashables did not explode into bricks upon death.  This included anything that was spawned or didnt have the flag is_smashable set.
Tested that in races, all objects smash into bricks
Tested that the player properly explodes in their car if they crash
Tested that Shooting Gallery plays the special smash animation when a ship is smashed
Tested that all spawned objects play smash animations

* Fix warning, Fix modular assembly not smashing

* Rename variable to correct name
2023-06-14 15:44:22 -07:00
David Markowitz
4fe335cc66
Refactor: Amf3 implementation (#998)
* Update AMFDeserializeTests.cpp

Redo Amf3 functionality

Overhaul the whole thing due to it being outdated and clunky to use

Sometimes you want to keep the value

Update AMFDeserializeTests.cpp

* Fix enum and constructors

Correct enum to a class and simplify names.
Add a proper default constructor

* Update MasterServer.cpp

* Fix bugs and add more tests

* Refactor: AMF with templates in mind

- Remove hard coded bodge
- Use templates and generics to allow for much looser typing and strengthened implementation
- Move code into header only implementation for portability

Refactor: Convert AMF implementation to templates

- Rip out previous implementation
- Remove all extraneous terminology
- Add proper overloads for all types of inserts
- Fix up tests and codebase

* Fix compiler errors

* Check for null first

* Add specialization for const char*

* Update tests for new template specialization

* Switch BitStream to use references

* Rename files

* Check enum bounds on deserialize

I did this on a phone
2023-05-13 17:22:00 -05:00
Aaron Kimbrell
6aa90ad5b2
Breakout rest of the enums from dCommonVars and clean it up (#1061)
* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity

* address feedback

* make player flag types consistent

* fix typo
2023-05-02 17:39:21 -05:00
David Markowitz
7671cc6865
CDClient cleanup and optimization (#1023)
* CDClient cleanup and optimization

- Use static function to get table name
- Remove unused GetName function
- Replace above function with a static GetTableName function
- Remove verbose comments
- Remove verbose initializers
- Remove need to specify table name when getting a table by name
- Remove unused typedef for mac and linux

* Re-add unused table

Convert tables to singletons

- Convert all CDClient tables to singletons
- Move Singleton.h to dCommon
- Reduce header clutter in CDClientManager
2023-03-17 07:36:21 -07:00
Aaron Kimbrell
e524b86e12
breakout the component types into a scoped enum (#1002)
* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
2023-03-04 01:16:37 -06:00
Aaron Kimbre
faf42d2f8c cleanup enums to make them more consistent 2023-01-22 17:38:47 -06:00
Aaron Kimbrell
872270704c
Hardmode cleanups (#954)
* load values once
so that it doesn't check every time
don't return, just skip
don't realod char

* address feedback

* don't drop the only item you can't get again

* address most feedback

* move settings for HC mode

* fix comment

* claenup whitespace
2023-01-12 13:16:24 -06:00
wincent
7aacfc1bf0 Fixed crashes related to hardcore mode 2023-01-11 21:51:14 +01:00
Gie "Max" Vanommeslaeghe
e7bc4ef773 add hardcore mode 2023-01-11 20:08:54 +01:00
Aaron Kimbrell
80f8dd8003
Imminuty updates (#925)
* WIP Immunities

* Immunity getters

* remove redundent variable
replace it use with it's equivalent

* remove unused lookups, fix typos

* fix tests

* added imunity test

* address feedback

* more immunity tests

* explicit this
2023-01-06 23:59:19 -06:00
David Markowitz
8bcb4bd36d
Fix smashables not counting towards whole team (#944) 2023-01-06 23:06:24 -06:00
David Markowitz
203a150a56 Update DestroyableComponent.cpp 2023-01-01 16:36:10 -08:00
EmosewaMC
19be0a61b2 Eliminate WorldConfig Magic Numbers
Add comments for fields

Use the name directly
2023-01-01 05:20:03 -08:00
David Markowitz
bbd5a49ea2
Update DarkInspirationBehavior.cpp (#897) 2022-12-23 18:05:30 -08:00
David Markowitz
bd7f532a28
Implement the Imaginite Backpack and Shard armor scripts (#886)
* Imaginite Pack now works

* Remove unused params

* Address issues

* Add TeslaPack script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
2022-12-21 14:33:41 -08:00
David Markowitz
84c5d74450
Add Delete Inventory Slash Command (#865)
* moving branch

* Add deleteinven slash command

* Change name of BRICKS_IN_BBB

* Use string_view instead of strcmp

* Remove GameConfig

* Revert "Remove GameConfig"

This reverts commit cef5cdeea2.
2022-12-18 09:46:04 -06:00
David Markowitz
1464762bcd
Implement GTest and change windows output path
Implement GTest as a testing infrastructure.
Make windows output binaries to the build folder instead of the release type folder (potentially issue further down the line)
Add a simple unit test for DestroyableComponent
2022-11-07 00:12:35 -08:00
Aaron Kimbrell
26f2eb409f
Mounts v2 (#726)
* Mounts -v2

* fix stun state and make comments a bit nicer

* remove extra serilization

* update the char position a bit more correctly

* make vehicles face thr player's direction

* address feedback

* fix compiling for real this time

* removed uneeded check
2022-09-02 13:49:19 -05:00
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05:00
Aaron Kimbrell
e97ae92624
Make logger automatically put a newline (#675)
at the end of the line
remove all the newlines in log calls
2022-07-24 21:26:51 -05:00
Aaron Kimbrell
a7fb6eb3f3
make LoadFromXml usage consistent across comps (#673) 2022-07-24 21:03:22 -05:00
David Markowitz
6a38b67ed5
General AMF cleanup (#663)
* General AMF cleanup

Proper memory management as well as style cleanup

* General optimizations

Fix AMFArray so values are properly deleted when you leave the scope it was created in.
Add bounds check for deletion so you don't double delete.
Remove all AMFdeletions that are contained in an array since the array now manages its own memory and deletes it when it is no longer needed.

* Better tests and fix de-serialize

Fix de-serialize to be correct and implement a test to check this

* Update AMFDeserializeTests.cpp

* Update AMFFormat.cpp
2022-07-21 22:26:09 -07:00
David Markowitz
ed5ced0bed
Fix Model Component Serialization (#655)
* Fix model component serialization

* Update ModelComponent.h
2022-07-19 16:51:35 -05:00
EmosewaMC
30c8326c3e Move owner override
Mover owner override to be earlier so that we dont try to get the team of an entity that doesnt have a team and may be a child entity of a player.  Tested changes with a team of two players and players were correctly given credit for kills
2022-06-11 20:50:01 -07:00
Aaron Kimbrell
e3422ac0c5
Merge branch 'main' into main 2022-05-24 19:00:52 -05:00
EmosewaMC
4117ceb6c1 Skill Tasks changes
Addressed an issue where the Spinjitzu Initiate achievement would not progress.  This also allows mission tasks that specify that the player must get a kill on an enemy with a skill to progress.  Tested mission 1935 and 1139 and both missions progressed and completed as intended.
2022-04-25 03:25:07 -07:00
David Markowitz
58d2cee984
Merge pull request #516 from EmosewaMC/isPlayer-changes
Live accurate item loot sources
2022-04-24 18:56:49 -07:00
EmosewaMC
2e29dce77c removed logs 2022-04-24 17:27:25 -07:00
EmosewaMC
e56732184f commit 2022-04-24 17:26:05 -07:00
EmosewaMC
ceab229a63 Specified enum
the LOOT_SOURCE enum is now attached to all loot sources.
2022-04-23 20:32:31 -07:00
cooltrain7
579cf590b4
Implement CDZoneTable PlayerLoseCoinsOnDeath (#251)
* Implement ZoneTable PlayerLoseCoinsOnDeath

- Adds a check on death if the character should drop coins in the current zone

* Refactored PlayerLoseCoinOnDeath into dZoneManager

* Coin death drops use LootGenerator

* Refactored again with use of CDZoneTableTable

* Remove duplicate CDZone call during initialization
2022-02-05 13:27:24 +01:00
David Markowitz
6ba9eea993
Added check to prevent accidental sentinel passive proc (#396)
* Added check to prevent accidental sentinel passive proc

Added a boolean to check if the player is at zero armor already and if so, do not trigger the passive ability.

* Renamed variable and condensed armor check
2022-02-05 12:59:07 +01:00
TheMatt2
59afc63a2f Merge DarkflameServer 2022-01-30 13:40:08 -05:00
Xiphoseer
20037d12f7
Merge pull request #339 from CodeAX2/fix-aoe-targets
Fix Area of Effect Behavior Targets
2022-01-23 14:12:59 +01:00
TheMatt2
9dfa401b27 Fix whitespace
Convert to tabs and remove trailing whitespace
2022-01-15 14:02:14 -05:00
TheMatt2
3de3932503 Comply with Xiphoseer required changes.
Remove the CDClientDatabase::ExecuteQueryWithArgs() function and replace 
it with CDClientDatabase::CreatePreppedStmt().

This prevents a developer from accidently using %s, or incorrectly 
passing std::string, and causing a silent error.
2022-01-12 22:48:27 -05:00
TheMatt2
e5f7d164cb Additional SQLite lookup sanitizing.
Using CDClientDatabase::ExecuteQueryWithArgs() across all known lookups.
2022-01-06 21:12:47 -05:00
CodeAX2
a19454f7ae Change destroyable component validator to properly check friends 2022-01-04 11:11:23 -07:00
Xiphoseer
4d19459015
Merge pull request #291 from EmosewaMC/EmosewaMC
Implemented sourceType for SendSetCurrency
2022-01-04 12:01:32 +01:00
CodeAX2
d78b2404e2 Refactor CheckValidity
- Change variables names to make it clear they are referring to the target
- Change how the target is decided to be an enemy of friend to use the built-in method
2022-01-02 14:01:29 -07:00
Jacob Hofer
1ddf7d1f94 Fix for Area of Affect Behaviors targeting incorrect entities 2022-01-02 20:37:03 +00:00
EmosewaMC
6aad799f95 Updated variable names
Updated the variable names to match the enum name update.
2021-12-23 18:48:08 -08:00
Jett
9440af0d67 Repaired some bugs
- Fixed Team loot
- LMI dropping for team sizes
- No more > 4 player teams
2021-12-24 00:25:52 +00:00
EmosewaMC
97f8e9e9fc Added enum for coin sources
Added an enum for coin sources as to avoid leaving a random number in the code.
2021-12-22 00:01:55 -08:00
EmosewaMC
23e269940b Implemented sourceType for SendSetCurrency
Implemented sourceType for the function SendSetCurrency.
2021-12-21 23:26:54 -08:00
Jett
0531365cb5
Make loot accurate to the loot drop rates during live. (#216)
* loot fix (broken)

* Fixed loot

* Update SlashCommandHandler.cpp

* Remove debug command

* Roll loot command

* Remove debug log

* Added const references
When this commit is applied it adds const references to the loot system avoid some unnecessary copies.

Co-authored-by: wincent <wincent.holm@gmail.com>
Co-authored-by: Avery <averysumner@gmail.com>
2021-12-20 02:25:45 -08:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00