public DI_THUONG_TRANG_THAI_NEW(TBL_XWWL_NPC Play_, int _NpcPlayId, int THOI_GIAN, int DI_THUONG_ID, int DI_THUONG_SO_LUONG)
 {
     this.int_0             = _NpcPlayId;
     this.FLD_PID           = DI_THUONG_ID;
     this.dateTime_0        = DateTime.Now;
     this.dateTime_0        = this.dateTime_0.AddMilliseconds((double)THOI_GIAN);
     this.class153_0        = Play_;
     this.timer_0           = new Timer((double)THOI_GIAN);
     this.timer_0.Elapsed  += new ElapsedEventHandler(this.timer_0_Elapsed);
     this.timer_0.Enabled   = true;
     this.timer_0.AutoReset = false;
     this.method_2(this.FLD_PID, 1, DI_THUONG_SO_LUONG, THOI_GIAN / 1000);
 }
        public void timer_1_Elapsed(object sender, ElapsedEventArgs e)
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "yczt_Elapsed");
            }
            if (this.class15_0 == null)
            {
                if (this.class153_0 != null)
                {
                    TBL_XWWL_NPC class1530 = this.class153_0;
                    class1530.Rxjh_HP = class1530.Rxjh_HP - (long)((int)this.double_0);
                    if (this.class153_0.Rxjh_HP <= 0L)
                    {
                        Form1.WriteLine(1, "DestroyMonsterScript DI_THUONG_TRANG_THAI_NEW timer_1_Elapsed");
                        this.class153_0.DestroyMonsterScript(this.int_0);
                        if (this.timer_1 != null)
                        {
                            this.timer_1.Enabled = false;
                            this.timer_1.Close();
                            this.timer_1.Dispose();
                            this.timer_1 = null;
                        }
                    }
                }
                return;
            }
            Players class150 = this.class15_0;

            class150.NHAN_VAT_HP = class150.NHAN_VAT_HP - (long)((int)this.double_0);
            if ((this.class15_0.Player_Job == 2 || this.class15_0.Player_Job == 9) && (double)(new Random()).Next(0, 120) <= this.class15_0.Kiem_khach_thang_thien_3_khi_cong_Hoa_phuong_lam_trieu && this.class15_0.NHAN_VAT_HP <= (long)0)
            {
                this.class15_0.NHAN_VAT_HP = (long)10;
                this.class15_0.Show_Char(this.class15_0.UserSessionID, 322);
            }
            if (this.class15_0.NHAN_VAT_HP <= (long)0)
            {
                this.class15_0.Dead();
                if (this.timer_1 != null)
                {
                    this.timer_1.Enabled = false;
                    this.timer_1.Close();
                    this.timer_1.Dispose();
                    this.timer_1 = null;
                }
            }
            this.class15_0.UpdateHP_MP_SP();
        }
Beispiel #3
0
        public void method_1(TBL_XWWL_NPC class153_0)
        {
            int num = 10000;

            while (num < 30000)
            {
                if (this.dictionary_0.ContainsKey(num))
                {
                    num++;
                }
                else
                {
                    class153_0.FLD_INDEX = num;
                    if (this.dictionary_0.ContainsKey(class153_0.FLD_INDEX))
                    {
                        break;
                    }
                    this.dictionary_0.Add(class153_0.FLD_INDEX, class153_0);
                    return;
                }
            }
        }
 public void Dispose()
 {
     if (World.jlMsg == 1)
     {
         Form1.WriteLine(0, "DI_THUONG_TRANG_THAI_LOAI-Dispose");
     }
     if (this.timer_0 != null)
     {
         this.timer_0.Enabled = false;
         this.timer_0.Close();
         this.timer_0.Dispose();
         this.timer_0 = null;
     }
     if (this.timer_1 != null)
     {
         this.timer_1.Enabled = false;
         this.timer_1.Close();
         this.timer_1.Dispose();
         this.timer_1 = null;
     }
     this.class15_0  = null;
     this.class153_0 = null;
 }