mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 20:52:01 +00:00 
			
		
		
		
	Fixed scripted powerup spawners
When applied this commit fixes scripted powerups
This commit is contained in:
		| @@ -15,6 +15,11 @@ void ScriptedPowerupSpawner::OnTimerDone(Entity *self, std::string message) { | |||||||
|  |  | ||||||
|         const auto itemLOT = self->GetVar<LOT>(u"lootLOT"); |         const auto itemLOT = self->GetVar<LOT>(u"lootLOT"); | ||||||
|  |  | ||||||
|  |         // Build drop table | ||||||
|  |         std::unordered_map<LOT, int32_t> drops; | ||||||
|  |  | ||||||
|  |         drops.emplace(itemLOT, 1); | ||||||
|  |  | ||||||
|         // Spawn the required number of powerups |         // Spawn the required number of powerups | ||||||
|         auto* owner = EntityManager::Instance()->GetEntity(self->GetSpawnerID()); |         auto* owner = EntityManager::Instance()->GetEntity(self->GetSpawnerID()); | ||||||
|         if (owner != nullptr) { |         if (owner != nullptr) { | ||||||
| @@ -24,7 +29,7 @@ void ScriptedPowerupSpawner::OnTimerDone(Entity *self, std::string message) { | |||||||
|                     renderComponent->PlayEffect(0, u"cast", "N_cast"); |                     renderComponent->PlayEffect(0, u"cast", "N_cast"); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 LootGenerator::Instance().DropLoot(owner, self, itemLOT, 0, 1); |                 LootGenerator::Instance().DropLoot(owner, self, drops, 0, 0); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             // Increment the current cycle |             // Increment the current cycle | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 wincent
					wincent