diff --git a/src/common/Util/SpawnIndexAllocator.h b/src/common/Util/SpawnIndexAllocator.h index 65cc826e..732f652c 100644 --- a/src/common/Util/SpawnIndexAllocator.h +++ b/src/common/Util/SpawnIndexAllocator.h @@ -24,11 +24,11 @@ namespace Util void init( T maxSlotId, bool reserveFirstSlot = false ) { - setupQueue(); - m_maxSlotId = maxSlotId; m_reserveFirstSlot = reserveFirstSlot; + setupQueue(); + // todo: reserve max slot id in map to prevent any runtime reshashing } diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index 35e711cd..9a68f69b 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -304,6 +304,14 @@ void Core::DebugCommandHandler::set( char * data, Entity::Player& player, boost: player.sendDebug( "MSQ Guide updated " ); } + else if( subCommand == "weatheroverride" || subCommand == "wo" ) + { + uint32_t weatherId; + + sscanf( params.c_str(), "%d", &weatherId ); + + player.getCurrentZone()->setWeatherOverride( static_cast< Common::Weather >( weatherId ) ); + } else { player.sendUrgent( subCommand + " is not a valid SET command." ); @@ -569,7 +577,7 @@ void Core::DebugCommandHandler::nudge( char * data, Entity::Player& player, boos void Core::DebugCommandHandler::serverInfo( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) { - player.sendDebug( "SapphireServer " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); + player.sendDebug( "SapphireZone " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); player.sendDebug( "Compiled: " __DATE__ " " __TIME__ ); player.sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) ); }