少年修仙传客户端代码仓库
client_linchunjie
2019-03-04 2a86bfa84ad4ed870703022ea765e29f16d25a08
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
public class Status_Polymorph : Status_Base
{
    public sealed override void Init(H0605_tagObjAddBuff data)
    {
        base.Init(data);
 
        GActorFight _actor = GAMgr.Instance.GetBySID(data.ObjID) as GActorFight;
 
        if (_actor != null)
        {
            var _config = SkillConfig.Get(data.SkillID);
 
            int _npcID = 0;
 
            if (_config.Effect1 == 1063)
            {
                _npcID = _config.EffectValue11;
            }
            else if (_config.Effect2 == 1063)
            {
                _npcID = _config.EffectValue21;
            }
            else if (_config.Effect3 == 1063)
            {
                _npcID = _config.EffectValue31;
            }
            else if (_config.Effect4 == 1063)
            {
                _npcID = _config.EffectValue41;
            }
            else if (_config.Effect5 == 1063)
            {
                _npcID = _config.EffectValue51;
            }
            else if (_config.Effect6 == 1063)
            {
                _npcID = _config.EffectValue61;
            }
 
            _actor.Polymorph(true, _npcID);
        }
    }
 
    public sealed override void Update() { }
 
    public sealed override void UnInit(uint objId, byte buffType)
    {
        GActorFight _actor = GAMgr.Instance.GetBySID(objId) as GActorFight;
 
        if (_actor != null)
        {
            var _config = SkillConfig.Get(h0605.SkillID);
 
            int _npcID = 0;
 
            if (_config.Effect1 == 1063)
            {
                _npcID = _config.EffectValue11;
            }
            else if (_config.Effect2 == 1063)
            {
                _npcID = _config.EffectValue21;
            }
            else if (_config.Effect3 == 1063)
            {
                _npcID = _config.EffectValue31;
            }
            else if (_config.Effect4 == 1063)
            {
                _npcID = _config.EffectValue41;
            }
            else if (_config.Effect5 == 1063)
            {
                _npcID = _config.EffectValue51;
            }
            else if (_config.Effect6 == 1063)
            {
                _npcID = _config.EffectValue61;
            }
 
            _actor.Polymorph(false, _npcID);
        }
    }
}