// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   NetGameInfoIndividual.java


public class NetGameInfoIndividual extends NetGameInfoCommon
{

    int[] GetGameScoreStatus()
    {
        return GetPlayerInfoList().GetGameScoreStatus();
    }

    boolean CheckGameWon()
    {
        return GetPlayerInfoList().CheckPlayerWon();
    }

    void Cheat()
    {
        GetPlayerInfoList().Cheat();
    }

    NetGameSettingsIndividual GetGameSettingsIndividual()
    {
        return m_cGameSettingsIndividual;
    }

    public NetGameInfoIndividual()
    {
        m_cGameSettingsIndividual = null;
    }

    boolean CheckGameFailed()
    {
        return CheckPlayersTeamFailed(0);
    }

    void UpdateEnableObjectives(NetPlayerInfo cPlayerInfo)
    {
        ((ChromeModule) (super.m_cModule)).m_ObjectivesManager.SetEnableNet(false, 0);
    }

    void OnScoreChange()
    {
        GetPlayerInfoList().Sort();
        super.OnScoreChange();
    }

    void SetGameSettings(NetGameSettings cGameSettings)
    {
        super.SetGameSettings(cGameSettings);
        if(cGameSettings instanceof NetGameSettingsIndividual)
            m_cGameSettingsIndividual = (NetGameSettingsIndividual)GetGameSettings();
        else
            GameObject.CrashLog(" Niepoprawny obiekt GameSettings " + cGameSettings + " dla NetGameInfoIndividual " + this + "\n");
    }

    int GetLeaderPoints()
    {
        return GetPlayerInfoList().GetLeaderPoints();
    }

    void CountIndividualFragsOnDie(PlayerNetBaseMortal victim, PlayerNetBaseMortal assassin, int nMode)
    {
        if(nMode == 3 || nMode == 4)
            return;
        NetPlayerInfo cVictimInfo = victim == null ? null : victim.GetPlayerInfo();
        NetPlayerInfo cAssassinInfo = assassin == null ? null : assassin.GetPlayerInfo();
        if(cVictimInfo != null)
            cVictimInfo.IncDeaths();
        else
            GameObject.CrashLog("ERROR: " + this + " PlayerDied " + victim + " ( cVictimInfo == null )\n");
        if(cAssassinInfo != null)
            if(cAssassinInfo != cVictimInfo)
                cAssassinInfo.IncFrags();
            else
                cAssassinInfo.DecFrags();
    }

    void EventPlayerDied(PlayerNetBaseMortal victim, PlayerNetBaseMortal assassin, int nMode)
    {
        if(super.Role < 4)
        {
            return;
        } else
        {
            super.EventPlayerDied(victim, assassin, nMode);
            CountIndividualFragsOnDie(victim, assassin, nMode);
            return;
        }
    }

    boolean CheckGameShouldStarted()
    {
        GameObject.LogD(" " + GetPlayerInfoList().GetSize() + " >= " + " " + GetGameSettingsIndividual().GetMinPlayersToStartGame() + " ? \n");
        return GetPlayerInfoList().GetSize() >= GetGameSettingsIndividual().GetMinPlayersToStartGame();
    }

    int GetLeaderFrags()
    {
        return GetPlayerInfoList().GetLeaderFrags();
    }

    public void OnDestroy()
    {
        super.OnDestroy();
        m_cGameSettingsIndividual = null;
    }

    NetGameSettingsIndividual m_cGameSettingsIndividual;
}
