diff --git a/E3Discord/App.config b/E3Discord/App.config
index 864a9338..33791c90 100644
--- a/E3Discord/App.config
+++ b/E3Discord/App.config
@@ -1,30 +1,30 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
\ No newline at end of file
+
diff --git a/E3Discord/E3Discord.csproj b/E3Discord/E3Discord.csproj
index 9cd7687f..327e7c95 100644
--- a/E3Discord/E3Discord.csproj
+++ b/E3Discord/E3Discord.csproj
@@ -12,6 +12,7 @@
512
true
true
+
AnyCPU
@@ -45,8 +46,8 @@
..\packages\NaCl.Net.0.1.13\lib\net472\NaCl.dll
-
- ..\packages\NetMQ.4.0.1.10\lib\net47\NetMQ.dll
+
+ ..\packages\NetMQ.4.0.1.13\lib\net47\NetMQ.dll
diff --git a/E3Discord/packages.config b/E3Discord/packages.config
index e7dd86b9..9feedd5c 100644
--- a/E3Discord/packages.config
+++ b/E3Discord/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/E3Next/Classes/Bard.cs b/E3Next/Classes/Bard.cs
index 8d8cb1fc..d03ee3de 100644
--- a/E3Next/Classes/Bard.cs
+++ b/E3Next/Classes/Bard.cs
@@ -9,6 +9,7 @@
using System.Dynamic;
using System.Linq;
using System.Windows.Forms;
+using System.Security.Cryptography;
namespace E3Core.Classes
{
@@ -32,14 +33,23 @@ public static class Bard
private static Data.Spell _sonataSpell = new Spell("Selo's Sonata");
private static Data.Spell _sonataAccelerando = new Spell("Selo's Accelerando");
private static Int64 _nextBardCast = 0;
- ///
- /// Initializes this instance.
- ///
- [ClassInvoke(Data.Class.Bard)]
+ private static bool _autoMezEnabled = false;
+ private static HashSet _autoMezFullMobList = new HashSet();
+ private static HashSet _mobsToAutoMez = new HashSet();
+ public static Dictionary _autoMezTimers = new Dictionary();
+
+ public static void ResetNextBardSong()
+ {
+ _nextBardCast = 0;
+ }
+ ///
+ /// Initializes this instance.
+ ///
+ [ClassInvoke(Data.Class.Bard)]
public static void Init()
{
if (_isInit) return;
- PlayMelody();
+ RegisterCommands();
_isInit = true;
}
///
@@ -61,7 +71,7 @@ public static void AutoSonata()
if(e3util.IsEQLive())
{
- spellIDToLookup = _sonataAccelerando.SpellID;
+ spellIDToLookup = 50190;
}
bool needToCast = false;
@@ -87,6 +97,10 @@ public static void AutoSonata()
if(e3util.IsEQLive())
{
totalSecondsLeft = MQ.Query("${Me.Buff[Selo's Accelerando].Duration.TotalSeconds}");
+ if (totalSecondsLeft < 1)
+ {
+ totalSecondsLeft = MQ.Query("${Me.Buff[Selo's Accelerato].Duration.TotalSeconds}");
+ }
}
else
{
@@ -115,7 +129,7 @@ public static void AutoSonata()
///
/// /playmelody melodyName
///
- public static void PlayMelody()
+ public static void RegisterCommands()
{
EventProcessor.RegisterCommand("/playmelody", (x) =>
{
@@ -140,7 +154,47 @@ public static void PlayMelody()
}
}
});
- }
+ EventProcessor.RegisterCommand("/e3bard-automez", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ if (x.args[0].Equals("off", StringComparison.OrdinalIgnoreCase))
+ {
+ E3.Bots.Broadcast("Turning off Bard Auto Mez");
+ Casting.Interrupt();
+ _autoMezEnabled = false;
+ _autoMezTimers.Clear();
+
+
+ }
+ else if (x.args[0].Equals("on", StringComparison.OrdinalIgnoreCase))
+ {
+ E3.Bots.Broadcast("Turning on Bard Auto Mez");
+
+ _autoMezEnabled = true;
+ _autoMezTimers.Clear();
+ }
+ }
+ else
+ {
+ if(_autoMezEnabled)
+ {
+ E3.Bots.Broadcast("Turning off Bard Auto Mez");
+ Casting.Interrupt();
+ _autoMezEnabled = false;
+ _autoMezTimers.Clear();
+ }
+ else
+ {
+ E3.Bots.Broadcast("Turning on Bard Auto Mez");
+
+ _autoMezEnabled = true;
+ _autoMezTimers.Clear();
+
+ }
+ }
+ });
+ }
///
/// Checks the melody ifs.
@@ -168,11 +222,182 @@ public static void checkMelodyIf()
}
}
}
- //[ClassInvoke(Data.Class.Bard)]
- ///
- /// Checks the bard songs.
- ///
- public static void check_BardSongs()
+ public static Dictionary _mobsAndTimeStampForMez = new Dictionary();
+ public static void Check_AutoMez()
+ {
+ if (!_autoMezEnabled) return;
+
+ if (Casting.IsCasting()) return;
+ if (!Basics.InCombat())
+ {
+ if(_autoMezTimers.Count>0)
+ {
+ _autoMezTimers.Clear();
+
+ }
+ return;
+ }
+ if (E3.CharacterSettings.Bard_AutoMezSong.Count == 0) return;
+ Int32 targetId = MQ.Query("${Target.ID}");
+
+ using (_log.Trace())
+ {
+ _autoMezFullMobList.Clear();
+
+ foreach (var s in _spawns.Get().OrderBy(x => x.Distance))
+ {
+ _autoMezFullMobList.Add(s.ID);
+ if (s.ID == Assist.AssistTargetID) continue;
+ if (_mobsToAutoMez.Contains(s.ID)) continue;
+ //find all mobs that are close
+ if (s.PctHps < 1) continue;
+ if (s.TypeDesc != "NPC") continue;
+ if (!s.Targetable) continue;
+ if (!s.Aggressive) continue;
+ if (s.CleanName.EndsWith("s pet")) continue;
+ if (!MQ.Query($"${{Spawn[npc id {s.ID}].LineOfSight}}")) continue;
+ if (s.Distance > 60) break;//mob is too far away, and since it is ordered, kick out.
+ //its valid to attack!
+ _mobsToAutoMez.Add(s.ID);
+ }
+
+ List mobIdsToRemove = new List();
+ foreach(var mobid in _mobsToAutoMez)
+ {
+ if(!_autoMezFullMobList.Contains(mobid))
+ {
+ //they are no longer a valid mobid, remove from mobs to mez
+ mobIdsToRemove.Add(mobid);
+ }
+ }
+ foreach (var mobid in mobIdsToRemove)
+ {
+ _mobsToAutoMez.Remove(mobid);
+ }
+ if (_mobsToAutoMez.Count == 0)
+ {
+ //_autoMezEnabled = false;
+ //E3.Bots.Broadcast("No more mobs to mez, turning off auto mez.");
+ _autoMezTimers.Clear();
+ return;
+ }
+ _mobsToAutoMez.Remove(Assist.AssistTargetID);
+ if (_mobsToAutoMez.Count == 0)
+ {
+ //E3.Bots.Broadcast("No more mobs to mez, turning off auto mez.");
+ //_autoMezEnabled = false;
+ _autoMezTimers.Clear();
+ return;
+ }
+
+ bool wasAttacking = MQ.Query("${Me.Combat}");
+ try
+ {
+
+
+ foreach (var spell in E3.CharacterSettings.Bard_AutoMezSong)
+ {
+
+ //check if the if condition works
+ if (!String.IsNullOrWhiteSpace(spell.Ifs))
+ {
+ if (!Casting.Ifs(spell))
+ {
+ continue;
+ }
+ }
+ if (Casting.CheckMana(spell))
+ {
+
+ //find the mob that has either 1) no mez timer, or 2) the lowest value one
+ _mobsAndTimeStampForMez.Clear();
+ foreach (Int32 mobid in _mobsToAutoMez.ToList())
+ {
+ SpellTimer s;
+ //do we need to cast the song?
+ if (_autoMezTimers.TryGetValue(mobid, out s))
+ {
+ Int64 timestamp;
+ if (s.Timestamps.TryGetValue(spell.SpellID, out timestamp))
+ {
+ Int64 timeAndMinDuration = (Core.StopWatch.ElapsedMilliseconds + (spell.MinDurationBeforeRecast));
+ if (timeAndMinDuration < timestamp)
+ {
+ //debuff/dot is still on the mob, kick off
+ //MQ.Write($"Debuff is still on the mob");
+ continue;
+ }
+ else
+ {
+ _mobsAndTimeStampForMez.Add(mobid, timeAndMinDuration);
+ continue;
+ //MQ.Write($"Debuff timer is up re-issuing cast. Time:{Core.StopWatch.ElapsedMilliseconds} stamp:{timestamp} minduration:{spell.MinDurationBeforeRecast}");
+ }
+ }
+
+ }
+ _mobsAndTimeStampForMez.Add(mobid, 0);
+
+ }
+
+ //get the mobid with the lease amount of timestamp
+ if(_mobsAndTimeStampForMez.Count>0)
+ {
+ Int32 mobIDToMez = 0;
+ Int64 leastTime = Int64.MaxValue;
+ foreach (var pair in _mobsAndTimeStampForMez)
+ {
+ if (pair.Value < leastTime)
+ {
+ mobIDToMez = pair.Key;
+ leastTime = pair.Value;
+ }
+
+ }
+ if (_spawns.TryByID(mobIDToMez, out var spawn))
+ {
+ //lets place the 1st offensive spell on each mob, then the next, then the next
+ //lets not hit what we are trying to mez
+ if (wasAttacking)
+ {
+ MQ.Cmd("/attack off");
+
+ }
+ Casting.TrueTarget(mobIDToMez);
+ if (Casting.CheckReady(spell))
+ {
+ E3.Bots.Broadcast($"Trying to Mez ==>[{spawn.CleanName}]");
+ Casting.Sing(mobIDToMez, spell);
+ }
+ //MQ.Write($"Setting Debuff timer for {spell.DurationTotalSeconds * 1000} ms");
+ //duration is in ticks
+ Int64 spellDuration = E3.CharacterSettings.Bard_AutoMezSongDuration * 1000;
+ DebuffDot.UpdateDotDebuffTimers(mobIDToMez, spell, spellDuration, _autoMezTimers);
+ }
+
+
+
+ }
+
+ return;
+ }
+ }
+ }
+ finally
+ {
+ e3util.PutOriginalTargetBackIfNeeded(targetId);
+ if(wasAttacking)
+ {
+ MQ.Cmd("/attack on");
+ }
+ }
+
+ }
+ }
+ ///
+ /// Checks the bard songs.
+ ///
+ public static void check_BardSongs()
{
if (!_playingMelody && !Assist.IsAssisting)
@@ -286,17 +511,23 @@ public static void check_BardSongs()
public static void StartMelody(string melodyName, bool force=false)
{
_songs.Clear();
- //lets find the melody in the character ini.
- CharacterSettings.LoadKeyData($"{melodyName} Melody", "Song", E3.CharacterSettings.ParsedData, _songs);
+ MQ.Cmd("/stopsong");
+ //lets find the melody in the character ini.
+ CharacterSettings.LoadKeyData($"{melodyName} Melody", "Song", E3.CharacterSettings.ParsedData, _songs);
if(_songs.Count>0)
{
MQ.Write($"\aoStart Melody:\ag{melodyName}");
- MQ.Cmd("/stopsong");
+
_nextBardCast = Core.StopWatch.ElapsedMilliseconds;
_forceOverride = force;
_playingMelody = true;
_currentMelody = melodyName;
}
+ else
+ {
+ //its an empty list
+
+ }
}
public static void RestartMelody()
{
diff --git a/E3Next/Classes/Magician.cs b/E3Next/Classes/Magician.cs
index bb462cfc..e4523e19 100644
--- a/E3Next/Classes/Magician.cs
+++ b/E3Next/Classes/Magician.cs
@@ -30,7 +30,12 @@ public static class Magician
private static string _focusItem = "Folded Pack of Enibik's Heirlooms";
private static string _weaponBag = "Pouch of Quellious";
private static string _armorOrHeirloomBag = "Phantom Satchel";
- private static Dictionary _weaponMap = new Dictionary(StringComparer.OrdinalIgnoreCase) {
+ private static string _dskGloveItem = "Glyphwielder's Ascendant Gloves of the Summoner";
+ private static string _dskCodex = "Codex of Minion's Materiel";
+ private static Spell _dskGloveSpell = null;
+ private static Spell _dskCodexSpell = null;
+
+ private static Dictionary _weaponMap = new Dictionary(StringComparer.OrdinalIgnoreCase) {
{"Fire", "Summoned: Fist of Flame"},
{"Water", "Summoned: Orb of Chilling Water" },
{"Shield", "Summoned: Buckler of Draining Defense" },
@@ -80,7 +85,7 @@ public static class Magician
[SubSystemInit]
public static void PetEquipmentRequest()
{
- if (E3.CurrentClass != Class.Magician)
+ if (E3.CurrentClass != Class.Magician || e3util.IsEQLive())
{
return;
}
@@ -175,7 +180,55 @@ public static void PetEquipmentRequest()
ArmPets();
});
- }
+ if(e3util.IsEQEMU())
+ {
+
+ }
+ armPetEvents = new List { "(?i)(.+) tells you, 'DSK'", "(?i)(.+) tells the group, 'DSK'", };
+ EventProcessor.RegisterEvent("ArmPetDSK", armPetEvents, x =>
+ {
+
+ var hasDskGloves = MQ.Query($"${{FindItem[{_dskGloveItem}]}}");
+
+ if (hasDskGloves)
+ {
+ if (_dskGloveSpell == null)
+ {
+ _dskGloveSpell = new Spell(_dskGloveItem);
+ }
+ _requester = x.match.Groups[1].ToString();
+ if (_spawns.TryByName(_requester, out var requesterSpawn))
+ {
+ var theirPetId = requesterSpawn.PetID;
+ if (theirPetId < 0)
+ {
+ MQ.Cmd($"/t {_requester} You don't have a pet to equip!");
+ return;
+ }
+ if (_spawns.Get().First(w => w.ID == theirPetId).Distance > 50)
+ {
+ MQ.Cmd($"/t {_requester} Your pet is too far away!");
+ return;
+ }
+ if (_spawns.Get().First(w => w.ID == theirPetId).Level == 1)
+ {
+ MQ.Cmd($"/t {_requester} Your pet is just a familiar!");
+ return;
+ }
+ if (!Casting.CheckReady(_dskGloveSpell))
+ {
+ MQ.Cmd($"/t {_requester} Is in cooldown, try again shortly.");
+ return;
+ }
+ MQ.Cmd($"/t {_requester} I hear you I hear you one moment please....");
+ if (Casting.CheckReady(_dskGloveSpell))
+ {
+ Casting.Cast(theirPetId, _dskGloveSpell);
+ }
+ }
+ }
+ });
+ }
///
@@ -331,77 +384,136 @@ public static void KeepOpenInvSlot()
}
private static void ArmPet(int petId, string weapons)
- {
- // so we can move back
- var currentX = MQ.Query("${Me.X}");
+ {
+ //all this code needs to be abstracted out as it is Laz specific
+
+ var hasDskGloves = MQ.Query($"${{FindItem[{_dskGloveItem}]}}");
+ var hasDskCodex = MQ.Query($"${{FindItem[{_dskCodex}]}}");
+
+ // so we can move back
+ var currentX = MQ.Query("${Me.X}");
var currentY = MQ.Query("${Me.Y}");
var currentZ = MQ.Query("${Me.Z}");
+ Casting.TrueTarget(petId);
- if (!GiveWeapons(petId, weapons ?? "Water|Fire"))
- {
- if (_isExternalRequest)
- {
- MQ.Cmd($"/t {_requester} There was an issue with pet weapon summoning and we are unable to continue.");
- }
- else
- {
- E3.Bots.Broadcast("\arThere was an issue with pet weapon summoning and we are unable to continue.");
- }
+ var myPetID = MQ.Query("${Me.Pet.ID}");
+
+ try
+ {
+ if (petId == myPetID && hasDskCodex)
+ {
+ if (_dskCodexSpell == null)
+ {
+ _dskCodexSpell = new Spell(_dskCodex);
+ }
+ //if not ready, wait till its ready
+ Int32 counter = 0;
+ while (!Casting.CheckReady(_dskCodexSpell))
+ {
+ //if more than 10 seconds, break out
+ if (counter > 100) break;
+ MQ.Delay(100);
+ counter++;
+ }
+ if (Casting.CheckReady(_dskCodexSpell))
+ {
+ Casting.Cast(petId, _dskCodexSpell);
+ }
+ }
+ if (hasDskGloves)
+ {
+ if (_dskGloveSpell == null)
+ {
+ _dskGloveSpell = new Spell(_dskGloveItem);
+ }
+
+ //if not ready, wait till its ready
+ Int32 counter = 0;
+ while (!Casting.CheckReady(_dskGloveSpell))
+ {
+ //if more than 10 seconds, break out
+ if (counter > 100) break;
+ MQ.Delay(100);
+ counter++;
+ }
+
+ if (Casting.CheckReady(_dskGloveSpell))
+ {
+ Casting.Cast(petId, _dskGloveSpell);
+ }
+ }
+ else
+ {
+ if (!GiveWeapons(petId, weapons ?? "Water|Fire"))
+ {
+ if (_isExternalRequest)
+ {
+ MQ.Cmd($"/t {_requester} There was an issue with pet weapon summoning and we are unable to continue.");
+
+ }
+ else
+ {
+ E3.Bots.Broadcast("\arThere was an issue with pet weapon summoning and we are unable to continue.");
+
+ }
+ return;
+ }
+ }
+ //we are done if its our pet and we have applied the codex
+ if (petId == myPetID && hasDskCodex) return;
- // move back to my original location
- e3util.TryMoveToLoc(currentX, currentY, currentZ);
- _isExternalRequest = false;
+ var spell = new Spell(_armorSpell);
+ Casting.MemorizeSpell(spell);
+ MQ.Delay(10000, $"${{Me.SpellReady[${{Me.Gem[{spell.SpellGem}].Name}}]}}");
- return;
- }
- Casting.TrueTarget(petId);
-
- var spell = new Spell(_armorSpell);
- Int32 castAttempts = 0;
- if(Casting.CheckReady(spell) && Casting.CheckMana(spell))
- {
- while(Casting.Cast(petId, spell) == CastReturn.CAST_FIZZLE)
+ Int32 castAttempts = 0;
+ if (Casting.CheckReady(spell) && Casting.CheckMana(spell))
{
- if (castAttempts > 7) break;
- MQ.Delay(1500);
- castAttempts++;
+ while (Casting.Cast(petId, spell) == CastReturn.CAST_FIZZLE)
+ {
+ if (castAttempts > 7) break;
+ MQ.Delay(1500);
+ castAttempts++;
+ }
}
- }
- castAttempts = 0;
- spell = new Spell(_focusSpell);
- if (Casting.CheckReady(spell) && Casting.CheckMana(spell))
- {
- while (Casting.Cast(petId, spell) == CastReturn.CAST_FIZZLE)
+ castAttempts = 0;
+ spell = new Spell(_focusSpell);
+ Casting.MemorizeSpell(spell);
+ MQ.Delay(10000, $"${{Me.SpellReady[${{Me.Gem[{spell.SpellGem}].Name}}]}}");
+
+ if (Casting.CheckReady(spell) && Casting.CheckMana(spell))
{
- if (castAttempts > 7) break;
- MQ.Delay(1500);
- castAttempts++;
+ while (Casting.Cast(petId, spell) == CastReturn.CAST_FIZZLE)
+ {
+ if (castAttempts > 7) break;
+ MQ.Delay(1500);
+ castAttempts++;
+ }
}
- }
- var dskGloveItem = "Glyphwielder's Ascendant Gloves of the Summoner";
- var hasDskGloves = MQ.Query($"${{FindItem[{dskGloveItem}]}}");
- if (hasDskGloves)
- {
- MQ.Cmd($"/useitem {dskGloveItem}");
- }
- var pet = _spawns.Get().FirstOrDefault(f => f.ID == petId);
- if (pet != null)
- {
- if (_isExternalRequest)
- {
- MQ.Cmd($"/t {_requester} Finished arming {pet.CleanName}");
- }
- else
- {
- E3.Bots.Broadcast($"\agFinishing arming {pet.CleanName}");
- }
- }
+ var pet = _spawns.Get().FirstOrDefault(f => f.ID == petId);
+ if (pet != null)
+ {
+ if (_isExternalRequest)
+ {
+ MQ.Cmd($"/t {_requester} Finished arming {pet.CleanName}");
+ }
+ else
+ {
+ E3.Bots.Broadcast($"\agFinishing arming {pet.CleanName}");
+ }
+ }
+ }
+ finally
+ { // move back to my original location
+ e3util.TryMoveToLoc(currentX, currentY, currentZ);
+ _isExternalRequest = false;
+
+ }
+
- // move back to my original location
- e3util.TryMoveToLoc(currentX, currentY, currentZ);
- _isExternalRequest = false;
+
}
private static bool GiveWeapons(int petId, string weaponString)
@@ -515,14 +627,17 @@ private static (bool success, string error) SummonItem(string itemToSummon, bool
var id = E3.CurrentId;
Casting.TrueTarget(id);
var spell = new Spell(itemToSummon);
- if (Casting.CheckReady(spell))
+ if (Casting.CheckReady(spell) && Casting.CheckMana(spell))
{
int cursorId = 0;
// try several times to summon
for (int i = 1; i <= 5; i++)
{
- Casting.Cast(id, spell);
- e3util.YieldToEQ();
+ if(Casting.Cast(id, spell)== CastReturn.CAST_FIZZLE)
+ {
+ continue;
+ }
+ MQ.Delay(3000, "${Cursor.ID}");
cursorId = MQ.Query("${Cursor.ID}");
if (cursorId > 0) break;
}
diff --git a/E3Next/Classes/Necromancer.cs b/E3Next/Classes/Necromancer.cs
index 62695a58..caeb7b8c 100644
--- a/E3Next/Classes/Necromancer.cs
+++ b/E3Next/Classes/Necromancer.cs
@@ -145,31 +145,36 @@ public static void Check_NecroAggro()
{
Spell s;
- if(!Spell.LoadedSpellsByName.TryGetValue("Improved Death Peace",out s))
- {
- s = new Spell("Improved Death Peace");
- }
- if(Casting.CheckReady(s) && Casting.CheckMana(s))
- {
- Casting.Cast(0, s);
- //check to see if we can stand based off the # of group members.
- Int32 GroupSize = MQ.Query("${Group}");
- Int32 GroupInZone = MQ.Query("${Group.Present}");
-
- if (GroupSize - GroupInZone > 0)
- {
- Assist.AssistOff();
- E3.Bots.Broadcast(" Have agro, someone is dead, staying down. Issue reassist when ready.");
-
-
- }
- else
- {
- MQ.Cmd("/stand");
- return;
- }
-
- }
+ if(e3util.IsEQEMU())
+ {
+ if (!Spell.LoadedSpellsByName.TryGetValue("Improved Death Peace", out s))
+ {
+ s = new Spell("Improved Death Peace");
+ }
+ if (Casting.CheckReady(s) && Casting.CheckMana(s))
+ {
+ Casting.Cast(0, s);
+ //check to see if we can stand based off the # of group members.
+ Int32 GroupSize = MQ.Query("${Group}");
+ Int32 GroupInZone = MQ.Query("${Group.Present}");
+
+ if (GroupSize - GroupInZone > 0)
+ {
+ Assist.AssistOff();
+ E3.Bots.Broadcast(" Have agro, someone is dead, staying down. Issue reassist when ready.");
+
+
+ }
+ else
+ {
+ MQ.Cmd("/stand");
+ return;
+ }
+
+ }
+
+ }
+
if (!Spell.LoadedSpellsByName.TryGetValue("Death Peace", out s))
{
s = new Spell("Death Peace");
diff --git a/E3Next/Classes/Ranger.cs b/E3Next/Classes/Ranger.cs
index a054cc31..f79acd39 100644
--- a/E3Next/Classes/Ranger.cs
+++ b/E3Next/Classes/Ranger.cs
@@ -52,6 +52,7 @@ public static void Check_RangerAggro()
}
E3.Bots.Broadcast($"\ag \awI have stolen aggro again ({aggroPct}%), Delaying for a bit till agro is below 75% or 5 seconds");
Int32 assistid = Assist.AssistTargetID;
+ bool allowControl = Assist.AllowControl;
Assist.AssistOff();
Int32 counter = 0;
while (MQ.Query("${Target.PctAggro}") >= 75 && counter<50)
@@ -59,6 +60,7 @@ public static void Check_RangerAggro()
MQ.Delay(100);
counter++;
}
+ Assist.AllowControl = allowControl;
Assist.AssistOn(assistid, Zoning.CurrentZone.Id);
}
diff --git a/E3Next/Classes/Rogue.cs b/E3Next/Classes/Rogue.cs
index 8cb20992..9af6456c 100644
--- a/E3Next/Classes/Rogue.cs
+++ b/E3Next/Classes/Rogue.cs
@@ -21,11 +21,39 @@ public static class Rogue
private static Data.Spell _rogueSneakAttack = null;
private static long _nextHideCheck = 0;
private static long _nextHideCheckInterval = 1000;
+ private static bool _isInit = false;
- ///
- /// Performs a sneak attack.
- ///
- public static void RogueStrike()
+ [ClassInvoke(Data.Class.Rogue)]
+ public static void Init()
+ {
+ if (_isInit) return;
+ RegisterCommands();
+ _isInit = true;
+ }
+ public static void RegisterCommands()
+ {
+ EventProcessor.RegisterCommand("/e3rogue-autohide", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ if (x.args[0].Equals("off", StringComparison.OrdinalIgnoreCase))
+ {
+ E3.Bots.Broadcast("Turning off Rogue Auto Hide");
+ E3.CharacterSettings.Rogue_AutoHide = false;
+ }
+ }
+ else
+ {
+ E3.Bots.Broadcast("Turning on Rogue Auto Hide");
+ E3.CharacterSettings.Rogue_AutoHide = true;
+ }
+ });
+ }
+
+ ///
+ /// Performs a sneak attack.
+ ///
+ public static void RogueStrike()
{
using(_log.Trace())
{
@@ -36,7 +64,7 @@ public static void RogueStrike()
_rogueSneakAttack = new Data.Spell(sneakattack);
}
- if (_rogueSneakAttack.CastType != Data.CastType.None)
+ if (_rogueSneakAttack.CastType != Data.CastingType.None)
{
if (MQ.Query($"${{Me.CombatAbilityReady[{sneakattack}]}}") && MQ.Query($"${{Me.AbilityReady[Backstab]}}"))
{
@@ -65,15 +93,21 @@ public static void RogueStrike()
[ClassInvoke(Data.Class.Rogue)]
public static void AutoHide()
{
+
+
if (!E3.CharacterSettings.Rogue_AutoHide) return;
if (!e3util.ShouldCheck(ref _nextHideCheck, _nextHideCheckInterval)) return;
if (MQ.Query("${Me.Invis}")) return;
- if (MQ.Query("${Me.Moving}")) return;
- if (Zoning.CurrentZone.IsSafeZone) return;
+
+ if (MQ.Query("${Me.Moving}")) return;
+ if (Zoning.CurrentZone.IsSafeZone) return;
if (Basics.InCombat()) return;
+ //reapply any buffs before we need to go into invis
+ BuffCheck.Check_Buffs();
+ if (E3.ActionTaken) return;
- var sneakQuery = "${Me.Sneaking}";
+ var sneakQuery = "${Me.Sneaking}";
if (!MQ.Query(sneakQuery) && MQ.Query("${Me.AbilityReady[Sneak]"))
{
MQ.Cmd("/doability sneak");
diff --git a/E3Next/Classes/Shaman.cs b/E3Next/Classes/Shaman.cs
index f8bc1cd5..3499e8a0 100644
--- a/E3Next/Classes/Shaman.cs
+++ b/E3Next/Classes/Shaman.cs
@@ -39,35 +39,8 @@ public static void RegisterEvents()
EventProcessor.RegisterCommand("/e3autocanni", (x) =>
{
//swap them
-
- if (x.args.Count > 0)
- {
- if (x.args[0].Equals("off", StringComparison.OrdinalIgnoreCase))
- {
- if (E3.CharacterSettings.AutoCanni)
- {
- E3.CharacterSettings.AutoCanni = false;
- E3.Bots.Broadcast("\agTurning off Auto Canni");
- }
- }
- else if (x.args[0].Equals("on", StringComparison.OrdinalIgnoreCase))
- {
- if (!E3.CharacterSettings.AutoCanni)
- {
- E3.CharacterSettings.AutoCanni = true;
- E3.Bots.Broadcast("\arTurning on auto canni!");
-
- }
- }
- }
- else
- {
- E3.CharacterSettings.AutoCanni = E3.CharacterSettings.AutoCanni ? false : true;
- if (E3.CharacterSettings.AutoCanni) E3.Bots.Broadcast("\arAuto Canni On");
- if (!E3.CharacterSettings.AutoCanni) E3.Bots.Broadcast("\agAuto Canni Off");
-
- }
-
+ e3util.ToggleBooleanSetting(ref E3.CharacterSettings.AutoCanni, "Auto Canni", x.args);
+
});
}
@@ -83,8 +56,15 @@ public static void AutoCanni()
int pctMana = MQ.Query("${Me.PctMana}");
var pctHps = MQ.Query("${Me.PctHPs}");
int currentHps = MQ.Query("${Me.CurrentHPs}");
-
- if(!Casting.Ifs(canniSpell))
+ var minhpThreashold = canniSpell.MinHPTotal;
+ if (minhpThreashold > 0)
+ {
+ if (currentHps < minhpThreashold)
+ {
+ continue;
+ }
+ }
+ if (!Casting.Ifs(canniSpell))
{
continue;
}
@@ -92,10 +72,13 @@ public static void AutoCanni()
{
var hpThresholdDefined = canniSpell.MinHP > 0;
var manaThresholdDefined = canniSpell.MaxMana > 0;
+
bool castCanniSpell = false;
bool hpThresholdMet = false;
bool manaThresholdMet = false;
+
+
if (hpThresholdDefined)
{
if (pctHps > canniSpell.MinHP)
diff --git a/E3Next/Core.cs b/E3Next/Core.cs
index e3ae5df4..a7ec5f3f 100644
--- a/E3Next/Core.cs
+++ b/E3Next/Core.cs
@@ -81,6 +81,7 @@ public static void Process()
}
catch (Exception ex)
{
+
if(ex is ThreadAbort)
{
Core.IsProcessing = false;
@@ -810,6 +811,7 @@ public static void OnInit()
{
try
{
+ Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
_MQ2MonoVersion = Decimal.Parse(Core.mq_GetMQ2MonoVersion());
}
catch (Exception)
@@ -851,10 +853,7 @@ public static void OnStop()
System.Threading.Thread.MemoryBarrier();
//tell the C# thread that it can now process and since processing is false, we can then end the application.
MainProcessor.ProcessResetEvent.Set();
- if (E3Core.Server.NetMQServer.UIProcess != null)
- {
- E3Core.Server.NetMQServer.UIProcess.Kill();
- }
+ E3Core.Server.NetMQServer.KillAllProcesses();
NetMQConfig.Cleanup(false);
System.Threading.Thread.Sleep(500);
GC.Collect();
diff --git a/E3Next/Data/MelodyIfs.cs b/E3Next/Data/MelodyIfs.cs
index 94300bdf..26b6aed9 100644
--- a/E3Next/Data/MelodyIfs.cs
+++ b/E3Next/Data/MelodyIfs.cs
@@ -11,7 +11,11 @@ public class MelodyIfs
{
public String MelodyName;
public String MelodyIf;
+ public String MelodyIfName;
+ public MelodyIfs()
+ {
+ }
public MelodyIfs(string melodyName, IniData parsedData)
{
string[] melodyArray = melodyName.Split('/');
@@ -20,11 +24,11 @@ public MelodyIfs(string melodyName, IniData parsedData)
if(melodyArray.Length>1)
{
- string ifKey = Spell.GetArgument(melodyArray[1]);
+ MelodyIfName = Spell.GetArgument(melodyArray[1]);
var section = parsedData.Sections["Ifs"];
if (section != null)
{
- var keyData = section[ifKey];
+ var keyData = section[MelodyIfName];
if (!String.IsNullOrWhiteSpace(keyData))
{
MelodyIf = keyData;
@@ -32,5 +36,15 @@ public MelodyIfs(string melodyName, IniData parsedData)
}
}
}
- }
+ public string ToConfigEntry()
+ {
+ //This is C#'s ternary conditional operator
+ //its condition if true do 1st, else 2nd.
+ //in this case, if ifskeys is null or empty, set to string empty
+ //else use /Ifs|{IfsKeys}
+ string t_Ifs = (String.IsNullOrWhiteSpace(this.MelodyIfName)) ? String.Empty : $"/Ifs|{MelodyIfName}";
+
+ return $"{MelodyName}{t_Ifs}";
+ }
+ }
}
diff --git a/E3Next/Data/ProtoBuff/SpellData.cs b/E3Next/Data/ProtoBuff/SpellData.cs
new file mode 100644
index 00000000..29b7937d
--- /dev/null
+++ b/E3Next/Data/ProtoBuff/SpellData.cs
@@ -0,0 +1,3329 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SpellData.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+/// Holder for reflection information generated from SpellData.proto
+public static partial class SpellDataReflection {
+
+ #region Descriptor
+ /// File descriptor for SpellData.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SpellDataReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cg9TcGVsbERhdGEucHJvdG8iKQoNU3BlbGxEYXRhTGlzdBIYCgRkYXRhGAEg",
+ "AygLMgouU3BlbGxEYXRhIrMNCglTcGVsbERhdGESEQoJU3BlbGxOYW1lGAEg",
+ "ASgJEhAKCENhc3ROYW1lGAIgASgJEhMKC1N1YmNhdGVnb3J5GAMgASgJEhAK",
+ "CENhdGVnb3J5GAQgASgJEigKCENhc3RUeXBlGAUgASgOMhYuU3BlbGxEYXRh",
+ "LkNhc3RpbmdUeXBlEhIKClRhcmdldFR5cGUYBiABKAkSEAoIU3BlbGxHZW0Y",
+ "ByABKAUSEwoLR2l2ZVVwVGltZXIYCCABKAUSEAoITWF4VHJpZXMYCSABKAUS",
+ "EAoIRHVyYXRpb24YCiABKAUSHAoURHVyYXRpb25Ub3RhbFNlY29uZHMYCyAB",
+ "KAUSEgoKUmVjYXN0VGltZRgMIAEoBRIUCgxSZWNvdmVyeVRpbWUYDSABKAES",
+ "EgoKbXlDYXN0VGltZRgOIAEoARIbChNNeUNhc3RUaW1lSW5TZWNvbmRzGA8g",
+ "ASgBEg8KB015UmFuZ2UYECABKAESDAoETWFuYRgRIAEoBRIPCgdNaW5NYW5h",
+ "GBIgASgFEg8KB01heE1hbmEYEyABKAUSDQoFTWluSFAYFCABKAUSDwoHSGVh",
+ "bFBjdBgVIAEoBRINCgVEZWJ1ZxgWIAEoCBIPCgdSZWFnZW50GBcgASgJEhUK",
+ "DUl0ZW1NdXN0RXF1aXAYGCABKAgSDgoGTm9CdXJuGBkgASgIEhAKCE5vVGFy",
+ "Z2V0GBogASgIEg8KB05vQWdncm8YGyABKAgSDAoETW9kZRgcIAEoBRIVCg1F",
+ "bmR1cmFuY2VDb3N0GB0gASgFEg0KBURlbGF5GB4gASgFEhYKDkRlbGF5QWZ0",
+ "ZXJDYXN0GB8gASgFEg4KBkNhc3RJRBggIAEoBRIOCgZNaW5FbmQYISABKAUS",
+ "EQoJQ2FzdEludmlzGCIgASgIEhEKCVNwZWxsVHlwZRgjIAEoCRISCgpDYXN0",
+ "VGFyZ2V0GCQgASgJEhsKE1N0YWNrUmVxdWVzdFRhcmdldHMYJSADKAkSGgoS",
+ "U3RhY2tJbnRlcnZhbENoZWNrGCYgASgDEh4KFlN0YWNrSW50ZXJ2YWxOZXh0",
+ "Q2hlY2sYJyABKAMSGAoQU3RhY2tSZWNhc3REZWxheRgoIAEoAxIYChBTdGFj",
+ "a1JlcXVlc3RJdGVtGCkgASgJEhIKCkdpZnRPZk1hbmEYKiABKAgSDwoHU3Bl",
+ "bGxJRBgrIAEoBRIQCghQY3RBZ2dybxgsIAEoBRIMCgRab25lGC0gASgJEg8K",
+ "B01pblNpY2sYLiABKAUSFgoOQWxsb3dTcGVsbFN3YXAYLyABKAgSFQoNTm9F",
+ "YXJseVJlY2FzdBgwIAEoCBIPCgdOb1N0YWNrGDEgASgIEhQKDFRyaWdnZXJT",
+ "cGVsbBgyIAEoCRITCgtCZWZvcmVTcGVsbBgzIAEoCRITCgtOb0ludGVycnVw",
+ "dBg1IAEoCBISCgpBZnRlckV2ZW50GDYgASgJEhMKC0JlZm9yZUV2ZW50GDcg",
+ "ASgJEg4KBkNhc3RJRhg4IAEoCRILCgNJZnMYOSABKAkSEAoISW5pdE5hbWUY",
+ "OiABKAkSGQoRUmVhZ2VudE91dE9mU3RvY2sYOyABKAgSEwoLU3BlbGxJbkJv",
+ "b2sYPCABKAgSEQoJU3BlbGxJY29uGD0gASgFEhUKDU5vTWlkU29uZ0Nhc3QY",
+ "PiABKAgSHwoXTWluRHVyYXRpb25CZWZvcmVSZWNhc3QYPyABKAMSEwoLSXNT",
+ "aG9ydEJ1ZmYYQCABKAgSEQoJSGVhbHRoTWF4GEEgASgFEhgKEElnbm9yZVN0",
+ "YWNrUnVsZXMYQiABKAgSEAoISXNEZWJ1ZmYYQyABKAgSDQoFSXNEb1QYRCAB",
+ "KAgSDgoGUm90YXRlGEUgASgIEhIKCkFmdGVyU3BlbGwYRiABKAkSDQoFTGV2",
+ "ZWwYRyABKAUSEwoLRGVzY3JpcHRpb24YSCABKAkSEgoKUmVzaXN0VHlwZRhJ",
+ "IAEoCRIRCglSZXNpc3RBZGoYSiABKAUSMAoQQ2FzdFR5cGVPdmVycmlkZRhL",
+ "IAEoDjIWLlNwZWxsRGF0YS5DYXN0aW5nVHlwZRIaChJDaGVja0ZvckNvbGxl",
+ "Y3Rpb24YTCADKAkSDwoHSWZzS2V5cxhNIAEoCRIPCgdFbmFibGVkGE4gASgI",
+ "Eg4KBklzQnVmZhhPIAEoCBISCgpNaW5IUFRvdGFsGFAgASgFIksKC0Nhc3Rp",
+ "bmdUeXBlEgYKAkFBEAASCQoFU3BlbGwQARIICgREaXNjEAISCwoHQWJpbGl0",
+ "eRADEggKBEl0ZW0QBBIICgROb25lEAViBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::SpellDataList), global::SpellDataList.Parser, new[]{ "Data" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::SpellData), global::SpellData.Parser, new[]{ "SpellName", "CastName", "Subcategory", "Category", "CastType", "TargetType", "SpellGem", "GiveUpTimer", "MaxTries", "Duration", "DurationTotalSeconds", "RecastTime", "RecoveryTime", "MyCastTime", "MyCastTimeInSeconds", "MyRange", "Mana", "MinMana", "MaxMana", "MinHP", "HealPct", "Debug", "Reagent", "ItemMustEquip", "NoBurn", "NoTarget", "NoAggro", "Mode", "EnduranceCost", "Delay", "DelayAfterCast", "CastID", "MinEnd", "CastInvis", "SpellType", "CastTarget", "StackRequestTargets", "StackIntervalCheck", "StackIntervalNextCheck", "StackRecastDelay", "StackRequestItem", "GiftOfMana", "SpellID", "PctAggro", "Zone", "MinSick", "AllowSpellSwap", "NoEarlyRecast", "NoStack", "TriggerSpell", "BeforeSpell", "NoInterrupt", "AfterEvent", "BeforeEvent", "CastIF", "Ifs", "InitName", "ReagentOutOfStock", "SpellInBook", "SpellIcon", "NoMidSongCast", "MinDurationBeforeRecast", "IsShortBuff", "HealthMax", "IgnoreStackRules", "IsDebuff", "IsDoT", "Rotate", "AfterSpell", "Level", "Description", "ResistType", "ResistAdj", "CastTypeOverride", "CheckForCollection", "IfsKeys", "Enabled", "IsBuff", "MinHPTotal" }, null, new[]{ typeof(global::SpellData.Types.CastingType) }, null, null)
+ }));
+ }
+ #endregion
+
+}
+#region Messages
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class SpellDataList : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpellDataList());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::SpellDataReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellDataList() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellDataList(SpellDataList other) : this() {
+ data_ = other.data_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellDataList Clone() {
+ return new SpellDataList(this);
+ }
+
+ /// Field number for the "data" field.
+ public const int DataFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_data_codec
+ = pb::FieldCodec.ForMessage(10, global::SpellData.Parser);
+ private readonly pbc::RepeatedField data_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField Data {
+ get { return data_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as SpellDataList);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(SpellDataList other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!data_.Equals(other.data_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= data_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ data_.WriteTo(output, _repeated_data_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ data_.WriteTo(ref output, _repeated_data_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += data_.CalculateSize(_repeated_data_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(SpellDataList other) {
+ if (other == null) {
+ return;
+ }
+ data_.Add(other.data_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ data_.AddEntriesFrom(input, _repeated_data_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ data_.AddEntriesFrom(ref input, _repeated_data_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class SpellData : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpellData());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::SpellDataReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellData() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellData(SpellData other) : this() {
+ spellName_ = other.spellName_;
+ castName_ = other.castName_;
+ subcategory_ = other.subcategory_;
+ category_ = other.category_;
+ castType_ = other.castType_;
+ targetType_ = other.targetType_;
+ spellGem_ = other.spellGem_;
+ giveUpTimer_ = other.giveUpTimer_;
+ maxTries_ = other.maxTries_;
+ duration_ = other.duration_;
+ durationTotalSeconds_ = other.durationTotalSeconds_;
+ recastTime_ = other.recastTime_;
+ recoveryTime_ = other.recoveryTime_;
+ myCastTime_ = other.myCastTime_;
+ myCastTimeInSeconds_ = other.myCastTimeInSeconds_;
+ myRange_ = other.myRange_;
+ mana_ = other.mana_;
+ minMana_ = other.minMana_;
+ maxMana_ = other.maxMana_;
+ minHP_ = other.minHP_;
+ healPct_ = other.healPct_;
+ debug_ = other.debug_;
+ reagent_ = other.reagent_;
+ itemMustEquip_ = other.itemMustEquip_;
+ noBurn_ = other.noBurn_;
+ noTarget_ = other.noTarget_;
+ noAggro_ = other.noAggro_;
+ mode_ = other.mode_;
+ enduranceCost_ = other.enduranceCost_;
+ delay_ = other.delay_;
+ delayAfterCast_ = other.delayAfterCast_;
+ castID_ = other.castID_;
+ minEnd_ = other.minEnd_;
+ castInvis_ = other.castInvis_;
+ spellType_ = other.spellType_;
+ castTarget_ = other.castTarget_;
+ stackRequestTargets_ = other.stackRequestTargets_.Clone();
+ stackIntervalCheck_ = other.stackIntervalCheck_;
+ stackIntervalNextCheck_ = other.stackIntervalNextCheck_;
+ stackRecastDelay_ = other.stackRecastDelay_;
+ stackRequestItem_ = other.stackRequestItem_;
+ giftOfMana_ = other.giftOfMana_;
+ spellID_ = other.spellID_;
+ pctAggro_ = other.pctAggro_;
+ zone_ = other.zone_;
+ minSick_ = other.minSick_;
+ allowSpellSwap_ = other.allowSpellSwap_;
+ noEarlyRecast_ = other.noEarlyRecast_;
+ noStack_ = other.noStack_;
+ triggerSpell_ = other.triggerSpell_;
+ beforeSpell_ = other.beforeSpell_;
+ noInterrupt_ = other.noInterrupt_;
+ afterEvent_ = other.afterEvent_;
+ beforeEvent_ = other.beforeEvent_;
+ castIF_ = other.castIF_;
+ ifs_ = other.ifs_;
+ initName_ = other.initName_;
+ reagentOutOfStock_ = other.reagentOutOfStock_;
+ spellInBook_ = other.spellInBook_;
+ spellIcon_ = other.spellIcon_;
+ noMidSongCast_ = other.noMidSongCast_;
+ minDurationBeforeRecast_ = other.minDurationBeforeRecast_;
+ isShortBuff_ = other.isShortBuff_;
+ healthMax_ = other.healthMax_;
+ ignoreStackRules_ = other.ignoreStackRules_;
+ isDebuff_ = other.isDebuff_;
+ isDoT_ = other.isDoT_;
+ rotate_ = other.rotate_;
+ afterSpell_ = other.afterSpell_;
+ level_ = other.level_;
+ description_ = other.description_;
+ resistType_ = other.resistType_;
+ resistAdj_ = other.resistAdj_;
+ castTypeOverride_ = other.castTypeOverride_;
+ checkForCollection_ = other.checkForCollection_.Clone();
+ ifsKeys_ = other.ifsKeys_;
+ enabled_ = other.enabled_;
+ isBuff_ = other.isBuff_;
+ minHPTotal_ = other.minHPTotal_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public SpellData Clone() {
+ return new SpellData(this);
+ }
+
+ /// Field number for the "SpellName" field.
+ public const int SpellNameFieldNumber = 1;
+ private string spellName_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string SpellName {
+ get { return spellName_; }
+ set {
+ spellName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "CastName" field.
+ public const int CastNameFieldNumber = 2;
+ private string castName_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string CastName {
+ get { return castName_; }
+ set {
+ castName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Subcategory" field.
+ public const int SubcategoryFieldNumber = 3;
+ private string subcategory_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Subcategory {
+ get { return subcategory_; }
+ set {
+ subcategory_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Category" field.
+ public const int CategoryFieldNumber = 4;
+ private string category_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Category {
+ get { return category_; }
+ set {
+ category_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "CastType" field.
+ public const int CastTypeFieldNumber = 5;
+ private global::SpellData.Types.CastingType castType_ = global::SpellData.Types.CastingType.Aa;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::SpellData.Types.CastingType CastType {
+ get { return castType_; }
+ set {
+ castType_ = value;
+ }
+ }
+
+ /// Field number for the "TargetType" field.
+ public const int TargetTypeFieldNumber = 6;
+ private string targetType_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string TargetType {
+ get { return targetType_; }
+ set {
+ targetType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "SpellGem" field.
+ public const int SpellGemFieldNumber = 7;
+ private int spellGem_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int SpellGem {
+ get { return spellGem_; }
+ set {
+ spellGem_ = value;
+ }
+ }
+
+ /// Field number for the "GiveUpTimer" field.
+ public const int GiveUpTimerFieldNumber = 8;
+ private int giveUpTimer_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int GiveUpTimer {
+ get { return giveUpTimer_; }
+ set {
+ giveUpTimer_ = value;
+ }
+ }
+
+ /// Field number for the "MaxTries" field.
+ public const int MaxTriesFieldNumber = 9;
+ private int maxTries_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MaxTries {
+ get { return maxTries_; }
+ set {
+ maxTries_ = value;
+ }
+ }
+
+ /// Field number for the "Duration" field.
+ public const int DurationFieldNumber = 10;
+ private int duration_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Duration {
+ get { return duration_; }
+ set {
+ duration_ = value;
+ }
+ }
+
+ /// Field number for the "DurationTotalSeconds" field.
+ public const int DurationTotalSecondsFieldNumber = 11;
+ private int durationTotalSeconds_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int DurationTotalSeconds {
+ get { return durationTotalSeconds_; }
+ set {
+ durationTotalSeconds_ = value;
+ }
+ }
+
+ /// Field number for the "RecastTime" field.
+ public const int RecastTimeFieldNumber = 12;
+ private int recastTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int RecastTime {
+ get { return recastTime_; }
+ set {
+ recastTime_ = value;
+ }
+ }
+
+ /// Field number for the "RecoveryTime" field.
+ public const int RecoveryTimeFieldNumber = 13;
+ private double recoveryTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public double RecoveryTime {
+ get { return recoveryTime_; }
+ set {
+ recoveryTime_ = value;
+ }
+ }
+
+ /// Field number for the "myCastTime" field.
+ public const int MyCastTimeFieldNumber = 14;
+ private double myCastTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public double MyCastTime {
+ get { return myCastTime_; }
+ set {
+ myCastTime_ = value;
+ }
+ }
+
+ /// Field number for the "MyCastTimeInSeconds" field.
+ public const int MyCastTimeInSecondsFieldNumber = 15;
+ private double myCastTimeInSeconds_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public double MyCastTimeInSeconds {
+ get { return myCastTimeInSeconds_; }
+ set {
+ myCastTimeInSeconds_ = value;
+ }
+ }
+
+ /// Field number for the "MyRange" field.
+ public const int MyRangeFieldNumber = 16;
+ private double myRange_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public double MyRange {
+ get { return myRange_; }
+ set {
+ myRange_ = value;
+ }
+ }
+
+ /// Field number for the "Mana" field.
+ public const int ManaFieldNumber = 17;
+ private int mana_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Mana {
+ get { return mana_; }
+ set {
+ mana_ = value;
+ }
+ }
+
+ /// Field number for the "MinMana" field.
+ public const int MinManaFieldNumber = 18;
+ private int minMana_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinMana {
+ get { return minMana_; }
+ set {
+ minMana_ = value;
+ }
+ }
+
+ /// Field number for the "MaxMana" field.
+ public const int MaxManaFieldNumber = 19;
+ private int maxMana_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MaxMana {
+ get { return maxMana_; }
+ set {
+ maxMana_ = value;
+ }
+ }
+
+ /// Field number for the "MinHP" field.
+ public const int MinHPFieldNumber = 20;
+ private int minHP_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinHP {
+ get { return minHP_; }
+ set {
+ minHP_ = value;
+ }
+ }
+
+ /// Field number for the "HealPct" field.
+ public const int HealPctFieldNumber = 21;
+ private int healPct_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int HealPct {
+ get { return healPct_; }
+ set {
+ healPct_ = value;
+ }
+ }
+
+ /// Field number for the "Debug" field.
+ public const int DebugFieldNumber = 22;
+ private bool debug_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Debug {
+ get { return debug_; }
+ set {
+ debug_ = value;
+ }
+ }
+
+ /// Field number for the "Reagent" field.
+ public const int ReagentFieldNumber = 23;
+ private string reagent_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Reagent {
+ get { return reagent_; }
+ set {
+ reagent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ItemMustEquip" field.
+ public const int ItemMustEquipFieldNumber = 24;
+ private bool itemMustEquip_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool ItemMustEquip {
+ get { return itemMustEquip_; }
+ set {
+ itemMustEquip_ = value;
+ }
+ }
+
+ /// Field number for the "NoBurn" field.
+ public const int NoBurnFieldNumber = 25;
+ private bool noBurn_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoBurn {
+ get { return noBurn_; }
+ set {
+ noBurn_ = value;
+ }
+ }
+
+ /// Field number for the "NoTarget" field.
+ public const int NoTargetFieldNumber = 26;
+ private bool noTarget_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoTarget {
+ get { return noTarget_; }
+ set {
+ noTarget_ = value;
+ }
+ }
+
+ /// Field number for the "NoAggro" field.
+ public const int NoAggroFieldNumber = 27;
+ private bool noAggro_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoAggro {
+ get { return noAggro_; }
+ set {
+ noAggro_ = value;
+ }
+ }
+
+ /// Field number for the "Mode" field.
+ public const int ModeFieldNumber = 28;
+ private int mode_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Mode {
+ get { return mode_; }
+ set {
+ mode_ = value;
+ }
+ }
+
+ /// Field number for the "EnduranceCost" field.
+ public const int EnduranceCostFieldNumber = 29;
+ private int enduranceCost_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int EnduranceCost {
+ get { return enduranceCost_; }
+ set {
+ enduranceCost_ = value;
+ }
+ }
+
+ /// Field number for the "Delay" field.
+ public const int DelayFieldNumber = 30;
+ private int delay_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Delay {
+ get { return delay_; }
+ set {
+ delay_ = value;
+ }
+ }
+
+ /// Field number for the "DelayAfterCast" field.
+ public const int DelayAfterCastFieldNumber = 31;
+ private int delayAfterCast_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int DelayAfterCast {
+ get { return delayAfterCast_; }
+ set {
+ delayAfterCast_ = value;
+ }
+ }
+
+ /// Field number for the "CastID" field.
+ public const int CastIDFieldNumber = 32;
+ private int castID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CastID {
+ get { return castID_; }
+ set {
+ castID_ = value;
+ }
+ }
+
+ /// Field number for the "MinEnd" field.
+ public const int MinEndFieldNumber = 33;
+ private int minEnd_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinEnd {
+ get { return minEnd_; }
+ set {
+ minEnd_ = value;
+ }
+ }
+
+ /// Field number for the "CastInvis" field.
+ public const int CastInvisFieldNumber = 34;
+ private bool castInvis_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool CastInvis {
+ get { return castInvis_; }
+ set {
+ castInvis_ = value;
+ }
+ }
+
+ /// Field number for the "SpellType" field.
+ public const int SpellTypeFieldNumber = 35;
+ private string spellType_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string SpellType {
+ get { return spellType_; }
+ set {
+ spellType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "CastTarget" field.
+ public const int CastTargetFieldNumber = 36;
+ private string castTarget_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string CastTarget {
+ get { return castTarget_; }
+ set {
+ castTarget_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "StackRequestTargets" field.
+ public const int StackRequestTargetsFieldNumber = 37;
+ private static readonly pb::FieldCodec _repeated_stackRequestTargets_codec
+ = pb::FieldCodec.ForString(298);
+ private readonly pbc::RepeatedField stackRequestTargets_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField StackRequestTargets {
+ get { return stackRequestTargets_; }
+ }
+
+ /// Field number for the "StackIntervalCheck" field.
+ public const int StackIntervalCheckFieldNumber = 38;
+ private long stackIntervalCheck_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long StackIntervalCheck {
+ get { return stackIntervalCheck_; }
+ set {
+ stackIntervalCheck_ = value;
+ }
+ }
+
+ /// Field number for the "StackIntervalNextCheck" field.
+ public const int StackIntervalNextCheckFieldNumber = 39;
+ private long stackIntervalNextCheck_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long StackIntervalNextCheck {
+ get { return stackIntervalNextCheck_; }
+ set {
+ stackIntervalNextCheck_ = value;
+ }
+ }
+
+ /// Field number for the "StackRecastDelay" field.
+ public const int StackRecastDelayFieldNumber = 40;
+ private long stackRecastDelay_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long StackRecastDelay {
+ get { return stackRecastDelay_; }
+ set {
+ stackRecastDelay_ = value;
+ }
+ }
+
+ /// Field number for the "StackRequestItem" field.
+ public const int StackRequestItemFieldNumber = 41;
+ private string stackRequestItem_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string StackRequestItem {
+ get { return stackRequestItem_; }
+ set {
+ stackRequestItem_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "GiftOfMana" field.
+ public const int GiftOfManaFieldNumber = 42;
+ private bool giftOfMana_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool GiftOfMana {
+ get { return giftOfMana_; }
+ set {
+ giftOfMana_ = value;
+ }
+ }
+
+ /// Field number for the "SpellID" field.
+ public const int SpellIDFieldNumber = 43;
+ private int spellID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int SpellID {
+ get { return spellID_; }
+ set {
+ spellID_ = value;
+ }
+ }
+
+ /// Field number for the "PctAggro" field.
+ public const int PctAggroFieldNumber = 44;
+ private int pctAggro_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int PctAggro {
+ get { return pctAggro_; }
+ set {
+ pctAggro_ = value;
+ }
+ }
+
+ /// Field number for the "Zone" field.
+ public const int ZoneFieldNumber = 45;
+ private string zone_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Zone {
+ get { return zone_; }
+ set {
+ zone_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "MinSick" field.
+ public const int MinSickFieldNumber = 46;
+ private int minSick_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinSick {
+ get { return minSick_; }
+ set {
+ minSick_ = value;
+ }
+ }
+
+ /// Field number for the "AllowSpellSwap" field.
+ public const int AllowSpellSwapFieldNumber = 47;
+ private bool allowSpellSwap_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool AllowSpellSwap {
+ get { return allowSpellSwap_; }
+ set {
+ allowSpellSwap_ = value;
+ }
+ }
+
+ /// Field number for the "NoEarlyRecast" field.
+ public const int NoEarlyRecastFieldNumber = 48;
+ private bool noEarlyRecast_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoEarlyRecast {
+ get { return noEarlyRecast_; }
+ set {
+ noEarlyRecast_ = value;
+ }
+ }
+
+ /// Field number for the "NoStack" field.
+ public const int NoStackFieldNumber = 49;
+ private bool noStack_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoStack {
+ get { return noStack_; }
+ set {
+ noStack_ = value;
+ }
+ }
+
+ /// Field number for the "TriggerSpell" field.
+ public const int TriggerSpellFieldNumber = 50;
+ private string triggerSpell_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string TriggerSpell {
+ get { return triggerSpell_; }
+ set {
+ triggerSpell_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "BeforeSpell" field.
+ public const int BeforeSpellFieldNumber = 51;
+ private string beforeSpell_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string BeforeSpell {
+ get { return beforeSpell_; }
+ set {
+ beforeSpell_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "NoInterrupt" field.
+ public const int NoInterruptFieldNumber = 53;
+ private bool noInterrupt_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoInterrupt {
+ get { return noInterrupt_; }
+ set {
+ noInterrupt_ = value;
+ }
+ }
+
+ /// Field number for the "AfterEvent" field.
+ public const int AfterEventFieldNumber = 54;
+ private string afterEvent_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string AfterEvent {
+ get { return afterEvent_; }
+ set {
+ afterEvent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "BeforeEvent" field.
+ public const int BeforeEventFieldNumber = 55;
+ private string beforeEvent_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string BeforeEvent {
+ get { return beforeEvent_; }
+ set {
+ beforeEvent_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "CastIF" field.
+ public const int CastIFFieldNumber = 56;
+ private string castIF_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string CastIF {
+ get { return castIF_; }
+ set {
+ castIF_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Ifs" field.
+ public const int IfsFieldNumber = 57;
+ private string ifs_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Ifs {
+ get { return ifs_; }
+ set {
+ ifs_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "InitName" field.
+ public const int InitNameFieldNumber = 58;
+ private string initName_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string InitName {
+ get { return initName_; }
+ set {
+ initName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ReagentOutOfStock" field.
+ public const int ReagentOutOfStockFieldNumber = 59;
+ private bool reagentOutOfStock_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool ReagentOutOfStock {
+ get { return reagentOutOfStock_; }
+ set {
+ reagentOutOfStock_ = value;
+ }
+ }
+
+ /// Field number for the "SpellInBook" field.
+ public const int SpellInBookFieldNumber = 60;
+ private bool spellInBook_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool SpellInBook {
+ get { return spellInBook_; }
+ set {
+ spellInBook_ = value;
+ }
+ }
+
+ /// Field number for the "SpellIcon" field.
+ public const int SpellIconFieldNumber = 61;
+ private int spellIcon_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int SpellIcon {
+ get { return spellIcon_; }
+ set {
+ spellIcon_ = value;
+ }
+ }
+
+ /// Field number for the "NoMidSongCast" field.
+ public const int NoMidSongCastFieldNumber = 62;
+ private bool noMidSongCast_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool NoMidSongCast {
+ get { return noMidSongCast_; }
+ set {
+ noMidSongCast_ = value;
+ }
+ }
+
+ /// Field number for the "MinDurationBeforeRecast" field.
+ public const int MinDurationBeforeRecastFieldNumber = 63;
+ private long minDurationBeforeRecast_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long MinDurationBeforeRecast {
+ get { return minDurationBeforeRecast_; }
+ set {
+ minDurationBeforeRecast_ = value;
+ }
+ }
+
+ /// Field number for the "IsShortBuff" field.
+ public const int IsShortBuffFieldNumber = 64;
+ private bool isShortBuff_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IsShortBuff {
+ get { return isShortBuff_; }
+ set {
+ isShortBuff_ = value;
+ }
+ }
+
+ /// Field number for the "HealthMax" field.
+ public const int HealthMaxFieldNumber = 65;
+ private int healthMax_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int HealthMax {
+ get { return healthMax_; }
+ set {
+ healthMax_ = value;
+ }
+ }
+
+ /// Field number for the "IgnoreStackRules" field.
+ public const int IgnoreStackRulesFieldNumber = 66;
+ private bool ignoreStackRules_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IgnoreStackRules {
+ get { return ignoreStackRules_; }
+ set {
+ ignoreStackRules_ = value;
+ }
+ }
+
+ /// Field number for the "IsDebuff" field.
+ public const int IsDebuffFieldNumber = 67;
+ private bool isDebuff_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IsDebuff {
+ get { return isDebuff_; }
+ set {
+ isDebuff_ = value;
+ }
+ }
+
+ /// Field number for the "IsDoT" field.
+ public const int IsDoTFieldNumber = 68;
+ private bool isDoT_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IsDoT {
+ get { return isDoT_; }
+ set {
+ isDoT_ = value;
+ }
+ }
+
+ /// Field number for the "Rotate" field.
+ public const int RotateFieldNumber = 69;
+ private bool rotate_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Rotate {
+ get { return rotate_; }
+ set {
+ rotate_ = value;
+ }
+ }
+
+ /// Field number for the "AfterSpell" field.
+ public const int AfterSpellFieldNumber = 70;
+ private string afterSpell_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string AfterSpell {
+ get { return afterSpell_; }
+ set {
+ afterSpell_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Level" field.
+ public const int LevelFieldNumber = 71;
+ private int level_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Level {
+ get { return level_; }
+ set {
+ level_ = value;
+ }
+ }
+
+ /// Field number for the "Description" field.
+ public const int DescriptionFieldNumber = 72;
+ private string description_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Description {
+ get { return description_; }
+ set {
+ description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ResistType" field.
+ public const int ResistTypeFieldNumber = 73;
+ private string resistType_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string ResistType {
+ get { return resistType_; }
+ set {
+ resistType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "ResistAdj" field.
+ public const int ResistAdjFieldNumber = 74;
+ private int resistAdj_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int ResistAdj {
+ get { return resistAdj_; }
+ set {
+ resistAdj_ = value;
+ }
+ }
+
+ /// Field number for the "CastTypeOverride" field.
+ public const int CastTypeOverrideFieldNumber = 75;
+ private global::SpellData.Types.CastingType castTypeOverride_ = global::SpellData.Types.CastingType.Aa;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::SpellData.Types.CastingType CastTypeOverride {
+ get { return castTypeOverride_; }
+ set {
+ castTypeOverride_ = value;
+ }
+ }
+
+ /// Field number for the "CheckForCollection" field.
+ public const int CheckForCollectionFieldNumber = 76;
+ private static readonly pb::FieldCodec _repeated_checkForCollection_codec
+ = pb::FieldCodec.ForString(610);
+ private readonly pbc::RepeatedField checkForCollection_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField CheckForCollection {
+ get { return checkForCollection_; }
+ }
+
+ /// Field number for the "IfsKeys" field.
+ public const int IfsKeysFieldNumber = 77;
+ private string ifsKeys_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string IfsKeys {
+ get { return ifsKeys_; }
+ set {
+ ifsKeys_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "Enabled" field.
+ public const int EnabledFieldNumber = 78;
+ private bool enabled_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Enabled {
+ get { return enabled_; }
+ set {
+ enabled_ = value;
+ }
+ }
+
+ /// Field number for the "IsBuff" field.
+ public const int IsBuffFieldNumber = 79;
+ private bool isBuff_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IsBuff {
+ get { return isBuff_; }
+ set {
+ isBuff_ = value;
+ }
+ }
+
+ /// Field number for the "MinHPTotal" field.
+ public const int MinHPTotalFieldNumber = 80;
+ private int minHPTotal_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinHPTotal {
+ get { return minHPTotal_; }
+ set {
+ minHPTotal_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as SpellData);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(SpellData other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (SpellName != other.SpellName) return false;
+ if (CastName != other.CastName) return false;
+ if (Subcategory != other.Subcategory) return false;
+ if (Category != other.Category) return false;
+ if (CastType != other.CastType) return false;
+ if (TargetType != other.TargetType) return false;
+ if (SpellGem != other.SpellGem) return false;
+ if (GiveUpTimer != other.GiveUpTimer) return false;
+ if (MaxTries != other.MaxTries) return false;
+ if (Duration != other.Duration) return false;
+ if (DurationTotalSeconds != other.DurationTotalSeconds) return false;
+ if (RecastTime != other.RecastTime) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(RecoveryTime, other.RecoveryTime)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MyCastTime, other.MyCastTime)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MyCastTimeInSeconds, other.MyCastTimeInSeconds)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MyRange, other.MyRange)) return false;
+ if (Mana != other.Mana) return false;
+ if (MinMana != other.MinMana) return false;
+ if (MaxMana != other.MaxMana) return false;
+ if (MinHP != other.MinHP) return false;
+ if (HealPct != other.HealPct) return false;
+ if (Debug != other.Debug) return false;
+ if (Reagent != other.Reagent) return false;
+ if (ItemMustEquip != other.ItemMustEquip) return false;
+ if (NoBurn != other.NoBurn) return false;
+ if (NoTarget != other.NoTarget) return false;
+ if (NoAggro != other.NoAggro) return false;
+ if (Mode != other.Mode) return false;
+ if (EnduranceCost != other.EnduranceCost) return false;
+ if (Delay != other.Delay) return false;
+ if (DelayAfterCast != other.DelayAfterCast) return false;
+ if (CastID != other.CastID) return false;
+ if (MinEnd != other.MinEnd) return false;
+ if (CastInvis != other.CastInvis) return false;
+ if (SpellType != other.SpellType) return false;
+ if (CastTarget != other.CastTarget) return false;
+ if(!stackRequestTargets_.Equals(other.stackRequestTargets_)) return false;
+ if (StackIntervalCheck != other.StackIntervalCheck) return false;
+ if (StackIntervalNextCheck != other.StackIntervalNextCheck) return false;
+ if (StackRecastDelay != other.StackRecastDelay) return false;
+ if (StackRequestItem != other.StackRequestItem) return false;
+ if (GiftOfMana != other.GiftOfMana) return false;
+ if (SpellID != other.SpellID) return false;
+ if (PctAggro != other.PctAggro) return false;
+ if (Zone != other.Zone) return false;
+ if (MinSick != other.MinSick) return false;
+ if (AllowSpellSwap != other.AllowSpellSwap) return false;
+ if (NoEarlyRecast != other.NoEarlyRecast) return false;
+ if (NoStack != other.NoStack) return false;
+ if (TriggerSpell != other.TriggerSpell) return false;
+ if (BeforeSpell != other.BeforeSpell) return false;
+ if (NoInterrupt != other.NoInterrupt) return false;
+ if (AfterEvent != other.AfterEvent) return false;
+ if (BeforeEvent != other.BeforeEvent) return false;
+ if (CastIF != other.CastIF) return false;
+ if (Ifs != other.Ifs) return false;
+ if (InitName != other.InitName) return false;
+ if (ReagentOutOfStock != other.ReagentOutOfStock) return false;
+ if (SpellInBook != other.SpellInBook) return false;
+ if (SpellIcon != other.SpellIcon) return false;
+ if (NoMidSongCast != other.NoMidSongCast) return false;
+ if (MinDurationBeforeRecast != other.MinDurationBeforeRecast) return false;
+ if (IsShortBuff != other.IsShortBuff) return false;
+ if (HealthMax != other.HealthMax) return false;
+ if (IgnoreStackRules != other.IgnoreStackRules) return false;
+ if (IsDebuff != other.IsDebuff) return false;
+ if (IsDoT != other.IsDoT) return false;
+ if (Rotate != other.Rotate) return false;
+ if (AfterSpell != other.AfterSpell) return false;
+ if (Level != other.Level) return false;
+ if (Description != other.Description) return false;
+ if (ResistType != other.ResistType) return false;
+ if (ResistAdj != other.ResistAdj) return false;
+ if (CastTypeOverride != other.CastTypeOverride) return false;
+ if(!checkForCollection_.Equals(other.checkForCollection_)) return false;
+ if (IfsKeys != other.IfsKeys) return false;
+ if (Enabled != other.Enabled) return false;
+ if (IsBuff != other.IsBuff) return false;
+ if (MinHPTotal != other.MinHPTotal) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (SpellName.Length != 0) hash ^= SpellName.GetHashCode();
+ if (CastName.Length != 0) hash ^= CastName.GetHashCode();
+ if (Subcategory.Length != 0) hash ^= Subcategory.GetHashCode();
+ if (Category.Length != 0) hash ^= Category.GetHashCode();
+ if (CastType != global::SpellData.Types.CastingType.Aa) hash ^= CastType.GetHashCode();
+ if (TargetType.Length != 0) hash ^= TargetType.GetHashCode();
+ if (SpellGem != 0) hash ^= SpellGem.GetHashCode();
+ if (GiveUpTimer != 0) hash ^= GiveUpTimer.GetHashCode();
+ if (MaxTries != 0) hash ^= MaxTries.GetHashCode();
+ if (Duration != 0) hash ^= Duration.GetHashCode();
+ if (DurationTotalSeconds != 0) hash ^= DurationTotalSeconds.GetHashCode();
+ if (RecastTime != 0) hash ^= RecastTime.GetHashCode();
+ if (RecoveryTime != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(RecoveryTime);
+ if (MyCastTime != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MyCastTime);
+ if (MyCastTimeInSeconds != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MyCastTimeInSeconds);
+ if (MyRange != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MyRange);
+ if (Mana != 0) hash ^= Mana.GetHashCode();
+ if (MinMana != 0) hash ^= MinMana.GetHashCode();
+ if (MaxMana != 0) hash ^= MaxMana.GetHashCode();
+ if (MinHP != 0) hash ^= MinHP.GetHashCode();
+ if (HealPct != 0) hash ^= HealPct.GetHashCode();
+ if (Debug != false) hash ^= Debug.GetHashCode();
+ if (Reagent.Length != 0) hash ^= Reagent.GetHashCode();
+ if (ItemMustEquip != false) hash ^= ItemMustEquip.GetHashCode();
+ if (NoBurn != false) hash ^= NoBurn.GetHashCode();
+ if (NoTarget != false) hash ^= NoTarget.GetHashCode();
+ if (NoAggro != false) hash ^= NoAggro.GetHashCode();
+ if (Mode != 0) hash ^= Mode.GetHashCode();
+ if (EnduranceCost != 0) hash ^= EnduranceCost.GetHashCode();
+ if (Delay != 0) hash ^= Delay.GetHashCode();
+ if (DelayAfterCast != 0) hash ^= DelayAfterCast.GetHashCode();
+ if (CastID != 0) hash ^= CastID.GetHashCode();
+ if (MinEnd != 0) hash ^= MinEnd.GetHashCode();
+ if (CastInvis != false) hash ^= CastInvis.GetHashCode();
+ if (SpellType.Length != 0) hash ^= SpellType.GetHashCode();
+ if (CastTarget.Length != 0) hash ^= CastTarget.GetHashCode();
+ hash ^= stackRequestTargets_.GetHashCode();
+ if (StackIntervalCheck != 0L) hash ^= StackIntervalCheck.GetHashCode();
+ if (StackIntervalNextCheck != 0L) hash ^= StackIntervalNextCheck.GetHashCode();
+ if (StackRecastDelay != 0L) hash ^= StackRecastDelay.GetHashCode();
+ if (StackRequestItem.Length != 0) hash ^= StackRequestItem.GetHashCode();
+ if (GiftOfMana != false) hash ^= GiftOfMana.GetHashCode();
+ if (SpellID != 0) hash ^= SpellID.GetHashCode();
+ if (PctAggro != 0) hash ^= PctAggro.GetHashCode();
+ if (Zone.Length != 0) hash ^= Zone.GetHashCode();
+ if (MinSick != 0) hash ^= MinSick.GetHashCode();
+ if (AllowSpellSwap != false) hash ^= AllowSpellSwap.GetHashCode();
+ if (NoEarlyRecast != false) hash ^= NoEarlyRecast.GetHashCode();
+ if (NoStack != false) hash ^= NoStack.GetHashCode();
+ if (TriggerSpell.Length != 0) hash ^= TriggerSpell.GetHashCode();
+ if (BeforeSpell.Length != 0) hash ^= BeforeSpell.GetHashCode();
+ if (NoInterrupt != false) hash ^= NoInterrupt.GetHashCode();
+ if (AfterEvent.Length != 0) hash ^= AfterEvent.GetHashCode();
+ if (BeforeEvent.Length != 0) hash ^= BeforeEvent.GetHashCode();
+ if (CastIF.Length != 0) hash ^= CastIF.GetHashCode();
+ if (Ifs.Length != 0) hash ^= Ifs.GetHashCode();
+ if (InitName.Length != 0) hash ^= InitName.GetHashCode();
+ if (ReagentOutOfStock != false) hash ^= ReagentOutOfStock.GetHashCode();
+ if (SpellInBook != false) hash ^= SpellInBook.GetHashCode();
+ if (SpellIcon != 0) hash ^= SpellIcon.GetHashCode();
+ if (NoMidSongCast != false) hash ^= NoMidSongCast.GetHashCode();
+ if (MinDurationBeforeRecast != 0L) hash ^= MinDurationBeforeRecast.GetHashCode();
+ if (IsShortBuff != false) hash ^= IsShortBuff.GetHashCode();
+ if (HealthMax != 0) hash ^= HealthMax.GetHashCode();
+ if (IgnoreStackRules != false) hash ^= IgnoreStackRules.GetHashCode();
+ if (IsDebuff != false) hash ^= IsDebuff.GetHashCode();
+ if (IsDoT != false) hash ^= IsDoT.GetHashCode();
+ if (Rotate != false) hash ^= Rotate.GetHashCode();
+ if (AfterSpell.Length != 0) hash ^= AfterSpell.GetHashCode();
+ if (Level != 0) hash ^= Level.GetHashCode();
+ if (Description.Length != 0) hash ^= Description.GetHashCode();
+ if (ResistType.Length != 0) hash ^= ResistType.GetHashCode();
+ if (ResistAdj != 0) hash ^= ResistAdj.GetHashCode();
+ if (CastTypeOverride != global::SpellData.Types.CastingType.Aa) hash ^= CastTypeOverride.GetHashCode();
+ hash ^= checkForCollection_.GetHashCode();
+ if (IfsKeys.Length != 0) hash ^= IfsKeys.GetHashCode();
+ if (Enabled != false) hash ^= Enabled.GetHashCode();
+ if (IsBuff != false) hash ^= IsBuff.GetHashCode();
+ if (MinHPTotal != 0) hash ^= MinHPTotal.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (SpellName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(SpellName);
+ }
+ if (CastName.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(CastName);
+ }
+ if (Subcategory.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Subcategory);
+ }
+ if (Category.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Category);
+ }
+ if (CastType != global::SpellData.Types.CastingType.Aa) {
+ output.WriteRawTag(40);
+ output.WriteEnum((int) CastType);
+ }
+ if (TargetType.Length != 0) {
+ output.WriteRawTag(50);
+ output.WriteString(TargetType);
+ }
+ if (SpellGem != 0) {
+ output.WriteRawTag(56);
+ output.WriteInt32(SpellGem);
+ }
+ if (GiveUpTimer != 0) {
+ output.WriteRawTag(64);
+ output.WriteInt32(GiveUpTimer);
+ }
+ if (MaxTries != 0) {
+ output.WriteRawTag(72);
+ output.WriteInt32(MaxTries);
+ }
+ if (Duration != 0) {
+ output.WriteRawTag(80);
+ output.WriteInt32(Duration);
+ }
+ if (DurationTotalSeconds != 0) {
+ output.WriteRawTag(88);
+ output.WriteInt32(DurationTotalSeconds);
+ }
+ if (RecastTime != 0) {
+ output.WriteRawTag(96);
+ output.WriteInt32(RecastTime);
+ }
+ if (RecoveryTime != 0D) {
+ output.WriteRawTag(105);
+ output.WriteDouble(RecoveryTime);
+ }
+ if (MyCastTime != 0D) {
+ output.WriteRawTag(113);
+ output.WriteDouble(MyCastTime);
+ }
+ if (MyCastTimeInSeconds != 0D) {
+ output.WriteRawTag(121);
+ output.WriteDouble(MyCastTimeInSeconds);
+ }
+ if (MyRange != 0D) {
+ output.WriteRawTag(129, 1);
+ output.WriteDouble(MyRange);
+ }
+ if (Mana != 0) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(Mana);
+ }
+ if (MinMana != 0) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(MinMana);
+ }
+ if (MaxMana != 0) {
+ output.WriteRawTag(152, 1);
+ output.WriteInt32(MaxMana);
+ }
+ if (MinHP != 0) {
+ output.WriteRawTag(160, 1);
+ output.WriteInt32(MinHP);
+ }
+ if (HealPct != 0) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(HealPct);
+ }
+ if (Debug != false) {
+ output.WriteRawTag(176, 1);
+ output.WriteBool(Debug);
+ }
+ if (Reagent.Length != 0) {
+ output.WriteRawTag(186, 1);
+ output.WriteString(Reagent);
+ }
+ if (ItemMustEquip != false) {
+ output.WriteRawTag(192, 1);
+ output.WriteBool(ItemMustEquip);
+ }
+ if (NoBurn != false) {
+ output.WriteRawTag(200, 1);
+ output.WriteBool(NoBurn);
+ }
+ if (NoTarget != false) {
+ output.WriteRawTag(208, 1);
+ output.WriteBool(NoTarget);
+ }
+ if (NoAggro != false) {
+ output.WriteRawTag(216, 1);
+ output.WriteBool(NoAggro);
+ }
+ if (Mode != 0) {
+ output.WriteRawTag(224, 1);
+ output.WriteInt32(Mode);
+ }
+ if (EnduranceCost != 0) {
+ output.WriteRawTag(232, 1);
+ output.WriteInt32(EnduranceCost);
+ }
+ if (Delay != 0) {
+ output.WriteRawTag(240, 1);
+ output.WriteInt32(Delay);
+ }
+ if (DelayAfterCast != 0) {
+ output.WriteRawTag(248, 1);
+ output.WriteInt32(DelayAfterCast);
+ }
+ if (CastID != 0) {
+ output.WriteRawTag(128, 2);
+ output.WriteInt32(CastID);
+ }
+ if (MinEnd != 0) {
+ output.WriteRawTag(136, 2);
+ output.WriteInt32(MinEnd);
+ }
+ if (CastInvis != false) {
+ output.WriteRawTag(144, 2);
+ output.WriteBool(CastInvis);
+ }
+ if (SpellType.Length != 0) {
+ output.WriteRawTag(154, 2);
+ output.WriteString(SpellType);
+ }
+ if (CastTarget.Length != 0) {
+ output.WriteRawTag(162, 2);
+ output.WriteString(CastTarget);
+ }
+ stackRequestTargets_.WriteTo(output, _repeated_stackRequestTargets_codec);
+ if (StackIntervalCheck != 0L) {
+ output.WriteRawTag(176, 2);
+ output.WriteInt64(StackIntervalCheck);
+ }
+ if (StackIntervalNextCheck != 0L) {
+ output.WriteRawTag(184, 2);
+ output.WriteInt64(StackIntervalNextCheck);
+ }
+ if (StackRecastDelay != 0L) {
+ output.WriteRawTag(192, 2);
+ output.WriteInt64(StackRecastDelay);
+ }
+ if (StackRequestItem.Length != 0) {
+ output.WriteRawTag(202, 2);
+ output.WriteString(StackRequestItem);
+ }
+ if (GiftOfMana != false) {
+ output.WriteRawTag(208, 2);
+ output.WriteBool(GiftOfMana);
+ }
+ if (SpellID != 0) {
+ output.WriteRawTag(216, 2);
+ output.WriteInt32(SpellID);
+ }
+ if (PctAggro != 0) {
+ output.WriteRawTag(224, 2);
+ output.WriteInt32(PctAggro);
+ }
+ if (Zone.Length != 0) {
+ output.WriteRawTag(234, 2);
+ output.WriteString(Zone);
+ }
+ if (MinSick != 0) {
+ output.WriteRawTag(240, 2);
+ output.WriteInt32(MinSick);
+ }
+ if (AllowSpellSwap != false) {
+ output.WriteRawTag(248, 2);
+ output.WriteBool(AllowSpellSwap);
+ }
+ if (NoEarlyRecast != false) {
+ output.WriteRawTag(128, 3);
+ output.WriteBool(NoEarlyRecast);
+ }
+ if (NoStack != false) {
+ output.WriteRawTag(136, 3);
+ output.WriteBool(NoStack);
+ }
+ if (TriggerSpell.Length != 0) {
+ output.WriteRawTag(146, 3);
+ output.WriteString(TriggerSpell);
+ }
+ if (BeforeSpell.Length != 0) {
+ output.WriteRawTag(154, 3);
+ output.WriteString(BeforeSpell);
+ }
+ if (NoInterrupt != false) {
+ output.WriteRawTag(168, 3);
+ output.WriteBool(NoInterrupt);
+ }
+ if (AfterEvent.Length != 0) {
+ output.WriteRawTag(178, 3);
+ output.WriteString(AfterEvent);
+ }
+ if (BeforeEvent.Length != 0) {
+ output.WriteRawTag(186, 3);
+ output.WriteString(BeforeEvent);
+ }
+ if (CastIF.Length != 0) {
+ output.WriteRawTag(194, 3);
+ output.WriteString(CastIF);
+ }
+ if (Ifs.Length != 0) {
+ output.WriteRawTag(202, 3);
+ output.WriteString(Ifs);
+ }
+ if (InitName.Length != 0) {
+ output.WriteRawTag(210, 3);
+ output.WriteString(InitName);
+ }
+ if (ReagentOutOfStock != false) {
+ output.WriteRawTag(216, 3);
+ output.WriteBool(ReagentOutOfStock);
+ }
+ if (SpellInBook != false) {
+ output.WriteRawTag(224, 3);
+ output.WriteBool(SpellInBook);
+ }
+ if (SpellIcon != 0) {
+ output.WriteRawTag(232, 3);
+ output.WriteInt32(SpellIcon);
+ }
+ if (NoMidSongCast != false) {
+ output.WriteRawTag(240, 3);
+ output.WriteBool(NoMidSongCast);
+ }
+ if (MinDurationBeforeRecast != 0L) {
+ output.WriteRawTag(248, 3);
+ output.WriteInt64(MinDurationBeforeRecast);
+ }
+ if (IsShortBuff != false) {
+ output.WriteRawTag(128, 4);
+ output.WriteBool(IsShortBuff);
+ }
+ if (HealthMax != 0) {
+ output.WriteRawTag(136, 4);
+ output.WriteInt32(HealthMax);
+ }
+ if (IgnoreStackRules != false) {
+ output.WriteRawTag(144, 4);
+ output.WriteBool(IgnoreStackRules);
+ }
+ if (IsDebuff != false) {
+ output.WriteRawTag(152, 4);
+ output.WriteBool(IsDebuff);
+ }
+ if (IsDoT != false) {
+ output.WriteRawTag(160, 4);
+ output.WriteBool(IsDoT);
+ }
+ if (Rotate != false) {
+ output.WriteRawTag(168, 4);
+ output.WriteBool(Rotate);
+ }
+ if (AfterSpell.Length != 0) {
+ output.WriteRawTag(178, 4);
+ output.WriteString(AfterSpell);
+ }
+ if (Level != 0) {
+ output.WriteRawTag(184, 4);
+ output.WriteInt32(Level);
+ }
+ if (Description.Length != 0) {
+ output.WriteRawTag(194, 4);
+ output.WriteString(Description);
+ }
+ if (ResistType.Length != 0) {
+ output.WriteRawTag(202, 4);
+ output.WriteString(ResistType);
+ }
+ if (ResistAdj != 0) {
+ output.WriteRawTag(208, 4);
+ output.WriteInt32(ResistAdj);
+ }
+ if (CastTypeOverride != global::SpellData.Types.CastingType.Aa) {
+ output.WriteRawTag(216, 4);
+ output.WriteEnum((int) CastTypeOverride);
+ }
+ checkForCollection_.WriteTo(output, _repeated_checkForCollection_codec);
+ if (IfsKeys.Length != 0) {
+ output.WriteRawTag(234, 4);
+ output.WriteString(IfsKeys);
+ }
+ if (Enabled != false) {
+ output.WriteRawTag(240, 4);
+ output.WriteBool(Enabled);
+ }
+ if (IsBuff != false) {
+ output.WriteRawTag(248, 4);
+ output.WriteBool(IsBuff);
+ }
+ if (MinHPTotal != 0) {
+ output.WriteRawTag(128, 5);
+ output.WriteInt32(MinHPTotal);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (SpellName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(SpellName);
+ }
+ if (CastName.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(CastName);
+ }
+ if (Subcategory.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Subcategory);
+ }
+ if (Category.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(Category);
+ }
+ if (CastType != global::SpellData.Types.CastingType.Aa) {
+ output.WriteRawTag(40);
+ output.WriteEnum((int) CastType);
+ }
+ if (TargetType.Length != 0) {
+ output.WriteRawTag(50);
+ output.WriteString(TargetType);
+ }
+ if (SpellGem != 0) {
+ output.WriteRawTag(56);
+ output.WriteInt32(SpellGem);
+ }
+ if (GiveUpTimer != 0) {
+ output.WriteRawTag(64);
+ output.WriteInt32(GiveUpTimer);
+ }
+ if (MaxTries != 0) {
+ output.WriteRawTag(72);
+ output.WriteInt32(MaxTries);
+ }
+ if (Duration != 0) {
+ output.WriteRawTag(80);
+ output.WriteInt32(Duration);
+ }
+ if (DurationTotalSeconds != 0) {
+ output.WriteRawTag(88);
+ output.WriteInt32(DurationTotalSeconds);
+ }
+ if (RecastTime != 0) {
+ output.WriteRawTag(96);
+ output.WriteInt32(RecastTime);
+ }
+ if (RecoveryTime != 0D) {
+ output.WriteRawTag(105);
+ output.WriteDouble(RecoveryTime);
+ }
+ if (MyCastTime != 0D) {
+ output.WriteRawTag(113);
+ output.WriteDouble(MyCastTime);
+ }
+ if (MyCastTimeInSeconds != 0D) {
+ output.WriteRawTag(121);
+ output.WriteDouble(MyCastTimeInSeconds);
+ }
+ if (MyRange != 0D) {
+ output.WriteRawTag(129, 1);
+ output.WriteDouble(MyRange);
+ }
+ if (Mana != 0) {
+ output.WriteRawTag(136, 1);
+ output.WriteInt32(Mana);
+ }
+ if (MinMana != 0) {
+ output.WriteRawTag(144, 1);
+ output.WriteInt32(MinMana);
+ }
+ if (MaxMana != 0) {
+ output.WriteRawTag(152, 1);
+ output.WriteInt32(MaxMana);
+ }
+ if (MinHP != 0) {
+ output.WriteRawTag(160, 1);
+ output.WriteInt32(MinHP);
+ }
+ if (HealPct != 0) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(HealPct);
+ }
+ if (Debug != false) {
+ output.WriteRawTag(176, 1);
+ output.WriteBool(Debug);
+ }
+ if (Reagent.Length != 0) {
+ output.WriteRawTag(186, 1);
+ output.WriteString(Reagent);
+ }
+ if (ItemMustEquip != false) {
+ output.WriteRawTag(192, 1);
+ output.WriteBool(ItemMustEquip);
+ }
+ if (NoBurn != false) {
+ output.WriteRawTag(200, 1);
+ output.WriteBool(NoBurn);
+ }
+ if (NoTarget != false) {
+ output.WriteRawTag(208, 1);
+ output.WriteBool(NoTarget);
+ }
+ if (NoAggro != false) {
+ output.WriteRawTag(216, 1);
+ output.WriteBool(NoAggro);
+ }
+ if (Mode != 0) {
+ output.WriteRawTag(224, 1);
+ output.WriteInt32(Mode);
+ }
+ if (EnduranceCost != 0) {
+ output.WriteRawTag(232, 1);
+ output.WriteInt32(EnduranceCost);
+ }
+ if (Delay != 0) {
+ output.WriteRawTag(240, 1);
+ output.WriteInt32(Delay);
+ }
+ if (DelayAfterCast != 0) {
+ output.WriteRawTag(248, 1);
+ output.WriteInt32(DelayAfterCast);
+ }
+ if (CastID != 0) {
+ output.WriteRawTag(128, 2);
+ output.WriteInt32(CastID);
+ }
+ if (MinEnd != 0) {
+ output.WriteRawTag(136, 2);
+ output.WriteInt32(MinEnd);
+ }
+ if (CastInvis != false) {
+ output.WriteRawTag(144, 2);
+ output.WriteBool(CastInvis);
+ }
+ if (SpellType.Length != 0) {
+ output.WriteRawTag(154, 2);
+ output.WriteString(SpellType);
+ }
+ if (CastTarget.Length != 0) {
+ output.WriteRawTag(162, 2);
+ output.WriteString(CastTarget);
+ }
+ stackRequestTargets_.WriteTo(ref output, _repeated_stackRequestTargets_codec);
+ if (StackIntervalCheck != 0L) {
+ output.WriteRawTag(176, 2);
+ output.WriteInt64(StackIntervalCheck);
+ }
+ if (StackIntervalNextCheck != 0L) {
+ output.WriteRawTag(184, 2);
+ output.WriteInt64(StackIntervalNextCheck);
+ }
+ if (StackRecastDelay != 0L) {
+ output.WriteRawTag(192, 2);
+ output.WriteInt64(StackRecastDelay);
+ }
+ if (StackRequestItem.Length != 0) {
+ output.WriteRawTag(202, 2);
+ output.WriteString(StackRequestItem);
+ }
+ if (GiftOfMana != false) {
+ output.WriteRawTag(208, 2);
+ output.WriteBool(GiftOfMana);
+ }
+ if (SpellID != 0) {
+ output.WriteRawTag(216, 2);
+ output.WriteInt32(SpellID);
+ }
+ if (PctAggro != 0) {
+ output.WriteRawTag(224, 2);
+ output.WriteInt32(PctAggro);
+ }
+ if (Zone.Length != 0) {
+ output.WriteRawTag(234, 2);
+ output.WriteString(Zone);
+ }
+ if (MinSick != 0) {
+ output.WriteRawTag(240, 2);
+ output.WriteInt32(MinSick);
+ }
+ if (AllowSpellSwap != false) {
+ output.WriteRawTag(248, 2);
+ output.WriteBool(AllowSpellSwap);
+ }
+ if (NoEarlyRecast != false) {
+ output.WriteRawTag(128, 3);
+ output.WriteBool(NoEarlyRecast);
+ }
+ if (NoStack != false) {
+ output.WriteRawTag(136, 3);
+ output.WriteBool(NoStack);
+ }
+ if (TriggerSpell.Length != 0) {
+ output.WriteRawTag(146, 3);
+ output.WriteString(TriggerSpell);
+ }
+ if (BeforeSpell.Length != 0) {
+ output.WriteRawTag(154, 3);
+ output.WriteString(BeforeSpell);
+ }
+ if (NoInterrupt != false) {
+ output.WriteRawTag(168, 3);
+ output.WriteBool(NoInterrupt);
+ }
+ if (AfterEvent.Length != 0) {
+ output.WriteRawTag(178, 3);
+ output.WriteString(AfterEvent);
+ }
+ if (BeforeEvent.Length != 0) {
+ output.WriteRawTag(186, 3);
+ output.WriteString(BeforeEvent);
+ }
+ if (CastIF.Length != 0) {
+ output.WriteRawTag(194, 3);
+ output.WriteString(CastIF);
+ }
+ if (Ifs.Length != 0) {
+ output.WriteRawTag(202, 3);
+ output.WriteString(Ifs);
+ }
+ if (InitName.Length != 0) {
+ output.WriteRawTag(210, 3);
+ output.WriteString(InitName);
+ }
+ if (ReagentOutOfStock != false) {
+ output.WriteRawTag(216, 3);
+ output.WriteBool(ReagentOutOfStock);
+ }
+ if (SpellInBook != false) {
+ output.WriteRawTag(224, 3);
+ output.WriteBool(SpellInBook);
+ }
+ if (SpellIcon != 0) {
+ output.WriteRawTag(232, 3);
+ output.WriteInt32(SpellIcon);
+ }
+ if (NoMidSongCast != false) {
+ output.WriteRawTag(240, 3);
+ output.WriteBool(NoMidSongCast);
+ }
+ if (MinDurationBeforeRecast != 0L) {
+ output.WriteRawTag(248, 3);
+ output.WriteInt64(MinDurationBeforeRecast);
+ }
+ if (IsShortBuff != false) {
+ output.WriteRawTag(128, 4);
+ output.WriteBool(IsShortBuff);
+ }
+ if (HealthMax != 0) {
+ output.WriteRawTag(136, 4);
+ output.WriteInt32(HealthMax);
+ }
+ if (IgnoreStackRules != false) {
+ output.WriteRawTag(144, 4);
+ output.WriteBool(IgnoreStackRules);
+ }
+ if (IsDebuff != false) {
+ output.WriteRawTag(152, 4);
+ output.WriteBool(IsDebuff);
+ }
+ if (IsDoT != false) {
+ output.WriteRawTag(160, 4);
+ output.WriteBool(IsDoT);
+ }
+ if (Rotate != false) {
+ output.WriteRawTag(168, 4);
+ output.WriteBool(Rotate);
+ }
+ if (AfterSpell.Length != 0) {
+ output.WriteRawTag(178, 4);
+ output.WriteString(AfterSpell);
+ }
+ if (Level != 0) {
+ output.WriteRawTag(184, 4);
+ output.WriteInt32(Level);
+ }
+ if (Description.Length != 0) {
+ output.WriteRawTag(194, 4);
+ output.WriteString(Description);
+ }
+ if (ResistType.Length != 0) {
+ output.WriteRawTag(202, 4);
+ output.WriteString(ResistType);
+ }
+ if (ResistAdj != 0) {
+ output.WriteRawTag(208, 4);
+ output.WriteInt32(ResistAdj);
+ }
+ if (CastTypeOverride != global::SpellData.Types.CastingType.Aa) {
+ output.WriteRawTag(216, 4);
+ output.WriteEnum((int) CastTypeOverride);
+ }
+ checkForCollection_.WriteTo(ref output, _repeated_checkForCollection_codec);
+ if (IfsKeys.Length != 0) {
+ output.WriteRawTag(234, 4);
+ output.WriteString(IfsKeys);
+ }
+ if (Enabled != false) {
+ output.WriteRawTag(240, 4);
+ output.WriteBool(Enabled);
+ }
+ if (IsBuff != false) {
+ output.WriteRawTag(248, 4);
+ output.WriteBool(IsBuff);
+ }
+ if (MinHPTotal != 0) {
+ output.WriteRawTag(128, 5);
+ output.WriteInt32(MinHPTotal);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (SpellName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(SpellName);
+ }
+ if (CastName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(CastName);
+ }
+ if (Subcategory.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Subcategory);
+ }
+ if (Category.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Category);
+ }
+ if (CastType != global::SpellData.Types.CastingType.Aa) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CastType);
+ }
+ if (TargetType.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(TargetType);
+ }
+ if (SpellGem != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpellGem);
+ }
+ if (GiveUpTimer != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(GiveUpTimer);
+ }
+ if (MaxTries != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxTries);
+ }
+ if (Duration != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Duration);
+ }
+ if (DurationTotalSeconds != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(DurationTotalSeconds);
+ }
+ if (RecastTime != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecastTime);
+ }
+ if (RecoveryTime != 0D) {
+ size += 1 + 8;
+ }
+ if (MyCastTime != 0D) {
+ size += 1 + 8;
+ }
+ if (MyCastTimeInSeconds != 0D) {
+ size += 1 + 8;
+ }
+ if (MyRange != 0D) {
+ size += 2 + 8;
+ }
+ if (Mana != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Mana);
+ }
+ if (MinMana != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinMana);
+ }
+ if (MaxMana != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MaxMana);
+ }
+ if (MinHP != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinHP);
+ }
+ if (HealPct != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(HealPct);
+ }
+ if (Debug != false) {
+ size += 2 + 1;
+ }
+ if (Reagent.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(Reagent);
+ }
+ if (ItemMustEquip != false) {
+ size += 2 + 1;
+ }
+ if (NoBurn != false) {
+ size += 2 + 1;
+ }
+ if (NoTarget != false) {
+ size += 2 + 1;
+ }
+ if (NoAggro != false) {
+ size += 2 + 1;
+ }
+ if (Mode != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Mode);
+ }
+ if (EnduranceCost != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(EnduranceCost);
+ }
+ if (Delay != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Delay);
+ }
+ if (DelayAfterCast != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(DelayAfterCast);
+ }
+ if (CastID != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(CastID);
+ }
+ if (MinEnd != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinEnd);
+ }
+ if (CastInvis != false) {
+ size += 2 + 1;
+ }
+ if (SpellType.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(SpellType);
+ }
+ if (CastTarget.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(CastTarget);
+ }
+ size += stackRequestTargets_.CalculateSize(_repeated_stackRequestTargets_codec);
+ if (StackIntervalCheck != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(StackIntervalCheck);
+ }
+ if (StackIntervalNextCheck != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(StackIntervalNextCheck);
+ }
+ if (StackRecastDelay != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(StackRecastDelay);
+ }
+ if (StackRequestItem.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(StackRequestItem);
+ }
+ if (GiftOfMana != false) {
+ size += 2 + 1;
+ }
+ if (SpellID != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(SpellID);
+ }
+ if (PctAggro != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(PctAggro);
+ }
+ if (Zone.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(Zone);
+ }
+ if (MinSick != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinSick);
+ }
+ if (AllowSpellSwap != false) {
+ size += 2 + 1;
+ }
+ if (NoEarlyRecast != false) {
+ size += 2 + 1;
+ }
+ if (NoStack != false) {
+ size += 2 + 1;
+ }
+ if (TriggerSpell.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(TriggerSpell);
+ }
+ if (BeforeSpell.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(BeforeSpell);
+ }
+ if (NoInterrupt != false) {
+ size += 2 + 1;
+ }
+ if (AfterEvent.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(AfterEvent);
+ }
+ if (BeforeEvent.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(BeforeEvent);
+ }
+ if (CastIF.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(CastIF);
+ }
+ if (Ifs.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(Ifs);
+ }
+ if (InitName.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(InitName);
+ }
+ if (ReagentOutOfStock != false) {
+ size += 2 + 1;
+ }
+ if (SpellInBook != false) {
+ size += 2 + 1;
+ }
+ if (SpellIcon != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(SpellIcon);
+ }
+ if (NoMidSongCast != false) {
+ size += 2 + 1;
+ }
+ if (MinDurationBeforeRecast != 0L) {
+ size += 2 + pb::CodedOutputStream.ComputeInt64Size(MinDurationBeforeRecast);
+ }
+ if (IsShortBuff != false) {
+ size += 2 + 1;
+ }
+ if (HealthMax != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(HealthMax);
+ }
+ if (IgnoreStackRules != false) {
+ size += 2 + 1;
+ }
+ if (IsDebuff != false) {
+ size += 2 + 1;
+ }
+ if (IsDoT != false) {
+ size += 2 + 1;
+ }
+ if (Rotate != false) {
+ size += 2 + 1;
+ }
+ if (AfterSpell.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(AfterSpell);
+ }
+ if (Level != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(Level);
+ }
+ if (Description.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(Description);
+ }
+ if (ResistType.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(ResistType);
+ }
+ if (ResistAdj != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(ResistAdj);
+ }
+ if (CastTypeOverride != global::SpellData.Types.CastingType.Aa) {
+ size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) CastTypeOverride);
+ }
+ size += checkForCollection_.CalculateSize(_repeated_checkForCollection_codec);
+ if (IfsKeys.Length != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeStringSize(IfsKeys);
+ }
+ if (Enabled != false) {
+ size += 2 + 1;
+ }
+ if (IsBuff != false) {
+ size += 2 + 1;
+ }
+ if (MinHPTotal != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinHPTotal);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(SpellData other) {
+ if (other == null) {
+ return;
+ }
+ if (other.SpellName.Length != 0) {
+ SpellName = other.SpellName;
+ }
+ if (other.CastName.Length != 0) {
+ CastName = other.CastName;
+ }
+ if (other.Subcategory.Length != 0) {
+ Subcategory = other.Subcategory;
+ }
+ if (other.Category.Length != 0) {
+ Category = other.Category;
+ }
+ if (other.CastType != global::SpellData.Types.CastingType.Aa) {
+ CastType = other.CastType;
+ }
+ if (other.TargetType.Length != 0) {
+ TargetType = other.TargetType;
+ }
+ if (other.SpellGem != 0) {
+ SpellGem = other.SpellGem;
+ }
+ if (other.GiveUpTimer != 0) {
+ GiveUpTimer = other.GiveUpTimer;
+ }
+ if (other.MaxTries != 0) {
+ MaxTries = other.MaxTries;
+ }
+ if (other.Duration != 0) {
+ Duration = other.Duration;
+ }
+ if (other.DurationTotalSeconds != 0) {
+ DurationTotalSeconds = other.DurationTotalSeconds;
+ }
+ if (other.RecastTime != 0) {
+ RecastTime = other.RecastTime;
+ }
+ if (other.RecoveryTime != 0D) {
+ RecoveryTime = other.RecoveryTime;
+ }
+ if (other.MyCastTime != 0D) {
+ MyCastTime = other.MyCastTime;
+ }
+ if (other.MyCastTimeInSeconds != 0D) {
+ MyCastTimeInSeconds = other.MyCastTimeInSeconds;
+ }
+ if (other.MyRange != 0D) {
+ MyRange = other.MyRange;
+ }
+ if (other.Mana != 0) {
+ Mana = other.Mana;
+ }
+ if (other.MinMana != 0) {
+ MinMana = other.MinMana;
+ }
+ if (other.MaxMana != 0) {
+ MaxMana = other.MaxMana;
+ }
+ if (other.MinHP != 0) {
+ MinHP = other.MinHP;
+ }
+ if (other.HealPct != 0) {
+ HealPct = other.HealPct;
+ }
+ if (other.Debug != false) {
+ Debug = other.Debug;
+ }
+ if (other.Reagent.Length != 0) {
+ Reagent = other.Reagent;
+ }
+ if (other.ItemMustEquip != false) {
+ ItemMustEquip = other.ItemMustEquip;
+ }
+ if (other.NoBurn != false) {
+ NoBurn = other.NoBurn;
+ }
+ if (other.NoTarget != false) {
+ NoTarget = other.NoTarget;
+ }
+ if (other.NoAggro != false) {
+ NoAggro = other.NoAggro;
+ }
+ if (other.Mode != 0) {
+ Mode = other.Mode;
+ }
+ if (other.EnduranceCost != 0) {
+ EnduranceCost = other.EnduranceCost;
+ }
+ if (other.Delay != 0) {
+ Delay = other.Delay;
+ }
+ if (other.DelayAfterCast != 0) {
+ DelayAfterCast = other.DelayAfterCast;
+ }
+ if (other.CastID != 0) {
+ CastID = other.CastID;
+ }
+ if (other.MinEnd != 0) {
+ MinEnd = other.MinEnd;
+ }
+ if (other.CastInvis != false) {
+ CastInvis = other.CastInvis;
+ }
+ if (other.SpellType.Length != 0) {
+ SpellType = other.SpellType;
+ }
+ if (other.CastTarget.Length != 0) {
+ CastTarget = other.CastTarget;
+ }
+ stackRequestTargets_.Add(other.stackRequestTargets_);
+ if (other.StackIntervalCheck != 0L) {
+ StackIntervalCheck = other.StackIntervalCheck;
+ }
+ if (other.StackIntervalNextCheck != 0L) {
+ StackIntervalNextCheck = other.StackIntervalNextCheck;
+ }
+ if (other.StackRecastDelay != 0L) {
+ StackRecastDelay = other.StackRecastDelay;
+ }
+ if (other.StackRequestItem.Length != 0) {
+ StackRequestItem = other.StackRequestItem;
+ }
+ if (other.GiftOfMana != false) {
+ GiftOfMana = other.GiftOfMana;
+ }
+ if (other.SpellID != 0) {
+ SpellID = other.SpellID;
+ }
+ if (other.PctAggro != 0) {
+ PctAggro = other.PctAggro;
+ }
+ if (other.Zone.Length != 0) {
+ Zone = other.Zone;
+ }
+ if (other.MinSick != 0) {
+ MinSick = other.MinSick;
+ }
+ if (other.AllowSpellSwap != false) {
+ AllowSpellSwap = other.AllowSpellSwap;
+ }
+ if (other.NoEarlyRecast != false) {
+ NoEarlyRecast = other.NoEarlyRecast;
+ }
+ if (other.NoStack != false) {
+ NoStack = other.NoStack;
+ }
+ if (other.TriggerSpell.Length != 0) {
+ TriggerSpell = other.TriggerSpell;
+ }
+ if (other.BeforeSpell.Length != 0) {
+ BeforeSpell = other.BeforeSpell;
+ }
+ if (other.NoInterrupt != false) {
+ NoInterrupt = other.NoInterrupt;
+ }
+ if (other.AfterEvent.Length != 0) {
+ AfterEvent = other.AfterEvent;
+ }
+ if (other.BeforeEvent.Length != 0) {
+ BeforeEvent = other.BeforeEvent;
+ }
+ if (other.CastIF.Length != 0) {
+ CastIF = other.CastIF;
+ }
+ if (other.Ifs.Length != 0) {
+ Ifs = other.Ifs;
+ }
+ if (other.InitName.Length != 0) {
+ InitName = other.InitName;
+ }
+ if (other.ReagentOutOfStock != false) {
+ ReagentOutOfStock = other.ReagentOutOfStock;
+ }
+ if (other.SpellInBook != false) {
+ SpellInBook = other.SpellInBook;
+ }
+ if (other.SpellIcon != 0) {
+ SpellIcon = other.SpellIcon;
+ }
+ if (other.NoMidSongCast != false) {
+ NoMidSongCast = other.NoMidSongCast;
+ }
+ if (other.MinDurationBeforeRecast != 0L) {
+ MinDurationBeforeRecast = other.MinDurationBeforeRecast;
+ }
+ if (other.IsShortBuff != false) {
+ IsShortBuff = other.IsShortBuff;
+ }
+ if (other.HealthMax != 0) {
+ HealthMax = other.HealthMax;
+ }
+ if (other.IgnoreStackRules != false) {
+ IgnoreStackRules = other.IgnoreStackRules;
+ }
+ if (other.IsDebuff != false) {
+ IsDebuff = other.IsDebuff;
+ }
+ if (other.IsDoT != false) {
+ IsDoT = other.IsDoT;
+ }
+ if (other.Rotate != false) {
+ Rotate = other.Rotate;
+ }
+ if (other.AfterSpell.Length != 0) {
+ AfterSpell = other.AfterSpell;
+ }
+ if (other.Level != 0) {
+ Level = other.Level;
+ }
+ if (other.Description.Length != 0) {
+ Description = other.Description;
+ }
+ if (other.ResistType.Length != 0) {
+ ResistType = other.ResistType;
+ }
+ if (other.ResistAdj != 0) {
+ ResistAdj = other.ResistAdj;
+ }
+ if (other.CastTypeOverride != global::SpellData.Types.CastingType.Aa) {
+ CastTypeOverride = other.CastTypeOverride;
+ }
+ checkForCollection_.Add(other.checkForCollection_);
+ if (other.IfsKeys.Length != 0) {
+ IfsKeys = other.IfsKeys;
+ }
+ if (other.Enabled != false) {
+ Enabled = other.Enabled;
+ }
+ if (other.IsBuff != false) {
+ IsBuff = other.IsBuff;
+ }
+ if (other.MinHPTotal != 0) {
+ MinHPTotal = other.MinHPTotal;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ SpellName = input.ReadString();
+ break;
+ }
+ case 18: {
+ CastName = input.ReadString();
+ break;
+ }
+ case 26: {
+ Subcategory = input.ReadString();
+ break;
+ }
+ case 34: {
+ Category = input.ReadString();
+ break;
+ }
+ case 40: {
+ CastType = (global::SpellData.Types.CastingType) input.ReadEnum();
+ break;
+ }
+ case 50: {
+ TargetType = input.ReadString();
+ break;
+ }
+ case 56: {
+ SpellGem = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ GiveUpTimer = input.ReadInt32();
+ break;
+ }
+ case 72: {
+ MaxTries = input.ReadInt32();
+ break;
+ }
+ case 80: {
+ Duration = input.ReadInt32();
+ break;
+ }
+ case 88: {
+ DurationTotalSeconds = input.ReadInt32();
+ break;
+ }
+ case 96: {
+ RecastTime = input.ReadInt32();
+ break;
+ }
+ case 105: {
+ RecoveryTime = input.ReadDouble();
+ break;
+ }
+ case 113: {
+ MyCastTime = input.ReadDouble();
+ break;
+ }
+ case 121: {
+ MyCastTimeInSeconds = input.ReadDouble();
+ break;
+ }
+ case 129: {
+ MyRange = input.ReadDouble();
+ break;
+ }
+ case 136: {
+ Mana = input.ReadInt32();
+ break;
+ }
+ case 144: {
+ MinMana = input.ReadInt32();
+ break;
+ }
+ case 152: {
+ MaxMana = input.ReadInt32();
+ break;
+ }
+ case 160: {
+ MinHP = input.ReadInt32();
+ break;
+ }
+ case 168: {
+ HealPct = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ Debug = input.ReadBool();
+ break;
+ }
+ case 186: {
+ Reagent = input.ReadString();
+ break;
+ }
+ case 192: {
+ ItemMustEquip = input.ReadBool();
+ break;
+ }
+ case 200: {
+ NoBurn = input.ReadBool();
+ break;
+ }
+ case 208: {
+ NoTarget = input.ReadBool();
+ break;
+ }
+ case 216: {
+ NoAggro = input.ReadBool();
+ break;
+ }
+ case 224: {
+ Mode = input.ReadInt32();
+ break;
+ }
+ case 232: {
+ EnduranceCost = input.ReadInt32();
+ break;
+ }
+ case 240: {
+ Delay = input.ReadInt32();
+ break;
+ }
+ case 248: {
+ DelayAfterCast = input.ReadInt32();
+ break;
+ }
+ case 256: {
+ CastID = input.ReadInt32();
+ break;
+ }
+ case 264: {
+ MinEnd = input.ReadInt32();
+ break;
+ }
+ case 272: {
+ CastInvis = input.ReadBool();
+ break;
+ }
+ case 282: {
+ SpellType = input.ReadString();
+ break;
+ }
+ case 290: {
+ CastTarget = input.ReadString();
+ break;
+ }
+ case 298: {
+ stackRequestTargets_.AddEntriesFrom(input, _repeated_stackRequestTargets_codec);
+ break;
+ }
+ case 304: {
+ StackIntervalCheck = input.ReadInt64();
+ break;
+ }
+ case 312: {
+ StackIntervalNextCheck = input.ReadInt64();
+ break;
+ }
+ case 320: {
+ StackRecastDelay = input.ReadInt64();
+ break;
+ }
+ case 330: {
+ StackRequestItem = input.ReadString();
+ break;
+ }
+ case 336: {
+ GiftOfMana = input.ReadBool();
+ break;
+ }
+ case 344: {
+ SpellID = input.ReadInt32();
+ break;
+ }
+ case 352: {
+ PctAggro = input.ReadInt32();
+ break;
+ }
+ case 362: {
+ Zone = input.ReadString();
+ break;
+ }
+ case 368: {
+ MinSick = input.ReadInt32();
+ break;
+ }
+ case 376: {
+ AllowSpellSwap = input.ReadBool();
+ break;
+ }
+ case 384: {
+ NoEarlyRecast = input.ReadBool();
+ break;
+ }
+ case 392: {
+ NoStack = input.ReadBool();
+ break;
+ }
+ case 402: {
+ TriggerSpell = input.ReadString();
+ break;
+ }
+ case 410: {
+ BeforeSpell = input.ReadString();
+ break;
+ }
+ case 424: {
+ NoInterrupt = input.ReadBool();
+ break;
+ }
+ case 434: {
+ AfterEvent = input.ReadString();
+ break;
+ }
+ case 442: {
+ BeforeEvent = input.ReadString();
+ break;
+ }
+ case 450: {
+ CastIF = input.ReadString();
+ break;
+ }
+ case 458: {
+ Ifs = input.ReadString();
+ break;
+ }
+ case 466: {
+ InitName = input.ReadString();
+ break;
+ }
+ case 472: {
+ ReagentOutOfStock = input.ReadBool();
+ break;
+ }
+ case 480: {
+ SpellInBook = input.ReadBool();
+ break;
+ }
+ case 488: {
+ SpellIcon = input.ReadInt32();
+ break;
+ }
+ case 496: {
+ NoMidSongCast = input.ReadBool();
+ break;
+ }
+ case 504: {
+ MinDurationBeforeRecast = input.ReadInt64();
+ break;
+ }
+ case 512: {
+ IsShortBuff = input.ReadBool();
+ break;
+ }
+ case 520: {
+ HealthMax = input.ReadInt32();
+ break;
+ }
+ case 528: {
+ IgnoreStackRules = input.ReadBool();
+ break;
+ }
+ case 536: {
+ IsDebuff = input.ReadBool();
+ break;
+ }
+ case 544: {
+ IsDoT = input.ReadBool();
+ break;
+ }
+ case 552: {
+ Rotate = input.ReadBool();
+ break;
+ }
+ case 562: {
+ AfterSpell = input.ReadString();
+ break;
+ }
+ case 568: {
+ Level = input.ReadInt32();
+ break;
+ }
+ case 578: {
+ Description = input.ReadString();
+ break;
+ }
+ case 586: {
+ ResistType = input.ReadString();
+ break;
+ }
+ case 592: {
+ ResistAdj = input.ReadInt32();
+ break;
+ }
+ case 600: {
+ CastTypeOverride = (global::SpellData.Types.CastingType) input.ReadEnum();
+ break;
+ }
+ case 610: {
+ checkForCollection_.AddEntriesFrom(input, _repeated_checkForCollection_codec);
+ break;
+ }
+ case 618: {
+ IfsKeys = input.ReadString();
+ break;
+ }
+ case 624: {
+ Enabled = input.ReadBool();
+ break;
+ }
+ case 632: {
+ IsBuff = input.ReadBool();
+ break;
+ }
+ case 640: {
+ MinHPTotal = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ SpellName = input.ReadString();
+ break;
+ }
+ case 18: {
+ CastName = input.ReadString();
+ break;
+ }
+ case 26: {
+ Subcategory = input.ReadString();
+ break;
+ }
+ case 34: {
+ Category = input.ReadString();
+ break;
+ }
+ case 40: {
+ CastType = (global::SpellData.Types.CastingType) input.ReadEnum();
+ break;
+ }
+ case 50: {
+ TargetType = input.ReadString();
+ break;
+ }
+ case 56: {
+ SpellGem = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ GiveUpTimer = input.ReadInt32();
+ break;
+ }
+ case 72: {
+ MaxTries = input.ReadInt32();
+ break;
+ }
+ case 80: {
+ Duration = input.ReadInt32();
+ break;
+ }
+ case 88: {
+ DurationTotalSeconds = input.ReadInt32();
+ break;
+ }
+ case 96: {
+ RecastTime = input.ReadInt32();
+ break;
+ }
+ case 105: {
+ RecoveryTime = input.ReadDouble();
+ break;
+ }
+ case 113: {
+ MyCastTime = input.ReadDouble();
+ break;
+ }
+ case 121: {
+ MyCastTimeInSeconds = input.ReadDouble();
+ break;
+ }
+ case 129: {
+ MyRange = input.ReadDouble();
+ break;
+ }
+ case 136: {
+ Mana = input.ReadInt32();
+ break;
+ }
+ case 144: {
+ MinMana = input.ReadInt32();
+ break;
+ }
+ case 152: {
+ MaxMana = input.ReadInt32();
+ break;
+ }
+ case 160: {
+ MinHP = input.ReadInt32();
+ break;
+ }
+ case 168: {
+ HealPct = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ Debug = input.ReadBool();
+ break;
+ }
+ case 186: {
+ Reagent = input.ReadString();
+ break;
+ }
+ case 192: {
+ ItemMustEquip = input.ReadBool();
+ break;
+ }
+ case 200: {
+ NoBurn = input.ReadBool();
+ break;
+ }
+ case 208: {
+ NoTarget = input.ReadBool();
+ break;
+ }
+ case 216: {
+ NoAggro = input.ReadBool();
+ break;
+ }
+ case 224: {
+ Mode = input.ReadInt32();
+ break;
+ }
+ case 232: {
+ EnduranceCost = input.ReadInt32();
+ break;
+ }
+ case 240: {
+ Delay = input.ReadInt32();
+ break;
+ }
+ case 248: {
+ DelayAfterCast = input.ReadInt32();
+ break;
+ }
+ case 256: {
+ CastID = input.ReadInt32();
+ break;
+ }
+ case 264: {
+ MinEnd = input.ReadInt32();
+ break;
+ }
+ case 272: {
+ CastInvis = input.ReadBool();
+ break;
+ }
+ case 282: {
+ SpellType = input.ReadString();
+ break;
+ }
+ case 290: {
+ CastTarget = input.ReadString();
+ break;
+ }
+ case 298: {
+ stackRequestTargets_.AddEntriesFrom(ref input, _repeated_stackRequestTargets_codec);
+ break;
+ }
+ case 304: {
+ StackIntervalCheck = input.ReadInt64();
+ break;
+ }
+ case 312: {
+ StackIntervalNextCheck = input.ReadInt64();
+ break;
+ }
+ case 320: {
+ StackRecastDelay = input.ReadInt64();
+ break;
+ }
+ case 330: {
+ StackRequestItem = input.ReadString();
+ break;
+ }
+ case 336: {
+ GiftOfMana = input.ReadBool();
+ break;
+ }
+ case 344: {
+ SpellID = input.ReadInt32();
+ break;
+ }
+ case 352: {
+ PctAggro = input.ReadInt32();
+ break;
+ }
+ case 362: {
+ Zone = input.ReadString();
+ break;
+ }
+ case 368: {
+ MinSick = input.ReadInt32();
+ break;
+ }
+ case 376: {
+ AllowSpellSwap = input.ReadBool();
+ break;
+ }
+ case 384: {
+ NoEarlyRecast = input.ReadBool();
+ break;
+ }
+ case 392: {
+ NoStack = input.ReadBool();
+ break;
+ }
+ case 402: {
+ TriggerSpell = input.ReadString();
+ break;
+ }
+ case 410: {
+ BeforeSpell = input.ReadString();
+ break;
+ }
+ case 424: {
+ NoInterrupt = input.ReadBool();
+ break;
+ }
+ case 434: {
+ AfterEvent = input.ReadString();
+ break;
+ }
+ case 442: {
+ BeforeEvent = input.ReadString();
+ break;
+ }
+ case 450: {
+ CastIF = input.ReadString();
+ break;
+ }
+ case 458: {
+ Ifs = input.ReadString();
+ break;
+ }
+ case 466: {
+ InitName = input.ReadString();
+ break;
+ }
+ case 472: {
+ ReagentOutOfStock = input.ReadBool();
+ break;
+ }
+ case 480: {
+ SpellInBook = input.ReadBool();
+ break;
+ }
+ case 488: {
+ SpellIcon = input.ReadInt32();
+ break;
+ }
+ case 496: {
+ NoMidSongCast = input.ReadBool();
+ break;
+ }
+ case 504: {
+ MinDurationBeforeRecast = input.ReadInt64();
+ break;
+ }
+ case 512: {
+ IsShortBuff = input.ReadBool();
+ break;
+ }
+ case 520: {
+ HealthMax = input.ReadInt32();
+ break;
+ }
+ case 528: {
+ IgnoreStackRules = input.ReadBool();
+ break;
+ }
+ case 536: {
+ IsDebuff = input.ReadBool();
+ break;
+ }
+ case 544: {
+ IsDoT = input.ReadBool();
+ break;
+ }
+ case 552: {
+ Rotate = input.ReadBool();
+ break;
+ }
+ case 562: {
+ AfterSpell = input.ReadString();
+ break;
+ }
+ case 568: {
+ Level = input.ReadInt32();
+ break;
+ }
+ case 578: {
+ Description = input.ReadString();
+ break;
+ }
+ case 586: {
+ ResistType = input.ReadString();
+ break;
+ }
+ case 592: {
+ ResistAdj = input.ReadInt32();
+ break;
+ }
+ case 600: {
+ CastTypeOverride = (global::SpellData.Types.CastingType) input.ReadEnum();
+ break;
+ }
+ case 610: {
+ checkForCollection_.AddEntriesFrom(ref input, _repeated_checkForCollection_codec);
+ break;
+ }
+ case 618: {
+ IfsKeys = input.ReadString();
+ break;
+ }
+ case 624: {
+ Enabled = input.ReadBool();
+ break;
+ }
+ case 632: {
+ IsBuff = input.ReadBool();
+ break;
+ }
+ case 640: {
+ MinHPTotal = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ #region Nested types
+ /// Container for nested types declared in the SpellData message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static partial class Types {
+ public enum CastingType {
+ [pbr::OriginalName("AA")] Aa = 0,
+ [pbr::OriginalName("Spell")] Spell = 1,
+ [pbr::OriginalName("Disc")] Disc = 2,
+ [pbr::OriginalName("Ability")] Ability = 3,
+ [pbr::OriginalName("Item")] Item = 4,
+ [pbr::OriginalName("None")] None = 5,
+ }
+
+ }
+ #endregion
+
+}
+
+#endregion
+
+
+#endregion Designer generated code
diff --git a/E3Next/Data/ProtoBuff/SpellData.proto b/E3Next/Data/ProtoBuff/SpellData.proto
new file mode 100644
index 00000000..0dbb9070
--- /dev/null
+++ b/E3Next/Data/ProtoBuff/SpellData.proto
@@ -0,0 +1,99 @@
+syntax = "proto3";
+
+message SpellDataList {
+
+ repeated SpellData data=1;
+
+}
+
+message SpellData {
+
+ enum CastingType {
+ AA=0;
+ Spell=1;
+ Disc=2;
+ Ability=3;
+ Item=4;
+ None=5;
+ }
+ string SpellName = 1;
+ string CastName = 2;
+ string Subcategory = 3;
+ string Category = 4;
+ CastingType CastType=5;
+ string TargetType=6;
+ int32 SpellGem=7;
+ int32 GiveUpTimer=8;
+ int32 MaxTries=9;
+ int32 Duration=10;
+ int32 DurationTotalSeconds=11;
+ int32 RecastTime=12;
+ double RecoveryTime=13;
+ double myCastTime=14;
+ double MyCastTimeInSeconds = 15;
+ double MyRange=16;
+ int32 Mana=17;
+ int32 MinMana=18;
+ int32 MaxMana=19;
+ int32 MinHP=20;
+ int32 HealPct=21;
+ bool Debug=22;
+ string Reagent=23;
+ bool ItemMustEquip=24;
+ bool NoBurn=25;
+ bool NoTarget=26;
+ bool NoAggro=27;
+ int32 Mode=28;
+
+ int32 EnduranceCost=29;
+ int32 Delay=30;
+ int32 DelayAfterCast=31;
+ int32 CastID=32;
+ int32 MinEnd=33;
+ bool CastInvis=34;
+ string SpellType=35;
+ string CastTarget=36;
+ repeated string StackRequestTargets=37;
+ int64 StackIntervalCheck=38;
+ int64 StackIntervalNextCheck =39;
+ int64 StackRecastDelay=40;
+ string StackRequestItem=41;
+ bool GiftOfMana=42;
+ int32 SpellID=43;
+ int32 PctAggro=44;
+ string Zone=45;
+ int32 MinSick=46;
+ bool AllowSpellSwap=47;
+ bool NoEarlyRecast=48;
+ bool NoStack=49;
+ string TriggerSpell=50;
+ string BeforeSpell=51;
+ bool NoInterrupt=53;
+ string AfterEvent=54;
+ string BeforeEvent=55;
+ string CastIF=56;
+ string Ifs=57;
+ string InitName =58;
+ bool ReagentOutOfStock=59;
+ bool SpellInBook=60;
+ int32 SpellIcon=61;
+ bool NoMidSongCast=62;
+ int64 MinDurationBeforeRecast=63;
+ bool IsShortBuff=64;
+ int32 HealthMax =65;
+ bool IgnoreStackRules=66;
+ bool IsDebuff=67;
+ bool IsDoT=68;
+ bool Rotate=69;
+ string AfterSpell=70;
+ int32 Level = 71;
+ string Description=72;
+ string ResistType=73;
+ int32 ResistAdj = 74;
+ CastingType CastTypeOverride=75;
+ repeated string CheckForCollection=76;
+ string IfsKeys=77;
+ bool Enabled = 78;
+ bool IsBuff = 79;
+ int32 MinHPTotal=80;
+}
\ No newline at end of file
diff --git a/E3Next/Data/ProtoBuff/protoc.exe b/E3Next/Data/ProtoBuff/protoc.exe
new file mode 100644
index 00000000..607e7841
Binary files /dev/null and b/E3Next/Data/ProtoBuff/protoc.exe differ
diff --git a/E3Next/Data/Skills.cs b/E3Next/Data/Skills.cs
new file mode 100644
index 00000000..a61e81c2
--- /dev/null
+++ b/E3Next/Data/Skills.cs
@@ -0,0 +1,147 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace E3Core.Data
+{
+ public static class Skills
+ {
+
+ public static Dictionary IDToName = new Dictionary { { 0, "1H Blunt" },
+ { 1, "1H Slashing" },
+ {2,"2H Blunt"},
+ {3,"2H Slashing"},
+ {4,"Abjuration"},
+ {5,"Alteration"},
+ {6,"Apply Poison"},
+ {7,"Archery"},
+ {8,"Backstab"},
+ {9,"Bind Wound"},
+ {10,"Bash"},
+ {11,"Block"},
+ {12,"Brass Instruments"},
+ {13,"Channeling"},
+ {14,"Conjuration"},
+ {15,"Defense"},
+ {16,"Disarm"},
+ {17,"Disarm Traps"},
+ {18,"Divination"},
+ {19,"Dodge"},
+ {20,"Double Attack"},
+ {21,"Dragon Punch"},
+ {22,"Dual Wield"},
+ {23,"Eagle Strike"},
+ {24,"Evocation"},
+ {25,"Feign Death"},
+ {26,"Flying Kick"},
+ {27,"Forage"},
+ {28,"Hand to Hand"},
+ {29,"Hide"},
+ {30,"Kick"},
+ {31,"Meditate"},
+ {32,"Mend"},
+ {33,"Offense"},
+ {34,"Parry"},
+ {35,"Pick Lock"},
+ {36,"1H Piercing"},
+ {37,"Riposte"},
+ {38,"Round Kick"},
+ {39,"Safe Fall"},
+ {40,"Sense Heading"},
+ {41,"Singing"},
+ {42,"Sneak"},
+ {43,"Specialize Abjure"},
+ {44,"Specialize Alteration"},
+ {45,"Specialize Conjuration"},
+ {46,"Specialize Divination"},
+ {47,"Specialize Evocation"},
+ {48,"Pick Pockets"},
+ {49,"Stringed Instruments"},
+ {50,"Swimming"},
+ {51,"Throwing"},
+ {52,"Tiger Claw"},
+ {53,"Tracking"},
+ {54,"Wind Instruments"},
+ {55,"Fishing"},
+ {56,"Make Poison"},
+ {57,"Tinkering"},
+ {58,"Research"},
+ {59,"Alchemy"},
+ {60,"Baking"},
+ {61,"Tailoring"},
+ {62,"Sense Traps"},
+ {63,"Blacksmithing"},
+ {64,"Fletching"},
+ {65,"Brewing"},
+ {66,"Alcohol Tolerance"},
+ {67,"Begging"},
+ {68,"Jewelry Making"},
+ {69,"Pottery"},
+ {70,"Percussion Instruments"},
+ {71,"Intimidation"},
+ {72,"Berserking"},
+ {73,"Taunt"},
+ {74,"Frenzy"},
+ {75,"Remove Trap"},
+ {76,"Triple Attack"},
+ {77,"2H Piercing"},
+ {78,"78"},
+ {79,"79"},
+ {80,"80"},
+ {81,"81"},
+ {82,"82"},
+ {83,"83"},
+ {84,"84"},
+ {85,"85"},
+ {86,"86"},
+ {87,"87"},
+ {88,"88"},
+ {89,"89"},
+ {90,"90"},
+ {91,"91"},
+ {92,"92"},
+ {93,"93"},
+ {94,"94"},
+ {95,"95"},
+ {96,"96"},
+ {97,"97"},
+ {98,"98"},
+ {99,"99"},
+ {100,"100"},
+ {101,"Awareness"},
+ {102,"Bash Door"},
+ {103,"Breathe Fire"},
+ {104,"Harmony"},
+ {105,"Harm Touch"},
+ {106,"Infravision"},
+ {107,"Lay Hands"},
+ {108,"Lore"},
+ {109,"No Bash"},
+ {110,"Regeneration"},
+ {111,"Slam"},
+ {112,"Surprise"},
+ {113,"Ultravision"},
+ {114,"Inspect"},
+ {115,"Open"},
+ {116,"Reveal Trap"},
+ {117,"117"},
+ {118,"118"},
+ {119,"119"},
+ {120,"120"},
+ {121,"121"},
+ {122,"122"},
+ {123,"123"},
+ {124,"124"},
+ {125,"125"},
+ {126,"126"},
+ {127,"127"},
+ {128,"128"},
+ {129,"129"},
+ {130,"130"},
+ {131,"131"},
+ {132,"Throw Stone"}};
+
+ }
+}
diff --git a/E3Next/Data/Spell.cs b/E3Next/Data/Spell.cs
index e241cc98..483eb3ca 100644
--- a/E3Next/Data/Spell.cs
+++ b/E3Next/Data/Spell.cs
@@ -13,7 +13,7 @@ namespace E3Core.Data
{
- public enum CastType
+ public enum CastingType
{
AA,
Spell,
@@ -27,6 +27,7 @@ public class Spell
{
public static Dictionary _loadedSpells = new Dictionary();
public static Dictionary LoadedSpellsByName = new Dictionary();
+ public static Dictionary LoadedSpellByConfigEntry = new Dictionary();
static Dictionary _spellIDLookup = new Dictionary();
public static IMQ MQ = E3.MQ;
@@ -45,9 +46,19 @@ public static Int32 SpellIDLookup(string spellName)
return spellID;
}
+ //only used for seralization
+ public Spell()
+ {
+
+ }
public Spell(string spellName, IniData parsedData = null)
{
+ if(!LoadedSpellByConfigEntry.ContainsKey(spellName))
+ {
+ LoadedSpellByConfigEntry.Add(spellName, this);
+ }
+
SpellName = spellName; //what the thing actually casts
CastName = spellName;//required to send command
InitName = spellName;
@@ -71,7 +82,7 @@ public Spell(string spellName, IniData parsedData = null)
void Parse(IniData parsedData)
{
-
+
if (SpellName.Contains("/"))
{
@@ -96,6 +107,19 @@ void Parse(IniData parsedData)
{
NoInterrupt = true;
}
+ else if (value.Equals("IsDoT", StringComparison.OrdinalIgnoreCase))
+ {
+ IsDoT = true;
+ }
+ else if (value.Equals("IsDebuff", StringComparison.OrdinalIgnoreCase))
+ {
+ IsDebuff = true;
+ }
+ else if(value.StartsWith("CastType|", StringComparison.OrdinalIgnoreCase))
+ {
+ string castTypeAsString = GetArgument(value);
+ Enum.TryParse(castTypeAsString, true, out this.CastTypeOverride);
+ }
else if (value.Equals("Debug", StringComparison.OrdinalIgnoreCase))
{
Debug = true;
@@ -189,11 +213,11 @@ void Parse(IniData parsedData)
{
MinHP = GetArgument(value);
}
- else if (value.StartsWith("HealPct|", StringComparison.OrdinalIgnoreCase))
- {
- HealPct = GetArgument(value);
- }
- else if (value.StartsWith("HealPct|", StringComparison.OrdinalIgnoreCase))
+ else if (value.StartsWith("MinHPTotal|", StringComparison.OrdinalIgnoreCase))
+ {
+ MinHPTotal = GetArgument(value);
+ }
+ else if (value.StartsWith("HealPct|", StringComparison.OrdinalIgnoreCase))
{
HealPct = GetArgument(value);
}
@@ -209,7 +233,11 @@ void Parse(IniData parsedData)
{
NoTarget = true;
}
- else if (value.Equals("NoAggro", StringComparison.OrdinalIgnoreCase))
+ else if (value.Equals("Disabled", StringComparison.OrdinalIgnoreCase))
+ {
+ Enabled = false;
+ }
+ else if (value.Equals("NoAggro", StringComparison.OrdinalIgnoreCase))
{
NoAggro = true;
}
@@ -286,11 +314,11 @@ void Parse(IniData parsedData)
}
else if (value.StartsWith("Ifs|", StringComparison.OrdinalIgnoreCase))
{
- string ifKey = GetArgument(value);
+ IfsKeys = GetArgument(value);
var section = parsedData.Sections["Ifs"];
if (section != null)
{
- var keys = ifKey.Split(','); // Splitting based on comma
+ var keys = IfsKeys.Split(','); // Splitting based on comma
foreach (var key in keys)
{
var keyData = section[key];
@@ -411,43 +439,50 @@ public static T GetArgument(string query)
}
void QueryMQ()
{
+ if(CastTypeOverride == CastingType.None)
+ {
+ if (MQ.Query($"${{Me.AltAbility[{CastName}].Spell}}"))
+ {
+ CastType = CastingType.AA;
+ }
+ else if (MQ.Query($"${{Me.Book[{CastName}]}}"))
+ {
+ CastType = CastingType.Spell;
+ SpellInBook = true;
+ }
+ else if (MQ.Query($"${{Me.CombatAbility[{CastName}]}}"))
+ {
+ CastType = CastingType.Disc;
+ }
+ else if (MQ.Query($"${{Me.Ability[{CastName}]}}") || String.Compare("Slam", CastName, true) == 0)
+ {
+ CastType = CastingType.Ability;
+ }
+ else if (MQ.Query($"${{FindItem[={CastName}]}}"))
+ {
- if (MQ.Query($"${{Me.AltAbility[{CastName}].Spell}}"))
- {
- CastType = CastType.AA;
- }
- else if (MQ.Query($"${{Me.Book[{CastName}]}}"))
- {
- CastType = CastType.Spell;
- SpellInBook = true;
- }
- else if (MQ.Query($"${{Me.CombatAbility[{CastName}]}}"))
- {
- CastType = CastType.Disc;
- }
- else if (MQ.Query($"${{Me.Ability[{CastName}]}}")|| String.Compare("Slam",CastName,true)==0)
- {
- CastType = CastType.Ability;
- }
- else if (MQ.Query($"${{FindItem[={CastName}]}}"))
- {
-
- CastType = CastType.Item;
- }
- else if (MQ.Query($"${{Spell[{CastName}]}}"))
- {
- //final check to see if its a spell, that maybe a mob casts?
- CastType = CastType.Spell;
- }
- else
- {
- //bad spell/item/etc
- CastType = CastType.None;
- }
+ CastType = CastingType.Item;
+ }
+ else if (MQ.Query($"${{Spell[{CastName}]}}"))
+ {
+ //final check to see if its a spell, that maybe a mob casts?
+ CastType = CastingType.Spell;
+ }
+ else
+ {
+ //bad spell/item/etc
+ CastType = CastingType.None;
+ }
+ }
+ else
+ {
+ CastType = CastTypeOverride;
+ }
+
- if (CastType == CastType.Item)
+ if (CastType == CastingType.Item)
{
Int32 invSlot;
Int32 bagSlot;
@@ -477,8 +512,11 @@ void QueryMQ()
RecastTime = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.RecastTime}}");
RecoveryTime = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.RecoveryTime}}");
MyCastTime = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.CastTime}}");
+ Description = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.Description}}");
+ ResistType = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.ResistType}}");
+ ResistAdj = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.ResistAdj}}");
- double AERange = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.AERange}}");
+ double AERange = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.AERange}}");
MyRange = AERange;
if (MyRange == 0)
{
@@ -495,8 +533,10 @@ void QueryMQ()
SpellName = MQ.Query($"${{Me.Inventory[{invSlot}].Spell}}");
SpellID = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.ID}}");
CastID = MQ.Query($"${{Me.Inventory[{invSlot}].ID}}");
- SpellType = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.SpellType}}");
+ SpellIcon = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.SpellIcon}}");
+ SpellType = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.SpellType}}");
IsShortBuff = MQ.Query($"${{Me.Inventory[{invSlot}].Spell.DurationWindow}}");
+
}
else
{
@@ -509,8 +549,11 @@ void QueryMQ()
RecastTime = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.RecastTime}}");
RecoveryTime = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.RecoveryTime}}");
MyCastTime = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].CastTime}}");
+ Description = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.Description}}");
+ ResistType = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.ResistType}}");
+ ResistAdj = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.ResistAdj}}");
- double AERange = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.AERange}}");
+ double AERange = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.AERange}}");
MyRange = AERange;
if (MyRange == 0)
{
@@ -526,12 +569,13 @@ void QueryMQ()
SpellName = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell}}");
SpellID = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.ID}}");
CastID = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].ID}}");
- SpellType = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.SpellType}}");
+ SpellIcon = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.SpellIcon}}");
+ SpellType = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.SpellType}}");
IsShortBuff = MQ.Query($"${{Me.Inventory[{invSlot}].Item[{bagSlot}].Spell.DurationWindow}}");
}
}
- else if (CastType == CastType.AA)
+ else if (CastType == CastingType.AA)
{
TargetType = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.TargetType}}");
Duration = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.Duration}}");
@@ -544,9 +588,12 @@ void QueryMQ()
Double AERange = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.AERange}}");
MyRange = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.MyRange}}");
SpellType = MQ.Query($"${{Spell[{CastName}].SpellType}}");
+ SpellIcon = MQ.Query($"${{Spell[{CastName}].SpellIcon}}");
+ Description = MQ.Query($"${{Spell[{CastName}].Description}}");
+ ResistType = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.ResistType}}");
+ ResistAdj = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.ResistAdj}}");
-
- if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
+ if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
{
if (AERange > 0)
@@ -577,9 +624,11 @@ void QueryMQ()
SpellID = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.ID}}");
CastID = MQ.Query($"${{Me.AltAbility[{CastName}].ID}}");
IsShortBuff = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.DurationWindow}}");
-
+ Category = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.Category}}");
+ Subcategory = MQ.Query($"${{Me.AltAbility[{CastName}].Spell.Subcategory}}");
+
}
- else if (CastType == CastType.Spell)
+ else if (CastType == CastingType.Spell)
{
if(SpellInBook)
@@ -599,6 +648,10 @@ void QueryMQ()
SpellType = MQ.Query($"${{Me.Book[{bookNumber}].SpellType}}");
IsShortBuff = MQ.Query($"${{Me.Book[{bookNumber}].DurationWindow}}");
Subcategory = MQ.Query($"${{Me.Book[{bookNumber}].Subcategory}}");
+ Category = MQ.Query($"${{Me.Book[{bookNumber}].Category}}");
+ Description= MQ.Query($"${{Me.Book[{bookNumber}].Description}}");
+ ResistType = MQ.Query($"${{Me.Book[{bookNumber}].ResistType}}");
+ ResistAdj = MQ.Query($"${{Me.Book[{bookNumber}].ResistAdj}}");
if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
{
@@ -626,7 +679,9 @@ void QueryMQ()
SpellName = CastName;
SpellID = MQ.Query($"${{Me.Book[{bookNumber}].ID}}");
CastID = SpellID;
- }
+ SpellIcon = MQ.Query($"${{Me.Book[{bookNumber}].SpellIcon}}");
+ Level = MQ.Query($"${{Me.Book[{bookNumber}].Level}}");
+ }
else
{
TargetType = MQ.Query($"${{Spell[{CastName}].TargetType}}");
@@ -642,8 +697,15 @@ void QueryMQ()
SpellType = MQ.Query($"${{Spell[{CastName}].SpellType}}");
IsShortBuff = MQ.Query($"${{Spell[{CastName}].DurationWindow}}");
Subcategory = MQ.Query($"${{Spell[{CastName}].Subcategory}}");
+ Category = MQ.Query($"${{Spell[{CastName}].Category}}");
+ SpellIcon = MQ.Query($"${{Spell[{CastName}].SpellIcon}}");
+ Level = MQ.Query($"${{Spell[{CastName}].Level}}");
+ Description = MQ.Query($"${{Spell[{CastName}].Description}}");
+ ResistType = MQ.Query($"${{Spell[{CastName}].ResistType}}");
+ ResistAdj = MQ.Query($"${{Spell[{CastName}].ResistAdj}}");
+
- if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
+ if (SpellType.Equals("Detrimental", StringComparison.OrdinalIgnoreCase))
{
if (AERange > 0)
@@ -674,7 +736,7 @@ void QueryMQ()
}
- else if (CastType == CastType.Disc)
+ else if (CastType == CastingType.Disc)
{
TargetType = MQ.Query($"${{Spell[{CastName}].TargetType}}");
Duration = MQ.Query($"${{Spell[{CastName}].Duration}}");
@@ -691,10 +753,16 @@ void QueryMQ()
CastID = SpellID;
SpellType = MQ.Query($"${{Spell[{CastName}].SpellType}}");
IsShortBuff = MQ.Query($"${{Spell[{CastName}].DurationWindow}}");
-
+ SpellIcon = MQ.Query($"${{Spell[{CastName}].SpellIcon}}");
+ Description = MQ.Query($"${{Spell[{CastName}].Description}}");
+ ResistType = MQ.Query($"${{Spell[{CastName}].ResistType}}");
+ ResistAdj = MQ.Query($"${{Spell[{CastName}].ResistAdj}}");
+ Level = MQ.Query($"${{Spell[{CastName}].Level}}");
+ Subcategory = MQ.Query($"${{Spell[{CastName}].Subcategory}}");
+ Category = MQ.Query($"${{Spell[{CastName}].Category}}");
}
- else if (CastType == CastType.Ability)
+ else if (CastType == CastingType.Ability)
{
//nothing to update here
}
@@ -722,13 +790,16 @@ void QueryMQ()
// return returnString;
//}
public String Subcategory = String.Empty;
+ public String Category = String.Empty;
public String SpellName = String.Empty;//the spell's name. If the item clicks, this is the spell it casts
public String CastName = String.Empty;//this can be the item, spell, aa, disc. What is required to cast it.
- public CastType CastType;
+ public CastingType CastType = CastingType.None;
+ public CastingType CastTypeOverride = CastingType.None;
public String TargetType = String.Empty;
public Int32 SpellGem;
public Int32 GiveUpTimer;
- public Int32 MaxTries = 5;
+ private const Int32 MaxTiresDefault = 5;
+ public Int32 MaxTries = MaxTiresDefault;
public Dictionary CheckForCollection = new Dictionary();
public Int32 Duration;
public Int32 DurationTotalSeconds;
@@ -741,7 +812,7 @@ public decimal MyCastTime
set
{
myCastTime = value;
- if (CastType != CastType.Ability)
+ if (CastType != CastingType.Ability)
{
MyCastTimeInSeconds = value / 1000;
}
@@ -753,6 +824,7 @@ public decimal MyCastTime
public Int32 MinMana;
public Int32 MaxMana;
public Int32 MinHP;
+ public Int32 MinHPTotal;
public Int32 HealPct;
public bool Debug;
public String Reagent = String.Empty;
@@ -780,7 +852,8 @@ public decimal MyCastTime
public Int32 SpellID;
public Int32 PctAggro;
public String Zone = "All";
- public Int32 MinSick = 2;
+ private const Int32 MinSickDefault = 2;
+ public Int32 MinSick = MinSickDefault;
public Boolean AllowSpellSwap;
public Boolean NoEarlyRecast;
public Boolean NoStack;
@@ -794,18 +867,264 @@ public decimal MyCastTime
public String BeforeEvent = String.Empty;
public String CastIF = String.Empty;
public string Ifs = String.Empty;
+ public string IfsKeys = String.Empty;
public string InitName = String.Empty;
public bool ReagentOutOfStock = false;
public bool SpellInBook = false;
+ public Int32 SpellIcon = 0;
public bool NoMidSongCast = false;
public Int64 MinDurationBeforeRecast = 0;
public Int64 LastUpdateCheckFromTopicUpdate = 0;
public bool IsShortBuff = false;
public Int32 HealthMax = 100;
public bool IgnoreStackRules = false;
-
+ public bool IsDebuff = false;
+ public bool IsDoT = false;
+ public bool IsBuff = false;
+ public Int32 Level = 255;
+ public string Description = String.Empty;
+ public Int32 ResistAdj = 0;
+ public string ResistType = String.Empty;
+ public bool Enabled = true;
+
+ //.\protoc --csharp_out=.\ SpellData.proto
+ //add field to this class, you need to update the proto file as well.
+ public static Spell FromProto(SpellData source)
+ {
+ Spell r = new Spell();
+ r.AfterEvent = source.AfterEvent;
+ r.AfterSpell = source.AfterSpell;
+ r.AllowSpellSwap = source.AllowSpellSwap;
+ r.BeforeEvent = source.BeforeEvent;
+ r.BeforeSpell = source.BeforeSpell;
+ r.CastID = source.CastID;
+ r.CastIF = source.CastIF;
+ r.CastInvis = source.CastInvis;
+ r.CastName = source.CastName;
+ r.CastTarget = source.CastTarget;
+ r.CastType = (CastingType)source.CastType;
+ r.Category = source.Category;
+ r.Debug = source.Debug;
+ r.Delay = source.Delay;
+ r.DelayAfterCast = source.DelayAfterCast;
+ r.Duration = source.Duration;
+ r.DurationTotalSeconds = source.DurationTotalSeconds;
+ r.EnduranceCost = source.EnduranceCost;
+ r.GiftOfMana = source.GiftOfMana;
+ r.GiveUpTimer = source.GiveUpTimer;
+ r.HealPct = source.HealPct;
+ r.HealthMax = source.HealthMax;
+ r.Ifs = source.Ifs;
+ r.IfsKeys = source.IfsKeys;
+ r.IgnoreStackRules = source.IgnoreStackRules;
+ r.InitName = source.InitName;
+ r.IsDebuff = source.IsDebuff;
+ r.IsDoT = source.IsDoT;
+ r.IsBuff = source.IsBuff;
+ r.IsShortBuff = source.IsShortBuff;
+ r.ItemMustEquip = source.ItemMustEquip;
+ r.Mana = source.Mana;
+ r.MaxMana = source.MaxMana;
+ r.MaxTries = source.MaxTries;
+ r.MinDurationBeforeRecast = source.MinDurationBeforeRecast;
+ r.MinEnd = source.MinEnd;
+ r.MinHP = source.MinHP;
+ r.MinHPTotal = source.MinHPTotal;
+ r.MinMana = source.MinMana;
+ r.MinSick = source.MinSick;
+ r.Mode = source.Mode;
+ r.MyCastTime = (Decimal)source.MyCastTime;
+ r.MyCastTimeInSeconds = (Decimal)source.MyCastTimeInSeconds;
+ r.MyRange = source.MyRange;
+ r.NoAggro = source.NoAggro;
+ r.NoBurn = source.NoBurn;
+ r.NoEarlyRecast = source.NoEarlyRecast;
+ r.NoInterrupt = source.NoInterrupt;
+ r.NoMidSongCast = source.NoMidSongCast;
+ r.NoStack = source.NoStack;
+ r.NoTarget = source.NoTarget;
+ r.PctAggro = source.PctAggro;
+ r.Reagent = source.Reagent;
+ r.ReagentOutOfStock = source.ReagentOutOfStock;
+ r.RecastTime = source.RecastTime;
+ r.RecoveryTime = (Decimal)source.RecoveryTime;
+ r.Rotate = source.Rotate;
+ r.SpellGem = source.SpellGem;
+ r.SpellIcon = source.SpellIcon;
+ r.SpellID = source.SpellID;
+ r.SpellInBook = source.SpellInBook;
+ r.SpellName = source.SpellName;
+ r.SpellType = source.SpellType;
+ r.StackRecastDelay = source.StackRecastDelay;
+ r.StackRequestItem = source.StackRequestItem;
+ r.StackRequestTargets.AddRange(source.StackRequestTargets);
+ r.Subcategory = source.Subcategory;
+ r.TargetType = source.TargetType;
+ r.TriggerSpell = source.TriggerSpell;
+ r.Zone = source.Zone;
+ r.Level = source.Level;
+ r.Description = source.Description;
+ r.ResistType = source.ResistType;
+ r.ResistAdj = source.ResistAdj;
+ r.CastTypeOverride = (CastingType)source.CastTypeOverride;
+ foreach(var entry in source.CheckForCollection)
+ {
+ if(!r.CheckForCollection.ContainsKey(entry))
+ {
+ r.CheckForCollection.Add(entry,0);
+ }
+ }
+ r.Enabled = source.Enabled;
+
+ return r;
+ }
+ public SpellData ToProto()
+ {
+
+ SpellData r = new SpellData();
+ r.AfterEvent = this.AfterEvent;
+ r.AfterSpell = this.AfterSpell;
+ r.AllowSpellSwap = this.AllowSpellSwap;
+ r.BeforeEvent = this.BeforeEvent;
+ r.BeforeSpell = this.BeforeSpell;
+ r.CastID = this.CastID;
+ r.CastIF = this.CastIF;
+ r.CastInvis = this.CastInvis;
+ r.CastName = this.CastName;
+ r.CastTarget = this.CastTarget;
+ r.CastType = (SpellData.Types.CastingType)this.CastType;
+ r.Category = this.Category;
+ r.Debug = this.Debug;
+ r.Delay = this.Delay;
+ r.DelayAfterCast = this.DelayAfterCast;
+ r.Duration = this.Duration;
+ r.DurationTotalSeconds = this.DurationTotalSeconds;
+ r.EnduranceCost = this.EnduranceCost;
+ r.GiftOfMana = this.GiftOfMana;
+ r.GiveUpTimer = this.GiveUpTimer;
+ r.HealPct = this.HealPct;
+ r.HealthMax = this.HealthMax;
+ r.Ifs= this.Ifs;
+ r.IgnoreStackRules = this.IgnoreStackRules;
+ r.InitName = this.InitName;
+ r.IsDebuff = this.IsDebuff;
+ r.IsDoT= this.IsDoT;
+ r.IsBuff = this.IsBuff;
+ r.IsShortBuff = this.IsShortBuff;
+ r.ItemMustEquip = this.ItemMustEquip;
+ r.Mana= this.Mana;
+ r.MaxMana= this.MaxMana;
+ r.MaxTries = this.MaxTries;
+ r.MinDurationBeforeRecast = this.MinDurationBeforeRecast;
+ r.MinEnd = this.MinEnd;
+ r.MinHP = this.MinHP;
+ r.MinHPTotal = this.MinHPTotal;
+ r.MinMana = this.MinMana;
+ r.MinSick = this.MinSick;
+ r.Mode = this.Mode;
+ r.MyCastTime = (double)this.MyCastTime;
+ r.MyCastTimeInSeconds = (double)this.MyCastTimeInSeconds;
+ r.MyRange= this.MyRange;
+ r.NoAggro = this.NoAggro;
+ r.NoBurn = this.NoBurn;
+ r.NoEarlyRecast = this.NoEarlyRecast;
+ r.NoInterrupt = this.NoInterrupt;
+ r.NoMidSongCast = this.NoMidSongCast;
+ r.NoStack = this.NoStack;
+ r.NoTarget = this.NoTarget;
+ r.PctAggro = this.PctAggro;
+ r.Reagent = this.Reagent;
+ r.ReagentOutOfStock = this.ReagentOutOfStock;
+ r.RecastTime= this.RecastTime;
+ r.RecoveryTime = (double)this.RecoveryTime;
+ r.Rotate = this.Rotate;
+ r.SpellGem = this.SpellGem;
+ r.SpellIcon = this.SpellIcon;
+ r.SpellID = this.SpellID;
+ r.SpellInBook = this.SpellInBook;
+ r.SpellName = this.SpellName;
+ r.SpellType = this.SpellType;
+ r.StackRecastDelay = this.StackRecastDelay;
+ r.StackRequestItem = this.StackRequestItem;
+ r.StackRequestTargets.AddRange(this.StackRequestTargets);
+ r.Subcategory = this.Subcategory;
+ r.TargetType = this.TargetType;
+ r.TriggerSpell =this.TriggerSpell;
+ r.Zone = this.Zone;
+ r.Level = this.Level;
+ r.Description = this.Description;
+ r.ResistType = this.ResistType;
+ r.ResistAdj = this.ResistAdj;
+ r.CastTypeOverride = (SpellData.Types.CastingType)this.CastTypeOverride;
+ r.IfsKeys = IfsKeys;
+ r.CheckForCollection.AddRange(CheckForCollection.Keys.ToList());
+ r.Enabled = Enabled;
+ return r;
+
+ }
+ public void TransferFlags(Spell d)
+ {
+ d.IfsKeys = IfsKeys;
+ d.SpellGem = SpellGem;
+ d.Zone = Zone;
+ d.MinSick = MinSick;
+ d.CheckForCollection =CheckForCollection.ToDictionary(entry => entry.Key, entry => entry.Value);
+ d.HealPct = HealPct;
+ d.NoInterrupt = NoInterrupt;
+ d.AfterSpell = AfterSpell;
+ d.BeforeSpell = BeforeSpell;
+ d.MinMana = MinMana;
+ d.MaxMana = MaxMana;
+ d.IgnoreStackRules = IgnoreStackRules;
+ d.HealthMax = HealthMax;
+ d.MinDurationBeforeRecast = MinDurationBeforeRecast;
+ d.MaxTries = MaxTries;
+ d.CastIF = CastIF;
+ d.MinEnd = MinEnd;
+ d.AfterEvent = AfterEvent;
+ d.BeforeEvent = BeforeEvent;
+ d.Reagent = Reagent;
+ d.Enabled = Enabled;
+
+ }
+
+ public string ToConfigEntry()
+ {
+ //This is C#'s ternary conditional operator
+ //its condition if true do 1st, else 2nd.
+ //in this case, if ifskeys is null or empty, set to string empty
+ //else use /Ifs|{IfsKeys}
+ string t_Ifs = (String.IsNullOrWhiteSpace(this.IfsKeys)) ? String.Empty : $"/Ifs|{IfsKeys}";
+ string t_Zone = (Zone=="All") ? String.Empty : $"/Zone|{Zone}";
+ string t_MinSick = (MinSick == MinSickDefault) ? String.Empty : t_MinSick = $"/MinSick|{MinSick}";
+ string t_checkFor = (CheckForCollection.Count == 0) ? String.Empty: t_checkFor = "/CheckFor|" + String.Join(",", CheckForCollection.Keys.ToList());
+ string t_healPct = (HealPct == 0) ?String.Empty : $"/HealPct|{HealPct}";
+ string t_noInterrupt = (!NoInterrupt) ? String.Empty :$"/NoInterrupt";
+ string t_AfterSpell = (String.IsNullOrWhiteSpace(this.AfterSpell)) ?String.Empty : t_AfterSpell = $"/AfterSpell|{AfterSpell}";
+ string t_BeforeSpell = (String.IsNullOrWhiteSpace(this.BeforeSpell)) ? String.Empty : t_BeforeSpell = $"/BeforeSpell|{BeforeSpell}";
+ string t_minMana = (MinMana==0) ?String.Empty: $"/MinMana|{MinMana}";
+ string t_maxMana = (MaxMana == 0) ? String.Empty : $"/MaxMana|{MaxMana}";
+ string t_ignoreStackRules = (!IgnoreStackRules) ? String.Empty : $"/IgnoreStackRules";
+ string t_healthMax = (HealthMax == 100) ? String.Empty : $"/HealthMax|{HealthMax}";
+ string t_MinDurationBeforeRecast = (MinDurationBeforeRecast == 0) ? String.Empty : $"/MinDurationBeforeRecast|{MinDurationBeforeRecast/1000}";
+ string t_MaxTries = (MaxTries == MaxTiresDefault) ? String.Empty : $"/MaxTries|{MaxTries}";
+ string t_CastIF = (String.IsNullOrWhiteSpace(this.CastIF)) ? String.Empty : $"/CastIF|{CastIF}";
+ string t_MinEnd = (MinEnd == 0) ? String.Empty : $"/MinEnd|{MinEnd}";
+ string t_AfterEvent = (String.IsNullOrWhiteSpace(this.AfterEvent)) ? String.Empty : $"/AfterEvent|{AfterEvent}";
+ string t_BeforeEvent = (String.IsNullOrWhiteSpace(this.BeforeEvent)) ? String.Empty : $"/BeforeEvent|{BeforeEvent}";
+ string t_Reagent = (String.IsNullOrWhiteSpace(this.Reagent)) ? String.Empty : $"/Reagent|{Reagent}";
+ string t_CastTypeOverride = (this.CastTypeOverride== CastingType.None) ? String.Empty : $"/CastType|{CastTypeOverride.ToString()}";
+ string t_GemNumber = (this.SpellGem == 0) ? String.Empty : $"/Gem|{SpellGem}";
+ string t_Enabled = (Enabled == true) ? String.Empty : $"/Disabled";
+ string t_CastTarget = (String.IsNullOrWhiteSpace(this.CastTarget) || this.IsBuff==false) ? String.Empty : $"/{CastTarget}";
+ string t_PctAggro = (PctAggro == 0) ? String.Empty : $"/PctAggro|{PctAggro}";
+ //Main=Terror of Mirenilla Rk. II/Gem|4/Ifs|Tanking
+ string returnValue = $"{CastName}{t_CastTarget}{t_GemNumber}{t_Ifs}{t_checkFor}{t_CastIF}{t_healPct}{t_healthMax}{t_noInterrupt}{t_Zone}{t_MinSick}{t_BeforeSpell}{t_AfterSpell}{t_BeforeEvent}{t_AfterEvent}{t_minMana}{t_maxMana}{t_MinEnd}{t_ignoreStackRules}{t_MinDurationBeforeRecast}{t_MaxTries}{t_Reagent}{t_CastTypeOverride}{t_PctAggro}{t_Enabled}";
+ return returnValue;
+
+ }
- public override string ToString()
+ public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append(this.GetType().Name);
diff --git a/E3Next/Data/SpellRequest.cs b/E3Next/Data/SpellRequest.cs
index 8b3ec103..40cbd254 100644
--- a/E3Next/Data/SpellRequest.cs
+++ b/E3Next/Data/SpellRequest.cs
@@ -9,11 +9,102 @@ namespace E3Core.Data
{
public class SpellRequest : Spell
{
+ public SpellRequest()
+ {
+
+ }
public SpellRequest(string spellName, IniData parsedData = null):base(spellName, parsedData)
{
}
+ public static new SpellRequest FromProto(SpellData source)
+ {
+ SpellRequest r = new SpellRequest();
+ r.AfterEvent = source.AfterEvent;
+ r.AfterSpell = source.AfterSpell;
+ r.AllowSpellSwap = source.AllowSpellSwap;
+ r.BeforeEvent = source.BeforeEvent;
+ r.BeforeSpell = source.BeforeSpell;
+ r.CastID = source.CastID;
+ r.CastIF = source.CastIF;
+ r.CastInvis = source.CastInvis;
+ r.CastName = source.CastName;
+ r.CastTarget = source.CastTarget;
+ r.CastType = (CastingType)source.CastType;
+ r.Category = source.Category;
+ r.Debug = source.Debug;
+ r.Delay = source.Delay;
+ r.DelayAfterCast = source.DelayAfterCast;
+ r.Duration = source.Duration;
+ r.DurationTotalSeconds = source.DurationTotalSeconds;
+ r.EnduranceCost = source.EnduranceCost;
+ r.GiftOfMana = source.GiftOfMana;
+ r.GiveUpTimer = source.GiveUpTimer;
+ r.HealPct = source.HealPct;
+ r.HealthMax = source.HealthMax;
+ r.Ifs = source.Ifs;
+ r.IfsKeys = source.IfsKeys;
+ r.IgnoreStackRules = source.IgnoreStackRules;
+ r.InitName = source.InitName;
+ r.IsDebuff = source.IsDebuff;
+ r.IsDoT = source.IsDoT;
+ r.IsBuff = source.IsBuff;
+ r.IsShortBuff = source.IsShortBuff;
+ r.ItemMustEquip = source.ItemMustEquip;
+ r.Mana = source.Mana;
+ r.MaxMana = source.MaxMana;
+ r.MaxTries = source.MaxTries;
+ r.MinDurationBeforeRecast = source.MinDurationBeforeRecast;
+ r.MinEnd = source.MinEnd;
+ r.MinHP = source.MinHP;
+ r.MinMana = source.MinMana;
+ r.MinSick = source.MinSick;
+ r.Mode = source.Mode;
+ r.MyCastTime = (Decimal)source.MyCastTime;
+ r.MyCastTimeInSeconds = (Decimal)source.MyCastTimeInSeconds;
+ r.MyRange = source.MyRange;
+ r.NoAggro = source.NoAggro;
+ r.NoBurn = source.NoBurn;
+ r.NoEarlyRecast = source.NoEarlyRecast;
+ r.NoInterrupt = source.NoInterrupt;
+ r.NoMidSongCast = source.NoMidSongCast;
+ r.NoStack = source.NoStack;
+ r.NoTarget = source.NoTarget;
+ r.PctAggro = source.PctAggro;
+ r.Reagent = source.Reagent;
+ r.ReagentOutOfStock = source.ReagentOutOfStock;
+ r.RecastTime = source.RecastTime;
+ r.RecoveryTime = (Decimal)source.RecoveryTime;
+ r.Rotate = source.Rotate;
+ r.SpellGem = source.SpellGem;
+ r.SpellIcon = source.SpellIcon;
+ r.SpellID = source.SpellID;
+ r.SpellInBook = source.SpellInBook;
+ r.SpellName = source.SpellName;
+ r.SpellType = source.SpellType;
+ r.StackRecastDelay = source.StackRecastDelay;
+ r.StackRequestItem = source.StackRequestItem;
+ r.StackRequestTargets.AddRange(source.StackRequestTargets);
+ r.Subcategory = source.Subcategory;
+ r.TargetType = source.TargetType;
+ r.TriggerSpell = source.TriggerSpell;
+ r.Zone = source.Zone;
+ r.Level = source.Level;
+ r.Description = source.Description;
+ r.ResistType = source.ResistType;
+ r.ResistAdj = source.ResistAdj;
+ r.CastTypeOverride = (CastingType)source.CastTypeOverride;
+ foreach (var entry in source.CheckForCollection)
+ {
+ if (!r.CheckForCollection.ContainsKey(entry))
+ {
+ r.CheckForCollection.Add(entry, 0);
+ }
+ }
+ r.Enabled = source.Enabled;
- public Int64 LastRequestTimeStamp;
+ return r;
+ }
+ public Int64 LastRequestTimeStamp;
}
}
diff --git a/E3Next/Data/Zone.cs b/E3Next/Data/Zone.cs
index f58a5c71..cb3bb29a 100644
--- a/E3Next/Data/Zone.cs
+++ b/E3Next/Data/Zone.cs
@@ -26,5 +26,10 @@ public Zone(Int32 zoneId)
public string ShortName { get; set; }
public int Id { get; set; }
public bool IsSafeZone { get; set; }
- }
+
+ public override string ToString()
+ {
+ return $"Name:{Name} ShortName:{ShortName} Id: {Id} IsSafeZone:{IsSafeZone}";
+ }
+ }
}
diff --git a/E3Next/E3.cs b/E3Next/E3.cs
index e13cfcd8..9e1d6ea1 100644
--- a/E3Next/E3.cs
+++ b/E3Next/E3.cs
@@ -53,6 +53,8 @@ public static void Process()
//stunned, no sense in processing
if (MQ.Query("${Me.Stunned}")) return;
if (MQ.Query("${Me.CurrentHPs}") < 1) return; //we are dead
+ if (MQ.Query("${Me.Feigning}") && E3.CharacterSettings.IfFDStayDown) return;
+
//global action taken key, used by adv settings
//if true, adv settings will stop processing for this loop.
@@ -156,6 +158,7 @@ private static void AfterAdvancedSettingsCalls()
//bard song player
if (E3.CurrentClass == Data.Class.Bard)
{
+ Bard.Check_AutoMez();
Bard.check_BardSongs();
}
}
@@ -251,15 +254,12 @@ public static bool IsPaused()
///
///
private static Int64 _nextStateUpdateCheckTime = 0;
- private static Int64 _nextStateUpdateTimeInterval = 50;
-
//needs to be fast to be able to show a new buff has landed
private static Int64 _nextBuffUpdateCheckTime = 0;
- private static Int64 _nextBuffUpdateTimeInterval = 1000;
-
private static Int64 _nextSlowUpdateCheckTime = 0;
- private static Int64 _nextSlowUpdateTimeInterval = 1000;
-
+ private static Int64 _nextMiscUpdateCheckTime = 0;
+ private static Int64 _MiscUpdateCheckRate = 100;
+
//qick hack to prevent calling state update... while in state updates.
public static bool InStateUpdate = false;
@@ -273,24 +273,20 @@ public static void StateUpdates_Counters()
PubServer.AddTopicMessage("${Me.CountersCorrupted}", MQ.Query("${Debuff.Corrupted}"));
}
+ public static void StateUpdates_Misc()
+ {
+ PubServer.AddTopicMessage("${InCombat}", CurrentInCombat.ToString());
+ PubServer.AddTopicMessage("${EQ.CurrentFocusedWindowName}", MQ.GetFocusedWindowName());
+ PubServer.AddTopicMessage("${Me.CurrentTargetID}", MQ.Query("${Target.ID}"));
+ }
public static void StateUpdates_Stats()
{
- PctHPs = MQ.Query("${Me.PctHPs}");
-
PubServer.AddTopicMessage("${Me.PctMana}", MQ.Query("${Me.PctMana}"));
PubServer.AddTopicMessage("${Me.PctEndurance}", MQ.Query("${Me.PctEndurance}"));
PubServer.AddTopicMessage("${Me.PctHPs}", PctHPs.ToString());
PubServer.AddTopicMessage("${Me.CurrentHPs}", MQ.Query("${Me.CurrentHPs}"));
PubServer.AddTopicMessage("${Me.CurrentMana}", MQ.Query("${Me.CurrentMana}"));
PubServer.AddTopicMessage("${Me.CurrentEndurance}", MQ.Query("${Me.CurrentEndurance}"));
-
- IsInvis = MQ.Query("${Me.Invis}");
-
- CurrentId = MQ.Query("${Me.ID}");
- CurrentInCombat = Basics.InCombat();
- PubServer.AddTopicMessage("${InCombat}", CurrentInCombat.ToString());
- PubServer.AddTopicMessage("${EQ.CurrentFocusedWindowName}", MQ.GetFocusedWindowName());
- PubServer.AddTopicMessage("${Me.CurrentTargetID}", MQ.Query("${Target.ID}"));
}
public static void StateUpdates_BuffInformation()
{
@@ -320,21 +316,30 @@ public static void StateUpdates()
{
//this is important so that we do not get caught up in recursion during a Delay as delay can call this.
InStateUpdate = true;
+ PctHPs = MQ.Query("${Me.PctHPs}");
+ IsInvis = MQ.Query("${Me.Invis}");
+ CurrentId = MQ.Query("${Me.ID}");
+ CurrentInCombat = Basics.InCombat();
- //expensive only send out once per second?
- if (e3util.ShouldCheck(ref _nextBuffUpdateCheckTime, _nextBuffUpdateTimeInterval))
+ //hp, mana, counters, etc, should send out quickly, but no more than say 50 milliseconds
+ if (e3util.ShouldCheck(ref _nextStateUpdateCheckTime, E3.CharacterSettings.CPU_PublishStateDataInMS))
{
- StateUpdates_BuffInformation();
+ StateUpdates_Stats();
}
- //hp, mana, counters, etc, should send out quickly, but no more than say 50 milliseconds
- if (e3util.ShouldCheck(ref _nextStateUpdateCheckTime, _nextStateUpdateTimeInterval))
+ //other stuff not quite so quickly
+ if (e3util.ShouldCheck(ref _nextMiscUpdateCheckTime, _MiscUpdateCheckRate))
{
+ StateUpdates_Misc();
+ }
+ //expensive only send out once per second?
+ if (e3util.ShouldCheck(ref _nextBuffUpdateCheckTime, E3.CharacterSettings.CPU_PublishBuffDataInMS))
+ {
+ StateUpdates_BuffInformation();
StateUpdates_Counters();
- StateUpdates_Stats();
}
-
+
//not horribly important stuff, can just be sent out whever, currently once per second
- if (e3util.ShouldCheck(ref _nextSlowUpdateCheckTime, _nextSlowUpdateTimeInterval))
+ if (e3util.ShouldCheck(ref _nextSlowUpdateCheckTime, E3.CharacterSettings.CPU_PublishSlowDataInMS))
{
StateUpdates_AAInformation();
//lets query the data we are configured to send out extra
@@ -352,7 +357,13 @@ public static void StateUpdates()
CurrentPetName = nameOfPet;
PubServer.AddTopicMessage("${Me.Pet.CleanName}", CurrentPetName);
}
-
+ string nameOfMerc = MQ.Query("${Mercenary.CleanName}");
+ if (nameOfMerc != "NULL")
+ {
+ //set the pet name
+ CurrentMercName = nameOfMerc;
+ PubServer.AddTopicMessage("${Mercenary.CleanName}", CurrentMercName);
+ }
bool IsMoving = MQ.Query("${Me.Moving}");
if (IsMoving)
{
@@ -383,6 +394,17 @@ private static void RefreshCaches()
Casting.RefreshGemCache();
Basics.RefreshGroupMembers();
}
+ public static void ReInit()
+ {
+ string classValue = e3util.ClassNameFix(MQ.Query("${Me.Class}"));
+ Enum.TryParse(classValue, out CurrentClass);
+ CurrentLongClassString = CurrentClass.ToString();
+ CurrentShortClassString = Data.Classes.ClassLongToShort[CurrentLongClassString];
+ if(e3util.IsEQLive())
+ {
+ e3util.MobMaxDebuffSlots = 200;
+ }
+ }
private static void Init()
{
@@ -390,8 +412,12 @@ private static void Init()
{
MQ.ClearCommands();
AsyncIO.ForceDotNet.Force();
-
- Logging.TraceLogLevel = Logging.LogLevels.None; //log level we are currently at
+ if (e3util.IsEQLive())
+ {
+ e3util.MobMaxDebuffSlots = 200;
+ e3util.XtargetMax = 20;
+ }
+ Logging.TraceLogLevel = Logging.LogLevels.None; //log level we are currently at
Logging.MinLogLevelTolog = Logging.LogLevels.Error; //log levels have integers assoicatd to them. you can set this to Error to only log errors.
Logging.DefaultLogLevel = Logging.LogLevels.Debug; //the default if a level is not passed into the _log.write statement. useful to hide/show things.
MainProcessor.ApplicationName = "E3"; //application name, used in some outputs
@@ -494,6 +520,7 @@ private static void CheckGC()
public static Data.Class CurrentClass;
public static string ServerName;
public static string CurrentPetName = String.Empty;
+ public static string CurrentMercName = String.Empty;
public static bool CurrentInCombat = false;
public static int CurrentId;
public static Int64 LastMovementTimeStamp;
diff --git a/E3Next/E3Next.csproj b/E3Next/E3Next.csproj
index 9e8ebe22..fa956c2d 100644
--- a/E3Next/E3Next.csproj
+++ b/E3Next/E3Next.csproj
@@ -48,14 +48,17 @@
..\packages\AsyncIO.0.1.69\lib\net40\AsyncIO.dll
+
+ ..\packages\Google.Protobuf.3.26.1\lib\net45\Google.Protobuf.dll
+
..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
..\packages\NaCl.Net.0.1.13\lib\net472\NaCl.dll
-
- ..\packages\NetMQ.4.0.1.10\lib\net47\NetMQ.dll
+
+ ..\packages\NetMQ.4.0.1.13\lib\net47\NetMQ.dll
@@ -76,9 +79,6 @@
..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll
-
- ..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll
-
..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
@@ -116,7 +116,9 @@
+
+
@@ -134,6 +136,11 @@
+
+ True
+ True
+ Resources.resx
+
@@ -180,6 +187,10 @@
{55537c61-1e0a-4b1e-b51f-1cd0149b5cc4}
E3Discord
+
+ {08d08e06-22a7-49b9-afa4-04f9e2aa9210}
+ E3NextProxy
+
{b2f73dbf-6758-48d3-8258-599bf07fa731}
E3NextUI
@@ -191,10 +202,26 @@
+
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+
powershell.exe $(ProjectDir)CopyToEQFolder.ps1
+
+ echo %25date%25 %25time%25 > "$(ProjectDir)\Resources\BuildDate.txt"
+
\ No newline at end of file
diff --git a/E3Next/Processors/Alerts.cs b/E3Next/Processors/Alerts.cs
index 49a5b782..9fccd88e 100644
--- a/E3Next/Processors/Alerts.cs
+++ b/E3Next/Processors/Alerts.cs
@@ -15,7 +15,7 @@ public static class Alerts
{
private static Logging _log = E3.Log;
private static IMQ MQ = E3.MQ;
-
+
///
/// Initializes this instance.
///
@@ -240,20 +240,49 @@ private static void RegisterEvents()
});
if(e3util.IsEQLive())
{
- pattern = @"You gain party experience!";
+ pattern = @"You gain party experience";
EventProcessor.RegisterEvent("YouGainEXPParty", pattern, (x) => {
E3.Bots.Broadcast(x.eventString + $" Total:{MQ.Query("${Me.PctExp}")}%");
});
- pattern = @"You gain experience!";
+ pattern = @"You gain experience";
EventProcessor.RegisterEvent("YouGainEXP", pattern, (x) => {
E3.Bots.Broadcast(x.eventString + $" Total:{MQ.Query("${Me.PctExp}")}%");
});
+ pattern = @"(.+) has asked you to join the shared task";
+ EventProcessor.RegisterEvent("GuildAddTask", pattern, (x) => {
+ if (!E3.CharacterSettings.Misc_AutoJoinTasks) return;
+ if (x.match.Groups.Count > 1)
+ {
+ string person = x.match.Groups[1].Value;
+ //need to fill out GuildList.txt for it to work for guild members not in zone.
+ if (e3util.InMyGuild(person))
+ {
+
+ MQ.Delay(7000);
+ e3util.ClickYesNo(true);
+
+ }
+ else
+ {
+ E3.Bots.Broadcast($@"{person} tried to invite me to a task, but not in my guild or was in guild but not in zone and not in \e3 Macro Inis\guildlist.txt");
+ }
+ }
+ });
+ EventProcessor.RegisterCommand("/e3autojointasks", (x) =>
+ {
+
+ e3util.ToggleBooleanSetting(ref E3.CharacterSettings.Misc_AutoJoinTasks, "Auto Join Tasks", x.args);
+
+
+ });
+
}
}
+
}
}
diff --git a/E3Next/Processors/Assist.cs b/E3Next/Processors/Assist.cs
index 139a0a55..5b32730c 100644
--- a/E3Next/Processors/Assist.cs
+++ b/E3Next/Processors/Assist.cs
@@ -16,25 +16,34 @@ namespace E3Core.Processors
///
public static class Assist
{
- public static bool AllowControl = false;
+ [ExposedData("Assist", "AllowControl")]
+ public static bool AllowControl = false;
+ [ExposedData("Assist", "IsAssisting")]
public static Boolean IsAssisting = false;
- public static Int32 AssistTargetID = 0;
+ [ExposedData("Assist", "AssistTargetID")]
+ public static Int32 AssistTargetID = 0;
public static long LastAssistEndedTimestamp = 0;
private static Logging _log = E3.Log;
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
- private static IList _rangeTypes = new List() { "Ranged", "Autofire" };
- private static IList _meleeTypes = new List() { "Melee","AutoAttack" };
- private static IList _assistDistanceTypes = new List { "MaxMelee", "off" };
- public static Int32 _assistDistance = 0;
- private static bool _assistIsEnraged = false;
+ [ExposedData("Assist", "RangeTypes")]
+ private static List _rangeTypes = new List() { "Ranged", "Autofire" };
+ [ExposedData("Assist", "MeleeTypes")]
+ private static List _meleeTypes = new List() { "Melee","AutoAttack" };
+ [ExposedData("Assist", "AssistDistanceTypes")]
+ private static List _assistDistanceTypes = new List { "MaxMelee", "off" };
+ [ExposedData("Assist", "AssistDistance")]
+ public static Int32 _assistDistance = 0;
+ [ExposedData("Assist", "AssistIsEnraged")]
+ private static bool _assistIsEnraged = false;
private static Dictionary _stickSwitch;
private static HashSet _offAssistIgnore = new HashSet();
- private static Data.Spell _divineStun = new Data.Spell("Divine Stun");
- private static Data.Spell _terrorOfDiscord = new Data.Spell("Terror of Discord");
- private static IList _tankTypes = new List() { "WAR", "PAL", "SHD" };
+ //private static Data.Spell _divineStun = new Data.Spell("Divine Stun");
+ //private static Data.Spell _terrorOfDiscord = new Data.Spell("Terror of Discord");
+ [ExposedData("Assist", "TankTypes")]
+ private static List _tankTypes = new List() { "WAR", "PAL", "SHD" };
///
/// Initializes this instance.
@@ -64,10 +73,11 @@ public static void Reset()
Casting.ResetResistCounters();
//put them back in their object pools
DebuffDot.Reset();
- Burns.Reset();
+ Burns.Reset();
AssistOff();
+
- }
+ }
///
/// Checks the assist status.
@@ -263,22 +273,22 @@ public static void CombatAbilties()
E3.Bots.Broadcast($"Taunting {s.CleanName}: {tt.ClassShortName} - {tt.CleanName} has agro and not a tank");
}
- else if (MQ.Query("${Me.AltAbilityReady[Divine Stun]}"))
- {
- if (Casting.CheckReady(_divineStun))
- {
- Casting.Cast(AssistTargetID, _divineStun);
- }
-
- }
- else if (MQ.Query("${Me.SpellReady[Terror of Discord]}"))
- {
- if (Casting.CheckReady(_terrorOfDiscord))
- {
- Casting.Cast(AssistTargetID, _terrorOfDiscord);
- }
-
- }
+ //else if (MQ.Query("${Me.AltAbilityReady[Divine Stun]}"))
+ //{
+ // if (Casting.CheckReady(_divineStun))
+ // {
+ // Casting.Cast(AssistTargetID, _divineStun);
+ // }
+
+ //}
+ //else if (MQ.Query("${Me.SpellReady[Terror of Discord]}"))
+ //{
+ // if (Casting.CheckReady(_terrorOfDiscord))
+ // {
+ // Casting.Cast(AssistTargetID, _terrorOfDiscord);
+ // }
+
+ //}
}
}
}
@@ -335,13 +345,13 @@ public static void CombatAbilties()
continue;
}
- if (ability.CastType == Data.CastType.Ability)
+ if (ability.CastType == Data.CastingType.Ability)
{
if(String.Equals(ability.CastName,"Bash",StringComparison.OrdinalIgnoreCase))
{
//check if we can actually bash
- if (MQ.Query("${Target.Distance}") > 14 || !(MQ.Query("${Select[${Me.Inventory[Offhand].Type},Shield]}") || MQ.Query("${Me.AltAbility[2 Hand Bash]}")))
+ if (MQ.Query("${Target.Distance}") > 15 || !(MQ.Query("${Select[${Me.Inventory[Offhand].Type},Shield]}") || MQ.Query("${Me.AltAbility[2 Hand Bash]}")))
{
continue;
}
@@ -350,7 +360,7 @@ public static void CombatAbilties()
if (String.Equals(ability.CastName, "Slam", StringComparison.OrdinalIgnoreCase))
{
//check if we can actually bash
- if (MQ.Query("${Target.Distance}") > 14 )
+ if (MQ.Query("${Target.Distance}") > 15)
{
continue;
}
@@ -358,7 +368,7 @@ public static void CombatAbilties()
if (String.Equals(ability.CastName, "Kick", StringComparison.OrdinalIgnoreCase))
{
//check if we can actually kick
- if (MQ.Query("${Target.Distance}") > 14)
+ if (MQ.Query("${Target.Distance}") > 15)
{
continue;
}
@@ -366,12 +376,12 @@ public static void CombatAbilties()
Casting.Cast(AssistTargetID, ability);
}
- else if (ability.CastType == Data.CastType.AA)
+ else if (ability.CastType == Data.CastingType.AA)
{
Casting.Cast(AssistTargetID, ability);
}
- else if (ability.CastType == Data.CastType.Disc)
+ else if (ability.CastType == Data.CastingType.Disc)
{
Int32 endurance = MQ.Query("${Me.Endurance}");
@@ -399,7 +409,7 @@ public static void CombatAbilties()
}
}
}
- else if (ability.CastType == Data.CastType.Item)
+ else if (ability.CastType == Data.CastingType.Item)
{
Casting.Cast(AssistTargetID, ability);
}
@@ -462,6 +472,7 @@ public static void AssistOff()
Burns.Reset();
}
LastAssistEndedTimestamp = Core.StopWatch.ElapsedMilliseconds;
+
}
///
@@ -508,7 +519,7 @@ public static void AssistOn(Int32 mobID, Int32 zoneId)
bool amIStanding = MQ.Query("${Me.Standing}");
if (MQ.Query("${Me.Feigning}"))
{
- if (E3.CharacterSettings.IfFDStayDown) return;
+ //if (E3.CharacterSettings.IfFDStayDown) return;
MQ.Cmd("/stand");
}else
{
@@ -525,9 +536,18 @@ public static void AssistOn(Int32 mobID, Int32 zoneId)
if (Movement.Following && folTarget.Distance3D > 100 && MQ.Query("${Me.Moving}"))
{
//using a delay in awhile loop, use query for realtime info
+ Int32 counter = 0;
while (MQ.Query("${Me.Moving}") && MQ.Query($"${{Spawn[{Movement.FollowTargetName}].Distance3D}}") > 100)
{
MQ.Delay(100);
+ counter++;
+ //if we have tried more than 3 seconds, stop and kick out.
+ if(counter>30)
+ {
+ E3.Bots.Broadcast("\arERROR:\ag Tried to move to target, took longer than 3 seconds, possibly not at the target. Turning off Assist");
+ AssistOff();
+ return;
+ }
//wait us to get close to our follow target and then we can engage
}
}
@@ -549,16 +569,24 @@ public static void AssistOn(Int32 mobID, Int32 zoneId)
}
}
- if (!AllowControl)
+ //rogues have discs that they need to be sneaking/invisiable for
+ if (String.IsNullOrWhiteSpace(E3.CharacterSettings.Rogue_SneakAttack))
+ {
+ MQ.Cmd("/makemevisible");
+
+ }
+
+
+ if (!AllowControl)
{
if(e3util.IsEQLive())
{
//don't want to appear 'bot' like by always facing the mob
//stick for melee should keep them facing th emob
//as well as ranged has face commands but casters shouldn't care
- //if(!((E3.CurrentClass & Class.Caster) == E3.CurrentClass || (E3.CurrentClass & Class.Priest) == E3.CurrentClass))
+ if(!((E3.CurrentClass & Class.Caster) == E3.CurrentClass || (E3.CurrentClass & Class.Priest) == E3.CurrentClass)|| (E3.CharacterSettings.Assist_Type.Equals("AutoAttack", StringComparison.OrdinalIgnoreCase)))
{
- //MQ.Cmd($"/face id {AssistTargetID}", 500);
+ MQ.Cmd($"/face id {AssistTargetID}", 500);
}
}
@@ -609,7 +637,7 @@ public static void AssistOn(Int32 mobID, Int32 zoneId)
}
}
- if (E3.CurrentClass == Data.Class.Rogue)
+ if (E3.CurrentClass == Data.Class.Rogue && !String.IsNullOrWhiteSpace(E3.CharacterSettings.Rogue_SneakAttack))
{
Rogue.RogueStrike();
@@ -733,7 +761,7 @@ private static void RegisterEvents()
x.args.Remove("/ignoreme");
}
- MQ.Cmd("/makemevisible");
+
//Rez.Reset();
if (x.args.Count == 0)
{
@@ -796,7 +824,7 @@ private static void RegisterEvents()
if((E3.CurrentClass & Class.Priest)!=E3.CurrentClass)
{
//if not a priest/healer, lets chill for 30-400ms
- MQ.Delay(E3.Random.Next(30, 400));
+ // MQ.Delay(E3.Random.Next(30, 400));
}
diff --git a/E3Next/Processors/Basics.cs b/E3Next/Processors/Basics.cs
index 6825fe06..1553f819 100644
--- a/E3Next/Processors/Basics.cs
+++ b/E3Next/Processors/Basics.cs
@@ -4,6 +4,7 @@
using E3Core.Settings;
using E3Core.Settings.FeatureSettings;
using E3Core.Utility;
+using E3NextUI;
using IniParser.Model;
using MonoCore;
using System;
@@ -24,15 +25,19 @@ public static class Basics
public static Logging _log = E3.Log;
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
- public static bool IsPaused = false;
- public static List GroupMembers = new List();
+ [ExposedData("Basics", "IsPaused")]
+ public static bool IsPaused = false;
+ [ExposedData("Basics", "GroupMembers")]
+ public static List GroupMembers = new List();
private static long _nextGroupCheck = 0;
private static long _nextGroupCheckInterval = 1000;
private static long _nextResourceCheck = 0;
private static long _nextResourceCheckInterval = 1000;
private static long _nextAutoMedCheck = 0;
private static long _nextAutoMedCheckInterval = 1000;
- private static long _nextFoodCheck = 0;
+ [ExposedData("Basics", "Misc_LastTimeAutoMedHappened")]
+ public static long Misc_LastTimeAutoMedHappened = 0;
+ private static long _nextFoodCheck = 0;
private static long _nextFoodCheckInterval = 1000;
private static long _nextCursorCheck = 0;
private static long _nextCursorCheckInterval = 1000;
@@ -46,7 +51,10 @@ public static class Basics
private static DateTime? _cursorOccupiedSince;
private static TimeSpan _cursorOccupiedTime;
private static TimeSpan _cursorOccupiedThreshold = new TimeSpan(0, 0, 0, 30);
- private static Int32 _cusrorPreviousID;
+
+ [ExposedData("Basics", "CusrorPreviousID")]
+ private static Int32 _cusrorPreviousID;
+ [ExposedData("Basics", "Debug_PreviousCPUDelay")]
static Int32 Debug_PreviousCPUDelay = 50;
///
@@ -64,7 +72,32 @@ public static void Init()
public static void RegisterEvents()
{
+ EventProcessor.RegisterCommand("/e3printAA", (x) =>
+ {
+ List aas = e3util.ListAllActiveAA();
+
+
+ foreach(var aa in aas)
+ {
+ E3.Bots.Broadcast(aa.CastName);
+ }
+ E3.Bots.Broadcast("Total Count:" + aas.Count);
+ //E3.Bots.Broadcast(output);
+
+ });
+ EventProcessor.RegisterCommand("/e3printDics", (x) =>
+ {
+ List aas = e3util.ListAllDiscData();
+
+
+ foreach (var aa in aas)
+ {
+ E3.Bots.Broadcast(aa.CastName);
+ }
+ E3.Bots.Broadcast("Total Count:" + aas.Count);
+ });
+
EventProcessor.RegisterCommand("/e3printini", (x) =>
{
// Print Character InI file
@@ -82,7 +115,12 @@ public static void RegisterEvents()
}
}
});
-
+ EventProcessor.RegisterCommand("/e3forage", (x) =>
+ {
+ //swap them
+ e3util.ToggleBooleanSetting(ref E3.CharacterSettings.Misc_AutoForage, "Auto Forage", x.args);
+
+ });
EventProcessor.RegisterEvent("InviteToGroup", "(.+) invites you to join a group.", (x) =>
{
@@ -183,6 +221,7 @@ public static void RegisterEvents()
Pets.Reset();
Nukes.Reset();
BuffCheck.AddToBuffCheckTimer(2000);
+
//clear out the timers as the ID's are no longer valid
BuffCheck.Reset();
Zoning.Zoned(MQ.Query("${Zone.ID}"));
@@ -289,7 +328,6 @@ public static void RegisterEvents()
{
Pause(true);
MQ.Cmd("/camp");
-
}
}
else
@@ -301,7 +339,6 @@ public static void RegisterEvents()
}
//we are telling people to follow us
E3.Bots.BroadcastCommandToGroup("/e3camp " + E3.CurrentName, x);
-
}
});
EventProcessor.RegisterCommand("/e3treport", (x) =>
@@ -334,14 +371,20 @@ public static void RegisterEvents()
}
});
-
- EventProcessor.RegisterCommand("/e3echo", (x) =>
+ EventProcessor.RegisterCommand("/e3echo", (x) =>
{
string argumentLine = e3util.ArgsToCommand(x.args);
string processedLine = Casting.Ifs_Results(argumentLine);
MQ.Cmd($"/echo {processedLine}");
MQ.Cmd($"/varset E3N_var {processedLine}");
});
+ EventProcessor.RegisterCommand("/e3echobool", (x) =>
+ {
+ string argumentLine = e3util.ArgsToCommand(x.args);
+ bool processedLine = Casting.Ifs(argumentLine);
+ MQ.Cmd($"/echo {processedLine}");
+ //MQ.Cmd($"/varset E3N_var {processedLine}");
+ });
EventProcessor.RegisterCommand("/dropinvis", (x) =>
{
E3.Bots.BroadcastCommandToGroup("/makemevisible",x);
@@ -400,6 +443,9 @@ public static void RegisterEvents()
BaseSettings.CurrentSet = String.Empty;
}
+ E3.ReInit(); //set new class
+ E3.AdvancedSettings.Reset(); //reset all collections
+
E3.CharacterSettings = new CharacterSettings();
E3.AdvancedSettings = new AdvancedSettings();
E3.GeneralSettings = new GeneralSettings();
@@ -416,10 +462,51 @@ public static void RegisterEvents()
if (x.args.Count > 0)
{
- Int32 delay = E3.CharacterSettings.CPU_ProcessLoopDelay;
- Int32.TryParse(x.args[0], out delay);
- E3.CharacterSettings.CPU_ProcessLoopDelay = delay;
- }
+
+ if (!e3util.FilterMe(x))
+ {
+ if(x.args.Count>1)
+ {
+ //pull out the type and then the value
+ string command = x.args[0];
+ Int32 value = 100;
+
+ if (String.Equals(command, "PublishStateDataInMS",StringComparison.OrdinalIgnoreCase))
+ {
+
+ if (!Int32.TryParse(x.args[1], out value)) value = 50;
+ E3.CharacterSettings.CPU_PublishStateDataInMS = value;
+ E3.Bots.Broadcast($"Setting {command} to value:{value}");
+
+ }
+ else if(String.Equals(command, "PublishBuffDataInMS", StringComparison.OrdinalIgnoreCase))
+ {
+
+ if (!Int32.TryParse(x.args[1], out value)) value = 1000;
+ E3.CharacterSettings.CPU_PublishBuffDataInMS = value;
+ E3.Bots.Broadcast($"Setting {command} to value:{value}");
+
+ }
+ else if (String.Equals(command, "PublishSlowDataInMS", StringComparison.OrdinalIgnoreCase))
+ {
+ if (!Int32.TryParse(x.args[1], out value)) value = 1000;
+ E3.CharacterSettings.CPU_PublishSlowDataInMS = value;
+ E3.Bots.Broadcast($"Setting {command} to value:{value}");
+
+ }
+
+ }
+ else
+ {
+ Int32 delay = E3.CharacterSettings.CPU_ProcessLoopDelay;
+ Int32.TryParse(x.args[0], out delay);
+ E3.CharacterSettings.CPU_ProcessLoopDelay = delay;
+ E3.Bots.Broadcast("Setting CPU Delay to:" + delay.ToString());
+
+ }
+
+ }
+ }
});
@@ -535,8 +622,12 @@ public static void RegisterEvents()
Spawn s;
if (_spawns.TryByID(targetid, out s))
{
- e3util.TryMoveToLoc(s.X, s.Y,s.Z);
- System.Text.StringBuilder sb = new StringBuilder();
+ //lets not appear too botty
+ if(e3util.IsEQEMU())
+ {
+ e3util.TryMoveToLoc(s.X, s.Y, s.Z);
+ }
+ System.Text.StringBuilder sb = new StringBuilder();
bool first = true;
foreach (string arg in x.args)
{
@@ -596,7 +687,10 @@ public static void RegisterEvents()
}
Casting.TrueTarget(targetid);
MQ.Delay(100);
- e3util.TryMoveToLoc(s.X, s.Y,s.Z);
+ if(e3util.IsEQEMU())
+ {
+ e3util.TryMoveToLoc(s.X, s.Y, s.Z);
+ }
Int32 numberToBark = 5;
if (e3util.IsEQLive())
{
@@ -932,29 +1026,29 @@ private static void PrintE3TReportEntries()
public static void PrintE3TReport(Spell spell)
{
- if (spell.CastType == CastType.AA)
+ if (spell.CastType == CastingType.AA)
{
Int32 timeInMS = MQ.Query($"${{Me.AltAbilityTimer[{spell.CastName}]}}");
PrintE3TReport_Information(spell, timeInMS);
}
- else if (spell.CastType == CastType.Spell)
+ else if (spell.CastType == CastingType.Spell)
{
Int32 timeInMS = MQ.Query($"${{Me.GemTimer[{spell.CastName}]}}");
PrintE3TReport_Information(spell, timeInMS);
}
- else if (spell.CastType == CastType.Disc)
+ else if (spell.CastType == CastingType.Disc)
{
Int32 timeInTicks = MQ.Query($"${{Me.CombatAbilityTimer[{spell.CastName}]}}");
PrintE3TReport_Information(spell, timeInTicks * 6 * 1000);
}
- else if (spell.CastType == Data.CastType.Ability)
+ else if (spell.CastType == Data.CastingType.Ability)
{
Int32 timeInMS = MQ.Query($"${{Me.AbilityTimer[{spell.CastName}]}}");
PrintE3TReport_Information(spell, timeInMS);
}
- else if (spell.CastType == CastType.Item || spell.CastType == CastType.None)
+ else if (spell.CastType == CastingType.Item || spell.CastType == CastingType.None)
{
if (MQ.Query($"${{FindItem[{spell.CastName}].ID}}"))
@@ -985,170 +1079,194 @@ public static bool InGameCombat()
return inCombat;
}
///
- /// Checks the mana resources, and does actions to regenerate mana during combat.
+ /// server specific code for Lazarus, honestly it was to make things easier for people during the begigning of E3N, ported over from custom macro code
+ /// E3N has somewhat out grown it, and no loner a real valid thing for most servers, leaving here for laz people with an option to turn it off
///
- [ClassInvoke(Data.Class.ManaUsers)]
- public static void CheckManaResources()
+ ///
+ private static bool LazarusManaRecovery()
{
- if (!e3util.ShouldCheck(ref _nextResourceCheck, _nextResourceCheckInterval)) return;
+ if (!(e3util.IsEQEMU() && E3.ServerName == "Lazarus")) return false;
+ if (!E3.GeneralSettings.General_LazarusManaRecovery) return false;
+ if (E3.IsInvis) return false;
+ if (Basics.AmIDead()) return false;
+ if (e3util.IsEQLive()) return false;
- using (_log.Trace())
- {
- if (E3.IsInvis) return;
- if (Basics.AmIDead()) return;
- if (e3util.IsEQLive()) return;
+ int pctMana = MQ.Query("${Me.PctMana}");
+ var pctHps = MQ.Query("${Me.PctHPs}");
+ int currentHps = MQ.Query("${Me.CurrentHPs}");
- int pctMana = MQ.Query("${Me.PctMana}");
- var pctHps = MQ.Query("${Me.PctHPs}");
- int currentHps = MQ.Query("${Me.CurrentHPs}");
+ if (E3.CurrentClass == Data.Class.Enchanter)
+ {
+ bool manaDrawBuff = MQ.Query("${Bool[${Me.Buff[Mana Draw]}]}") || MQ.Query("${Bool[${Me.Song[Mana Draw]}]}");
+ if (manaDrawBuff)
+ {
+ if (pctMana > 50)
+ {
+ return false;
+ }
+ }
+ }
- if (E3.CurrentClass == Data.Class.Enchanter)
- {
- bool manaDrawBuff = MQ.Query("${Bool[${Me.Buff[Mana Draw]}]}") || MQ.Query("${Bool[${Me.Song[Mana Draw]}]}");
- if (manaDrawBuff)
- {
- if (pctMana > 50)
- {
- return;
- }
- }
- }
+ if (E3.CurrentClass == Data.Class.Necromancer)
+ {
+ bool deathBloom = MQ.Query("${Bool[${Me.Buff[Death Bloom]}]}") || MQ.Query("${Bool[${Me.Song[Death Bloom]}]}");
+ if (deathBloom)
+ {
+ return false;
+ }
+ }
- if (E3.CurrentClass == Data.Class.Necromancer)
- {
- bool deathBloom = MQ.Query("${Bool[${Me.Buff[Death Bloom]}]}") || MQ.Query("${Bool[${Me.Song[Death Bloom]}]}");
- if (deathBloom)
- {
- return;
- }
- }
+ if (E3.CurrentClass == Data.Class.Shaman)
+ {
+ bool canniReady = MQ.Query("${Me.AltAbilityReady[Cannibalization]}");
- if (E3.CurrentClass == Data.Class.Shaman)
- {
- bool canniReady = MQ.Query("${Me.AltAbilityReady[Cannibalization]}");
+ if (canniReady && currentHps > 7000 && MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 4500)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Cannibalization", out s))
+ {
+ s = new Spell("Cannibalization");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
- if (canniReady && currentHps > 7000 && MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 4500)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Cannibalization", out s))
- {
- s = new Spell("Cannibalization");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
+ if (MQ.Query("${Me.ItemReady[Summoned: Large Modulation Shard]}"))
+ {
+ if (MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 3500 && currentHps > 6000)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Summoned: Large Modulation Shard", out s))
+ {
+ s = new Spell("Summoned: Large Modulation Shard");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
+ if (MQ.Query("${Me.ItemReady[Azure Mind Crystal III]}"))
+ {
+ if (MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 3500)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Azure Mind Crystal III", out s))
+ {
+ s = new Spell("Azure Mind Crystal III");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
-
+ if (E3.CurrentClass == Data.Class.Necromancer && pctMana < 50 && E3.CurrentInCombat)
+ {
+ bool deathBloomReady = MQ.Query("${Me.AltAbilityReady[Death Bloom]}");
+ if (deathBloomReady && currentHps > 8000)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Death Bloom", out s))
+ {
+ s = new Spell("Death Bloom");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
+ if (E3.CurrentClass == Data.Class.Cleric && pctMana < 30 && E3.CurrentInCombat)
+ {
+ bool miracleReady = MQ.Query("${Me.AltAbilityReady[Quiet Miracle]}");
+ if (miracleReady)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Quiet Miracle", out s))
+ {
+ s = new Spell("Quiet Miracle");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(E3.CurrentId, s);
+ return true;
+ }
+ }
+ }
+ if (E3.CurrentClass == Data.Class.Wizard && pctMana < 15 && E3.CurrentInCombat)
+ {
+ bool harvestReady = MQ.Query("${Me.AltAbilityReady[Harvest of Druzzil]}");
+ if (harvestReady)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Harvest of Druzzil", out s))
+ {
+ s = new Spell("Harvest of Druzzil");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
+ if (E3.CurrentClass == Data.Class.Enchanter && pctMana < 50 && E3.CurrentInCombat)
+ {
+ bool manaDrawReady = MQ.Query("${Me.AltAbilityReady[Mana Draw]}");
+ if (manaDrawReady)
+ {
+ Spell s;
+ if (!Spell.LoadedSpellsByName.TryGetValue("Mana Draw", out s))
+ {
+ s = new Spell("Mana Draw");
+ }
+ if (s.CastType != CastingType.None)
+ {
+ Casting.Cast(0, s);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ ///
+ /// Checks the mana resources, and does actions to regenerate mana during combat.
+ ///
+ [ClassInvoke(Data.Class.ManaUsers)]
+ public static void CheckManaResources()
+ {
+ if (!e3util.ShouldCheck(ref _nextResourceCheck, _nextResourceCheckInterval)) return;
- }
+ if (e3util.IsEQLive()) return;
- if (MQ.Query("${Me.ItemReady[Summoned: Large Modulation Shard]}"))
- {
- if (MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 3500 && currentHps > 6000)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Summoned: Large Modulation Shard", out s))
- {
- s = new Spell("Summoned: Large Modulation Shard");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
- }
- if (MQ.Query("${Me.ItemReady[Azure Mind Crystal III]}"))
+ if(e3util.IsEQEMU() && E3.ServerName=="Lazarus")
+ {
+ if(LazarusManaRecovery())
{
- if (MQ.Query("${Math.Calc[${Me.MaxMana} - ${Me.CurrentMana}]}") > 3500)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Azure Mind Crystal III", out s))
- {
- s = new Spell("Azure Mind Crystal III");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
+ return;
}
+ }
- if (E3.CurrentClass == Data.Class.Necromancer && pctMana < 50 && E3.CurrentInCombat)
- {
- bool deathBloomReady = MQ.Query("${Me.AltAbilityReady[Death Bloom]}");
- if (deathBloomReady && currentHps > 8000)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Death Bloom", out s))
- {
- s = new Spell("Death Bloom");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
- }
- if (E3.CurrentClass == Data.Class.Cleric && pctMana < 30 && E3.CurrentInCombat)
- {
- bool miracleReady = MQ.Query("${Me.AltAbilityReady[Quiet Miracle]}");
- if (miracleReady)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Quiet Miracle", out s))
- {
- s = new Spell("Quiet Miracle");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(E3.CurrentId, s);
- return;
- }
- }
- }
- if (E3.CurrentClass == Data.Class.Wizard && pctMana < 15 && E3.CurrentInCombat)
- {
- bool harvestReady = MQ.Query("${Me.AltAbilityReady[Harvest of Druzzil]}");
- if (harvestReady)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Harvest of Druzzil", out s))
- {
- s = new Spell("Harvest of Druzzil");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
- }
- if (E3.CurrentClass == Data.Class.Enchanter && pctMana < 50 && E3.CurrentInCombat)
- {
- bool manaDrawReady = MQ.Query("${Me.AltAbilityReady[Mana Draw]}");
- if (manaDrawReady)
- {
- Spell s;
- if (!Spell.LoadedSpellsByName.TryGetValue("Mana Draw", out s))
- {
- s = new Spell("Mana Draw");
- }
- if (s.CastType != CastType.None)
- {
- Casting.Cast(0, s);
- return;
- }
- }
- }
+ using (_log.Trace())
+ {
+ if (E3.IsInvis) return;
+ if (Basics.AmIDead()) return;
+ if (e3util.IsEQLive()) return;
+ int pctMana = MQ.Query("${Me.PctMana}");
+ var pctHps = MQ.Query("${Me.PctHPs}");
+ int currentHps = MQ.Query("${Me.CurrentHPs}");
- if (E3.CharacterSettings.Manastone_OverrideGeneralSettings && !E3.CharacterSettings.Manastone_Enabled)
+ if (E3.CharacterSettings.Manastone_OverrideGeneralSettings && !E3.CharacterSettings.Manastone_Enabled)
{
return;
}
@@ -1282,15 +1400,48 @@ public static void CheckManaResources()
public static void CheckAutoMed()
{
if (!e3util.ShouldCheck(ref _nextAutoMedCheck, _nextAutoMedCheckInterval)) return;
+ if (!E3.CharacterSettings.Misc_AutoMedBreak) return;
int autoMedPct = E3.GeneralSettings.General_AutoMedBreakPctMana;
if (autoMedPct == 0) return;
- if (InCombat()) return;
- if (Casting.SpellBookWndOpen()) return;
+
+ if(Misc_LastTimeAutoMedHappened==0)
+ {
+ Misc_LastTimeAutoMedHappened = Core.StopWatch.ElapsedMilliseconds;
+ }
+
+ if(E3.ActionTaken && E3.CurrentClass!=Class.Bard)
+ { //we just did something, lets wait for at least one loop of nothing before we sit
+ //this should prevent cast/sit/cast/cast in rapid fire situations
+ Misc_LastTimeAutoMedHappened = Core.StopWatch.ElapsedMilliseconds;
+ return;
+
+ }
+ else if(E3.CurrentClass== Class.Bard && Basics.InCombat())
+ {
+ //well they won't really sit in combat\
+ Misc_LastTimeAutoMedHappened = Core.StopWatch.ElapsedMilliseconds;
+ return;
+ }
+ //don't try and sit more than once every 3 seconds to prevent the cast/spell/up /down
+ if(Core.StopWatch.ElapsedMilliseconds < (Misc_LastTimeAutoMedHappened+3000))
+ {
+ return;
+ }
+ bool isCasterOrPriest = (E3.CurrentClass & Class.Caster) == E3.CurrentClass || (E3.CurrentClass & Class.Priest) == E3.CurrentClass;
+
+ if (E3.CharacterSettings.Misc_EndMedBreakInCombat || (Assist.IsAssisting && !isCasterOrPriest))
+ {
+
+ if (InCombat()) return;
+
+ }
+ if (Casting.SpellBookWndOpen()) return;
if (e3util.IsManualControl()) return;
if (Casting.IsCasting() && E3.CurrentClass!= Class.Bard) return;
bool amIStanding = MQ.Query("${Me.Standing}");
int pctMana = MQ.Query("${Me.PctMana}");
int pctEndurance = MQ.Query("${Me.PctEndurance}");
+ int pctHealth = MQ.Query("${Me.PctHPs}");
bool confirmationBox = MQ.Query("${Window[ConfirmationDialogBox].Open}");
if (!confirmationBox && !amIStanding&& pctMana > 99 && pctEndurance > 99 && !e3util.IsManualControl())
{
@@ -1300,7 +1451,7 @@ public static void CheckAutoMed()
//no sense in recovering endurance if not in resting state
if (!MQ.Query("${Me.CombatState.Equal[ACTIVE]}") && E3.CurrentClass == Class.Bard) return;
- if (!E3.CharacterSettings.Misc_AutoMedBreak) return;
+
using (_log.Trace())
{
bool onMount = MQ.Query("${Me.Mount.ID}");
@@ -1321,14 +1472,18 @@ public static void CheckAutoMed()
if (pctMana < autoMedPct && (E3.CurrentClass & Class.ManaUsers) == E3.CurrentClass)
{
MQ.Cmd("/sit");
- return;
+ Misc_LastTimeAutoMedHappened = Core.StopWatch.ElapsedMilliseconds;
+
+ return;
}
if (pctEndurance < autoMedPct)
{
MQ.Cmd("/sit");
- }
- }
+ Misc_LastTimeAutoMedHappened = Core.StopWatch.ElapsedMilliseconds;
+
+ }
+ }
}
}
diff --git a/E3Next/Processors/BegForBuffs.cs b/E3Next/Processors/BegForBuffs.cs
index 071e1f4d..fcf08200 100644
--- a/E3Next/Processors/BegForBuffs.cs
+++ b/E3Next/Processors/BegForBuffs.cs
@@ -98,7 +98,7 @@ private static void RegsterEvents()
if (totalQueuedSpells > 0)
{
MQ.Cmd($"/t {user} casting buffs on you, please wait.");
- E3.Bots.BroadcastCommand($"/buffme {spawn.ID}");
+ E3.Bots.BroadcastCommand($"/buffme {spawn.CleanName}");
}
}
@@ -145,7 +145,7 @@ private static void RegsterEvents()
if (totalQueuedSpells > 0)
{
MQ.Cmd($"/t {user} casting buffs on your pet, please wait.");
- E3.Bots.BroadcastCommand($"/buffme {petid}");
+ E3.Bots.BroadcastCommand($"/buffpet {user}");
}
}
@@ -164,32 +164,60 @@ private static void RegsterEvents()
{
if (x.args.Count > 0)
{
- if (Int32.TryParse(x.args[0], out var spawnid))
- {
- foreach (var spell in E3.CharacterSettings.GroupBuffs)
- {
- if(_spawns.TryByID(spawnid, out var spawn))
- {
- _queuedBuffs.Enqueue(new BuffQueuedItem() { TargetID = spawnid, Spell = spell });
- }
-
+ string spawnid = x.args[0];
+ if (_spawns.TryByName(spawnid, out var spawn))
+ {
+ foreach (var spell in E3.CharacterSettings.GroupBuffs)
+ {
+ _queuedBuffs.Enqueue(new BuffQueuedItem() { TargetID = spawn.ID, Spell = spell });
}
- }
+ }
}
else
{
-
foreach (var spell in E3.CharacterSettings.GroupBuffs)
{
_queuedBuffs.Enqueue(new BuffQueuedItem() { TargetID = E3.CurrentId, Spell = spell });
}
- E3.Bots.BroadcastCommand($"/buffme {E3.CurrentId}");
+ E3.Bots.BroadcastCommand($"/buffme {E3.CurrentName}");
}
});
+ EventProcessor.RegisterCommand("/buffpet", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ string spawnid = x.args[0];
+ if (_spawns.TryByName(spawnid, out var spawn))
+ {
+ if (spawn.PetID > 0)
+ {
+ foreach (var spell in E3.CharacterSettings.GroupBuffs)
+ {
+ _queuedBuffs.Enqueue(new BuffQueuedItem() { TargetID = spawn.PetID, Spell = spell });
+ }
- EventProcessor.RegisterCommand("/buffit", (x) =>
+ }
+ }
+ }
+ else
+ {
+ if (_spawns.TryByID(E3.CurrentId, out var spawn))
+ {
+ foreach (var spell in E3.CharacterSettings.GroupBuffs)
+ {
+
+ _queuedBuffs.Enqueue(new BuffQueuedItem() { TargetID = spawn.PetID, Spell = spell });
+
+ }
+ }
+
+ E3.Bots.BroadcastCommand($"/buffpet {E3.CurrentName}");
+ }
+ });
+
+ EventProcessor.RegisterCommand("/buffit", (x) =>
{
if (x.args.Count > 0)
{
@@ -207,7 +235,10 @@ private static void RegsterEvents()
int targetid = MQ.Query("${Target.ID}");
if(targetid>0)
{
- E3.Bots.BroadcastCommand($"/buffme {targetid}");
+ if (_spawns.TryByID(targetid, out var spawn))
+ {
+ E3.Bots.BroadcastCommand($"/buffme {spawn.CleanName}");
+ }
}
}
@@ -250,9 +281,8 @@ private static void RegsterEvents()
}
bool inBook = MQ.Query($"${{Me.Book[{spell}]}}");
bool aa = MQ.Query($"${{Me.AltAbility[{spell}].Spell}}");
- bool item = MQ.Query($"${{FindItem[={spell}]}}");
-
- if (inBook || aa || item)
+
+ if (inBook || aa )
{
if (groupReply)
{
@@ -418,7 +448,7 @@ public static void Check_QueuedBuffs()
}
//not a valid spell
- if (s.CastType==CastType.None)
+ if (s.CastType==CastingType.None)
{
_queuedBuffs.Dequeue();
return;
@@ -451,8 +481,11 @@ public static void Check_QueuedBuffs()
{
//so we can be sure our cursor was empty before we cast
Int32 cursorID = MQ.Query("${Cursor.ID}");
-
- var result = Casting.Cast(spawn.ID, s, Heals.SomeoneNeedsHealing);
+
+ recast:
+ var result = Casting.Cast(spawn.ID, s, Heals.SomeoneNeedsHealing);
+ if (result == CastReturn.CAST_FIZZLE) goto recast;
+
if (result == CastReturn.CAST_INTERRUPTFORHEAL)
{
return;
diff --git a/E3Next/Processors/Bots.cs b/E3Next/Processors/Bots.cs
index db4a0cb5..6ea63d62 100644
--- a/E3Next/Processors/Bots.cs
+++ b/E3Next/Processors/Bots.cs
@@ -52,7 +52,9 @@ public class SharedDataBots : IBots
private static Dictionary _characterBuffs = new Dictionary();
private static Dictionary _petBuffs = new Dictionary();
private static System.Text.StringBuilder _stringBuilder = new System.Text.StringBuilder();
+ [ExposedData("Bots", "GlobalAllEnabled")]
private static bool GlobalAllEnabled = false;
+ [ExposedData("Bots", "NetworkingPathsTolookAt")]
List _pathsTolookAt = new List();
Task _autoRegisrationTask;
public SharedDataBots()
@@ -86,7 +88,7 @@ public SharedDataBots()
EventProcessor.RegisterCommand("/e3GlobalBroadcast", (x) =>
{
GlobalAllEnabled = !GlobalAllEnabled;
- Broadcast($"\agSetting Global Boradcast to {GlobalAllEnabled}");
+ Broadcast($"\agSetting Global Broadcast to {GlobalAllEnabled}");
});
EventProcessor.RegisterCommand("/e3bc", (x) =>
@@ -160,6 +162,21 @@ public SharedDataBots()
}
});
+ EventProcessor.RegisterCommand("/e3bcchannel", (x) =>
+ {
+ if (x.args.Count > 1)
+ {
+ string channel = x.args[0];
+ x.args.RemoveAt(0);
+ string command = e3util.ArgsToCommand(x.args);
+ if (x.filters.Count > 0)
+ {
+ command += " \"" + e3util.ArgsToCommand(x.filters) + "\"";
+ }
+
+ BroadcastCommandToChannel(channel, command, true);
+ }
+ });
EventProcessor.RegisterCommand("/e3bct", (x) =>
{
if (x.args.Count > 1)
@@ -211,7 +228,42 @@ public SharedDataBots()
}
});
+ EventProcessor.RegisterCommand("/e3bcr", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ string command = e3util.ArgsToCommand(x.args);
+ BroadcastCommandRaidNotMe(command, true, x);
+
+ }
+ });
+ EventProcessor.RegisterCommand("/e3bcrz", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ string command = e3util.ArgsToCommand(x.args);
+ BroadcastCommandToRaidNotMeZone(command, x,true);
+
+ }
+ });
+ EventProcessor.RegisterCommand("/e3bcra", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ string command = e3util.ArgsToCommand(x.args);
+ BroadcastCommandRaid(command, true,x);
+
+ }
+ });
+ EventProcessor.RegisterCommand("/e3bcraz", (x) =>
+ {
+ if (x.args.Count > 0)
+ {
+ string command = e3util.ArgsToCommand(x.args);
+ BroadcastCommandRaidZone(command, x,true);
+ }
+ });
}
public CharacterBuffs GetBuffInformation(string name)
@@ -226,12 +278,65 @@ public CharacterBuffs GetBuffInformation(string name)
private void AutoRegisterUsers(List settingsPaths)
{
+ ///we can have two states here, the normal user_server_pubsubport.txt
+ ///and the "proxy_pubsubport.txt". If the proxy_pubsubport exists, we use that and only that.
string searchPattern = $"*_{E3.ServerName}_pubsubport.txt";
+ bool inProxyState = false;
+ string proxyFileFullName = string.Empty;
+ DateTime proxyFileLastUpdateTime = DateTime.MinValue;
while (Core.IsProcessing)
{
- foreach(var path in settingsPaths)
- {
- try
+ //currently have proxy file, to just keep the thread checking for updates
+ if(inProxyState)
+ {
+ System.Threading.Thread.Sleep(500);
+
+ if(!File.Exists(proxyFileFullName))
+ { //proxy file poofed, will need to restart proxy
+ continue;
+ }
+ //need to check for proxy file update
+ DateTime lastUpdate = System.IO.File.GetLastWriteTime(proxyFileFullName);
+
+ if(lastUpdate>proxyFileLastUpdateTime)
+ {
+ inProxyState = false;
+
+ }
+
+ continue;
+ }
+ //check to see if there are any proxy setups, if so do them first
+ foreach (var path in settingsPaths)
+ {
+ string tpath = path;
+ if (!tpath.EndsWith(@"\"))
+ {
+ tpath += @"\";
+ }
+ if (File.Exists($@"{tpath}proxy_pubsubport.txt"))
+ {
+
+ //we are in proxy mode, set proxy state and kick out
+
+ NetMQServer.SharedDataClient.RegisterUser("proxy", tpath, true);
+ inProxyState = true;
+ proxyFileFullName = $@"{tpath}proxy_pubsubport.txt";
+ proxyFileLastUpdateTime = System.IO.File.GetLastWriteTime(proxyFileFullName);
+ break;
+
+ }
+ }
+ if (inProxyState) continue;
+ foreach (var path in settingsPaths)
+ {
+ string tpath = path;
+ if (!tpath.EndsWith(@"\"))
+ {
+ tpath += @"\";
+ }
+
+ try
{
//look for files that start with $"{user}_{E3.ServerName}_pubsubport.txt"
string[] fileNames = System.IO.Directory.GetFiles(path, searchPattern);
@@ -255,7 +360,7 @@ private void AutoRegisterUsers(List settingsPaths)
System.Threading.Thread.Sleep(1000);
}
}
- System.Threading.Thread.Sleep(1000);
+ System.Threading.Thread.Sleep(500);
}
}
///
@@ -360,10 +465,17 @@ public int BaseCorruptedCounters(string name)
return DebuffCounterFunction(name, "${Me.CountersCorrupted}", _debuffCorruptedCounterCollection);
}
-
+ private Int32 _botsConnectedCount = 0;
+ private List _botsConnectedCache = new List();
public List BotsConnected()
{
- return NetMQServer.SharedDataClient.TopicUpdates.Keys.ToList();
+ if(NetMQServer.SharedDataClient.TopicUpdates.Keys.Count!=_botsConnectedCount)
+ {
+ //need to udpate
+ _botsConnectedCount = NetMQServer.SharedDataClient.TopicUpdates.Keys.Count;
+ _botsConnectedCache = NetMQServer.SharedDataClient.TopicUpdates.Keys.ToList();
+ }
+ return _botsConnectedCache;
}
public void Broadcast(string message, bool noparse = false)
@@ -425,6 +537,89 @@ public void BroadcastCommandAll(string command, bool noparse = false, CommandMat
}
PubServer.AddTopicMessage("OnCommand-All", $"{E3.CurrentName}:{noparse}:{command}");
}
+ public void BroadcastCommandRaid(string command, bool noparse = false, CommandMatch match = null)
+ {
+ if (match != null && match.filters.Count > 0)
+ {
+ //need to pass over the filters if they exist
+ _stringBuilder.Clear();
+ _stringBuilder.Append($"{command}");
+ foreach (var filter in match.filters)
+ {
+ _stringBuilder.Append($" \"{filter}\"");
+ }
+ command = _stringBuilder.ToString();
+ }
+ if (!noparse)
+ {
+ command = MQ.Query(command);
+ }
+ PubServer.AddTopicMessage("OnCommand-Raid", $"{E3.CurrentName}:{noparse}:{command}");
+ }
+ public void BroadcastCommandRaidNotMe(string command, bool noparse = false, CommandMatch match = null)
+ {
+ if (match != null && match.filters.Count > 0)
+ {
+ //need to pass over the filters if they exist
+ _stringBuilder.Clear();
+ _stringBuilder.Append($"{command}");
+ foreach (var filter in match.filters)
+ {
+ _stringBuilder.Append($" \"{filter}\"");
+ }
+ command = _stringBuilder.ToString();
+ }
+ if (!noparse)
+ {
+ command = MQ.Query(command);
+ }
+ PubServer.AddTopicMessage("OnCommand-RaidNotMe", $"{E3.CurrentName}:{noparse}:{command}");
+ MQ.Write($"\ap{E3.CurrentName} => \ayRaid All: \ag{command}");
+ }
+
+ public void BroadcastCommandRaidZone(string command, CommandMatch match = null, bool noparse = false)
+ {
+
+ if (match != null && match.filters.Count > 0)
+ {
+ //need to pass over the filters if they exist
+ _stringBuilder.Clear();
+ _stringBuilder.Append($"{command}");
+ foreach (var filter in match.filters)
+ {
+ _stringBuilder.Append($" \"{filter}\"");
+ }
+ command = _stringBuilder.ToString();
+ }
+ if (!noparse)
+ {
+ command = MQ.Query(command);
+ }
+ PubServer.AddTopicMessage("OnCommand-RaidZone", $"{E3.CurrentName}:{noparse}:{command}");
+
+ }
+ public void BroadcastCommandToRaidNotMeZone(string command, CommandMatch match = null, bool noparse = false)
+ {
+
+
+ if (match != null && match.filters.Count > 0)
+ {
+ //need to pass over the filters if they exist
+ _stringBuilder.Clear();
+ _stringBuilder.Append($"{command}");
+ foreach (var filter in match.filters)
+ {
+ _stringBuilder.Append($" \"{filter}\"");
+ }
+ command = _stringBuilder.ToString();
+ }
+ if (!noparse)
+ {
+ command = MQ.Query(command);
+ }
+ PubServer.AddTopicMessage("OnCommand-RaidZoneNotMe", $"{E3.CurrentName}:{noparse}:{command}");
+
+ }
public void BroadcastCommandAllZone(string command, bool noparse = false, CommandMatch match = null)
{
if (match != null && match.filters.Count > 0)
@@ -610,6 +805,16 @@ public void BroadcastCommandToGroupAllZone(string command, CommandMatch match =
}
PubServer.AddTopicMessage("OnCommand-GroupAllZone", $"{E3.CurrentName}:{noparse}:{command}");
+ }
+ public void BroadcastCommandToChannel(string channel, string command, bool noparse = false)
+ {
+ if (!noparse)
+ {
+ command = MQ.Query(command);
+ }
+ PubServer.AddTopicMessage($"${{DataChannel.{channel}}}", $"{E3.CurrentName}:{false}:{command}");
+ MQ.Write($"\ap{E3.CurrentName} => \ay{channel} : \ag{command}");
+
}
public void BroadcastCommandToPerson(string person, string command, bool noparse = false)
{
@@ -807,7 +1012,7 @@ public Bots()
EventProcessor.RegisterCommand("/e3GlobalBroadcast", (x) =>
{
GlobalAllEnabled = !GlobalAllEnabled;
- Broadcast($"\agSetting Global Boradcast to {GlobalAllEnabled}");
+ Broadcast($"\agSetting Global Broadcast to {GlobalAllEnabled}");
});
}
diff --git a/E3Next/Processors/BuffCheck.cs b/E3Next/Processors/BuffCheck.cs
index a28bdbf2..71ad58ca 100644
--- a/E3Next/Processors/BuffCheck.cs
+++ b/E3Next/Processors/BuffCheck.cs
@@ -46,12 +46,16 @@ public static class BuffCheck
//private static Int64 _printoutTimer;
private static Data.Spell _selectAura = null;
private static Int64 _nextBuffCheck = 0;
-
+ [ExposedData("BuffCheck", "BuffCheckInterval")]
private static Int64 _nextBuffCheckInterval = 1000;
+ [ExposedData("BuffCheck", "XPBuffs")]
private static List _xpBuffs = new List() { 42962 /*xp6*/, 42617 /*xp5*/, 42616 /*xp4*/};
+ [ExposedData("BuffCheck", "GMBuffs")]
private static List _gmBuffs = new List() { 34835, 35989, 35361, 25732, 34567, 36838, 43040, 36266, 36423 };
private static Int64 _nextBlockBuffCheck = 0;
+ [ExposedData("BuffCheck", "BlockBuffCheckInterval")]
private static Int64 _nextBlockBuffCheckInterval = 1000;
+ [ExposedData("BuffCheck", "InitAuras")]
static bool _initAuras = false;
public static void AddToBuffCheckTimer(int millisecondsToAdd)
@@ -499,6 +503,7 @@ public static void Check_Buffs()
{
BuffBots(E3.CharacterSettings.CombatBuffs);
BuffBots(E3.CharacterSettings.CombatPetBuffs,true);
+ BuffBots(E3.CharacterSettings.CombatPetOwnerBuffs, true);
}
if ((!Movement.IsMoving() && String.IsNullOrWhiteSpace(Movement.FollowTargetName)) || Movement.StandingStillForTimePeriod())
@@ -523,7 +528,7 @@ public static void Check_Buffs()
//using (_log.Trace("Buffs-Pet"))
{
if (!E3.ActionTaken) BuffBots(E3.CharacterSettings.PetBuffs, true);
-
+ if (!E3.ActionTaken) BuffBots(E3.CharacterSettings.PetOwnerBuffs, true);
}
}
@@ -1397,7 +1402,7 @@ private static void BuffAuras()
if (currentAura != "NULL")
{
//we already have an aura, check if its different
- if (currentAura.Equals(_selectAura.SpellName, StringComparison.OrdinalIgnoreCase))
+ //if (currentAura.Equals(_selectAura.SpellName, StringComparison.OrdinalIgnoreCase))
{
//don't need to do anything
return;
@@ -1408,7 +1413,7 @@ private static void BuffAuras()
//need to put on new aura
Int32 meID = E3.CurrentId;
- if (_selectAura.CastType == CastType.Spell)
+ if (_selectAura.CastType == CastingType.Spell)
{
//this is a spell, need to mem, then cast.
if (Casting.CheckReady(_selectAura) && Casting.CheckMana(_selectAura))
@@ -1418,7 +1423,7 @@ private static void BuffAuras()
}
- else if (_selectAura.CastType == CastType.Disc)
+ else if (_selectAura.CastType == CastingType.Disc)
{
Int32 endurance = MQ.Query("${Me.Endurance}");
if (_selectAura.EnduranceCost < endurance)
diff --git a/E3Next/Processors/Burns.cs b/E3Next/Processors/Burns.cs
index a5ea915e..d3ae950c 100644
--- a/E3Next/Processors/Burns.cs
+++ b/E3Next/Processors/Burns.cs
@@ -17,11 +17,16 @@ public static class Burns
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
- public static bool use_FULLBurns = false;
- public static bool use_QUICKBurns = false;
- public static bool use_EPICBurns = false;
- public static bool use_LONGBurns = false;
- public static bool use_Swarms = false;
+ [ExposedData("Burns", "UsingFullBurns")]
+ public static bool use_FULLBurns = false;
+ [ExposedData("Burns", "UsingQuickBurns")]
+ public static bool use_QUICKBurns = false;
+ [ExposedData("Burns", "UsingEpicBurns")]
+ public static bool use_EPICBurns = false;
+ [ExposedData("Burns", "UsingLongBurns")]
+ public static bool use_LONGBurns = false;
+ [ExposedData("Burns", "UsingSwarmBurns")]
+ public static bool use_Swarms = false;
public static List _epicWeapon = new List();
public static List _anguishBP = new List();
public static List _swarmPets = new List();
@@ -177,7 +182,7 @@ private static void UseBurn(List burnList, bool use, string burnType
if (Casting.CheckReady(burn))
{
- if (burn.CastType == Data.CastType.Disc)
+ if (burn.CastType == Data.CastingType.Disc)
{
if (burn.TargetType == "Self")
{
@@ -202,7 +207,22 @@ private static void UseBurn(List burnList, bool use, string burnType
}
var chatOutput = $"{burnType}: {burn.CastName}";
//so you don't target other groups or your pet for burns if your target happens to be on them.
- if (((isMyPet) || (targetPC && !isGroupMember)) && (burn.TargetType == "Group v1" || burn.TargetType == "Group v2"))
+ if(!String.IsNullOrWhiteSpace(burn.CastTarget) && _spawns.TryByName(burn.CastTarget, out var spelltarget))
+ {
+
+ Casting.Cast(spelltarget.ID, burn);
+ if (previousTarget > 0)
+ {
+ Int32 currentTarget = MQ.Query("${Target.ID}");
+ if (previousTarget != currentTarget)
+ {
+ Casting.TrueTarget(previousTarget);
+ }
+ }
+ E3.Bots.Broadcast(chatOutput);
+
+ }
+ else if (((isMyPet) || (targetPC && !isGroupMember)) && (burn.TargetType == "Group v1" || burn.TargetType == "Group v2"))
{
Casting.Cast(E3.CurrentId, burn);
if (previousTarget > 0)
diff --git a/E3Next/Processors/Casting.cs b/E3Next/Processors/Casting.cs
index 81246ba6..7e40e2ff 100644
--- a/E3Next/Processors/Casting.cs
+++ b/E3Next/Processors/Casting.cs
@@ -30,11 +30,18 @@ public static class Casting
private static ISpawns _spawns = E3.Spawns;
private static Logging.LogLevels _previousLogLevel = Logging.LogLevels.Error;
- public static CastReturn Cast(int targetID, Data.Spell spell, Func interruptCheck = null, bool isNowCast = false)
+ public static CastReturn Cast(int targetID, Data.Spell spell, Func interruptCheck = null, bool isNowCast = false, bool isEmergency = false)
{
bool navActive = false;
bool navPaused = false;
bool e3PausedNav = false;
+ Int32 currentMana = 0;
+ Int32 pctMana = 0;
+
+ currentMana = MQ.Query("${Me.CurrentMana}");
+ pctMana = MQ.Query("${Me.PctMana}");
+
+
if (MQ.Query("${Cursor.ID}"))
{
e3util.ClearCursor();
@@ -78,7 +85,7 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func($"${{Spawn[id ${{Target.ID}}].CleanName}}");
}
+ TrueTarget(targetID);
+
//this lets bard kick regardless of current song status, otherwise will wait until between songs to kick
string abilityToCheck = spell.CastName;
- if (spell.CastType == Data.CastType.Ability && abilityToCheck.Equals("Kick", StringComparison.OrdinalIgnoreCase))
+ if (spell.CastType == Data.CastingType.Ability && abilityToCheck.Equals("Kick", StringComparison.OrdinalIgnoreCase))
{
- MQ.Write($"\ag{spell.CastName} \am{targetName} \ao{targetID}");
+ BeforeEventCheck(spell);
+ MQ.Write($"\ag{spell.CastName} \am{targetName} \ao{targetID}");
MQ.Cmd($"/doability \"{spell.CastName}\"");
- return CastReturn.CAST_SUCCESS;
+ AfterEventCheck(spell);
+ return CastReturn.CAST_SUCCESS;
}
MQ.Write($"\agBardCast {spell.CastName} \at{spell.SpellID} \am{targetName} \ao{targetID} \aw({spell.MyCastTime / 1000}sec)");
- if (spell.CastType == CastType.AA)
+ if (spell.CastType == CastingType.AA)
{
+ BeforeEventCheck(spell);
MQ.Cmd($"/alt activate {spell.CastID}");
UpdateAAInCooldown(spell);
+ AfterEventCheck(spell);
E3.ActionTaken = true;
return CastReturn.CAST_SUCCESS;
}
- if (spell.CastType == CastType.Item)
+ if (spell.CastType == CastingType.Item)
{
- //else its an item
- MQ.Cmd($"/useitem \"{spell.CastName}\"", 300);
+ BeforeEventCheck(spell);
+ //else its an item
+ MQ.Cmd($"/useitem \"{spell.CastName}\"", 300);
UpdateItemInCooldown(spell);
+ AfterEventCheck(spell);
E3.ActionTaken = true;
return CastReturn.CAST_SUCCESS;
}
@@ -171,7 +186,7 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func($"${{FindItemCount[={spell.Reagent}]}}");
if (itemCount < 1)
{
spell.ReagentOutOfStock = true;
- _log.Write($"Cannot cast [{spell.CastName}], I do not have any [{spell.Reagent}], removing this spell from array. Restock and Reload Macro", Logging.LogLevels.Error);
- E3.Bots.BroadcastCommand($"/popup ${{Me}} does not have {spell.Reagent}", false);
+ _log.Write($"Cannot cast [{spell.CastName}], I do not have any [{spell.Reagent}], removing this spell from array. Restock for this spell to cast again.", Logging.LogLevels.Error);
+ E3.Bots.Broadcast($"Cannot cast [{spell.CastName}], I do not have any [{spell.Reagent}], removing this spell from array. Restock for this spell to cast again.");
e3util.Beep();
return CastReturn.CAST_REAGENT;
}
@@ -288,12 +326,20 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func("${Window[SpellBookWnd].Open}"))
+ if (MQ.Query("${Window[SpellBookWnd].Open}") )
{
- E3.ActionTaken = true;
- E3.Bots.Broadcast($"skipping [{spell.CastName}] , spellbook is open.");
- MQ.Delay(200);
- return CastReturn.CAST_SPELLBOOKOPEN;
+ if(!e3util.IsManualControl())
+ {
+ MQ.Cmd("/stand");
+ }
+ else
+ {
+ E3.ActionTaken = true;
+ E3.Bots.Broadcast($"skipping [{spell.CastName}] , spellbook is open.");
+ MQ.Delay(200);
+ return CastReturn.CAST_SPELLBOOKOPEN;
+ }
+
}
_log.Write("Checking for Open corpse....");
if (MQ.Query("${Corpse.Open}"))
@@ -349,7 +395,7 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func("${Me.ActiveDisc.ID}") && spell.TargetType.Equals("Self"))
@@ -362,7 +408,8 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func("${Window[ActionsAbilitiesPage].Child[AAP_FirstAbilityButton].Text.Equal[Slam]}"))
@@ -475,7 +522,7 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func("${Me.CurrentMana}");
- pctMana = MQ.Query("${Me.PctMana}");
- }
+
+ currentMana = MQ.Query("${Me.CurrentMana}");
+ pctMana = MQ.Query("${Me.PctMana}");
+
while (IsCasting())
{
//means that we didn't fizzle and are now casting the spell
+
+ //these are outside the no interrupt check
+ if (!isEmergency && Heals.SomeoneNeedEmergencyHealing(currentMana, pctMana))
+ {
+ E3.Bots.Broadcast($"Interrupting [{spell.CastName}] for Emergecy Heal.");
+ Interrupt();
+ E3.ActionTaken = true;
+ //fire of emergency heal asap! checks targets in network and xtarget
+ Heals.SomeoneNeedEmergencyHealing(currentMana, pctMana, true);
+ return CastReturn.CAST_INTERRUPTFORHEAL;
+ }
+ if (!isEmergency && Heals.SomeoneNeedEmergencyHealingGroup(currentMana, pctMana))
+ {
+
+ E3.Bots.Broadcast($"Interrupting [{spell.CastName}] for Emergecy Group Heal.");
+ Interrupt();
+ E3.ActionTaken = true;
+ //fire of emergency heal asap!
+ //checks group members
+ Heals.SomeoneNeedEmergencyHealingGroup(currentMana, pctMana, true);
+ return CastReturn.CAST_INTERRUPTFORHEAL;
+ }
+
if (!spell.NoInterrupt)
{
if (interruptCheck != null && interruptCheck(spell, currentMana, pctMana))
@@ -592,8 +659,9 @@ public static CastReturn Cast(int targetID, Data.Spell spell, Func($"${{Bool[${{Me.Book[{spell.CastName}]}}]}}"))
{
@@ -894,7 +962,7 @@ public static void Sing(Int32 targetid, Data.Spell spell)
}
}
- else if (spell.CastType == CastType.Item)
+ else if (spell.CastType == CastingType.Item)
{
if (spell.MyCastTime > 500)
{
@@ -930,7 +998,7 @@ public static void Sing(Int32 targetid, Data.Spell spell)
MQ.Cmd($"/docommand {spell.AfterEvent}");
}
}
- else if (spell.CastType == CastType.AA)
+ else if (spell.CastType == CastingType.AA)
{
if (spell.MyCastTime > 500)
{
@@ -1029,7 +1097,8 @@ public static bool SpellBookWndOpen()
}
public static bool MemorizeSpell(Data.Spell spell,bool ignoreWait=false)
{
- if (!(spell.CastType == CastType.Spell && spell.SpellInBook))
+
+ if (!(spell.CastType == CastingType.Spell && spell.SpellInBook))
{
//we can't mem this just return true
return true;
@@ -1073,6 +1142,10 @@ public static bool MemorizeSpell(Data.Spell spell,bool ignoreWait=false)
MQ.Delay(15000, $"${{Me.Gem[{spell.SpellGem}].Name.Equal[{spell.SpellName}]}} || !${{Window[SpellBookWnd].Open}}");
if(!ignoreWait)
{
+ //sanity check that we stand in case something went wrong
+ //we do it in the ignorewait, because if we do ignore wait they already will do the
+ //sit/stand as we are meming lots of spells at once.
+ MQ.Cmd("/stand");
MQ.Delay(3000, $"${{Me.SpellReady[${{Me.Gem[{spell.SpellGem}].Name}}]}}");
}
@@ -1264,8 +1337,14 @@ public static bool SpellInCooldown(Data.Spell spell)
_log.Write($"Checking if spell is ready on {spell.CastName}");
- if (MQ.Query($"${{Me.SpellReady[{spell.CastName}]}}") && MQ.Query($"${{Me.GemTimer[{spell.CastName}]}}") < 1)
+ if (MQ.Query($"${{Me.GemTimer[{spell.CastName}]}}") ==0)
{
+ //check if we are out of stock still
+ if(spell.ReagentOutOfStock)
+ {
+ Int32 itemCount = MQ.Query($"${{FindItemCount[={spell.Reagent}]}}");
+ if (itemCount<1) return true;
+ }
_log.Write($"CheckReady Success! on {spell.CastName}");
returnValue = false;
@@ -1310,38 +1389,62 @@ private static bool SpellInSharedCooldown(Spell spell)
}
- public static Boolean CheckReady(Data.Spell spell)
+ public static Boolean CheckReady(Data.Spell spell, bool skipCastCheck = false)
{
+ if (!spell.Enabled) return false;
//if your stunned nothing is ready
if (MQ.Query("${Me.Stunned}"))
{
return false;
}
-
- if (spell.CastType == CastType.None) return false;
+ if (spell.CastType == CastingType.None) return false;
//do we need to memorize it?
-
- if ((spell.CastType == CastType.Spell || spell.CastType == CastType.Item || spell.CastType == CastType.AA) && MQ.Query("${Debuff.Silenced}")) return false;
-
- if (!MemorizeSpell(spell))
- {
- return false;
- }
-
+ if ((spell.CastType == CastingType.Spell || spell.CastType == CastingType.Item || spell.CastType == CastingType.AA) && MQ.Query("${Debuff.Silenced}")) return false;
//_log.Write($"CheckReady on {spell.CastName}");
-
- if (E3.CurrentClass != Data.Class.Bard)
+ if(!skipCastCheck)
{
- while (IsCasting())
+ if (E3.CurrentClass != Data.Class.Bard)
{
- MQ.Delay(20);
+ while (IsCasting())
+ {
+ MQ.Delay(20);
+ }
}
+
}
bool returnValue = false;
- if (spell.CastType == Data.CastType.Spell && spell.SpellInBook)
+ if (spell.CastType == Data.CastingType.Spell && spell.SpellInBook)
{
+ //do we already have it memed?
+ bool spellMemed = false;
+ foreach (var spellid in _currentSpellGems.Values)
+ {
+ if (spellid == spell.SpellID && spellid != 0)
+ {
+ spellMemed = true;
+ break;
+ }
+ }
+
+ //if not memed, and we are not currently tanking
+ //mem the spell or try to.
+ if (!spellMemed)
+ {
+ //lets not sit while we have 100% aggro on a mob , crits be bad
+ Int32 pctAggro = MQ.Query("${Me.PctAggro}");
+
+ if (pctAggro == 100)
+ {
+ //don't try and mem a spell while tanking
+ return false;
+ }
+ if (!MemorizeSpell(spell))
+ {
+ return false;
+ }
+ }
if (!SpellInCooldown(spell))
{
@@ -1349,14 +1452,14 @@ public static Boolean CheckReady(Data.Spell spell)
}
}
- else if (spell.CastType == Data.CastType.Item)
+ else if (spell.CastType == Data.CastingType.Item)
{
if (!ItemInCooldown(spell))
{
return true;
}
}
- else if (spell.CastType == Data.CastType.AA)
+ else if (spell.CastType == Data.CastingType.AA)
{
if (!AAInCooldown(spell))
{
@@ -1364,7 +1467,7 @@ public static Boolean CheckReady(Data.Spell spell)
}
}
- else if (spell.CastType == Data.CastType.Disc)
+ else if (spell.CastType == Data.CastingType.Disc)
{
//bug with thiefs eyes, always return true
if (spell.SpellID == 8001) return true;
@@ -1378,7 +1481,7 @@ public static Boolean CheckReady(Data.Spell spell)
return true;
}
}
- else if (spell.CastType == Data.CastType.Ability)
+ else if (spell.CastType == Data.CastingType.Ability)
{
string abilityToCheck = spell.CastName;
@@ -1428,6 +1531,80 @@ public static void InitCommands()
{
string key = x.args[0];
string value = x.args[1];
+ if (VarsetValues.Count > 0)
+ {
+ foreach (var vkey in VarsetValues.Keys)
+ {
+ if (value.IndexOf($"({vkey})", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+
+ value = value.ReplaceInsensitive($"({vkey})", $"({VarsetValues[vkey]})");
+ }
+ }
+ }
+ if (!VarsetValues.ContainsKey(key))
+ {
+ VarsetValues.Add(key, value);
+ }
+ else
+ {
+ VarsetValues[key] = value;
+ }
+ }
+ });
+ EventProcessor.RegisterCommand("/e3varbool", (x) =>
+ {
+ //key/value
+ if (x.args.Count > 1)
+ {
+ string key = x.args[0];
+ string value = x.args[1];
+
+ if (VarsetValues.Count > 0)
+ {
+ foreach (var vkey in VarsetValues.Keys)
+ {
+ if (value.IndexOf($"({vkey})", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+
+ value = value.ReplaceInsensitive($"({vkey})", $"({VarsetValues[vkey]})");
+ }
+ }
+ }
+ value = Ifs(value).ToString();
+
+
+ if (!VarsetValues.ContainsKey(key))
+ {
+ VarsetValues.Add(key, value);
+ }
+ else
+ {
+ VarsetValues[key] = value;
+ }
+ }
+ });
+ EventProcessor.RegisterCommand("/e3varcalc", (x) =>
+ {
+ //key/value
+ if (x.args.Count > 1)
+ {
+ string key = x.args[0];
+ string value = x.args[1];
+ if (VarsetValues.Count > 0)
+ {
+ foreach (var vkey in VarsetValues.Keys)
+ {
+ if (value.IndexOf($"({vkey})", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+
+ value = value.ReplaceInsensitive($"({vkey})", $"({VarsetValues[vkey]})");
+ }
+ }
+ }
+ value = Ifs_Results(value);
+ value = MQ.Query($"${{Math.Calc[{value}]}}").ToString();
+
if (!VarsetValues.ContainsKey(key))
{
VarsetValues.Add(key, value);
@@ -1485,7 +1662,7 @@ public static bool Ifs(Data.Spell spell)
{
return Ifs(spell.Ifs);
}
-
+ private static StringBuilder _ifsStringBuilder = new StringBuilder();
public static bool Ifs(string IfsExpression)
{
if (!String.IsNullOrWhiteSpace(IfsExpression))
@@ -1528,6 +1705,122 @@ public static string Ifs_Results(string IfsExpression)
}
}
}
+ //to deal with an issue of ( and [ in the parser
+ if (tIF.Contains(@"\["))
+ {
+ //settings shouldn't have [, if we do they should be ( or ) instead
+ tIF = tIF.Replace(@"\[", "(").Replace(@"\]", ")");
+ }
+
+ //dynamic lookup via reflection
+ //${E3N.Settings.Header.Key}
+ if (tIF.IndexOf("${E3N.Settings",0,StringComparison.OrdinalIgnoreCase)>-1)
+ {
+
+ foreach (var pair in E3.CharacterSettings.SettingsReflectionLookup)
+ {
+ if (tIF.IndexOf(pair.Key, 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+ var field = pair.Value;
+ if (field.IsGenericList(typeof(String)))
+ {
+ List fieldValue = (List)field.GetValue(E3.CharacterSettings);
+ string finallist = string.Join(",", fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else if (field.IsGenericList(typeof(Int32)))
+ {
+ List fieldValue = (List)field.GetValue(E3.CharacterSettings);
+ string finallist = string.Join(",", fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else if (field.IsGenericList(typeof(Spell)))
+ {
+ List fieldValue = (List)field.GetValue(E3.CharacterSettings);
+ _ifsStringBuilder.Clear();
+ foreach (var spell in fieldValue)
+ {
+ if(_ifsStringBuilder.Length==0)
+ {
+ _ifsStringBuilder.Append(spell.CastName);
+ }
+ else
+ {
+ _ifsStringBuilder.Append(","+spell.CastName);
+ }
+ }
+ tIF = tIF.ReplaceInsensitive(pair.Key, _ifsStringBuilder.ToString());
+ }
+ else if (field.IsGenericList(typeof(Int64)))
+ {
+ List fieldValue = (List)field.GetValue(E3.CharacterSettings);
+ string finallist = string.Join(",", fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else
+ {
+ tIF = tIF.ReplaceInsensitive(pair.Key, pair.Value.GetValue(E3.CharacterSettings).ToString());
+
+ }
+
+ }
+ }
+ }
+ if (tIF.IndexOf("${E3N.State", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+ foreach (var pair in Setup.ExposedDataReflectionLookup)
+ {
+ var field = pair.Value;
+ if(field.IsStatic)
+ {
+ if (tIF.IndexOf(pair.Key, 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+ //we are pulling static data, so pass a null to get it.
+ if (field.IsGenericList(typeof(String)))
+ {
+ List fieldValue = (List)field.GetValue(null);
+ string finallist = string.Join(",",fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else if (field.IsGenericList(typeof(Spell)))
+ {
+ List fieldValue = (List)field.GetValue(null);
+ _ifsStringBuilder.Clear();
+ foreach (var spell in fieldValue)
+ {
+ if (_ifsStringBuilder.Length == 0)
+ {
+ _ifsStringBuilder.Append(spell.CastName);
+ }
+ else
+ {
+ _ifsStringBuilder.Append("," + spell.CastName);
+ }
+ }
+ tIF = tIF.ReplaceInsensitive(pair.Key, _ifsStringBuilder.ToString());
+ }
+ else if (field.IsGenericList(typeof(Int32)))
+ {
+ List fieldValue = (List)field.GetValue(null);
+ string finallist = string.Join(",", fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else if (field.IsGenericList(typeof(Int64)))
+ {
+ List fieldValue = (List)field.GetValue(null);
+ string finallist = string.Join(",", fieldValue);
+ tIF = tIF.ReplaceInsensitive(pair.Key, finallist);
+ }
+ else
+ {
+ tIF = tIF.ReplaceInsensitive(pair.Key, field.GetValue(null).ToString());
+
+ }
+ }
+ }
+ }
+ }
+
//need to do some legacy compatability checksraibles that were used in Ifs.
if (tIF.IndexOf("${Assisting}", 0, StringComparison.OrdinalIgnoreCase) > -1)
{
@@ -1543,6 +1836,16 @@ public static string Ifs_Results(string IfsExpression)
//lets replace it with TRUE/FALSE
tIF = tIF.ReplaceInsensitive("${PBAEON}", Nukes.PBAEEnabled.ToString());
}
+ //if (tIF.IndexOf("${E3N.State.ClearTargets}", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ //{
+ // //lets replace it with TRUE/FALSE
+ // tIF = tIF.ReplaceInsensitive("${E3N.State.ClearTargets}", ClearXTargets.Enabled.ToString());
+ //}
+ //if (tIF.IndexOf("${E3N.State.IsLootOn}", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ //{
+ // //lets replace it with TRUE/FALSE
+ // tIF = tIF.ReplaceInsensitive("${E3N.State.IsLootOn}", E3.CharacterSettings.Misc_AutoLootEnabled.ToString());
+ //}
if (tIF.IndexOf("${AssistTarget}", 0, StringComparison.OrdinalIgnoreCase) > -1)
{
//lets replace it with TRUE/FALSE
@@ -1867,6 +2170,18 @@ public static void Ifs_E3Bots(ref string tIF)
}
+ }
+ else if (tIF.IndexOf("${E3Bots.ConnectedClients}", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+
+ tIF = tIF.ReplaceInsensitive("${E3Bots.ConnectedClients}", String.Join(",", E3.Bots.BotsConnected()));
+
+ }
+ else if (tIF.IndexOf("${E3Bots.ConnectedClientsCount}", 0, StringComparison.OrdinalIgnoreCase) > -1)
+ {
+
+ tIF = tIF.ReplaceInsensitive("${E3Bots.ConnectedClientsCount}", E3.Bots.BotsConnected().Count.ToString());
+
}
else if (tIF.IndexOf("${E3BuffExists[", 0, StringComparison.OrdinalIgnoreCase) > -1)
{
@@ -2059,7 +2374,7 @@ public static CastReturn CheckForReist(Data.Spell spell)
public static Int64 TimeLeftOnMySpell(Data.Spell spell)
{
- for (Int32 i = 1; i < 57; i++)
+ for (Int32 i = 1; i < (e3util.MobMaxDebuffSlots+1); i++)
{
Int32 buffID = MQ.Query($"${{Target.Buff[{i}].ID}}");
@@ -2107,15 +2422,20 @@ public static Int64 TimeLeftOnMyPetBuff(Data.Spell spell)
if (buffIndex > 0)
{
millisecondsLeft = MQ.Query($"${{Me.Pet.Buff[{buffIndex}].Duration}}");
- if (millisecondsLeft == 0)
+ if(millisecondsLeft<0)
{
- //check if perma spell
- Int32 duration = MQ.Query($"${{Spell[{buffIndex}].Duration}}");
- if (duration < 0)
- {
- millisecondsLeft = Int32.MaxValue;
- }
+ //perma buff?
+ millisecondsLeft = Int32.MaxValue;
}
+ //if (millisecondsLeft == 0)
+ //{
+ // //check if perma spell
+ // Int32 duration = MQ.Query($"${{Spell[{spell.SpellName}].Duration}}");
+ // if (duration < 0)
+ // {
+ // millisecondsLeft = Int32.MaxValue;
+ // }
+ //}
}
return millisecondsLeft;
}
diff --git a/E3Next/Processors/Charm.cs b/E3Next/Processors/Charm.cs
index fbb289e7..74813c5b 100644
--- a/E3Next/Processors/Charm.cs
+++ b/E3Next/Processors/Charm.cs
@@ -13,12 +13,15 @@ public static class Charm
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
-
+ [ExposedData("Charm", "CharmTimer")]
private static Int64 _charmTimer = 0;
+ [ExposedData("Charm", "CharmTargetId")]
private static int _charmTargetId = 0;
private static long _nextCharmCheck = 0;
+ [ExposedData("Charm", "NextCharmRefreshTimeInterval")]
private static long _nextCharmRefreshTimeInterval = 500;
+ [ExposedData("Charm", "CharmDebuffDelay")]
private static Int32 _charmDebuffDelay = 4000;
[SubSystemInit]
diff --git a/E3Next/Processors/ClearXTargets.cs b/E3Next/Processors/ClearXTargets.cs
index 8cf6c10d..97ce9087 100644
--- a/E3Next/Processors/ClearXTargets.cs
+++ b/E3Next/Processors/ClearXTargets.cs
@@ -18,12 +18,17 @@ public static class ClearXTargets
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
- public static bool Enabled = false;
- public static Int32 MobToAttack = 0;
- public static bool FaceTarget = false;
+ [ExposedData("ClearXTargets", "Enabled")]
+ public static bool Enabled = false;
+ [ExposedData("ClearXTargets", "MobToAttack")]
+ public static Int32 MobToAttack = 0;
+ [ExposedData("ClearXTargets", "FaceTarget")]
+ public static bool FaceTarget = false;
public static List Filters = new List();
- public static bool HasAllFlag = false;
- public static bool StickTarget = false;
+ [ExposedData("ClearXTargets", "HasAllFlag")]
+ public static bool HasAllFlag = false;
+ [ExposedData("ClearXTargets", "StickTarget")]
+ public static bool StickTarget = false;
[ClassInvoke(Data.Class.All)]
public static void Check_Xtargets()
diff --git a/E3Next/Processors/Cures.cs b/E3Next/Processors/Cures.cs
index 263ed78f..a1d4d2fe 100644
--- a/E3Next/Processors/Cures.cs
+++ b/E3Next/Processors/Cures.cs
@@ -52,12 +52,16 @@ public static void Check_Cures()
{
if (!e3util.ShouldCheck(ref _nextRCureCheck, _nexRCureCheckInterval)) return;
- if (!E3.ActionTaken) CheckRadiant();
+
+ Int32 targetID = MQ.Query("${Target.ID}");
+ if (!E3.ActionTaken) CheckRadiant();
if (!E3.ActionTaken) CheckNormalCures();
if (!E3.ActionTaken) CheckCounterCures();
if (!E3.ActionTaken) CheckNormalCureAll();
- }
+ e3util.PutOriginalTargetBackIfNeeded(targetID);
+
+ }
private static void CheckNormalCureAll()
{
foreach (var spell in E3.CharacterSettings.CureAll)
diff --git a/E3Next/Processors/DebuffDot.cs b/E3Next/Processors/DebuffDot.cs
index c3d68f65..580d7ab2 100644
--- a/E3Next/Processors/DebuffDot.cs
+++ b/E3Next/Processors/DebuffDot.cs
@@ -7,23 +7,26 @@
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
+using System.Security.Cryptography;
namespace E3Core.Processors
{
public static class DebuffDot
{
public static Logging _log = E3.Log;
+
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
- public static Dictionary _debuffTimers = new Dictionary();
- public static Dictionary _dotTimers = new Dictionary();
- public static Dictionary _OffAssistTimers = new Dictionary();
-
+ public static Dictionary _debuffdotTimers = new Dictionary();
+
public static HashSet _mobsToDot = new HashSet();
public static HashSet _mobsToDebuff = new HashSet();
- public static HashSet _mobsToOffAsist = new HashSet();
- public static HashSet _mobsToIgnoreOffAsist = new HashSet();
- public static List _deadMobs = new List();
+ public static HashSet _mobsToOffAsist = new HashSet();
+ private static HashSet _offAssistFullMobList = new HashSet();
+
+ public static HashSet _mobsToIgnoreOffAsist = new HashSet();
+
+ public static List _deadMobs = new List();
private static Int64 _nextDebuffCheck = 0;
private static Int64 _nextDebuffCheckInterval = 1000;
@@ -31,7 +34,8 @@ public static class DebuffDot
private static Int64 _nextDoTCheckInterval = 1000;
private static Int64 _nextOffAssistCheck = 0;
private static Int64 _nextOffAssistCheckInterval = 500;
- private static bool _shouldOffAssist = true;
+ [ExposedData("DebuffDot", "ShouldOffAssist")]
+ private static bool _shouldOffAssist = true;
private static List _tempOffAssistSpellList = new List();
[SubSystemInit]
@@ -43,74 +47,92 @@ public static void Reset()
{
_mobsToDot.Clear();
_mobsToDebuff.Clear();
- _mobsToOffAsist.Clear();
- _mobsToIgnoreOffAsist.Clear();
- foreach (var kvp in _debuffTimers)
- {
- kvp.Value.Dispose();
- }
- _debuffTimers.Clear();
- foreach (var kvp in _dotTimers)
+
+ foreach (var kvp in _debuffdotTimers)
{
kvp.Value.Dispose();
}
- _dotTimers.Clear();
-
-
- }
+ _debuffdotTimers.Clear();
+
+ _mobsToOffAsist.Clear();
+ _mobsToIgnoreOffAsist.Clear();
+
+ }
+
[AdvSettingInvoke]
public static void Check_OffAssistSpells()
{
if (!_shouldOffAssist) return;
if (!Assist.IsAssisting) return;
+
if (E3.CharacterSettings.OffAssistSpells.Count == 0) return;
if (!e3util.ShouldCheck(ref _nextOffAssistCheck, _nextOffAssistCheckInterval)) return;
- Int32 targetId = MQ.Query("${Target.ID}");
- if (targetId != Assist.AssistTargetID && e3util.IsManualControl())
+
+ if (!Basics.InCombat())
{
return;
}
+
+ Int32 targetId = MQ.Query("${Target.ID}");
+ //if (targetId != Assist.AssistTargetID && e3util.IsManualControl())
+ //{
+ // return;
+ //}
//do not off assist if you are in the middle of gather dusk. It sucks to put it on an add.
- if (E3.CurrentClass == Data.Class.Necromancer)
+ if(e3util.IsEQEMU() && String.Equals(E3.ServerName,"Lazarus", StringComparison.OrdinalIgnoreCase))
{
- bool duskfall = MQ.Query("${$Bool[${Me.Song[Fading Light]}]}");
- if (duskfall) return;
- int gatheringDuskTicks = MQ.Query("${Me.Song[Gathering Dusk].Duration.Ticks}");
-
- if (gatheringDuskTicks > 0 && gatheringDuskTicks <= 2) return;
- }
+ if (E3.CurrentClass == Data.Class.Necromancer)
+ {
+ bool duskfall = MQ.Query("${$Bool[${Me.Song[Fading Light]}]}");
+ if (duskfall) return;
+ int gatheringDuskTicks = MQ.Query("${Me.Song[Gathering Dusk].Duration.Ticks}");
- using (_log.Trace())
- {
- //check xtargets
- for (Int32 i = 1; i <= 13; i++)
+ if (gatheringDuskTicks > 0 && gatheringDuskTicks <= 2) return;
+ }
+ }
+
+ using (_log.Trace())
+ {
+ _offAssistFullMobList.Clear();
+ foreach (var s in _spawns.Get().OrderBy(x => x.Distance))
+ {
+ _offAssistFullMobList.Add(s.ID);
+ if (_mobsToOffAsist.Contains(s.ID)) continue;
+ //find all mobs that are close
+ if (s.PctHps < 10) continue;
+ if (s.TypeDesc != "NPC") continue;
+ if (!s.Targetable) continue;
+ if (!s.Aggressive) continue;
+ if (s.CleanName.EndsWith("s pet")) continue;
+ if (!MQ.Query($"${{Spawn[npc id {s.ID}].LineOfSight}}")) continue;
+ if (s.Distance > 60) break;//mob is too far away, and since it is ordered, kick out.
+ //its valid to attack!
+ _mobsToOffAsist.Add(s.ID);
+ }
+ List mobIdsToRemove = new List();
+ foreach (var mobid in _mobsToOffAsist)
+ {
+ if (!_offAssistFullMobList.Contains(mobid))
+ {
+ //they are no longer a valid mobid, remove from mobs to mez
+ mobIdsToRemove.Add(mobid);
+ }
+ }
+ foreach (var mobid in mobIdsToRemove)
+ {
+ _mobsToOffAsist.Remove(mobid);
+ }
+ if (_mobsToOffAsist.Count == 0)
{
- bool autoHater = MQ.Query($"${{Me.XTarget[{i}].TargetType.Equal[Auto Hater]}}");
- if (!autoHater) continue;
- Int32 mobId = MQ.Query($"${{Me.XTarget[{i}].ID}}");
- if (mobId > 0)
- {
- if (_mobsToOffAsist.Contains(mobId) || _mobsToIgnoreOffAsist.Contains(mobId)) continue;
- Spawn s;
- if (_spawns.TryByID(mobId, out s))
- {
- if (s.ID == Assist.AssistTargetID) continue;
- if (s.PctHps < 10) continue;
- //find all mobs that are close
- if (s.TypeDesc != "NPC") continue;
- if (!s.Targetable) continue;
- if (!s.Aggressive) continue;
- if (!MQ.Query($"${{Spawn[npc id {s.ID}].LineOfSight}}")) continue;
- if (s.Distance > 100) break;//mob is too far away, and since it is ordered, kick out.
- _mobsToOffAsist.Add(mobId);
- }
- }
- }
- if (_mobsToOffAsist.Count == 0) return;
+ return;
+ }
_mobsToOffAsist.Remove(Assist.AssistTargetID);
- if (_mobsToOffAsist.Count == 0) return;
+ if (_mobsToOffAsist.Count == 0)
+ {
+ return;
+ }
- try
+ try
{
//lets place the 1st offensive spell on each mob, then the next, then the next
foreach (var spell in E3.CharacterSettings.OffAssistSpells)
@@ -127,9 +149,9 @@ public static void Check_OffAssistSpells()
{
_tempOffAssistSpellList.Clear();
_tempOffAssistSpellList.Add(spell);
- foreach (Int32 mobid in _mobsToOffAsist.ToList())
+ foreach (Int32 mobid in _mobsToOffAsist.ToList())
{
- CastLongTermSpell(mobid, _tempOffAssistSpellList, _OffAssistTimers);
+ CastLongTermSpell(mobid, _tempOffAssistSpellList, _debuffdotTimers);
if (E3.ActionTaken) return;
}
}
@@ -156,7 +178,7 @@ public static void Check_Debuffs()
{
return;
}
- CastLongTermSpell(Assist.AssistTargetID, E3.CharacterSettings.Debuffs_OnAssist, _debuffTimers);
+ CastLongTermSpell(Assist.AssistTargetID, E3.CharacterSettings.Debuffs_OnAssist, _debuffdotTimers);
if (E3.ActionTaken) return;
}
@@ -169,7 +191,7 @@ public static void Check_Debuffs()
foreach (var mobid in _mobsToDebuff.ToList())
{
- CastLongTermSpell(mobid, E3.CharacterSettings.Debuffs_Command, _debuffTimers);
+ CastLongTermSpell(mobid, E3.CharacterSettings.Debuffs_Command, _debuffdotTimers);
if (E3.ActionTaken) return;
}
}
@@ -197,7 +219,7 @@ public static void check_Dots()
{
return;
}
- CastLongTermSpell(Assist.AssistTargetID, E3.CharacterSettings.Dots_Assist, _dotTimers);
+ CastLongTermSpell(Assist.AssistTargetID, E3.CharacterSettings.Dots_Assist, _debuffdotTimers);
if (E3.ActionTaken) return;
}
@@ -215,7 +237,7 @@ public static void check_Dots()
{
foreach (var mobid in _mobsToDot.ToList())
{
- CastLongTermSpell(mobid, E3.CharacterSettings.Dots_OnCommand, _dotTimers);
+ CastLongTermSpell(mobid, E3.CharacterSettings.Dots_OnCommand, _debuffdotTimers);
if (E3.ActionTaken) return;
}
@@ -268,12 +290,12 @@ private static void RegisterEvents()
e3util.RegisterCommandWithTarget("/debuffson", DebuffsOn);
e3util.RegisterCommandWithTarget("/debuff", DebuffsOn);
- EventProcessor.RegisterCommand("/offassiston", (x) =>
+ EventProcessor.RegisterCommand("/e3offassiston", (x) =>
{
if (x.args.Count == 0)
{
_shouldOffAssist = true;
- E3.Bots.BroadcastCommandToGroup("/offassiston all",x);
+ E3.Bots.BroadcastCommandToGroup("/e3offassiston all", x);
}
else
{
@@ -281,12 +303,12 @@ private static void RegisterEvents()
E3.Bots.Broadcast("\a#336699Turning on OffAssist.");
}
});
- EventProcessor.RegisterCommand("/offassistoff", (x) =>
+ EventProcessor.RegisterCommand("/e3offassistoff", (x) =>
{
if (x.args.Count == 0)
{
_shouldOffAssist = false;
- E3.Bots.BroadcastCommandToGroup("/offassistoff all");
+ E3.Bots.BroadcastCommandToGroup("/e3offassistoff all");
}
else
{
@@ -295,7 +317,7 @@ private static void RegisterEvents()
}
});
- EventProcessor.RegisterCommand("/offassistignore", (x) =>
+ EventProcessor.RegisterCommand("/e3offassistignore", (x) =>
{
if (x.args.Count == 3)
{
@@ -331,12 +353,12 @@ private static void RegisterEvents()
{
_mobsToIgnoreOffAsist.Add(targetid);
}
- E3.Bots.BroadcastCommandToGroup($"/offassistignore all {command} {targetid}",x);
+ E3.Bots.BroadcastCommandToGroup($"/e3offassistignore all {command} {targetid}",x);
}
else if (command == "remove")
{
_mobsToIgnoreOffAsist.Remove(targetid);
- E3.Bots.BroadcastCommandToGroup($"/offassistignore all {command} {targetid}",x);
+ E3.Bots.BroadcastCommandToGroup($"/e3offassistignore all {command} {targetid}",x);
}
}
}
@@ -350,7 +372,7 @@ public static void DebuffsOn(Int32 mobid)
_mobsToDebuff.Add(mobid);
}
}
- private static void CastLongTermSpell(Int32 mobid, List spells, Dictionary timers)
+ public static void CastLongTermSpell(Int32 mobid, List spells, Dictionary timers)
{
foreach (var spell in spells)
@@ -362,7 +384,7 @@ private static void CastLongTermSpell(Int32 mobid, List spells, Dict
Int64 timestamp;
if (s.Timestamps.TryGetValue(spell.SpellID, out timestamp))
{
- if (Core.StopWatch.ElapsedMilliseconds < timestamp)
+ if ((Core.StopWatch.ElapsedMilliseconds + (spell.MinDurationBeforeRecast)) < timestamp)
{
//debuff/dot is still on the mob, kick off
continue;
@@ -488,7 +510,9 @@ private static void CastLongTermSpell(Int32 mobid, List spells, Dict
//Refactored the way buffs/debuffs are stored on characters and NPCs, enabling an increase in hostile NPC's maximum from 97 to 200.
//This required a one-time clearing of saved buffs on mercenaries and pets, may 2022.
- if (buffCount < 55 || (e3util.IsEQLive() && buffCount<201))
+
+
+ if (buffCount< e3util.MobMaxDebuffSlots && E3.CharacterSettings.Misc_VisibleDebuffsDots)
{
UpdateDotDebuffTimers(mobid, spell, timeLeftInMS, timers);
}
@@ -523,7 +547,7 @@ private static void CastLongTermSpell(Int32 mobid, List spells, Dict
}
}
}
- private static void UpdateDotDebuffTimers(Int32 mobid, Data.Spell spell, Int64 timeLeftInMS, Dictionary timers)
+ public static void UpdateDotDebuffTimers(Int32 mobid, Data.Spell spell, Int64 timeLeftInMS, Dictionary timers)
{
SpellTimer s;
//if we have no time left, as it was not found, just set it to 0 in ours
diff --git a/E3Next/Processors/Dispel.cs b/E3Next/Processors/Dispel.cs
index 11dddfc8..26b4b074 100644
--- a/E3Next/Processors/Dispel.cs
+++ b/E3Next/Processors/Dispel.cs
@@ -15,7 +15,8 @@ public static class Dispel
private static IMQ MQ = E3.MQ;
private static ISpawns _spawns = E3.Spawns;
private static Int64 _nextDispelCheck = 0;
- private static Int64 _nextDispelCheckInterval = 500;
+ [ExposedData("Dispel", "DispelCheckInterval")]
+ private static Int64 _nextDispelCheckInterval = 500;
[ClassInvoke(Data.Class.All)]
diff --git a/E3Next/Processors/Heals.cs b/E3Next/Processors/Heals.cs
index 072a2ef7..2d3891cb 100644
--- a/E3Next/Processors/Heals.cs
+++ b/E3Next/Processors/Heals.cs
@@ -8,6 +8,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Xml.Linq;
namespace E3Core.Processors
{
@@ -16,7 +17,9 @@ public class Heals : BaseProcessor
public static ISpawns _spawns = E3.Spawns;
private static Int64 _nextHealCheck = 0;
+ [ExposedData("Heals", "HealCheckInterval")]
private static Int64 _nextHealCheckInterval = 250;
+ [ExposedData("Heals", "UseEQGroupDataForHeals")]
private static bool _useEQGroupDataForHeals = true;
private static Data.Spell _orbOfShadowsSpell = null;
private static Data.Spell _orbOfSoulsSpell = null;
@@ -48,7 +51,13 @@ public static void Check_Heals()
Int32 currentMana = MQ.Query("${Me.CurrentMana}");
Int32 pctMana = MQ.Query("${Me.PctMana}");
Int32 targetID = MQ.Query("${Target.ID}");
- if (E3.CharacterSettings.HealTanks.Count > 0 && E3.CharacterSettings.HealTankTargets.Count > 0)
+
+
+ //check for Emergency heals
+ Heals.SomeoneNeedEmergencyHealingGroup(currentMana, pctMana, true);
+ if(!E3.ActionTaken) Heals.SomeoneNeedEmergencyHealing(currentMana, pctMana, true);
+
+ if (!E3.ActionTaken && E3.CharacterSettings.HealTanks.Count > 0 && E3.CharacterSettings.HealTankTargets.Count > 0)
{
HealTanks(currentMana, pctMana);
if (E3.ActionTaken)
@@ -59,7 +68,7 @@ public static void Check_Heals()
}
if (!E3.ActionTaken && E3.CharacterSettings.HealXTarget.Count > 0)
{
- HealXTargets(currentMana, pctMana);
+ HealXTargets(E3.CharacterSettings.HealXTarget,currentMana, pctMana);
}
if (!E3.ActionTaken) GroupHeals(currentMana, pctMana);
if (!E3.ActionTaken) HealImportant(currentMana, pctMana);
@@ -101,14 +110,14 @@ public static bool HealParty(Int32 currentMana, Int32 pctMana)
}
return false;
}
- public static bool HealXTargets(Int32 currentMana, Int32 pctMana, bool JustCheck = false)
+ public static bool HealXTargets(List spellsToUse, Int32 currentMana, Int32 pctMana, bool JustCheck = false, bool isEmergency = false)
{
if (!E3.CharacterSettings.WhoToHeal.Contains("XTargets"))
{
return false;
}
//find the lowest health xtarget
- const Int32 XtargetMax = 12;
+ Int32 XtargetMax = e3util.XtargetMax;
//dealing with index of 1.
Int32 currentLowestHealth = 100;
Int32 lowestHealthTargetid = -1;
@@ -146,7 +155,7 @@ public static bool HealXTargets(Int32 currentMana, Int32 pctMana, bool JustCheck
//found someone to heal
if (lowestHealthTargetid > 0 && currentLowestHealth < 95)
{
- foreach (var spell in E3.CharacterSettings.HealXTarget)
+ foreach (var spell in spellsToUse)
{
//check Ifs on the spell
if (!String.IsNullOrWhiteSpace(spell.Ifs))
@@ -172,11 +181,12 @@ public static bool HealXTargets(Int32 currentMana, Int32 pctMana, bool JustCheck
{
if (currentLowestHealth < spell.HealPct)
{
- if (JustCheck) return true;
- if (Casting.CheckReady(spell))
+
+ if (Casting.CheckReady(spell) && Casting.CheckMana(spell))
{
+ if (JustCheck) return true;
- if (Casting.Cast(lowestHealthTargetid, spell) == CastReturn.CAST_FIZZLE)
+ if (Casting.Cast(lowestHealthTargetid, spell,null,false,isEmergency) == CastReturn.CAST_FIZZLE)
{
currentMana = MQ.Query("${Me.CurrentMana}");
pctMana = MQ.Query("${Me.PctMana}");
@@ -328,7 +338,7 @@ public static bool SomeoneNeedsHealing(Spell spell,Int32 currentMana, Int32 pctM
}
if (E3.CharacterSettings.HealXTarget.Count > 0)
{
- if (HealXTargets(currentMana, pctMana, true))
+ if (HealXTargets(E3.CharacterSettings.HealXTarget,currentMana, pctMana, true))
{
return true;
}
@@ -342,7 +352,104 @@ public static bool SomeoneNeedsHealing(Spell spell,Int32 currentMana, Int32 pctM
}
return false;
}
- private static bool Heal(Int32 currentMana, Int32 pctMana, List targets, List spells, bool healPets = false, bool JustCheck = false)
+ public static bool SomeoneNeedEmergencyHealing(Int32 currentMana, Int32 pctMana, bool CastIfNeed = false)
+ {
+ foreach (var spell in E3.CharacterSettings.Heal_EmergencyHeals)
+ {
+ string target = spell.CastTarget;
+ Int32 pctHealth = 0;
+ if (E3.Bots.IsMyBot(target))
+ {
+ pctHealth = E3.Bots.PctHealth(target);
+ }
+ else
+ {
+ //not our bot
+ continue;
+ }
+
+
+ if(_spawns.TryByName(target,out var s))
+ {
+ if (!Casting.InRange(s.ID, spell))
+ {
+ continue;
+ }
+ }
+ else
+ {
+ continue;
+ }
+ if (Casting.CheckReady(spell,true) && Casting.CheckMana(spell))
+ {
+ if (pctHealth < spell.HealPct && pctHealth != 0)
+ {
+ if (CastIfNeed)
+ {
+ E3.Bots.Broadcast($"Casting Emergency Heal. Target:{target} PctHealth:{pctHealth}");
+ Heal(currentMana, pctMana, new List { target }, E3.CharacterSettings.Heal_EmergencyHeals, false, false, true);
+ return true;
+ }
+
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ public static bool SomeoneNeedEmergencyHealingGroup(Int32 currentMana, Int32 pctMana, bool CastIfNeeded = false)
+ {
+ if (E3.CharacterSettings.Heal_EmergencyHeals.Count == 0) return false;
+
+ Int32 groupmemberCount = MQ.Query("${Group.Members}");
+
+ for(Int32 i = 0;i<=groupmemberCount;i++)
+ {
+ Int32 pctHealth = 0;
+ string name = MQ.Query