void Battle::SetImReady( bool ready ) { UserBattleStatus& bs = m_serv.GetMe().BattleStatus(); bs.ready = ready; //m_serv.GetMe().SetBattleStatus( bs ); SendMyBattleStatus(); }
void Battle::StartSpring() { if ( UserExists( GetMe().GetNick() ) && !GetMe().Status().in_game ) { GetMe().BattleStatus().ready = false; SendMyBattleStatus(); GetMe().Status().in_game = spring().Run( *this ); GetMe().SendMyUserStatus(); } ui().OnBattleStarted( *this ); }
void Battle::OnRequestBattleStatus() { UserBattleStatus& bs = m_serv.GetMe().BattleStatus(); bs.team = GetFreeTeam( true ); bs.ally = GetFreeAlly( true ); bs.spectator = false; bs.colour = sett().GetBattleLastColour(); // theres some highly annoying bug with color changes on player join/leave. if ( !bs.colour.IsOk() ) bs.colour = GetFreeColour( GetMe() ); SendMyBattleStatus(); }
void Battle::StartSpring() { if ( UserExists( GetMe().GetNick() ) && !GetMe().Status().in_game ) { GetMe().BattleStatus().ready = false; SendMyBattleStatus(); // set m_generating_script, this will make the script.txt writer realize we're just clients even if using a relayhost m_generating_script = true; GetMe().Status().in_game = spring().Run( *this ); m_generating_script = false; GetMe().SendMyUserStatus(); } ui().OnBattleStarted( *this ); }
void Battle::OnUnitsyncReloaded( GlobalEvents::GlobalEventData data ) { IBattle::OnUnitsyncReloaded( data ); if ( m_is_self_in ) SendMyBattleStatus(); }
void Battle::OnUnitsyncReloaded( wxEvent& data ) { IBattle::OnUnitsyncReloaded( data ); if ( m_is_self_in ) SendMyBattleStatus(); }