mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 12:41:55 +00:00 
			
		
		
		
	 6aa90ad5b2
			
		
	
	6aa90ad5b2
	
	
	
		
			
			* 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
		
			
				
	
	
		
			31 lines
		
	
	
		
			939 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			939 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "GfJailWalls.h"
 | |
| #include "dZoneManager.h"
 | |
| #include "GeneralUtils.h"
 | |
| #include "eRebuildState.h"
 | |
| 
 | |
| void GfJailWalls::OnRebuildComplete(Entity* self, Entity* target) {
 | |
| 	const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
 | |
| 
 | |
| 	for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("Jail0" + wall)) {
 | |
| 		spawner->Deactivate();
 | |
| 	}
 | |
| 
 | |
| 	for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("JailCaptain0" + wall)) {
 | |
| 		spawner->Deactivate();
 | |
| 	}
 | |
| }
 | |
| 
 | |
| void GfJailWalls::OnRebuildNotifyState(Entity* self, eRebuildState state) {
 | |
| 	if (state != eRebuildState::RESETTING) return;
 | |
| 
 | |
| 	const auto wall = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Wall"));
 | |
| 
 | |
| 	for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("Jail0" + wall)) {
 | |
| 		spawner->Activate();
 | |
| 	}
 | |
| 
 | |
| 	for (auto* spawner : dZoneManager::Instance()->GetSpawnersByName("JailCaptain0" + wall)) {
 | |
| 		spawner->Activate();
 | |
| 	}
 | |
| }
 |