예제 #1
0
 public void setPlayerId(int id)
 {
     this.player_id  = id;
     this._inventory = new DaoManager(this._connection).getInventory(this.player_id);
     this._team      = -1;
     this._mission   = new Mission[3];
     if (ConfigManager.getInstance().getInfoItem(id) == null)
     {
         ConfigP confign = new ConfigP();
         confign.setOwnerId(id);
         confign.setOwnerName(this.player_name);
         confign.setMira(1);
         confign.setSensibilidade(50);
         confign.setSangue(1);
         confign.setVisao(70);
         confign.setAudio1(100);
         confign.setAudio2(100);
         ConfigManager.getInstance().AddConfig(confign);
         ConfigManager.getInstance().AddConfigDb(id, 100, 100, 50, 70, 1, 0, this.player_name, 0, 7);
         this._config       = ConfigManager.getInstance().getInfoItem(id);
         this.audio1        = this.getConfig().getAudio1();
         this.audio2        = this.getConfig().getAudio2();
         this.sensibilidade = this.getConfig().getSensibilidade();
         this.visao         = this.getConfig().getVisao();
         this.mira          = this.getConfig().getMira();
         this.mao           = this.getConfig().getMao();
         this.sangue        = this.getConfig().getSangue();
         this.audio_enable  = this.getConfig().getAudioEnable();
     }
     else
     {
         this._config       = ConfigManager.getInstance().getInfoItem(id);
         this.audio1        = this.getConfig().getAudio1();
         this.audio2        = this.getConfig().getAudio2();
         this.sensibilidade = this.getConfig().getSensibilidade();
         this.visao         = this.getConfig().getVisao();
         this.mira          = this.getConfig().getMira();
         this.mao           = this.getConfig().getMao();
         this.sangue        = this.getConfig().getSangue();
         this.audio_enable  = this.getConfig().getAudioEnable();
     }
 }
예제 #2
0
        public void setPlayerId(int id)
        {
            this.player_id  = id;
            this._inventory = new DaoManager(this._connection).getInventory(this.player_id);
            this._team      = -1;
            this._mission   = new Mission[3];
            bool flag = TitleManager.getInstance().getTitle(id) == null;

            if (flag)
            {
                TitleManager.getInstance().AddTitleDb(id);
                Title acc = new Title
                {
                    owner_id = id
                };
                TitleManager.getInstance().AddTitle(acc);
                this.title = TitleManager.getInstance().getTitle(id);
            }
            else
            {
                this.title = TitleManager.getInstance().getTitle(id);
            }
            bool flag2 = ConfigManager.getInstance().getInfoItem(id) == null;

            if (flag2)
            {
                ConfigP configP = new ConfigP();
                configP.setOwnerId(id);
                configP.setOwnerName(this.player_name);
                configP.setMira(1);
                configP.setSensibilidade(50);
                configP.setSangue(1);
                configP.setVisao(70);
                configP.setAudio1(100);
                configP.setAudio2(100);
                configP.config = 55;
                ConfigManager.getInstance().AddConfig(configP);
                ConfigManager.getInstance().AddConfigDb(id, 100, 100, 50, 70, 1, 0, this.player_name, 0, 7, 55);
                this._config       = ConfigManager.getInstance().getInfoItem(id);
                this.audio1        = this.getConfig().getAudio1();
                this.audio2        = this.getConfig().getAudio2();
                this.sensibilidade = this.getConfig().getSensibilidade();
                this.visao         = this.getConfig().getVisao();
                this.mira          = this.getConfig().getMira();
                this.mao           = this.getConfig().getMao();
                this.sangue        = this.getConfig().getSangue();
                this.audio_enable  = this.getConfig().getAudioEnable();
                this.config        = this.getConfig().config;
            }
            else
            {
                this._config       = ConfigManager.getInstance().getInfoItem(id);
                this.audio1        = this.getConfig().getAudio1();
                this.audio2        = this.getConfig().getAudio2();
                this.sensibilidade = this.getConfig().getSensibilidade();
                this.visao         = this.getConfig().getVisao();
                this.mira          = this.getConfig().getMira();
                this.mao           = this.getConfig().getMao();
                this.sangue        = this.getConfig().getSangue();
                this.audio_enable  = this.getConfig().getAudioEnable();
                this.config        = this.getConfig().config;
            }
        }