public int GetTalentInfo(int idxTab, int idxTalent) { string sLuaCmd = String.Format("return GetTalentInfo( {0}, {1});", idxTab, idxTalent); List <string> retList = Lua.GetReturnValues(sLuaCmd, "hawker.lua"); if (Equals(null, retList)) { Shaman.Slog("ERROR: Talent {0}, {1} does not exist -- Notify CC developer", idxTab, idxTalent); return(0); } return(Convert.ToInt32(retList[4])); }
private static void LoadInt(XElement elem, ref int value) { int localVal; if (!int.TryParse(elem.Value, out localVal)) { localVal = value; Shaman.Slog( "config: setting '{0}' invalid - expected integer but read '{1}' - defaulting to '{2}'", elem.Name, elem.Value, localVal ); } value = localVal; }
private static void LoadBool(XElement elem, ref bool value) { bool localVal; if (!bool.TryParse(elem.Value, out localVal)) { localVal = value; Shaman.Slog( "config: setting '{0}' invalid - expected True/False but read '{1}' - defaulting to '{2}'", elem.Name, elem.Value, localVal ); } value = localVal; }
/// <summary> /// SetTotemsAsNeeded() - manages casting totems as called for by environment and /// user configuration values. This code uses: /// http://www.yawb.info/2009/08/25/learning-about-totems-tips-to-aid-your-growing-shamanism/ /// as a guideline for totem usage while leveling. /// </summary> private bool SetTotemsAsNeeded() { bool castTotem = false; try { if (!_me.Fleeing && (Shaman.cfg.FarmingLowLevel || _me.IsMoving)) { return(false); } // limit how frequently we check totems. needs to be often, // .. but not each loop. // .. if (_TotemCheckTimer.ElapsedMilliseconds < 1500) { // if this isn't first time here since reset, then wait for 2 seconds if (!_me.Fleeing && _TotemCheckTimer.ElapsedMilliseconds > 0 && TotemsWereSet()) { return(false); } // otherwise, only 0 if first check after last .Reset // .. so continue processing } if (TotemsWereSet() && _ptTotems.Distance(_me.Location) > Shaman.cfg.DistanceForTotemRecall) { Shaman.Dlog("Recalling Totems that were set {0:F1} yds away at point {1}", _ptTotems.Distance(_me.Location), _ptTotems.ToString()); RecallTotemsForMana(); } _TotemCheckTimer.Reset(); _TotemCheckTimer.Start(); //----- // if you make it past the following gate, only limited tests are needed for each totem //----- if (IsPVP() || Shaman.IsRAF()) { ; } else if (Shaman.IsFightStressful() || !Shaman.cfg.PVE_SaveForStress_TotemsSelected) { ; } else { Shaman.Dlog("not setting totems until a stressful situation"); return(false); } // check which totems exist bool bAnyTotemsUp = TotemExist(TOTEM_EARTH) || TotemExist(TOTEM_FIRE) || TotemExist(TOTEM_WATER) || TotemExist(TOTEM_AIR); Shaman.Dlog("SetTotemsAsNeeded: earth: " + BoolToYN(TotemExist(TOTEM_EARTH)) + " fire: " + BoolToYN(TotemExist(TOTEM_FIRE)) + " water: " + BoolToYN(TotemExist(TOTEM_WATER)) + " air: " + BoolToYN(TotemExist(TOTEM_AIR))); _WereTotemsSet = bAnyTotemsUp; // _WereTotemsSet || removed because only matters if they exist // Quick scan for mobs that cast fear (only in RAF) ////////////////////////////////////////////////////////////////////// Shaman.foundMobsThatFear = _me.Fleeing; if (Shaman.foundMobsThatFear) { Shaman.Slog("Tremor Totem: detected fear mob"); } // Totem Bar Set // -- add handling for changing totem bar setup temporarily if needed for tremor totem ////////////////////////////////////////////////////////////////////// const string totemBar = "Call of the Elements"; if (!bAnyTotemsUp && SpellManager.HasSpell(totemBar)) { TotemId saveEarthTotemSetup = TotemId.TREMOR_TOTEM; // if mobs that fear are found and tremor not in bar setup already, add temporarily just for cast if (Shaman.foundMobsThatFear && _totemBar[TOTEM_EARTH] != TotemId.TREMOR_TOTEM) { saveEarthTotemSetup = _totemBar[TOTEM_EARTH]; TotemSelect(TOTEM_EARTH, TotemId.TREMOR_TOTEM); } if (Shaman.Safe_CastSpell(totemBar, Shaman.SpellRange.NoCheck, Shaman.SpellWait.Complete)) { castTotem = true; _WereTotemsSet = true; _ptTotems = _me.Location; if (IsRAF()) { Dlog("SetTotemsAsNeeded: set totems at <{0}> {1:F1} yds from Leader", _ptTotems.ToString(), GroupTank.Distance); } else { Dlog("SetTotemsAsNeeded: set totems at <{0}>", _ptTotems.ToString()); } } // if we changed the earth totem on bar, restore back to configured value if (saveEarthTotemSetup != TotemId.TREMOR_TOTEM) { TotemSelect(TOTEM_EARTH, saveEarthTotemSetup); } } else { // Earth Totems First ////////////////////////////////////////////////////////////////////// if (foundMobsThatFear && HasTotemSpell(TotemId.TREMOR_TOTEM) && TotemId.TREMOR_TOTEM != (TotemId)_totem[TOTEM_EARTH].CreatedBySpellId) { castTotem = castTotem || TotemCast(TotemId.TREMOR_TOTEM); } else if (0 != _totemBar[TOTEM_EARTH]) { if (!TotemExist(TOTEM_EARTH) && HasTotemSpell(_totemBar[TOTEM_EARTH])) { castTotem = castTotem || TotemCast(_totemBar[TOTEM_EARTH]); } if (!TotemExist(TOTEM_EARTH) && Shaman.typeShaman == Shaman.ShamanType.Enhance && HasTotemSpell(TotemId.STRENGTH_OF_EARTH_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.STRENGTH_OF_EARTH_TOTEM); } if (!TotemExist(TOTEM_EARTH) && Shaman.typeShaman != Shaman.ShamanType.Enhance && HasTotemSpell(TotemId.STONESKIN_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.STONESKIN_TOTEM); } } // Fire Totems ////////////////////////////////////////////////////////////////////// if (_countMeleeEnemy >= 3 && !IsHealerOnly()) { if (!_me.GotTarget || !IsImmunneToFire(_me.CurrentTarget)) { if (!TotemExist(TOTEM_FIRE) || (!TotemExist(TotemId.MAGMA_TOTEM) && !TotemExist(TotemId.FIRE_ELEMENTAL_TOTEM))) { if (HasTotemSpell(TotemId.MAGMA_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.MAGMA_TOTEM); } else if (_countMeleeEnemy >= 4 && HasTotemSpell(TotemId.FLAMETONGUE_TOTEM) && !TotemExist(TotemId.FLAMETONGUE_TOTEM)) { Dlog("SetTotemsAsNeeded: 4 or more mobs and Magma not trained, using Flametongue to allow Fire Nova"); castTotem = castTotem || TotemCast(TotemId.FLAMETONGUE_TOTEM); } } } } if (0 != _totemBar[TOTEM_FIRE] && !TotemExist(TOTEM_FIRE)) { if (!TotemExist(TOTEM_FIRE) && HasTotemSpell(_totemBar[TOTEM_FIRE])) { castTotem = castTotem || TotemCast(_totemBar[TOTEM_FIRE]); } if (!TotemExist(TOTEM_FIRE) && Shaman.typeShaman != Shaman.ShamanType.Resto && HasTotemSpell(TotemId.SEARING_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.SEARING_TOTEM); } if (!TotemExist(TOTEM_FIRE) && HasTotemSpell(TotemId.FLAMETONGUE_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.FLAMETONGUE_TOTEM); } } // Water Totems ////////////////////////////////////////////////////////////////////// if (0 != _totemBar[TOTEM_WATER]) { if (!TotemExist(TOTEM_WATER) && HasTotemSpell(_totemBar[TOTEM_WATER])) { castTotem = castTotem || TotemCast(_totemBar[TOTEM_WATER]); } if (!TotemExist(TOTEM_WATER) && HasTotemSpell(TotemId.MANA_SPRING_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.MANA_SPRING_TOTEM); } } // Air Totems ////////////////////////////////////////////////////////////////////// if (0 != _totemBar[TOTEM_AIR]) { if (!TotemExist(TOTEM_AIR) && HasTotemSpell(_totemBar[TOTEM_WATER])) { castTotem = castTotem || TotemCast(_totemBar[TOTEM_AIR]); } if (!TotemExist(TOTEM_AIR) && Shaman.typeShaman == Shaman.ShamanType.Resto && HasTotemSpell(TotemId.GROUNDING_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.GROUNDING_TOTEM); } if (!TotemExist(TOTEM_AIR) && Shaman.typeShaman == Shaman.ShamanType.Enhance && HasTotemSpell(TotemId.WINDFURY_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.WINDFURY_TOTEM); } if (!TotemExist(TOTEM_AIR) && Shaman.typeShaman == Shaman.ShamanType.Elemental && HasTotemSpell(TotemId.WRATH_OF_AIR_TOTEM)) { castTotem = castTotem || TotemCast(TotemId.WRATH_OF_AIR_TOTEM); } } _WereTotemsSet = _WereTotemsSet || TotemExist(TOTEM_EARTH) || TotemExist(TOTEM_FIRE) || TotemExist(TOTEM_WATER) || TotemExist(TOTEM_AIR); if (!bAnyTotemsUp && _WereTotemsSet) { _ptTotems = _me.Location; } } } catch (ThreadAbortException) { throw; } catch (Exception e) { Log(Color.Red, "An Exception occured. Check debug log for details."); Logging.WriteDebug("HB EXCEPTION in SetTotemsAsNeeded()"); Logging.WriteException(e); } // would like to remove this code, but seeing duplicate totem sets if (castTotem) { ObjectManager.Update(); TotemManagerUpdate(); } return(castTotem); }
private void TotemSetupBar() { string[] aBar = new string[5]; if (IsPVP()) { aBar[TOTEM_EARTH] = Shaman.cfg.PVP_TotemEarth; aBar[TOTEM_FIRE] = Shaman.cfg.PVP_TotemFire; aBar[TOTEM_WATER] = Shaman.cfg.PVP_TotemWater; aBar[TOTEM_AIR] = Shaman.cfg.PVP_TotemAir; } else if (Shaman.IsRAF()) { aBar[TOTEM_EARTH] = Shaman.cfg.RAF_TotemEarth; aBar[TOTEM_FIRE] = Shaman.cfg.RAF_TotemFire; aBar[TOTEM_WATER] = Shaman.cfg.RAF_TotemWater; aBar[TOTEM_AIR] = Shaman.cfg.RAF_TotemAir; } else { aBar[TOTEM_EARTH] = Shaman.cfg.PVE_TotemEarth; aBar[TOTEM_FIRE] = Shaman.cfg.PVE_TotemFire; aBar[TOTEM_WATER] = Shaman.cfg.PVE_TotemWater; aBar[TOTEM_AIR] = Shaman.cfg.PVE_TotemAir; } /* * Shaman.Dlog("value from cfgdlg: Earth - {0}", _totemBar[TOTEM_EARTH]); * Shaman.Dlog("value from cfgdlg: Fire - {0}", _totemBar[TOTEM_FIRE ]); * Shaman.Dlog("value from cfgdlg: Water - {0}", _totemBar[TOTEM_WATER]); * Shaman.Dlog("value from cfgdlg: Air - {0}", _totemBar[TOTEM_AIR ]); */ // Earth - if configured spell is None or a real spellname, select that if (0 != String.Compare("Auto", aBar[TOTEM_EARTH], true)) { TotemSelect(TOTEM_EARTH, aBar[TOTEM_EARTH]); } else if (Shaman.typeShaman == Shaman.ShamanType.Enhance && HasTotemSpell(TotemId.STRENGTH_OF_EARTH_TOTEM)) { TotemSelect(TOTEM_EARTH, TotemId.STRENGTH_OF_EARTH_TOTEM); } else if (IsRAF() && HasTotemSpell(TotemId.STRENGTH_OF_EARTH_TOTEM)) { TotemSelect(TOTEM_EARTH, TotemId.STRENGTH_OF_EARTH_TOTEM); } else if (HasTotemSpell(TotemId.STONESKIN_TOTEM)) { TotemSelect(TOTEM_EARTH, TotemId.STONESKIN_TOTEM); } else { TotemSelect(TOTEM_EARTH, "None"); } // Fire - if configured spell is None or a real spellname, select that if (0 != String.Compare("Auto", aBar[TOTEM_FIRE], true)) { TotemSelect(TOTEM_FIRE, aBar[TOTEM_FIRE]); } else if (HasTotemSpell(TotemId.FLAMETONGUE_TOTEM) && (Shaman.typeShaman == Shaman.ShamanType.Resto || Shaman.IsHealerOnly())) { TotemSelect(TOTEM_FIRE, TotemId.FLAMETONGUE_TOTEM); } else if (HasTotemSpell(TotemId.SEARING_TOTEM)) { TotemSelect(TOTEM_FIRE, TotemId.SEARING_TOTEM); } else { TotemSelect(TOTEM_FIRE, "None"); } // Water - if configured spell is None or a real spellname, select that if (0 != String.Compare("Auto", aBar[TOTEM_WATER], true)) { TotemSelect(TOTEM_WATER, aBar[TOTEM_WATER]); } else if (HasTotemSpell(TotemId.HEALING_STREAM_TOTEM) && Shaman.IsRAF()) { TotemSelect(TOTEM_WATER, TotemId.HEALING_STREAM_TOTEM); } else if (_hasGlyphOfHealingStreamTotem && IsPVP()) { TotemSelect(TOTEM_WATER, TotemId.HEALING_STREAM_TOTEM); } else if (HasTotemSpell(TotemId.ELEMENTAL_RESISTANCE_TOTEM) && IsPVP()) { TotemSelect(TOTEM_WATER, TotemId.ELEMENTAL_RESISTANCE_TOTEM); } else if (HasTotemSpell(TotemId.HEALING_STREAM_TOTEM)) { TotemSelect(TOTEM_WATER, TotemId.HEALING_STREAM_TOTEM); } else if (HasTotemSpell(TotemId.MANA_SPRING_TOTEM)) { TotemSelect(TOTEM_WATER, TotemId.MANA_SPRING_TOTEM); } else { TotemSelect(TOTEM_WATER, "None"); } // Air - if configured spell is None or a real spellname, select that if (0 != String.Compare("Auto", aBar[TOTEM_AIR], true)) { TotemSelect(TOTEM_AIR, aBar[TOTEM_AIR]); } else if (HasTotemSpell(TotemId.GROUNDING_TOTEM) && Shaman.typeShaman == Shaman.ShamanType.Resto) { TotemSelect(TOTEM_AIR, TotemId.GROUNDING_TOTEM); } else if (HasTotemSpell(TotemId.WINDFURY_TOTEM) && Shaman.typeShaman == Shaman.ShamanType.Enhance) { TotemSelect(TOTEM_AIR, TotemId.WINDFURY_TOTEM); } else if (HasTotemSpell(TotemId.WRATH_OF_AIR_TOTEM) && (Shaman.typeShaman == Shaman.ShamanType.Elemental || Shaman.typeShaman == Shaman.ShamanType.Resto)) { TotemSelect(TOTEM_AIR, TotemId.WRATH_OF_AIR_TOTEM); } else if (IsRAF() && HasTotemSpell(TotemId.WINDFURY_TOTEM)) { TotemSelect(TOTEM_AIR, TotemId.WINDFURY_TOTEM); } else if (IsRAF() && HasTotemSpell(TotemId.GROUNDING_TOTEM)) { TotemSelect(TOTEM_AIR, TotemId.GROUNDING_TOTEM); } else { TotemSelect(TOTEM_AIR, "None"); } Shaman.Slog("Totem Bar[Earth]: {0}", _totemBar[TOTEM_EARTH]); Shaman.Slog("Totem Bar[Fire ]: {0}", _totemBar[TOTEM_FIRE]); Shaman.Slog("Totem Bar[Water]: {0}", _totemBar[TOTEM_WATER]); Shaman.Slog("Totem Bar[Air ]: {0}", _totemBar[TOTEM_AIR]); }
private void TotemDestroy(int indexTotem) { Shaman.RunLUA("DestroyTotem(" + indexTotem + ")"); _totem[indexTotem] = null; }
private bool TotemManagerUpdate() { int countTotems = 0; _ptTotems = new WoWPoint(); _totem = new WoWUnit[5]; #if USE_OLD_SEARCH List <WoWUnit> totemList = (from o in ObjectManager.ObjectList where o is WoWUnit let unit = o.ToUnit() where unit.CreatedByUnitGuid == _me.Guid && unit.CreatureType == WoWCreatureType.Totem select unit ).ToList(); foreach (WoWUnit totem in totemList) { int indexTotem = 0; try { countTotems++; indexTotem = _dictTotemSlot[(TotemId)totem.CreatedBySpellId]; _totem[indexTotem] = totem; if (totem.Distance < _ptTotems.Distance(_me.Location)) { _ptTotems = totem.Location; } } catch { Shaman.Wlog("NOTIFY SHAMWOW DEVELOPER: Unknown totem: totem spell id={0}, totem name='{1}', index totem={2}", totem.CreatedBySpellId, totem.Name, indexTotem); } } #else foreach (WoWTotemInfo ti in _me.Totems) { if (ti.WoWTotem != WoWTotem.None) { countTotems++; try { WoWUnit totem = ObjectManager.GetObjectByGuid <WoWUnit>(ti.Guid); int indexTotem = _dictTotemSlot[(TotemId)totem.CreatedBySpellId]; _totem[indexTotem] = totem; if (totem.Distance < _ptTotems.Distance(_me.Location)) { _ptTotems = totem.Location; } } catch { Shaman.Wlog("NOTIFY SHAMWOW DEVELOPER: Unknown totem: totem spell id={0}, totem name='{1}'", ti.Spell.Id, ti.Name); } } } #endif #if SHOW_TOTEM_COUNT if (countTotems > 0) { Shaman.Dlog("TotemManagerUpdate: found {0} totems with closest {1:F1} yds away at {2}", countTotems, _ptTotems.Distance(_me.Location), _ptTotems.ToString()); } #endif return(countTotems > 0); }
public bool FileLoad(string sFilename, out bool didUpgrade) { XElement toplvl = XElement.Load(sFilename); XElement[] elements = toplvl.Elements().ToArray(); didUpgrade = false; foreach (XElement elem in elements) { switch (elem.Name.ToString()) { case "version": LoadStr(elem, ref CreatedByVersion); break; case "debug": LoadBool(elem, ref Debug); break; case "useghostwolf": LoadBool(elem, ref UseGhostWolfForm); break; case "safedistanceforghostwolf": LoadInt(elem, ref DistanceForGhostWolf); break; case "restminmana": LoadInt(elem, ref RestManaPercent); break; case "restminhealth": LoadInt(elem, ref RestHealthPercent); break; case "needheal": LoadInt(elem, ref NeedHealHealthPercent); break; case "emergencyhealth": LoadInt(elem, ref EmergencyHealthPercent); break; case "emergencymana": LoadInt(elem, ref EmergencyManaPercent); break; case "needlifeblood": LoadInt(elem, ref LifebloodPercent); break; case "needshamanisticrage": LoadInt(elem, ref ShamanisticRagePercent); break; case "needthunderstorm": LoadInt(elem, ref ThunderstormPercent); break; case "needmanatide": LoadInt(elem, ref ManaTidePercent); break; case "trinkathealth": LoadInt(elem, ref TrinkAtHealth); break; case "trinkatmana": LoadInt(elem, ref TrinkAtMana); break; case "usebandages": LoadBool(elem, ref UseBandages); break; case "totemrecalldistance": LoadInt(elem, ref DistanceForTotemRecall); break; case "twistwatershield": LoadInt(elem, ref TwistManaPercent); break; case "twistlightningshield": LoadInt(elem, ref TwistDamagePercent); break; case "disablemovement": LoadBool(elem, ref DisableMovement); break; case "disabletargeting": LoadBool(elem, ref DisableTargeting); break; case "meleecombatbeforelevel10": LoadBool(elem, ref MeleeCombatBeforeLevel10); break; case "interruptstyle": LoadSpellInterruptStyle(elem, ref InterruptStyle); break; case "detectimmunities": LoadBool(elem, ref DetectImmunities); break; case "waterwalking": LoadBool(elem, ref WaterWalking); break; case "pve_combatstyle": LoadPveCombatStyle(elem, ref PVE_CombatStyle); break; case "pve_typeofpull": LoadTypeOfPull(elem, ref PVE_PullType); break; case "pve_stressonly_feralspirit": LoadBool(elem, ref PVE_SaveForStress_FeralSpirit); break; case "pve_stressonly_elementaltotems": LoadBool(elem, ref PVE_SaveForStress_ElementalTotems); break; case "pve_stressonly_dps_racials": LoadBool(elem, ref PVE_SaveForStress_DPS_Racials); break; case "pve_stressonly_bloodlust": LoadBool(elem, ref PVE_SaveForStress_Bloodlust); break; case "pve_stressonly_totembar": LoadBool(elem, ref PVE_SaveForStress_TotemsSelected); break; case "pve_stresslevelsabove": LoadInt(elem, ref PVE_LevelsAboveAsElite); break; case "pve_stressfulmobcount": LoadInt(elem, ref PVE_StressfulMobCount); break; case "pve_totemearth": LoadStr(elem, ref PVE_TotemEarth); break; case "pve_totemfire": LoadStr(elem, ref PVE_TotemFire); break; case "pve_totemwater": LoadStr(elem, ref PVE_TotemWater); break; case "pve_totemair": LoadStr(elem, ref PVE_TotemAir); break; case "pve_mainhand": LoadStr(elem, ref PVE_MainhandImbue); break; case "pve_offhand": LoadStr(elem, ref PVE_OffhandImbue); break; case "pvp_combatstyle": LoadPvpCombatStyle(elem, ref PVP_CombatStyle); break; case "pvp_totemearth": LoadStr(elem, ref PVP_TotemEarth); break; case "pvp_totemfire": LoadStr(elem, ref PVP_TotemFire); break; case "pvp_totemwater": LoadStr(elem, ref PVP_TotemWater); break; case "pvp_totemair": LoadStr(elem, ref PVP_TotemAir); break; case "pvp_mainhand": LoadStr(elem, ref PVP_MainhandImbue); break; case "pvp_offhand": LoadStr(elem, ref PVP_OffhandImbue); break; case "pvp_cleansepriority": LoadSpellPriority(elem, ref PVP_CleansePriority); break; case "pvp_purgepriority": LoadSpellPriority(elem, ref PVP_PurgePriority); break; case "pvp_hexicon": LoadRaidIcon(elem, ref PVP_HexIcon); break; case "pvp_prepwaterbreathing": LoadBool(elem, ref PVP_PrepWaterBreathing); break; case "pvp_prepwaterwalking": LoadBool(elem, ref PVP_PrepWaterWalking); break; case "pvp_heal_healingwave": LoadInt(elem, ref PVP_Heal.HealingWave); break; case "pvp_heal_riptide": LoadInt(elem, ref PVP_Heal.Riptide); break; case "pvp_heal_unleashelements": LoadInt(elem, ref PVP_Heal.UnleashElements); break; case "pvp_heal_chainheal": LoadInt(elem, ref PVP_Heal.ChainHeal); break; case "pvp_heal_healingrain": LoadInt(elem, ref PVP_Heal.HealingRain); break; case "pvp_heal_greaterhealingwave": LoadInt(elem, ref PVP_Heal.GreaterHealingWave); break; case "pvp_heal_healingsurge": LoadInt(elem, ref PVP_Heal.HealingSurge); break; case "pvp_heal_ohshoot": LoadInt(elem, ref PVP_Heal.OhShoot); break; case "pvp_heal_tidalwaves": LoadBool(elem, ref PVP_Heal.TidalWaves); break; case "pvp_heal_cleanse": LoadBool(elem, ref PVP_Heal.Cleanse); break; case "pvp_heal_pets": LoadBool(elem, ref PVP_Heal.Pets); break; case "pvp_heal_searchrange": LoadDouble(elem, ref PVP_Heal.SearchRange); break; case "raf_combatstyle": LoadRafCombatStyle(elem, ref RAF_CombatStyle); break; case "raf_groupoffheal": LoadInt(elem, ref RAF_GroupOffHeal); break; case "raf_usethunderstorm": LoadBool(elem, ref RAF_UseThunderstorm); break; case "raf_usebloodlustonbosses": LoadBool(elem, ref RAF_UseBloodlustOnBosses); break; case "raf_saveferalspiritforbosses": LoadBool(elem, ref RAF_SaveFeralSpiritForBosses); break; case "raf_totemearth": LoadStr(elem, ref RAF_TotemEarth); break; case "raf_totemfire": LoadStr(elem, ref RAF_TotemFire); break; case "raf_totemwater": LoadStr(elem, ref RAF_TotemWater); break; case "raf_totemair": LoadStr(elem, ref RAF_TotemAir); break; case "raf_saveelementaltotemsforbosses": LoadBool(elem, ref RAF_SaveElementalTotemsForBosses); break; case "raf_followclosely": LoadBool(elem, ref RAF_FollowClosely); break; case "raf_cleansepriority": LoadSpellPriority(elem, ref RAF_CleansePriority); break; case "raf_purgepriority": LoadSpellPriority(elem, ref RAF_PurgePriority); break; case "raf_hexicon": LoadRaidIcon(elem, ref RAF_HexIcon); break; case "raf_bindicon": LoadRaidIcon(elem, ref RAF_BindIcon); break; case "raf_heal_healingwave": LoadInt(elem, ref RAF_Heal.HealingWave); break; case "raf_heal_riptide": LoadInt(elem, ref RAF_Heal.Riptide); break; case "raf_heal_unleashelements": LoadInt(elem, ref RAF_Heal.UnleashElements); break; case "raf_heal_chainheal": LoadInt(elem, ref RAF_Heal.ChainHeal); break; case "raf_heal_healingrain": LoadInt(elem, ref RAF_Heal.HealingRain); break; case "raf_heal_greaterhealingwave": LoadInt(elem, ref RAF_Heal.GreaterHealingWave); break; case "raf_heal_healingsurge": LoadInt(elem, ref RAF_Heal.HealingSurge); break; case "raf_heal_ohshoot": LoadInt(elem, ref RAF_Heal.OhShoot); break; case "raf_heal_tidalwaves": LoadBool(elem, ref RAF_Heal.TidalWaves); break; case "raf_heal_cleanse": LoadBool(elem, ref RAF_Heal.Cleanse); break; case "raf_heal_pets": LoadBool(elem, ref RAF_Heal.Pets); break; case "raf_heal_searchrange": LoadDouble(elem, ref RAF_Heal.SearchRange); break; case "raf_followatrange": LoadInt(elem, ref RAF_FollowAtRange); break; case "raf_healstyle": LoadHealStyle(elem, ref RAF_HealStyle); break; default: Shaman.Dlog("error: unknown config setting: {0}={1}", elem.Name, elem.Value.ToString()); break; } } if (String.Compare(CreatedByVersion, Shaman.Version) < 0) { didUpgrade = true; Shaman.Dlog("ConfigValue.FileLoad: detected config file created by a different version"); // UPGRADE TO 4.2.05 if (string.Compare(CreatedByVersion, "4.2.05") < 0) { Shaman.Slog(""); Shaman.Slog(Color.Orange, "ConfigUpgrade: upgrading older config file version to {0}", Shaman.Version); Shaman.Slog(Color.Orange, "ConfigUpgrade: Shamanistic Rage % changed from {0} to {1}", ShamanisticRagePercent, 100); ShamanisticRagePercent = 100; Shaman.Slog(Color.Orange, "ConfigUpgrade: RAF Combat Style changed from '{0}' to '{1}'", RAF_CombatStyle, "Auto"); RAF_CombatStyle = RafCombatStyle.Auto; Shaman.Slog(Color.Orange, "ConfigUpgrade: Shield Twist Mana % changed from '{0}' to '{1}'", TwistManaPercent, 25); TwistManaPercent = 25; Shaman.Slog(Color.Orange, "ConfigUpgrade: Shield Twist Damage % changed from '{0}' to '{1}'", TwistDamagePercent, 50); TwistDamagePercent = 50; Shaman.Slog(""); } CreatedByVersion = Shaman.Version; Save(sFilename); } return(true); }
private void btnLogTargets_Click(object sender, EventArgs e) { Shaman.ListWowUnitsInRange(); }