mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 04:32:06 +00:00 
			
		
		
		
	Add more logging around rewarding items (#1861)
This commit is contained in:
		| @@ -180,6 +180,7 @@ void InventoryComponent::AddItem( | ||||
| 	const int32_t sourceType, | ||||
| 	const bool bound, | ||||
| 	int32_t preferredSlot) { | ||||
| 	LOG("AddItem %i %i %s %s", lot, count, StringifiedEnum::ToString(lootSourceType).data(), StringifiedEnum::ToString(inventoryType).data()); | ||||
| 	if (count == 0) { | ||||
| 		LOG("Attempted to add 0 of item (%i) to the inventory!", lot); | ||||
|  | ||||
|   | ||||
| @@ -483,7 +483,7 @@ void Mission::YieldRewards() { | ||||
|  | ||||
| 			// If a mission rewards zero of an item, make it reward 1. | ||||
| 			auto count = pair.second > 0 ? pair.second : 1; | ||||
|  | ||||
| 			LOG("Player %llu is receiving %i of item %i from repeatable mission %i", entity->GetObjectID(), count, pair.first, info.id); | ||||
| 			inventoryComponent->AddItem(pair.first, count, IsMission() ? eLootSourceType::MISSION : eLootSourceType::ACHIEVEMENT); | ||||
| 		} | ||||
|  | ||||
| @@ -511,7 +511,7 @@ void Mission::YieldRewards() { | ||||
|  | ||||
| 		// If a mission rewards zero of an item, make it reward 1. | ||||
| 		auto count = pair.second > 0 ? pair.second : 1; | ||||
|  | ||||
| 		LOG("Player %llu is receiving %i of item %i from mission %i", entity->GetObjectID(), count, pair.first, info.id); | ||||
| 		inventoryComponent->AddItem(pair.first, count, IsMission() ? eLootSourceType::MISSION : eLootSourceType::ACHIEVEMENT); | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -129,6 +129,10 @@ std::unordered_map<LOT, int32_t> Loot::RollLootMatrix(Entity* player, uint32_t m | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	for (const auto& drop : drops) { | ||||
| 		LOG("Player %llu has rolled %i of item %i from loot matrix %i", player->GetObjectID(), drop.second, drop.first, matrixIndex); | ||||
| 	} | ||||
|  | ||||
| 	return drops; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Markowitz
					David Markowitz