// Token: 0x06000272 RID: 626 RVA: 0x00013C38 File Offset: 0x00011E38 public void CheatRaiseSkill(string name, float value) { foreach (object obj in Enum.GetValues(typeof(Skills.SkillType))) { Skills.SkillType skillType = (Skills.SkillType)obj; if (skillType.ToString().ToLower() == name) { Skills.Skill skill = this.GetSkill(skillType); skill.m_level += value; skill.m_level = Mathf.Clamp(skill.m_level, 0f, 100f); if (this.m_useSkillCap) { this.RebalanceSkills(skillType); } this.m_player.Message(MessageHud.MessageType.TopLeft, string.Concat(new object[] { "Skill incresed ", skill.m_info.m_skill.ToString(), ": ", (int)skill.m_level }), 0, skill.m_info.m_icon); global::Console.instance.Print("Skill " + skillType.ToString() + " = " + skill.m_level.ToString()); return; } } global::Console.instance.Print("Skill not found " + name); }
// Token: 0x06000275 RID: 629 RVA: 0x00013E74 File Offset: 0x00012074 public void RaiseSkill(Skills.SkillType skillType, float factor = 1f) { if (skillType == Skills.SkillType.None) { return; } Skills.Skill skill = this.GetSkill(skillType); float level = skill.m_level; if (skill.Raise(factor)) { if (this.m_useSkillCap) { this.RebalanceSkills(skillType); } this.m_player.OnSkillLevelup(skillType, skill.m_level); MessageHud.MessageType type = ((int)level == 0) ? MessageHud.MessageType.Center : MessageHud.MessageType.TopLeft; this.m_player.Message(type, string.Concat(new object[] { "$msg_skillup $skill_", skill.m_info.m_skill.ToString().ToLower(), ": ", (int)skill.m_level }), 0, skill.m_info.m_icon); Gogan.LogEvent("Game", "Levelup", skillType.ToString(), (long)((int)skill.m_level)); } }
public Creation(List <Item> input, List <Item> output, Skills.Skill skill, double experience) { Input = input; Output = output; Skill = skill; Experience = experience; }
internal static void Setup_Post(ref SkillsDialog __instance, Player player) { List <GameObject> elements = AccessTools.Field(typeof(SkillsDialog), "m_elements").GetValue(__instance) as List <GameObject>; foreach (GameObject gameObject in elements) { Dictionary <Skills.SkillType, Skills.Skill> skillData = AccessTools.Field(typeof(Skills), "m_skillData").GetValue(player.GetSkills()) as Dictionary <Skills.SkillType, Skills.Skill>; Skills.Skill skill = skillData .Where(sd => Utils.FindChild(gameObject.transform, "name").GetComponent <Text>().text.ToLower().Contains(SkillRequirement.GetSkillName(sd.Key).ToLower())) .Select(sd => sd.Value).FirstOrDefault(); if (skill != null) { string message = GetMessage(__instance, player, skill, gameObject); var tooltip = gameObject.GetComponentInChildren <UITooltip>(); tooltip.m_text += $"\n{message}"; Image img = tooltip.m_tooltipPrefab.GetComponentInChildren <Image>(true); if (img && !string.IsNullOrEmpty(message)) { img.gameObject.transform.localScale = new Vector3(1f, 2.1f, 1f); img.gameObject.transform.localPosition += new Vector3(0f, 15f); Text text = tooltip.m_tooltipPrefab.GetComponentInChildren <Text>(true); if (text) { text.gameObject.transform.localPosition += new Vector3(0f, 15f); } } } } AccessTools.Field(typeof(SkillsDialog), "m_elements").SetValue(__instance, elements); }
public override void Run(string[] args) { if (args.Length != 2) { Console.instance.Print("Usage: raise_skill <skill> <amount>"); return; } string name = args[0]; int amount = int.Parse(args[1]); Skills skills = Player.m_localPlayer.GetSkills(); foreach (Skills.SkillDef skillDef in skills.m_skills) { Jotunn.Logger.LogInfo(skillDef.m_skill.ToString().ToLower()); if (skillDef.m_skill.ToString().ToLower() == name) { Skills.Skill skill = skills.GetSkill(skillDef.m_skill); skill.m_level += amount; skill.m_level = Mathf.Clamp(skill.m_level, 0.0f, 100f); Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "Skill incresed " + skill.m_info.m_skill.ToString() + ": " + (object)(int)skill.m_level, 0, skill.m_info.m_icon); Console.instance.Print("Skill " + skillDef.m_skill.ToString() + " = " + skill.m_level.ToString()); return; } } Console.instance.Print("Skill not found " + name); }
public bool CanTarget(Entities.Monster Target, Skills.Skill Skill) { if (Target.HitPoints == 0) { return(false); } if (Calculations.GetDistance(X, Y, Target.X, Target.Y) > Skill.SkillInfo.Range) { return(false); } if (Skill.SkillInfo.DamageType == Enums.DamageType.HealHP) { return(true); } else if (Skill.SkillInfo.DamageType == Enums.DamageType.HealMP) { return(false); } if (Skill.SkillInfo.ExtraEffect == Enums.SkillExtraEffect.Poison) { return(true); } else if (Skill.SkillInfo.ExtraEffect != Enums.SkillExtraEffect.None) { return(false); } return(true); }
public void Activate(bool m_bool) { if (m_bool) { if (TooltipObject.GetComponent <MelodyBehaviour>() != null) { Melody melody = TooltipObject.GetComponent <MelodyBehaviour>().melody; Name.GetComponent <Text>().text = Utils.SplitPascalCase(melody.name); effect.GetComponent <Text>().text = melody.effect; inspiration.GetComponent <Text>().text = stringInspiration(melody); trance.GetComponent <Text>().text = stringTrance(melody); type.GetComponent <Text>().text = stringTier("melody"); //add trance melody possibility inspiration.SetActive(true); trance.SetActive(true); } if (TooltipObject.GetComponent <InstrumentBehaviour>() != null) { Instrument instrument = TooltipObject.GetComponent <InstrumentBehaviour>().instrument; Name.GetComponent <Text>().text = Utils.SplitPascalCase(instrument.name); effect.GetComponent <Text>().text = instrument.passif; type.GetComponent <Text>().text = instrument.type; } if (TooltipObject.GetComponent <SkillBehaviour>() != null) { Skills.Skill skill = TooltipObject.GetComponent <SkillBehaviour>().skill; Name.GetComponent <Text>().text = Utils.SplitPascalCase(skill.name); effect.GetComponent <Text>().text = previewDamage();// skill.description; type.GetComponent <Text>().text = stringTier("skill"); } Name.SetActive(true); effect.SetActive(true); type.SetActive(true); transform.GetChild(0).gameObject.SetActive(true); //develop-nico //detect status and display status window if needed //Debug.Log("status detection"); effect.GetComponent <StatusDetector>().resetStatusList(); effect.GetComponent <StatusDetector>().detectStatus(); effect.GetComponent <StatusDetector>().displayStatus(); } else { Name.SetActive(false); effect.SetActive(false); inspiration.SetActive(false); trance.SetActive(false); type.SetActive(false); transform.GetChild(0).gameObject.SetActive(false); effect.GetComponent <StatusDetector>().deactivateStatusWindow(); } }
public int HerbLevel() { List <Skills.Skill> skills = Skills.Instance.GetAllPlayerSkills(); Skills.Skill herb = skills.Where(x => x.Id == Enums.Skills.HERBALISM).FirstOrDefault(); return(herb != null ? herb.CurrentLevel : 0); }
public int HerbLevel() { List <Skills.Skill> skills = Skills.Instance.GetAllPlayerSkills(); Skills.Skill herb = skills.Where(x => x.Id == Enums.Skills.HERBALISM).FirstOrDefault(); return(herb != null ? ObjectManager.Instance.Player.FactionId == (int)Enums.FactionPlayerHorde.Tauren ? herb.CurrentLevel + 15 : herb.CurrentLevel : -1); }
public int MineLevel() { List <Skills.Skill> skills = Skills.Instance.GetAllPlayerSkills(); Skills.Skill mine = skills.Where(x => x.Id == Enums.Skills.MINING).FirstOrDefault(); return(mine != null ? mine.CurrentLevel : -1); }
public int MineLevel() { List <Skills.Skill> skills = Skills.GetAllPlayerSkills(); Skills.Skill mine = skills.Where(x => x.Id == Enums.Skills.MINING).First(); return(mine.CurrentLevel); }
public int HerbLevel() { List <Skills.Skill> skills = Skills.GetAllPlayerSkills(); Skills.Skill herb = skills.Where(x => x.Id == Enums.Skills.HERBALISM).First(); return(herb.CurrentLevel); }
public static void Postfix(Skills __instance, string name, float value) { if (name == MagicSkill.skillName) { Skills.Skill skill = (Skills.Skill) typeof(Skills).GetMethod("GetSkill", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(__instance, new object[] { MagicSkill.MagicSkillDef.m_skill }); skill.m_level += value; } }
/* * private static void Prefix(Skills __instance, Skills.SkillType skillType, float factor = 1f) * { * * * }*/ private static void Postfix(Skills __instance, Skills.SkillType skillType, float factor = 1f) { if (Settings.isEnabled("Player") && Settings.getBool("Player", "experienceGainedNotifications")) { Skills.Skill skill = __instance.GetSkill(skillType); float percent = skill.m_accumulator / (skill.GetNextLevelRequirement() / 100); __instance.m_player.Message(MessageHud.MessageType.TopLeft, skill.m_info.m_skill + " [" + Helper.tFloat(skill.m_accumulator, 2) + "/" + Helper.tFloat(skill.GetNextLevelRequirement(), 2) + "] (" + Helper.tFloat(percent, 0) + "%)", 0, skill.m_info.m_icon); } }
private static void Postfix(Skills __instance, Skills.SkillType skillType, float factor = 1f) { if (Configuration.Current.Hud.IsEnabled && Configuration.Current.Hud.experienceGainedNotifications) { Skills.Skill skill = __instance.GetSkill(skillType); float percent = skill.m_accumulator / (skill.GetNextLevelRequirement() / 100); __instance.m_player.Message(MessageHud.MessageType.TopLeft, skill.m_info.m_skill + " [" + Helper.tFloat(skill.m_accumulator, 2) + "/" + Helper.tFloat(skill.GetNextLevelRequirement(), 2) + "] (" + Helper.tFloat(percent, 0) + "%)", 0, skill.m_info.m_icon); } }
public void Activate(bool m_bool) { if (m_bool) { Name.SetActive(true); effect.SetActive(true); transform.GetChild(0).gameObject.SetActive(true); if (TooltipObject.GetComponent <MelodyBehaviour>() != null) { Melodies.Melody melody = TooltipObject.GetComponent <MelodyBehaviour>().melody; inspiration.SetActive(true); trance.SetActive(true); target.SetActive(true); type.SetActive(true); Name.GetComponent <Text>().text = Utils.SplitPascalCase(melody.name); effect.GetComponent <Text>().text = melody.effect; inspiration.GetComponent <Text>().text = stringInspiration(melody); trance.GetComponent <Text>().text = stringTrance(melody); type.GetComponent <Text>().text = "Tier " + melody.tier; //add trance melody possibility target.GetComponent <Text>().text = melodyTargetToString(melody.targetMode); } if (TooltipObject.GetComponent <InstrumentBehaviour>() != null) { Bard.Instrument instrument = TooltipObject.GetComponent <InstrumentBehaviour>().instrument; type.SetActive(true); Name.GetComponent <Text>().text = Utils.SplitPascalCase(instrument.name); effect.GetComponent <Text>().text = instrument.passif; type.GetComponent <Text>().text = instrument.type; } if (TooltipObject.GetComponent <SkillBehaviour>() != null) { Skills.Skill skill = TooltipObject.GetComponent <SkillBehaviour>().skill; target.SetActive(true); Name.GetComponent <Text>().text = Utils.SplitPascalCase(skill.name); effect.GetComponent <Text>().text = skill.description; target.GetComponent <Text>().text = skillTargetToString(skill.actions); } } else { Name.SetActive(false); effect.SetActive(false); target.SetActive(false); inspiration.SetActive(false); trance.SetActive(false); type.SetActive(false); transform.GetChild(0).gameObject.SetActive(false); } }
private Skills.Skill GetSkill(Skills.SkillType skillType) { Skills.Skill skill1; if (this.m_skillData.TryGetValue(skillType, out skill1)) { return(skill1); } Skills.Skill skill2 = new Skills.Skill(this.GetSkillDef(skillType)); this.m_skillData.Add(skillType, skill2); return(skill2); }
public static void VTUpdateSkillLevel(this Player player, string skillName, int level) { if (player != null) { Skills.SkillType skillType = (Skills.SkillType)Enum.Parse(typeof(Skills.SkillType), skillName); Skills.Skill skill = (Skills.Skill)player.GetSkills().CallMethod("GetSkill", skillType); int offset = (int)Math.Ceiling(level - skill.m_level); player.GetSkills().CheatRaiseSkill(skillName.ToLower(), offset); } }
public void UseSkillOnPlayer(Skills.Skill skill) { if (Skills.Actions.SkillActions.ContainsKey(skill)) { Skills.Actions.SkillActions[skill](_playerStats, _player); if (debugMessages) { Debug.Log("Used " + Skills.Strings.SkillNames[skill]); } } }
public static void UpdateDialog(SkillsDialog dialog, Player player) { foreach (GameObject obj in dialog.m_elements) { UnityEngine.Object.Destroy(obj); } dialog.m_elements.Clear(); List <Skills.Skill> skillList = player.GetSkills().GetSkillList(); for (int i = 0; i < skillList.Count; i++) { Skills.Skill skill = skillList[i]; float acc = (float)Math.Round(skill.m_accumulator * 100f) / 100f; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(dialog.m_elementPrefab, Vector3.zero, Quaternion.identity, dialog.m_listRoot); gameObject.SetActive(true); (gameObject.transform as RectTransform).anchoredPosition = new Vector2(0f, (float)(-(float)i - paddingFix) * dialog.m_spacing); gameObject.GetComponentInChildren <UITooltip>().m_text = skill.m_info.m_description; Utils.FindChild(gameObject.transform, "icon").GetComponent <Image>().sprite = skill.m_info.m_icon; Utils.FindChild(gameObject.transform, "name").GetComponent <Text>().text = Localization.instance.Localize("$skill_" + skill.m_info.m_skill.ToString().ToLower() + $"\n<size={Main.skillUITextSize.Value - 2}>Lvl: {(int)skill.m_level}</size>"); Utils.FindChild(gameObject.transform, "name").GetComponent <Text>().fontSize = Main.skillUITextSize.Value; Utils.FindChild(gameObject.transform, "leveltext").GetComponent <Text>().text = $"<size={Main.skillUITextSize.Value-4}>{acc} ({skill.GetLevelPercentage() * 100f:0.##}%)</size>"; Utils.FindChild(gameObject.transform, "levelbar").GetComponent <GuiBar>().SetValue(skill.GetLevelPercentage()); // Alter existing xpBar size to fill currentlevel area as well. RectTransform xpBar = (Utils.FindChild(gameObject.transform, "levelbar").GetComponent <GuiBar>().m_bar.parent as RectTransform); xpBar.sizeDelta = new Vector2(xpBar.sizeDelta.x, xpBar.sizeDelta.y + 4f); xpBar.anchoredPosition = new Vector2(-4f, 0f); RectTransform txt = Utils.FindChild(gameObject.transform, "leveltext").GetComponent <Text>().rectTransform; txt.anchoredPosition = new Vector2(txt.anchoredPosition.x, txt.anchoredPosition.y + 2f); // Remove currentlevel bar UnityEngine.Object.Destroy(Utils.FindChild(gameObject.transform, "currentlevel").GetComponent <GuiBar>().gameObject); dialog.m_elements.Add(gameObject); } float size = Mathf.Max(dialog.m_baseListSize, ((float)skillList.Count + paddingFix) * dialog.m_spacing); dialog.m_listRoot.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size); // Devs added this, but forgot to render it... /* * __instance.m_totalSkillText.text = string.Concat(new string[] * { * "<color=orange>", * player.GetSkills().GetTotalSkill().ToString("0"), * "</color><color=white> / </color><color=orange>", * player.GetSkills().GetTotalSkillCap().ToString("0"), * "</color>" * }); */ }
private static void Notification(Skills __instance, Skills.SkillType skillType, float factor = 1f) { if (skillType == Skills.SkillType.None) { return; } if (Main.showXPNotifications.Value) { Skills.Skill skill = __instance.GetSkill(skillType); Patches.XPNotification.Show(skill, factor); } }
public bool CanTarget(Entities.Character Target, Skills.Skill Skill) { if (Target.Dead && Skill.SkillInfo.ExtraEffect != Enums.SkillExtraEffect.Revive) { return(false); } if (MapID != Target.MapID) { return(false); } if (UniqueID == Target.UniqueID && !Skill.SkillInfo.CanTargetSelf) { return(false); } if (Calculations.GetDistance(X, Y, Target.X, Target.Y) > Skill.SkillInfo.Range) { return(false); } if (Skill.SkillInfo.DamageType == Enums.DamageType.HealHP || Skill.SkillInfo.DamageType == Enums.DamageType.HealMP) { return(true); } if (Skill.SkillInfo.ExtraEffect != Enums.SkillExtraEffect.None) { return(true); } switch (PKMode) { case Enums.PKMode.Peace: return(false); case Enums.PKMode.Capture: { if (Target.Buffs.ContainsFlag(Enums.Flag.Flashing) || Target.Buffs.ContainsFlag(Enums.Flag.BlackName)) { return(true); } return(false); } case Enums.PKMode.Team: { #warning Add Team/Guild Check return(false); } case Enums.PKMode.PK: return(true); default: return(false); } }
private static void Prefix(ref Attack __instance) { if (Configuration.Current.PlayerProjectile.IsEnabled && __instance.m_character.IsPlayer()) { float playerProjVelMinMod = Helper.applyModifierValue(__instance.m_projectileVelMin, Configuration.Current.PlayerProjectile.playerMinChargeVelocityMultiplier); float playerProjVelMaxMod = Helper.applyModifierValue(__instance.m_projectileVel, Configuration.Current.PlayerProjectile.playerMaxChargeVelocityMultiplier); // negate value to handle increasing accuracy means decreasing variance float playerProjAccuMinMod = Helper.applyModifierValue(__instance.m_projectileAccuracyMin, -Configuration.Current.PlayerProjectile.playerMinChargeAccuracyMultiplier); float playerProjAccuMaxMod = Helper.applyModifierValue(__instance.m_projectileAccuracy, -Configuration.Current.PlayerProjectile.playerMaxChargeAccuracyMultiplier); if (Configuration.Current.PlayerProjectile.enableScaleWithSkillLevel) { Player player = (Player)__instance.m_character; Skills.Skill skill = player.m_skills.GetSkill(__instance.m_weapon.m_shared.m_skillType); float maxLevelPercentage = skill.m_level * 0.01f; __instance.m_projectileVelMin = Mathf.Lerp(__instance.m_projectileVelMin, playerProjVelMinMod, maxLevelPercentage); __instance.m_projectileVel = Mathf.Lerp(__instance.m_projectileVel, playerProjVelMaxMod, maxLevelPercentage); __instance.m_projectileAccuracyMin = Mathf.Lerp(__instance.m_projectileAccuracyMin, playerProjAccuMinMod, maxLevelPercentage); __instance.m_projectileAccuracy = Mathf.Lerp(__instance.m_projectileAccuracy, playerProjAccuMaxMod, maxLevelPercentage); } else { __instance.m_projectileVelMin = playerProjVelMinMod; __instance.m_projectileVel = playerProjVelMaxMod; __instance.m_projectileAccuracyMin = playerProjAccuMinMod; __instance.m_projectileAccuracy = playerProjAccuMaxMod; } } if (Configuration.Current.MonsterProjectile.IsEnabled && !__instance.m_character.IsPlayer()) { __instance.m_projectileVel = Helper.applyModifierValue(__instance.m_projectileVel, Configuration.Current.MonsterProjectile.monsterMaxChargeVelocityMultiplier); // negate value to handle increasing accuracy means decreasing variance __instance.m_projectileAccuracy = Helper.applyModifierValue(__instance.m_projectileAccuracy, -Configuration.Current.MonsterProjectile.monsterMaxChargeAccuracyMultiplier); } __instance.m_projectileVelMin = Mathf.Clamp(__instance.m_projectileVelMin, 0f, maxClampValue); __instance.m_projectileVel = Mathf.Clamp(__instance.m_projectileVel, 0f, maxClampValue); __instance.m_projectileAccuracyMin = Mathf.Clamp(__instance.m_projectileAccuracyMin, 0f, maxClampValue); __instance.m_projectileAccuracy = Mathf.Clamp(__instance.m_projectileAccuracy, 0f, maxClampValue); }
public void SetSkills(SkillInfo[] skills) { if (skills.Length != numskills) { return; } for (int i = 0; i < numskills; i++) { Skills.Skill skill = Skills.SkillFactory.GetSkill(skills[i].skillID); for (int j = 0; j < skill.special; j++) { this.PutUInt(skills[i].skillID, (ushort)(4 + j * 9 + skills[i].slot * 9)); this.PutUInt(skills[i].exp, (ushort)(8 + j * 9 + skills[i].slot * 9)); this.PutByte((byte)(skills[i].slot + j), (ushort)(12 + j * 9 + skills[i].slot * 9)); } } }
internal static bool GoodEnough(Player player, Recipe recipe) { if (!skillRequirements.ContainsKey(recipe.name)) { return(true); } SkillRequirement skillRecipe = skillRequirements[recipe.name]; Skills skills = player.GetSkills(); Dictionary <Skills.SkillType, Skills.Skill> m_skillData = AccessTools.Field(typeof(Skills), "m_skillData").GetValue(skills) as Dictionary <Skills.SkillType, Skills.Skill>; if (m_skillData.ContainsKey(skillRecipe.m_skill)) { Skills.Skill requiredSkill = m_skillData[skillRecipe.m_skill]; return(requiredSkill.m_level >= skillRecipe.m_requiredLevel); } return(false); }
public void LearnSkill(ushort SkillID, byte Level, uint Experience) { if (!Kernel.SkillInfos.ContainsKey(SkillID)) { return; } Skills.SkillInfo SI; if (!Kernel.SkillInfos[SkillID].TryGetValue(Level, out SI)) { return; } Skills.Skill s = new Skills.Skill(SI); s.Experience = Experience; if (Skills.TryAdd(SkillID, s)) { Owner.Send(Packets.ToSend.SpellPacket(SkillID, Level, Experience)); } }
public static bool Prefix(string name, float value, Skills __instance, Player ___m_player) { foreach (int id in m_defs.Keys) { SkillInfo value2 = m_defs[id]; if (value2.name.ToLower() == name) { Skills.Skill skill = Traverse.Create(__instance).Method("GetSkill", (Skills.SkillType)id).GetValue <Skills.Skill>((Skills.SkillType)id); skill.m_level += value; skill.m_level = Mathf.Clamp(skill.m_level, 0f, 100f); ___m_player.Message(MessageHud.MessageType.TopLeft, "Skill incresed " + value2.name + ": " + (int)skill.m_level, 0, skill.m_info.m_icon); Console.instance.Print("Skill " + value2.name + " = " + skill.m_level); return(false); } } return(true); }
private void InitClient() { List <Client> clients = GameManager.clients; for (int i = 0; i < clients.Count; i++) { Client client = clients[i]; GameObject clientPanel = clientPanels[i]; //client image //TO DO// //name clientPanel.transform.GetChild(2).GetComponent <Text>().text = client.ClientName; //class clientPanel.transform.GetChild(3).GetComponent <Text>().text = client.Character.name; //armor //TO DO// //weapon //TO DO// //trait //TO DO// //stats clientPanel.transform.GetChild(7).GetChild(5).GetComponent <Text>().text = client.Character.baseStats.maxHp.ToString(); clientPanel.transform.GetChild(7).GetChild(6).GetComponent <Text>().text = client.Character.baseStats.atq.ToString(); clientPanel.transform.GetChild(7).GetChild(7).GetComponent <Text>().text = client.Character.baseStats.prot.ToString(); clientPanel.transform.GetChild(7).GetChild(8).GetComponent <Text>().text = client.Character.baseStats.prec.ToString(); clientPanel.transform.GetChild(7).GetChild(9).GetComponent <Text>().text = client.Character.baseStats.crit.ToString(); //skills for (int j = 0; j < client.SkillWheel.Length; j++) { Skills.Skill skill = client.Character.skills[client.SkillWheel[j]]; clientPanel.transform.GetChild(8).GetChild(j).GetComponent <SkillBehaviour>().skill = skill; clientPanel.transform.GetChild(8).GetChild(j).GetComponent <Image>().sprite = skill.sprite; clientPanel.transform.GetChild(8).GetChild(j).GetComponent <Image>().color = new Color(1, 1, 1, 1); } } }
public void Load(ZPackage pkg) { int num1 = pkg.ReadInt(); this.m_skillData.Clear(); int num2 = pkg.ReadInt(); for (int index = 0; index < num2; ++index) { Skills.SkillType skillType = (Skills.SkillType)pkg.ReadInt(); float num3 = pkg.ReadSingle(); float num4 = num1 >= 2 ? pkg.ReadSingle() : 0.0f; if (this.IsSkillValid(skillType)) { Skills.Skill skill = this.GetSkill(skillType); skill.m_level = num3; skill.m_accumulator = num4; } } }
// Token: 0x0600026D RID: 621 RVA: 0x00013B00 File Offset: 0x00011D00 public void Load(ZPackage pkg) { int num = pkg.ReadInt(); this.m_skillData.Clear(); int num2 = pkg.ReadInt(); for (int i = 0; i < num2; i++) { Skills.SkillType skillType = (Skills.SkillType)pkg.ReadInt(); float level = pkg.ReadSingle(); float accumulator = (num >= 2) ? pkg.ReadSingle() : 0f; if (this.IsSkillValid(skillType)) { Skills.Skill skill = this.GetSkill(skillType); skill.m_level = level; skill.m_accumulator = accumulator; } } }
public void LearnSkill(ushort SkillID, byte Level, uint Experience) { if (!Kernel.SkillInfos.ContainsKey(SkillID)) return; Skills.SkillInfo SI; if (!Kernel.SkillInfos[SkillID].TryGetValue(Level, out SI)) return; Skills.Skill s = new Skills.Skill(SI); s.Experience = Experience; if (Skills.TryAdd(SkillID, s)) Owner.Send(Packets.ToSend.SpellPacket(SkillID, Level, Experience)); }