// Passives /// <summary> /// please use this when adding any type of passive /// </summary> /// <param name="passive"></param> public override void AddPassive(Passive passive) { if (initalized) { InitPassive(passive); } else { passive.PartialInit(this); } bool add = true; if (passive is Buff) { add = AddBuff((Buff)passive); } if (passive is TalentTrigger) { TalentTriggers.Add((TalentTrigger)passive); } if (passive is Talent) { Talents.Add((Talent)passive); } if (add) { passives.Add(passive); } }
public override void Dispose() { Talents.ForEach((talentImage) => talentImage = null); Talents.Clear(); base.Dispose(); }
/// <summary> /// loads WOW Talent and Spec info into cached list /// </summary> public static void Update() { using (StyxWoW.Memory.AcquireFrame()) { // With Legion, Low levels are an auto selected spec now. We want to keep using Lowbie behaviors pre level 10 CurrentSpec = StyxWoW.Me.Level < 10 ? WoWSpec.None : StyxWoW.Me.Specialization; Talents.Clear(); TalentId = new int[7]; // Always 21 talents. 7 rows of 3 talents. for (int row = 0; row < 7; row++) { for (int col = 0; col < 3; col++) { var selected = Lua.GetReturnVal <bool>(string.Format("local t = select(4, GetTalentInfo({0}, {1}, GetActiveSpecGroup())) if t then return 1 end return nil", row + 1, col + 1), 0); int index = 1 + row * 3 + col; var t = new Talent { Index = index, Selected = selected }; Talents.Add(t); if (selected) { TalentId[row] = index; } } } SpellCount = (uint)SpellManager.Spells.Count; SpellBookSignature = CalcSpellBookSignature(); } }
public static void Initialize() { Main.Log("Initialized"); ZEPriestSettings.Load(); _settings = ZEPriestSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); _wandThreshold = _settings.WandThreshold > 100 ? 50 : _settings.WandThreshold; Main.SetRange(_distaneRange); // Fight end FightEvents.OnFightEnd += (ulong guid) => { _usingWand = false; _goInMFRange = false; _dispelTimer.Reset(); _iCanUseWand = false; Main.SetRange(_distaneRange); }; // Fight start FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { _iCanUseWand = ToolBox.HaveRangedWeaponEquipped(); }; Rotation(); }
public IActionResult UpdateTalent(int id, [FromForm] IFormCollection data) { //Create an object Users type object, user Talents talent = _database.Talents .SingleOrDefault(u => u.Id == id); if (talent != null) { //Start passing the collected data talent.TalentName = data["name"]; talent.Shortname = data["shortName"]; talent.Bio = data["bio"]; talent.Reknown = data["reknown"]; } else { return(NotFound(new { message = "Unable to update the talent's information." })); } try { _database.Talents.Update(talent); _database.SaveChanges(); } catch (Exception ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } //Send back an OK with 200 status code return(Ok(new { message = "Updated talent record" })); }//End of PUT Web API method
public static void Initialize() { if (ObjectManager.Me.WowClass == WoWClass.Warlock && ObjectManager.Me.Level <= 80) { #region Loggin Settings Logging.Write("Warlock Low Level Class...loading..."); #endregion Logging.Write("Movement Lua enabled"); WarlockLevelSettings.Load(); Main.kindofclass = WarlockLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(WarlockLevelSettings.CurrentSetting.AssignTalents, WarlockLevelSettings.CurrentSetting.UseDefaultTalents, WarlockLevelSettings.CurrentSetting.TalentCodes.ToArray()); Logging.Write("WarlockLevelSettings Loaded"); TargetSwitcher(); Logging.Write("Targetswitcher Activated"); _isLaunched = true; Rotation(); } else { Logging.Write("No Warlock....unloading..."); } }
public static void Initialize() { ShamanLevelSettings.Load(); Main.kindofclass = ShamanLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(ShamanLevelSettings.CurrentSetting.AssignTalents, ShamanLevelSettings.CurrentSetting.UseDefaultTalents, ShamanLevelSettings.CurrentSetting.TalentCodes.ToArray()); Logging.Write("Shaman Low Level Class...loading..."); { lowlevel = true; _isLaunched = true; if (Me.Level < 10) { Spec = "Under10"; } if (Extension.GetSpec() == "Elemental") { Spec = "Elemental"; } if (Extension.GetSpec() == "Enhancement") { Spec = "Enhancement"; } if (Extension.GetSpec() == "Restoration") { Spec = "Restoration"; } Rotation(); } }
public static void Initialize() { Main.Log("Initialized"); ZEWarlockSettings.Load(); _settings = ZEWarlockSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); Main.SetRange(_maxRange); _petPulseThread.DoWork += PetThread; _petPulseThread.RunWorkerAsync(); // Set pet mode if (_settings.PetInPassiveWhenOOC) { Lua.LuaDoString("PetPassiveMode();"); } else { Lua.LuaDoString("PetDefensiveMode();"); } // Fight end FightEvents.OnFightEnd += (ulong guid) => { _usingWand = false; _iCanUseWand = false; Main.SetRange(_maxRange); _addCheckTimer.Reset(); if (_settings.PetInPassiveWhenOOC) { Lua.LuaDoString("PetPassiveMode();"); } }; // Fight start FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { if (UseWand.IsSpellUsable) { _iCanUseWand = true; } Lua.LuaDoString("PetDefensiveMode();"); // Imp Firebolt if (PetAndConsumables.MyWarlockPet().Equals("Imp")) { ToolBox.TogglePetSpellAuto("Firebolt", true); } // Imp BloodPact if (PetAndConsumables.MyWarlockPet().Equals("Imp")) { ToolBox.TogglePetSpellAuto("Blood Pact", true); } }; Rotation(); }
public override void Read() { uint count = _worldPacket.ReadBits <uint>(6); for (uint i = 0; i < count; ++i) { Talents.Add(_worldPacket.ReadUInt16()); } }
public override void Dispose() { Talents.ForEach((talentImage) => talentImage.Dispose()); Talents.Clear(); TalentNames.Clear(); TalentShortTooltips.Clear(); TalentFullTooltips.Clear(); TalentSubInfo.Clear(); base.Dispose(); }
public static Talents ReadTalents(string fname) { XmlSerializer s = new XmlSerializer(typeof(Talents)); TextReader r = new StreamReader(fname); Talents talents = (Talents)s.Deserialize(r); talents.FullPath = fname; r.Close(); return(talents); }
public IActionResult TalentCreate([FromForm] IFormCollection data) { //Create an object User type object, user Talents talent = new Talents(); object response = null; try { //Start passing the collected data into the new User object. talent.TalentName = data["name"]; talent.Shortname = data["shortName"]; talent.Bio = data["bio"]; talent.Reknown = data["reknown"]; talent.TalentImageURL = ""; if (talent.TalentName == "") { response = new { status = "fail", message = "Talent Name is required" }; return(BadRequest(response)); } else if (talent.Shortname == "") { response = new { status = "fail", message = "Short Name is required" }; return(BadRequest(response)); } else if (talent.Bio == "") { response = new { status = "fail", message = "Bio is required" }; return(BadRequest(response)); } else if (talent.Reknown == "") { response = new { status = "fail", message = "Reknown is required" }; return(BadRequest(response)); } else { _database.Talents.Add(talent); _database.SaveChanges(); } } catch (AppException ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } //Send back an OK with 200 status code return(Ok(new { message = "Successfully Created Talent" })); }//End of post web api
public static void Initialize() { WarriorLevelSettings.Load(); Main.kindofclass = WarriorLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(WarriorLevelSettings.CurrentSetting.AssignTalents, WarriorLevelSettings.CurrentSetting.UseDefaultTalents, WarriorLevelSettings.CurrentSetting.TalentCodes.ToArray()); { _isLaunched = true; Logging.Write("Warrior Low Level Class...loading..."); Rotation(); } }
public void SetTalents(ReplayMatchPlayerTalent playerTalentList) { HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName1); var talent1 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName1); var talent4 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName4); var talent7 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName7); var talent10 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName10); var talent13 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName13); var talent16 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName16); var talent20 = HeroesIcons.HeroBuilds().GetHeroInfo(playerTalentList.Character).GetTalent(playerTalentList.TalentName20); Talents.Add(talent1.GetIcon()); Talents.Add(talent4.GetIcon()); Talents.Add(talent7.GetIcon()); Talents.Add(talent10.GetIcon()); Talents.Add(talent13.GetIcon()); Talents.Add(talent16.GetIcon()); Talents.Add(talent20.GetIcon()); TalentNames.Add(talent1.Name); TalentNames.Add(talent4.Name); TalentNames.Add(talent7.Name); TalentNames.Add(talent10.Name); TalentNames.Add(talent13.Name); TalentNames.Add(talent16.Name); TalentNames.Add(talent20.Name); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent1.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent4.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent7.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent10.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent13.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent16.Name}:</c> {talent1.Tooltip.Short}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent20.Name}:</c> {talent1.Tooltip.Short}"); TalentFullTooltips.Add(talent1.Tooltip.Full); TalentFullTooltips.Add(talent4.Tooltip.Full); TalentFullTooltips.Add(talent7.Tooltip.Full); TalentFullTooltips.Add(talent10.Tooltip.Full); TalentFullTooltips.Add(talent13.Tooltip.Full); TalentFullTooltips.Add(talent16.Tooltip.Full); TalentFullTooltips.Add(talent20.Tooltip.Full); TalentSubInfo.Add(talent1.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent4.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent7.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent10.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent13.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent16.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent20.Tooltip.GetTalentSubInfo()); }
public static void Initialize() { { //Radar3D.Pulse(); _isLaunched = true; PaladinLevelSettings.Load(); Main.kindofclass = PaladinLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(PaladinLevelSettings.CurrentSetting.AssignTalents, PaladinLevelSettings.CurrentSetting.UseDefaultTalents, PaladinLevelSettings.CurrentSetting.TalentCodes.ToArray()); Logging.Write("Paladin Low Level Class...loading..."); Rotation(); } }
public void SetTalents(ReplayMatchPlayerTalent playerTalentList) { Talent talent1 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName1); Talent talent4 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName4); Talent talent7 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName7); Talent talent10 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName10); Talent talent13 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName13); Talent talent16 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName16); Talent talent20 = HeroesIcons.HeroesData(Build).HeroData(playerTalentList.Character).GetTalent(playerTalentList.TalentName20); Talents.Add(talent1.AbilityTalentImage()); Talents.Add(talent4.AbilityTalentImage()); Talents.Add(talent7.AbilityTalentImage()); Talents.Add(talent10.AbilityTalentImage()); Talents.Add(talent13.AbilityTalentImage()); Talents.Add(talent16.AbilityTalentImage()); Talents.Add(talent20.AbilityTalentImage()); TalentNames.Add(talent1.Name); TalentNames.Add(talent4.Name); TalentNames.Add(talent7.Name); TalentNames.Add(talent10.Name); TalentNames.Add(talent13.Name); TalentNames.Add(talent16.Name); TalentNames.Add(talent20.Name); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent1.Name}:</c> {talent1.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent4.Name}:</c> {talent4.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent7.Name}:</c> {talent7.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent10.Name}:</c> {talent10.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent13.Name}:</c> {talent13.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent16.Name}:</c> {talent16.Tooltip?.ShortTooltip?.ColoredText}"); TalentShortTooltips.Add($"<c val=\"FFFFFF\">{talent20.Name}:</c> {talent20.Tooltip?.ShortTooltip?.ColoredText}"); TalentFullTooltips.Add(talent1.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent4.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent7.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent10.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent13.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent16.Tooltip?.FullTooltip?.ColoredText); TalentFullTooltips.Add(talent20.Tooltip?.FullTooltip?.ColoredText); TalentSubInfo.Add(talent1.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent4.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent7.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent10.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent13.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent16.Tooltip.GetTalentSubInfo()); TalentSubInfo.Add(talent20.Tooltip.GetTalentSubInfo()); }
protected override void OnLevelChanged() { if (HasPlayerMaster) { // make sure to execute in context AddMessage(() => { // add/remove spell ranks UpdateSpellRanks(); // scale size, if necessary UpdateSize(); var level = Level; // update talents if (level >= PetMgr.MinPetTalentLevel) { // make sure, pet has talent collection if (m_petTalents == null) { m_petTalents = new PetTalentCollection(this); } // update talent points var freeTalentPoints = Talents.GetFreeTalentPointsForLevel(level); if (freeTalentPoints < 0) { // Level was reduced: Remove talent points if (!((Character)m_master).GodMode) { Talents.RemoveTalents(-freeTalentPoints); } freeTalentPoints = 0; } FreeTalentPoints = freeTalentPoints; } // update pet stats var levelStatInfo = m_entry.GetPetLevelStatInfo(level); if (levelStatInfo != null) { ModPetStatsPerLevel(levelStatInfo); m_auras.ReapplyAllAuras(); } }); } m_entry.NotifyLeveledChanged(this); }
private void refreshTalents() { List <int> list = new List <int>(); foreach (Profession profession in Professions) { foreach (Talent talent in profession.talents) { if (!list.Contains(talent.Id)) { list.Add(talent.Id); Talents.Add(talent); } } } }
public static void Initialize() { Main.Log("Initialized"); ZEWarlockSettings.Load(); _settings = ZEWarlockSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); Main.settingRange = _maxRange; _petPulseThread.DoWork += PetThread; _petPulseThread.RunWorkerAsync(); // Set pet mode if (_settings.PetInPassiveWhenOOC) { Lua.LuaDoString("PetPassiveMode();"); } else { Lua.LuaDoString("PetDefensiveMode();"); } // Fight end FightEvents.OnFightEnd += (ulong guid) => { _usingWand = false; _iCanUseWand = false; Main.settingRange = _maxRange; _addCheckTimer.Reset(); if (_settings.PetInPassiveWhenOOC) { Lua.LuaDoString("PetPassiveMode();"); } }; // Fight start FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { if (UseWand.IsSpellUsable) { _iCanUseWand = true; } Lua.LuaDoString("PetDefensiveMode();"); }; Rotation(); }
public RangeHero(HeroTable hero) { Talents.Add("L1", hero.TalentL1); Talents.Add("L2", hero.TalentL2); Talents.Add("L3", hero.TalentL3); Talents.Add("L4", hero.TalentL4); Talents.Add("R1", hero.TalentR1); Talents.Add("R2", hero.TalentR2); Talents.Add("R3", hero.TalentR3); Talents.Add("R4", hero.TalentR4); Name = hero.Name; Hp = hero.Hp; Mana = hero.Mana; IncHp = hero.IncHp; IncMana = hero.IncMana; MainAttribute = hero.MainAttribute; Strength = hero.Strength; Agility = hero.Agility; Intelligence = hero.Intelligence; IncStrength = hero.IncStrength; IncAgility = hero.IncAgility; IncIntelligence = hero.IncIntelligence; Damage = hero.Damage; Armor = hero.Armor; AttackSpeed = hero.AttackSpeed; Speed = hero.Speed; Description = hero.Description; AttackRange = (int)hero.AttackRange; ProjectileSpeed = (int)hero.ProjectileSpeed; using (DotaBaseContext context = new DotaBaseContext()) { List <AbilityTable> abilities = context.AbilityTable.ToList(); DefaultSpell First = new DefaultSpell(abilities.First(x => x.Name == hero.FirstSpell)); FirstSpell = First; DefaultSpell Second = new DefaultSpell(abilities.First(x => x.Name == hero.SecondSpell)); SecondSpell = Second; DefaultSpell Third = new DefaultSpell(abilities.First(x => x.Name == hero.ThirdSpell)); ThirdSpell = Third; Ultimate Ulti = new Ultimate(abilities.First(x => x.Name == hero.Ultimate)); Ultimate = Ulti; } }
public Character(string name, Profession prof) : base(name, prof) { Name = name; Gender = prof.Gender ?? "Male"; Profession = prof; Attributes = new Attributes(this, prof.StartingAttributesDict); Talents = new Talents(this, prof.StartingTalentsDict); Inventory = new Inventory(this, prof.StartingInventoryList); Equipment = new Equipment(this, prof.StartingEquipmentDict); Skillbar = new Skillbar(this, prof.StartingSkills); HP = new Health(this); SP = new Stamina(this); HP.AdjustHP(9999); // Start off at full health (account for equip mods). SP.AdjustSP(999); // Start off at full stamina (account for equip mods). XP = new Experience(this, 1); }
private void btnAdd_Click(object sender, EventArgs e) { int num = 10; int tab = 1; int talent = 1; int rank = 1; // Find last item if ((CurTalents != null) && (CurTalents.Levels.Count > 0)) { Level last = (Level)CurTalents.Levels[CurTalents.Levels.Count - 1]; num = last.Num + 1; tab = last.TabId; talent = last.TalentId; if (last.Rank < numRank.Maximum) { rank = last.Rank + 1; } else { talent++; } } Level l = new Level(num, tab, talent, rank); bool is_new = (CurTalents == null); if (is_new) { // Don't forget add .xml extension for new file CurTalents = new Talents(cbTalentTemplates.Text + ".xml", tbTalentURL.Text, tbDescription.Text); BindLevels(); } CurTalents.AddLevel(l); RefreshLevelList(); lbLevelList.SelectedIndex = lbLevelList.Items.Count - 1; RegisterChange(); }
public static Spell AbolishPoison = new Spell("Abolish Poison"); //26 public static void Initialize() { { _isLaunched = true; DruidLevelSettings.Load(); Main.kindofclass = DruidLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(DruidLevelSettings.CurrentSetting.AssignTalents, DruidLevelSettings.CurrentSetting.UseDefaultTalents, DruidLevelSettings.CurrentSetting.TalentCodes.ToArray()); Logging.Write("Druid Low Level Class...loading..."); Groundmount = wManager.wManagerSetting.CurrentSetting.GroundMountName; if (wManager.wManagerSetting.CurrentSetting.GroundMountName == string.Empty) { wManager.wManagerSetting.CurrentSetting.GroundMountName = "Travel Form"; } Rotation(); } }
/// <summary> /// Returns a talent object given the reference name /// </summary> /// <param name="referenceName">reference name of the talent</param> /// <returns></returns> public Talent GetTalent(string referenceName) { if (string.IsNullOrEmpty(referenceName)) { return(Talents[string.Empty]); // no pick } if (Talents.TryGetValue(referenceName, out Talent talent)) { return(talent); } else { talent = Talents["NotFound"]; talent.Name = referenceName; return(talent); } }
public static void Initialize() { Main.Log("Initialized"); ZEWarriorSettings.Load(); _settings = ZEWarriorSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); FightEvents.OnFightEnd += (ulong guid) => { _fightingACaster = false; _meleeTimer.Reset(); _pullMeleeTimer.Reset(); _pullFromAfar = false; Main.SetRange(Main.DefaultMeleeRange); }; Rotation(); }
public static void Update() { // Keep the frame stuck so we can do a bunch of injecting at once. using (StyxWoW.Memory.AcquireFrame()) { CurrentSpec = StyxWoW.Me.Specialization; Talents.Clear(); TalentId = new int[6]; // Always 18 talents. 6 rows of 3 talents. for (int index = 1; index <= 6 * 3; index++) { var selected = Lua.GetReturnVal <bool>( string.Format( "local t= select(5,GetTalentInfo({0})) if t == true then return 1 end return nil", index), 0); var t = new Talent { Index = index, Selected = selected }; Talents.Add(t); TalentId[(index - 1) / 3] = index; } Glyphs.Clear(); GlyphId = new int[6]; // 6 glyphs all the time. Plain and simple! for (int i = 1; i <= 6; i++) { List <string> glyphInfo = Lua.GetReturnValues(String.Format("return GetGlyphSocketInfo({0})", i)); // add check for 4 members before access because empty sockets weren't returning 'nil' as documented if (glyphInfo != null && glyphInfo.Count >= 4 && glyphInfo[3] != "nil" && !string.IsNullOrEmpty(glyphInfo[3])) { GlyphId[i - 1] = int.Parse(glyphInfo[3]); Glyphs.Add(WoWSpell.FromId(GlyphId[i - 1]).Name.Replace("Glyph of ", "")); } } } }
public static void Initialize() // When product started, initialize and launch Fightclass { if (ObjectManager.Me.WowClass == WoWClass.Hunter) { HunterLevelSettings.Load(); Main.kindofclass = HunterLevelSettings.CurrentSetting.ChooseTalent; Talents.InitTalents(HunterLevelSettings.CurrentSetting.AssignTalents, HunterLevelSettings.CurrentSetting.UseDefaultTalents, HunterLevelSettings.CurrentSetting.TalentCodes.ToArray()); Logging.Write("Hunter Low Level Class...loading..."); RangeManager(); _isLaunched = true; Rotation(); } else { Logging.Write("No Hunter....unloading..."); } }
public override void Initialize() { LatestVersion = Helpers.Version.CheckVersion(); Helpers.Logger.PrintLog("You are using Version {0} of GGWP", Helpers.Version.CurrentLocalVersion.ToString()); if (!LatestVersion) { Helpers.Logger.PrintLog(Colors.Red, "There is a new Version of Wrathful Paladin available, go to https://github.com/oruna/paladin-cr/ and download the latest Version"); } HotkeysManager.Initialize(StyxWoW.Memory.Process.MainWindowHandle); PaladinSettings.Instance.Load(); Lua.Events.AttachEvent("PLAYER_REGEN_DISABLED", OnCombatStarted); Lua.Events.AttachEvent("UPDATE_BATTLEFIELD_STATUS", BGArena); Hotkeys.RegisterHotkeys(); Talents.Init(); }
public static void Initialize() { Main.Log("Initialized"); ZEShamanSettings.Load(); _settings = ZEShamanSettings.CurrentSetting; Talents.InitTalents(_settings.AssignTalents, _settings.UseDefaultTalents, _settings.TalentCodes); _ghostWolfTimer.Start(); FightEvents.OnFightEnd += (ulong guid) => { _goInMelee = false; _ghostWolfTimer.Restart(); _fightingACaster = false; _meleeTimer.Reset(); _pullMeleeTimer.Reset(); _pullAttempt = 0; }; FightEvents.OnFightStart += (WoWUnit unit, CancelEventArgs cancelable) => { _ghostWolfTimer.Reset(); }; robotManager.Events.FiniteStateMachineEvents.OnRunState += (Engine engine, State state, CancelEventArgs cancelable) => { if (state.DisplayName == "Regeneration") { _ghostWolfTimer.Reset(); } }; robotManager.Events.FiniteStateMachineEvents.OnAfterRunState += (Engine engine, State state) => { if (state.DisplayName == "Regeneration") { _ghostWolfTimer.Restart(); } }; Rotation(); }
private void cbTalentTemplates_SelectedIndexChanged(object sender, EventArgs e) { CurTalents = (Talents)cbTalentTemplates.SelectedItem; // Doesn't make sence process if tallent not selected if (CurTalents == null) { return; } if (CurTalents.WoWVersion != null) { cbWoWVersion.SelectedItem = DataManager.FindWoWVersionByName(CurTalents.WoWVersion); } else { cbWoWVersion.SelectedItem = null; } SelectClass(); tbDescription.Text = CurTalents.Description; tbTalentURL.Text = CurTalents.URL; tbLearningOrder.Text = CurTalents.LearningOrder; // Clear binding if (lbLevelList.DataSource != null) { lbLevelList.DataSource = null; } lbLevelList.Items.Clear(); BindLevels(); lbLevelList.SelectedIndex = 0; IsChanged = false; CheckSaveBtn(); }
public bool HaveTalent( Talents t ) { if ( talentList[ (int)t ] != null ) return true; return false; }
public int TalentLevel( Talents t ) { if ( talentList[ (int)t ] != null ) return (int)talentList[ (int)t ]; return 0; }
public BaseAbility GetTalentEffect( Talents t ) { TalentDescription td = (TalentDescription)TalentDescription.all[ (int)t ]; return (BaseAbility)Abilities.abilities[ td.AuraFXId( (int)talentList[ (int)t ] ) ]; }