public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.time = Int32.Parse(importObject.reserved[1].Trim()); this.npc_id = Utility.ClientNpcIndex[importObject.reserved[8].Trim()]; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.count = Int32.Parse(importObject.reserved[8].Trim()); this.unknown1 = Int32.Parse(importObject.reserved[12].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.value = Int32.Parse(importObject.reserved[3].Trim()); this.delta = Int32.Parse(importObject.reserved[2].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.signet = "SYSTEM_SKILL_SIGNET" + importObject.reserved[12].Trim(); this.signetlvl = Int32.Parse(importObject.reserved[13]); string signetName = String.Format("Signet1_{0}", this.signetlvl); ClientSkill skill = Utility.SkillIndex[signetName]; if (skill == null) { Debug.Print("Missing signet skill '{0}' for skillId {1}", signetName, importObject.Skill.id); } else { signetid = skill.id; } if (importObject.reserved[3] != null) { this.value = Int32.Parse(importObject.reserved[3]); this.delta = Int32.Parse(importObject.reserved[2]); } else if (importObject.reserved[1] != null) { this.value = Int32.Parse(importObject.reserved[1]); this.delta = Int32.Parse(importObject.reserved[0]); } if (importObject.reserved[6] != null) { string subName = "NormalAttack_" + importObject.reserved[6].Trim(); this.subeffect = new SubEffect(); this.subeffect.skill_id = Utility.SkillIndex[subName].id; } this.probability = Int32.Parse(importObject.reserved[15]); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); base.count = Int32.Parse(importObject.reserved[8].Trim()); if (importObject.reserved[7] != null) this.delta = Int32.Parse(importObject.reserved[7].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.range = Int32.Parse(importObject.reserved[4].Trim()); // always true for protect effect base.percent = true; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); if (importObject.reserved[7] != null) this.type = (TransformType)Enum.Parse(typeof(TransformType), importObject.reserved[7].Trim(), true); this.model = Utility.ClientNpcIndex[importObject.reserved[8].Trim()]; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); if (importObject.reserved[5] != null && importObject.reserved[5].Trim() == "1") this.percent = true; this.value = Int32.Parse(importObject.reserved[1].Trim()); if (importObject.reserved[0] != null) this.delta = Int32.Parse(importObject.reserved[0].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.change = new ChangeList(); var change = new Change(); change.stat = modifiersenum.BOOST_HEAL; change.func = StatFunc.ADD; change.value = Int32.Parse(importObject.reserved[1].Trim()) * 10; this.change.Add(change); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.armor = Utility.GetArmorType(importObject.reserved[4]); this.change = new ChangeList(); var change = new Change(); change.stat = modifiersenum.PHYSICAL_DEFENSE; change.value = Int32.Parse(importObject.reserved[1]); change.delta = Int32.Parse(importObject.reserved[0]); change.func = StatFunc.PERCENT; this.change.Add(change); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.value = Int32.Parse(importObject.reserved[1].Trim()); this.change = new ChangeList(); var change = new Change(); change.value = this.value; if (importObject.reserved[0] != null) change.delta = Int32.Parse(importObject.reserved[0].Trim()); change.func = StatFunc.PERCENT; change.stat = modifiersenum.BOOST_HATE; this.change.Add(change); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.count = Int32.Parse(importObject.reserved[1].Trim()); if (importObject.reserved[0] != null) this.unknown1 = Int32.Parse(importObject.reserved[0].Trim()); if (importObject.reserved[15] != null) this.level = Int32.Parse(importObject.reserved[15].Trim()); if (importObject.reserved[17] != null) this.unknown2 = Int32.Parse(importObject.reserved[17].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); string provokerSkill = importObject.reserved[16].Trim(); this.skill_id = Utility.SkillIndex[provokerSkill].id; provoke_target = (ProvokeTarget)Enum.Parse(typeof(ProvokeTarget), importObject.reserved[13], true); if (importObject.reserved_cond1 != null) { HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true); if (Enum.IsDefined(typeof(HitType), hitType)) { base.attacktype = (AttackType)hitType; base.probability = importObject.reserved_cond1_prob[1].Value; } } }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); string provokerSkill = importObject.reserved[16].Trim(); try { this.skill_id = Utility.SkillIndex[provokerSkill].id; } catch { // TODO: Add Error Handling for unmatched skill and log return; } provoke_target = (ProvokeTarget)Enum.Parse(typeof(ProvokeTarget), importObject.reserved[13], true); /* if (importObject.reserved_cond1 != null) { string type = importObject.reserved_cond1.Trim().ToUpper(); if(type != "EVERYHIT") this.hittype = type; HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true); if (Enum.IsDefined(typeof(HitType), hitType)) { base.attacktype = (AttackType)hitType; //base.probability = importObject.reserved_cond1_prob[1].Value; } } */ /* if (importObject.reserved_cond1_prob[1] != null) { this.hittypeprob2 = importObject.reserved_cond1_prob[1].Value; } * / /* if (importObject.reserved[4] != null) { this.radius = Int32.Parse(importObject.reserved[4].Trim()); } * */ }
public bool RemoveEffect(ClientEffect _effect, bool _sync = true) { bool success = HasEffect(_effect); if (success) { long expires = 0; ClientEffects.TryRemove(_effect, out expires); success = expires > 0; SpawnPacket.StatusEffects &= ~_effect; if (_sync) { Send(UpdatePacket.Create(UID, UpdateType.StatusEffects, (ulong)SpawnPacket.StatusEffects)); SendToScreen(SpawnPacket); } if (_effect == ClientEffect.XpStart) { Xp = 0; } } return(success); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); percent = importObject.reserved[5] != null && importObject.reserved[5].Trim() == "1"; if (importObject.cond_race != null) cond_race = (SkillTargetRace)Enum.Parse(typeof(SkillTargetRace), importObject.cond_race.Trim(), true); HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true); if (Enum.IsDefined(typeof(HitType), hitType)) { attacktype = (AttackType)hitType; probability = importObject.reserved_cond1_prob[1].Value; } if (this.GetType().Equals(typeof(ProtectEffect)) || this.GetType().Equals(typeof(ReflectorEffect))) { if (importObject.reserved[8] == null) { if (importObject.reserved[7] != null) value = Int32.Parse(importObject.reserved[7].Trim()); if (importObject.reserved[6] != null) delta = Int32.Parse(importObject.reserved[6].Trim()); } else { value = Int32.Parse(importObject.reserved[8].Trim()); delta = Int32.Parse(importObject.reserved[7].Trim()); } } else if (this.GetType() != typeof(ProvokerEffect)) { value = Int32.Parse(importObject.reserved[7].Trim()); delta = Int32.Parse(importObject.reserved[6].Trim()); hitvalue = Int32.Parse(importObject.reserved[1].Trim()); hitdelta = Int32.Parse(importObject.reserved[0].Trim()); } }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.radius = Int32.Parse(importObject.reserved[4].Trim()); this.value = 0; // drop it if (importObject.reserved[1] != null) hitvalue = Int32.Parse(importObject.reserved[1].Trim()); if (importObject.reserved[0] != null) hitdelta = Int32.Parse(importObject.reserved[0].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); // E1 Reserved: CH_Chant_ImprovedMagic_G1_Effect null 20 10 Party Friend 1 0 this.skill_id = Utility.SkillIndex[importObject.reserved[0].Trim()].id; // Party distance in % this.distance = Int32.Parse(importObject.reserved[2].Trim()); // Friend distane in absolute values? // this.distance = Int32.Parse(importObject.reserved[3].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); base.Import(importObject, typeof(SnareEffect), 1, 0, 1, 0, 5, Stat.Speed); base.Import(importObject, typeof(SnareEffect), 1, 0, 1, 0, 5, Stat.FlySpeed); foreach (var change in this.change) change.value = -change.value; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); if (importObject.remain[0] != null) this.delta = importObject.remain[0].Value; else this.delta = this.duration; }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.skill_id = Utility.SkillIndex[importObject.reserved[0].Trim()].id; this.value = Int32.Parse(importObject.reserved[1].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.value = Int16.Parse(importObject.reserved[6]); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); if (importObject.reserved[1] != null) this.resistchance = Int32.Parse(importObject.reserved[1].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); string skillOrItem = importObject.reserved[8].Trim(); string[] nameParts = skillOrItem.Split('_'); if (nameParts[nameParts.Length - 1].StartsWith("Q")) { // do nothing, since the item summons NPC with it's own skill } else if (nameParts[nameParts.Length - 1] == "NPC") { this.npc_id = Utility.ClientNpcIndex[skillOrItem]; string skillName; if (nameParts.Contains("Slave") || nameParts.Contains("CallSlave")) { skillName = String.Format("{0}_{1}_{2}", nameParts[nameParts.Length - 4], nameParts[nameParts.Length - 3], nameParts[nameParts.Length - 2]); } else { skillName = String.Format("{0}_{1}", nameParts[nameParts.Length - 3], nameParts[nameParts.Length - 2]); } ClientSkill skill = Utility.SkillIndex[skillName]; if (skill == null) { // drop last NPC suffix skillName = String.Join("_", nameParts, 0, nameParts.Length - 1); skill = Utility.SkillIndex[skillName]; if (skill == null) Debug.Print("Unknown skill for the {0}: {1} (skillId={2})", this.GetType().Name, skillName, importObject.Skill.id); else skill_id = skill.id; } else { skill_id = skill.id; } } else { this.npc_id = Utility.ClientNpcIndex[skillOrItem]; ClientSkill skill = Utility.SkillIndex[skillOrItem]; if (skill == null) { if (nameParts.Contains("ExplosionTrap")) { skill = Utility.SkillIndex["ExplosionTrap_G1"]; skill_id = skill.id; } else if (nameParts.Contains("FlameShower")) { skill = Utility.SkillIndex["Stigma_" + skillOrItem]; skill_id = skill.id; } else { Debug.Print("Unknown skill for the {0}: {1} (skillId={2})", this.GetType().Name, skillOrItem, importObject.Skill.id); } } else { skill_id = skill.id; } } this.time = Int32.Parse(importObject.reserved[3].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.percent = Int32.Parse(importObject.reserved[1]); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.ultra_skill = Int32.Parse(importObject.reserved[0].Trim()); if (importObject.reserved[1] != null) { int additional = Int32.Parse(importObject.reserved[1].Trim()); if (additional == 1) { disappear = true; } else { Debug.Print("Unknown value for PetOrderUseUltraSkillEffect: {0}", additional); } } }
public bool HasEffect(ClientEffect _effect) { return(SpawnPacket.UID > 0 && SpawnPacket.StatusEffects.HasFlag(_effect)); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); if (importObject.ChangeStat == Stat.None) importObject.ChangeStat = Stat.AttackDelay; base.Import(importObject, typeof(SlowEffect), 1, 0, 1, 0, 5, Stat.None); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); // count is always equals 1 for summonservant effect and // differs for summon homing bool isSummonHoming = importObject.reserved[4] != null; if (isSummonHoming) { this.npc_count = Int32.Parse(importObject.reserved[4].Trim()); this.attack_count = Int32.Parse(importObject.reserved[3].Trim()); } else this.hp_ratio = Int32.Parse(importObject.reserved[3].Trim()); string skillName = importObject.reserved[8].Trim(); this.npc_id = Utility.ClientNpcIndex[skillName]; string[] nameParts = skillName.Split('_'); if (nameParts[nameParts.Length - 1] == "NPC" || nameParts[nameParts.Length - 1] == "N") { //if (nameParts.Contains("Slave")) // skillName = String.Format("{0}_{1}_{2}_{3}_{4}", // nameParts[nameParts.Length - 6], // nameParts[nameParts.Length - 5], // nameParts[nameParts.Length - 4], // nameParts[nameParts.Length - 3], // nameParts[nameParts.Length - 2]); //else skillName = String.Format("{0}_{1}", nameParts[nameParts.Length - 3], nameParts[nameParts.Length - 2]); } else { skillName = String.Format("{0}_{1}", nameParts[nameParts.Length - 2], nameParts[nameParts.Length - 1]); } ClientSkill skill = Utility.SkillIndex[skillName]; if (skill == null) { string origName = isSummonHoming ? "summonhoming" : "summonservant"; Debug.Print("Unknown skill for the {0}: {1} (skillId={2})", origName, skillName, importObject.Skill.id); } else { skill_id = skill.id; } }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); // res11 and res12 - 0 500 ??? this.type = (skillType)Enum.Parse(typeof(skillType), importObject.reserved[4], true); this.value = Int32.Parse(importObject.reserved[1].Trim()); this.count = Int32.Parse(importObject.reserved[6].Trim()); }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); this.value = Int32.Parse(importObject.reserved[1].Trim()); int dir = Int32.Parse(importObject.reserved[2].Trim()); if (dir == 1) direction = "FRONT"; else if (dir == 2) direction = "BACK"; else { Debug.Print("Unknown direction for RandomMoveLocEffect: {0}", importObject.Skill.id); } }
public override void Import(ClientEffect importObject, IEnumerable<FieldInfo> getters) { base.Import(importObject, getters); ClientSkill skill = Utility.SkillIndex[importObject.reserved[5].Trim()]; if (skill != null) this.skill_id = skill.id; }