public void Reset(BuffData _this, uint id, int dataid, int bufflevel, ObjCharacter caster, BuffRecord tbbuff, ObjCharacter bear, eHitType hitType, float fBili) { _this.mId = id; _this.m_nBuffId = dataid; _this.m_nLevel = bufflevel; SetCaster(_this, caster); _this.m_fDuration = (float)tbbuff.Duration / 1000; _this.m_Bear = bear; _this.m_nLayer = 1; _this.m_nHuchi = tbbuff.HuchiId; _this.m_HitType = hitType; _this.m_fModify = fBili; _this.m_bActive = true; _this.m_nUpdataCount = 0; _this.m_Flag.CleanFlag(0); _this.mCoolDownTime = DateTime.MinValue; _this.RemainAbsorbDict.Clear(); for (var i = 0; i < tbbuff.effectid.Length; ++i) { var effectId = tbbuff.effectid[i]; var absorbMax = tbbuff.effectparam[i, 2]; if (effectId == (int)eEffectType.AbsorbInjury && absorbMax > 0) { _this.RemainAbsorbDict[(byte)i] = absorbMax; } } }
public void Reset(uint id, int dataid, int bufflevel, ObjCharacter caster, BuffRecord tbbuff, ObjCharacter bear, eHitType hitType, float fBili) { mImpl.Reset(this, id, dataid, bufflevel, caster, tbbuff, bear, hitType, fBili); }
public void SetData(BuffRecord buff) { Data = buff; Icon.sprite = Resources.Load <Sprite>(buff.View); if (Icon.sprite == null) { Debug.LogWarning($"加载{0}失败"); } TextRoot.gameObject.SetActive(false); UpdateProps(); }
IList GenBuffs() { var list = new List <BuffRecord>(); var b0 = new BuffRecord() { Id = 1, Name = "绿毒", Desc = "蚀骨之毒", View = "view/buff/poison", CanMerge = true, Count = 5, Triggers = new Dictionary <string, List <Command> >() { { KeyEvent.RoundBegin, new List <Command>() { new Command(CmdType.PushNum, ActionType.None, "-4"), new Command(CmdType.HpChange, ActionType.Self), } } } }; list.Add(b0); var b1 = new BuffRecord() { Id = 2, Name = "冰甲", Desc = "凝水为冰", View = "view/buff/ice_armor", CanMerge = true, Count = 5, Triggers = new Dictionary <string, List <Command> >() { { KeyEvent.Hurt, new List <Command>() { new Command(CmdType.PushStr, ActionType.None, "砰!"), new Command(CmdType.Say, ActionType.Self), } } } }; list.Add(b1); return(list); }