mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-17 12:14:21 +00:00
chore: cleanup pointer management for LDF data (#1995)
* change network settings from vector to LwoNameValue * move settings on Entity to managed memory * Migrate more members * chore: remove pointer leakage from raw ldf pointers * feedback * fix ci
This commit is contained in:
@@ -881,9 +881,9 @@ void DestroyableComponent::FixStats() {
|
||||
int32_t currentImagination = destroyableComponent->GetImagination();
|
||||
|
||||
// Unequip all items
|
||||
auto equipped = inventoryComponent->GetEquippedItems();
|
||||
const auto equipped = inventoryComponent->GetEquippedItems();
|
||||
|
||||
for (auto& equippedItem : equipped) {
|
||||
for (const auto& equippedItem : equipped) {
|
||||
// Get the item with the item ID
|
||||
auto* item = inventoryComponent->FindItemById(equippedItem.second.id);
|
||||
|
||||
@@ -924,7 +924,7 @@ void DestroyableComponent::FixStats() {
|
||||
buffComponent->ReApplyBuffs();
|
||||
|
||||
// Requip all items
|
||||
for (auto& equippedItem : equipped) {
|
||||
for (const auto& equippedItem : equipped) {
|
||||
// Get the item with the item ID
|
||||
auto* item = inventoryComponent->FindItemById(equippedItem.second.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user