少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System.IO;
using UnityEngine;
 
namespace H2Engine
{
    [System.Serializable]
    public class Evt_RefreshMonster : Evt
    {
        public enum E_OverCondition
        {
            DeadCount,
            Time,
        }
 
        public enum E_RefreshType
        {
            All,
            OneByOneTime,// 根据时间刷新
            OneByOnePrevDie,// 前一只刷出已死亡
        }
 
        public MonsterData[] monsters;
        public E_OverCondition overCondition = E_OverCondition.DeadCount;
        public E_RefreshType refreshType = E_RefreshType.All;
        /// <summary>
        /// 参数
        /// <para>当使用OverCondition类型为DeadCount的时候为个数</para>
        /// <para>当使用OverCondition类型为Time的时候为时间(毫秒)</para>
        /// </summary>
        public int conditionParam;
        /// <summary>
        /// 刷新参数
        /// <para>刷新类型: OneByOneTime, 作为时间(毫秒)</para>
        /// </summary>
        public int refreshParam;
        public int nextEventID = -1;
 
        public override void Load(BinaryReader br)
        {
            base.Load(br);
            overCondition = (Evt_RefreshMonster.E_OverCondition)br.ReadByte();
            refreshType = (Evt_RefreshMonster.E_RefreshType)br.ReadByte();
            refreshParam = br.ReadInt32();
            conditionParam = br.ReadInt32();
            nextEventID = br.ReadInt32();
            int _count = br.ReadInt32();
            monsters = new MonsterData[_count];
            for (int i = 0; i < _count; ++i)
            {
                monsters[i] = new MonsterData();
                monsters[i].Load(br);
            }
        }
    }
}