protected override void OnStart() { this.range = base.buff_data.Args[0]; this.hprecoverratio = base.buff_data.Args[1] / 100f; this.attackratio = base.buff_data.Args[2] / 100f; this.m_EntityBaby = base.m_Entity as EntityBabyBase; }
protected override void OnInstall() { if (base.m_SkillData.Args.Length != 2) { object[] args = new object[] { base.m_SkillData.SkillID, base.m_SkillData.Args.Length }; SdkManager.Bugly_Report("SkillAlone1083", Utils.FormatString("SkillID:{0} args.length:{1} != 2", args)); } else if (!float.TryParse(base.m_SkillData.Args[0], out this.ratio)) { object[] args = new object[] { base.m_SkillData.SkillID }; SdkManager.Bugly_Report("SkillAlone1083", Utils.FormatString("SkillID:{0} args[0] is not a float type.", args)); } else if (!float.TryParse(base.m_SkillData.Args[1], out this.hppercent)) { object[] args = new object[] { base.m_SkillData.SkillID }; SdkManager.Bugly_Report("SkillAlone1083", Utils.FormatString("SkillID:{0} args[1] is not a float type.", args)); } else { EntityBabyBase entity = base.m_Entity as EntityBabyBase; if ((entity == null) || (entity.GetParent() == null)) { object[] args = new object[] { base.m_Entity.m_Data.CharID }; SdkManager.Bugly_Report("SkillAlone1083", Utils.FormatString("entity : {0} is not a baby.", args)); } else { this.mParent = entity.GetParent(); base.m_Entity.Event_OnAttack = (Action)Delegate.Combine(base.m_Entity.Event_OnAttack, new Action(this.OnAttack)); this.bInit = true; } } }
protected override void OnInstall() { if (this.mBabyID == 0) { object[] args = new object[] { base.ClassID }; SdkManager.Bugly_Report("SkillAloneBabyBase.cs", Utils.FormatString("OnInstall SkillAlone {0} baby is null", args)); } this.baby = base.CreateBaby(this.mBabyID); if (this.baby != null) { this.baby.SetParent(base.m_Entity); this.baby.Init(this.mBabyID); base.m_Entity.m_EntityData.AddBaby(this.baby); base.m_Entity.AddBabySkillID(base.m_SkillData.SkillID); } }
public void SetBaby(EntityBabyBase baby) { this.m_BabyList.Add(baby); }
public void RemoveBaby(EntityBabyBase baby) { baby.DeInit(); this.m_BabyList.Remove(baby); }