public class Status_Polymorph : Status_Base
|
{
|
|
public override void Init(uint sid, int skillId, uint srcSid, int type, int lastTime)
|
{
|
base.Init(sid, skillId, srcSid, type, lastTime);
|
|
GActorFight _actor = GAMgr.Instance.GetBySID(sid) as GActorFight;
|
|
if (_actor != null)
|
{
|
var _config = SkillConfig.Get(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(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);
|
}
|
}
|
}
|