1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

set weatheroverride debug command and assert fix in spawnindexallocator

This commit is contained in:
Adam 2018-03-02 15:29:48 +11:00
parent 4e597d8acd
commit 8437ff3cbc
2 changed files with 11 additions and 3 deletions

View file

@ -24,11 +24,11 @@ namespace Util
void init( T maxSlotId, bool reserveFirstSlot = false ) void init( T maxSlotId, bool reserveFirstSlot = false )
{ {
setupQueue();
m_maxSlotId = maxSlotId; m_maxSlotId = maxSlotId;
m_reserveFirstSlot = reserveFirstSlot; m_reserveFirstSlot = reserveFirstSlot;
setupQueue();
// todo: reserve max slot id in map to prevent any runtime reshashing // todo: reserve max slot id in map to prevent any runtime reshashing
} }

View file

@ -304,6 +304,14 @@ void Core::DebugCommandHandler::set( char * data, Entity::Player& player, boost:
player.sendDebug( "MSQ Guide updated " ); 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 else
{ {
player.sendUrgent( subCommand + " is not a valid SET command." ); 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 ) 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( "Compiled: " __DATE__ " " __TIME__ );
player.sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) ); player.sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) );
} }