public Buff(CharacterBuffs parent, dynamic buffDatum) { this.Parent = parent; this.MapleID = buffDatum.MapleID; this.SkillLevel = buffDatum.SkillLevel; this.Type = buffDatum.Type; this.Value = buffDatum.Value; this.End = buffDatum.End; this.PrimaryStatups = new Dictionary <PrimaryBuffStat, short>(); this.SecondaryStatups = new Dictionary <SecondaryBuffStat, short>(); if (this.Type == 1) { this.CalculateStatups(ChannelData.CachedSkills[this.MapleID][this.SkillLevel]); } Delay.Execute((this.End - DateTime.Now).TotalMilliseconds, () => this.Parent.Remove(this)); }
public Buff(CharacterBuffs parent, Skill skill, int value) { this.Parent = parent; this.MapleID = skill.MapleID; this.SkillLevel = skill.CurrentLevel; this.Type = 1; this.Value = value; this.End = DateTime.Now.AddSeconds(skill.BuffTime); this.PrimaryStatups = new Dictionary <PrimaryBuffStat, short>(); this.SecondaryStatups = new Dictionary <SecondaryBuffStat, short>(); this.CalculateStatups(skill); Delay.Execute((this.End - DateTime.Now).TotalMilliseconds, () => { if (this.Parent.Contains(this)) { this.Parent.Remove(this); } }); }
public Buff(CharacterBuffs parent, Skill skill, int value) { Parent = parent; MapleID = skill.MapleID; SkillLevel = skill.CurrentLevel; Type = 1; Value = value; End = DateTime.Now.AddSeconds(skill.BuffTime); PrimaryStatups = new Dictionary <CharacterConstants.PrimaryBuffStat, short>(); SecondaryStatups = new Dictionary <CharacterConstants.SecondaryBuffStat, short>(); CalculateStatups(skill); Delay.Execute(() => { if (Parent.Contains(this)) { Parent.RemoveBuff(this); } }, (int)(End - DateTime.Now).TotalMilliseconds); }
public Buff(CharacterBuffs parent, Datum datum) { Parent = parent; MapleID = (int)datum["MapleID"]; SkillLevel = (byte)datum["SkillLevel"]; Type = (byte)datum["Type"]; Value = (int)datum["Value"]; End = (DateTime)datum["End"]; PrimaryStatups = new Dictionary <CharacterConstants.PrimaryBuffStat, short>(); SecondaryStatups = new Dictionary <CharacterConstants.SecondaryBuffStat, short>(); if (Type == 1) { CalculateStatups(DataProvider.Skills[MapleID][SkillLevel]); } Delay.Execute(() => { if (Parent.Contains(this)) { Parent.RemoveBuff(this); } }, (int)(End - DateTime.Now).TotalMilliseconds); }
public Buff(CharacterBuffs parent, Datum datum) { this.Parent = parent; this.MapleID = (int)datum["MapleID"]; this.SkillLevel = (byte)datum["SkillLevel"]; this.Type = (byte)datum["Type"]; this.Value = (int)datum["Value"]; this.End = (DateTime)datum["End"]; this.PrimaryStatups = new Dictionary <PrimaryBuffStat, short>(); this.SecondaryStatups = new Dictionary <SecondaryBuffStat, short>(); if (this.Type == 1) { this.CalculateStatups(DataProvider.Skills[this.MapleID][this.SkillLevel]); } Delay.Execute(() => { if (this.Parent.Contains(this)) { this.Parent.Remove(this); } }, (int)(this.End - DateTime.Now).TotalMilliseconds); }
private void PlayPortalSoundEffect() { CharacterBuffs.ShowLocalUserEffect(mCharacter, CharacterConstants.UserEffect.PlayPortalSE); }
public void PlaySoundEffect(Character character) { CharacterBuffs.ShowLocalUserEffect(character, UserEffect.PlayPortalSE); }