forked from ServersHub/ServerAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix chat msg crash, header updates (ServersHub#7)
* The most significant changes involve modifications to the `AddItem` and `ServerEquipItem` methods in the `UPrimalInventoryComponent` struct, and the `GetBlueprint` method in the `AsaApi` namespace. The parameters in the first two methods have been changed from pointers to references, enhancing the safety and readability of the code. The `GetBlueprint` method now handles null objects or classes more explicitly and modifies the path name of the blueprint. Changes: 1. The `AddItem` method in the `UPrimalInventoryComponent` struct in `Inventory.h` has been modified. The parameter `theItemInfo` has been changed from a pointer to a reference. This change enhances the safety and readability of the code by ensuring that the parameter cannot be null and that it cannot be changed to point to a different object. (See `Inventory.h`) 2. The `ServerEquipItem` method in the `UPrimalInventoryComponent` struct in `Inventory.h` has been modified. The parameter `itemID` has been changed from a pointer to a reference. This change enhances the safety and readability of the code by ensuring that the parameter cannot be null and that it cannot be changed to point to a different object. (See `Inventory.h`) 3. The `GetBlueprint` method in the `AsaApi` namespace in `ArkApiUtils.h` has been modified. The method now replaces "Default__" with an empty string in the path name of the blueprint. If the object or its class is null, the method now explicitly returns an empty string. This change makes the method's behavior more predictable and its output more useful. (See `ArkApiUtils.h`) * Fixed signatures and removed else statement * Add null check to find property * Fixed chat message crash and header updates * FItemStatInfo updated for stat changes --------- Co-authored-by: Lethalinjectionx <[email protected]>
- Loading branch information
1 parent
0571b3f
commit 5d58d94
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters