Skip to content

Commit

Permalink
Merge pull request #5 from JackCeparou/v9.0_ready
Browse files Browse the repository at this point in the history
Apply ActorSnoEnum refactoring (v9.0)
  • Loading branch information
JackCeparou committed Feb 17, 2019
2 parents 5ddbc7a + e725def commit 0f75a20
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 90 deletions.
70 changes: 43 additions & 27 deletions Actors/DoorsPlugin.cs
Expand Up @@ -28,33 +28,49 @@ public Key HotKey
set { ToggleKeyEvent = Hud.Input.CreateKeyEvent(true, value, false, false, false); }
}

public readonly HashSet<uint> BridgesIds = new HashSet<uint> { 309432, 54850, 404043, 198125 };
public readonly HashSet<uint> BreakableDoorsIds = new HashSet<uint> { 55325, 427495, 5792, 95481, 379048, 95481, 230324, }; // 258064 };
public readonly HashSet<uint> DoorsIdsBlackList = new HashSet<uint>() {
197939, 169502, 214333, 181195, 190236, // A2 to belial
167185, // A2 Alcarnus
200371, 5503, // A2 City
198977, 52685, // A3 rakkis crossing
112316, // A3 stonefort
210433, // A3 battlefields
356879, 182636, 165415,
432258,
341214, 370187,
178161, // check this one, maybe a bounty
217285, // leoric manor
193248, // 3462, Holy Sanctum
153752, // a3 catapult event
102711, // a1dun_Leor_Jail_Door_SuperLocked_A_Fake
447641, // cos_pet_mimic_01
5288, // shoulderPads_norm_base_flippy ???
291717, // x1_Abattoir_Barricade_Solid
365503, // X1_Fortress_FloatRubble_A
211456, // a3dun_Keep_Barrel_Snow_No_Skirt Sturdy Barrel
377253, // x1_Fortress_Crystal_Prison_Shield
319797, // x1_westm_Railing_A_01_piece1
289804, // x1_Pand_HexMaze_Corpse Corpse
159098, // DH_Companion_RuneC
187436, // LootType2_tristramVillager_Male_C_Corpse_01 Dead Villager
// TODO: replace with the real enum value (no cast)
public readonly HashSet<ActorSnoEnum> BridgesIds = new HashSet<ActorSnoEnum>
{
(ActorSnoEnum)309432,
(ActorSnoEnum)54850,
(ActorSnoEnum)404043,
(ActorSnoEnum)198125
};
public readonly HashSet<ActorSnoEnum> BreakableDoorsIds = new HashSet<ActorSnoEnum>
{
(ActorSnoEnum)55325,
(ActorSnoEnum)427495,
(ActorSnoEnum)5792,
(ActorSnoEnum)95481,
(ActorSnoEnum)379048,
(ActorSnoEnum)95481,
(ActorSnoEnum)230324,
}; // 258064 };
public readonly HashSet<ActorSnoEnum> DoorsIdsBlackList = new HashSet<ActorSnoEnum>() {
(ActorSnoEnum)197939, (ActorSnoEnum)169502, (ActorSnoEnum)214333, (ActorSnoEnum)181195, (ActorSnoEnum)190236, // A2 to belial
(ActorSnoEnum)167185, // A2 Alcarnus
(ActorSnoEnum)200371, (ActorSnoEnum)5503, // A2 City
(ActorSnoEnum)198977, (ActorSnoEnum)52685, // A3 rakkis crossing
(ActorSnoEnum)112316, // A3 stonefort
(ActorSnoEnum)210433, // A3 battlefields
(ActorSnoEnum)356879, (ActorSnoEnum)182636, (ActorSnoEnum)165415,
(ActorSnoEnum)432258,
(ActorSnoEnum)341214, (ActorSnoEnum)370187,
(ActorSnoEnum)178161, // check this one, maybe a bounty
(ActorSnoEnum)217285, // leoric manor
(ActorSnoEnum)193248, // 3462, Holy Sanctum
(ActorSnoEnum)153752, // a3 catapult event
(ActorSnoEnum)102711, // a1dun_Leor_Jail_Door_SuperLocked_A_Fake
(ActorSnoEnum)447641, // cos_pet_mimic_01
(ActorSnoEnum)5288, // shoulderPads_norm_base_flippy ???
(ActorSnoEnum)291717, // x1_Abattoir_Barricade_Solid
(ActorSnoEnum)365503, // X1_Fortress_FloatRubble_A
(ActorSnoEnum)211456, // a3dun_Keep_Barrel_Snow_No_Skirt Sturdy Barrel
(ActorSnoEnum)377253, // x1_Fortress_Crystal_Prison_Shield
(ActorSnoEnum)319797, // x1_westm_Railing_A_01_piece1
(ActorSnoEnum)289804, // x1_Pand_HexMaze_Corpse Corpse
(ActorSnoEnum)159098, // DH_Companion_RuneC
(ActorSnoEnum)187436, // LootType2_tristramVillager_Male_C_Corpse_01 Dead Villager
};

public DoorsPlugin()
Expand Down
27 changes: 21 additions & 6 deletions Actors/NecromancerPetsPlugin.cs
Expand Up @@ -6,20 +6,35 @@ namespace Turbo.Plugins.Jack.Actors
{
public class NecromancerPetsPlugin : BasePlugin, IInGameWorldPainter
{
public HashSet<uint> SkeletonWarriorsIds { get; set; }
public HashSet<ActorSnoEnum> SkeletonWarriorsIds { get; set; }
public WorldDecoratorCollection SkeletonWarriorsDecorators { get; set; }
public HashSet<uint> SkeletonMagesIds { get; set; }
public HashSet<ActorSnoEnum> SkeletonMagesIds { get; set; }
public WorldDecoratorCollection SkeletonMagesDecorators { get; set; }
public HashSet<uint> SkeletonArchersIds { get; set; }
public HashSet<ActorSnoEnum> SkeletonArchersIds { get; set; }
public WorldDecoratorCollection SkeletonArchersDecorators { get; set; }


public NecromancerPetsPlugin()
{
Enabled = true;
SkeletonWarriorsIds = new HashSet<uint> { 473147, 473420, 473426, 473418, 473428, 473417 }; // ty SR ;p
SkeletonMagesIds = new HashSet<uint> { 472275, 472588, 472769, 472606, 472715 };
SkeletonArchersIds = new HashSet<uint> { 472801 };
SkeletonWarriorsIds = new HashSet<ActorSnoEnum>
{
ActorSnoEnum._p6_necro_commandskeletons_a, // = 473147,
ActorSnoEnum._p6_necro_commandskeletons_f, // = 473417,
ActorSnoEnum._p6_necro_commandskeletons_d, // = 473418,
ActorSnoEnum._p6_necro_commandskeletons_b, // = 473420,
ActorSnoEnum._p6_necro_commandskeletons_c, // = 473426,
ActorSnoEnum._p6_necro_commandskeletons_e, // = 473428,
}; // ty SR ;p
SkeletonMagesIds = new HashSet<ActorSnoEnum>
{
ActorSnoEnum._p6_necro_skeletonmage_a, // = 472275,
ActorSnoEnum._p6_necro_skeletonmage_b, // = 472588,
ActorSnoEnum._p6_necro_skeletonmage_c, // = 472606,
ActorSnoEnum._p6_necro_skeletonmage_d, // = 472715,
ActorSnoEnum._p6_necro_skeletonmage_e, // = 472769,
};
SkeletonArchersIds = new HashSet<ActorSnoEnum> { ActorSnoEnum._p6_necro_skeletonmage_f_archer /*472801*/ };
}

public override void Load(IController hud)
Expand Down
46 changes: 41 additions & 5 deletions Actors/WitchDoctorPetsPlugin.cs
Expand Up @@ -6,19 +6,55 @@ namespace Turbo.Plugins.Jack.Actors
{
public class WitchDoctorPetsPlugin : BasePlugin, IInGameWorldPainter
{
public HashSet<uint> GargantuansIds { get; set; }
public HashSet<ActorSnoEnum> GargantuansIds { get; set; }
public WorldDecoratorCollection GargantuansDecorators { get; set; }

public HashSet<uint> ZombiesDogsIds { get; set; }
public HashSet<ActorSnoEnum> ZombiesDogsIds { get; set; }
public WorldDecoratorCollection ZombiesDogsDecorators { get; set; }


public WitchDoctorPetsPlugin()
{
Enabled = true;
GargantuansIds = new HashSet<uint> { 432690, 432691, 432692, 432693, 432694, 122305, 179776, 171491, 179778, 171501, 171502, 179780, 179779, 179772 };
ZombiesDogsIds = new HashSet<uint> { 51353, 108536, 103215, 108543, 104079, 105763, 108560, 110959, 105772, 103235, 108550, 103217, 108556, 105606 };
}
//GargantuansIds = new HashSet<ActorSnoEnum> { 432690, 432691, 432692, 432693, 432694, 122305, 179776, 171491, 179778, 171501, 171502, 179780, 179779, 179772 };
//ZombiesDogsIds = new HashSet<ActorSnoEnum> { 51353, 108536, 103215, 108543, 104079, 105763, 108560, 110959, 105772, 103235, 108550, 103217, 108556, 105606 };

GargantuansIds = new HashSet<ActorSnoEnum>
{
ActorSnoEnum._legendary_wd_gargantuan, // = 432690,
ActorSnoEnum._legendary_wd_gargantuan_absorb, // = 432691,
ActorSnoEnum._legendary_wd_gargantuan_cleave, // = 432692,
ActorSnoEnum._legendary_wd_gargantuan_cooldown, // = 432693,
ActorSnoEnum._legendary_wd_gargantuan_poison, // = 432694,
//ActorSnoEnum._legendary_wd_gargantuan_slam, // = 432695,
ActorSnoEnum._wd_gargantuan, // = 122305,
ActorSnoEnum._wd_gargantuan_attack_swipe, // = 171491,
ActorSnoEnum._wd_gargantuan_cleaveleft_swipe, // = 171501,
ActorSnoEnum._wd_gargantuan_cleaveright_swipe, // = 171502,
ActorSnoEnum._wd_gargantuan_slam, // = 179772,
ActorSnoEnum._wd_gargantuan_absorb, // = 179776,
ActorSnoEnum._wd_gargantuan_cleave, // = 179778,
ActorSnoEnum._wd_gargantuan_poison, // = 179779,
ActorSnoEnum._wd_gargantuan_cooldown, // = 179780,
};
ZombiesDogsIds = new HashSet<ActorSnoEnum>
{
ActorSnoEnum._wd_zombiedog, // 51353,
ActorSnoEnum._wd_zombiedogrune_fire, // 103215,
ActorSnoEnum._wd_zombiedogrune_poison, // 103217,
ActorSnoEnum._wd_zombiedogrune_lifesteal, // 103235,
ActorSnoEnum._wd_zombiedogrune_fire_swipes_02, // 104079,
ActorSnoEnum._wd_zombiedogrune_poison_swipes_02, // 105606,
ActorSnoEnum._wd_zombiedogrune_healthglobe, // 105763,
ActorSnoEnum._wd_zombiedogrune_healthlink_attract, // 105772,
ActorSnoEnum._wd_zombiedog_cast_spirit, // 108536,
ActorSnoEnum._wd_zombiedogrune_fire_castspirit, // 108543,
ActorSnoEnum._wd_zombiedogrune_lifesteal_castspirit, // 108550,
ActorSnoEnum._wd_zombiedogrune_poison_castspirit, // 108556,
ActorSnoEnum._wd_zombiedogrune_healthglobe_castspirit, // 108560,
ActorSnoEnum._wd_zombiedogrune_healthlink, // 110959,
};
}

public override void Load(IController hud)
{
Expand Down
4 changes: 2 additions & 2 deletions Alerts/AlertRule.cs
Expand Up @@ -29,8 +29,8 @@ public class AlertRule
public SnoPowerId[] InactiveBuffs { get; set; }
public uint[] EquippedPassives { get; set; }
public uint[] MissingPassives { get; set; }
public HashSet<uint> ActorSnoIds { get; set; }
public HashSet<uint> InvocationActorSnoIds { get; set; }
public HashSet<ActorSnoEnum> ActorSnoIds { get; set; }
public HashSet<ActorSnoEnum> InvocationActorSnoIds { get; set; }

public AlertRule(IController hud, HeroClass heroClass = HeroClass.None)
{
Expand Down
94 changes: 85 additions & 9 deletions Alerts/PlayerTopAlertListPlugin.cs
Expand Up @@ -32,7 +32,13 @@ public override void Load(IController hud)
// ALL
// ===
// Molten explosions
var moltenIds = new HashSet<uint>() { 4803, 4804, 224225, 247987 };
var moltenIds = new HashSet<ActorSnoEnum>()
{
ActorSnoEnum._monsteraffix_molten_deathstart_proxy, //4803,
ActorSnoEnum._monsteraffix_molten_deathexplosion_proxy, //4804,
ActorSnoEnum._monsteraffix_molten_firering, //224225,
// TODO : missing!!! ActorSnoEnum.???, //247987,
};
AlertList.Alerts.Add(new Alert(Hud)
{
MessageFormat = "\uD83D\uDCA3 \uD83D\uDCA5 \uD83D\uDCA3", //💣 💥 💣
Expand All @@ -50,10 +56,28 @@ public override void Load(IController hud)
}
});
// Grotesque & Fast Mummy explosions
var explosiveMonsterIds = new HashSet<uint>()
var explosiveMonsterIds = new HashSet<ActorSnoEnum>()
{
4104, 4105, 4106, // Fast Mummy
3847, 218307, 218308, 365450, 3848, 218405, 3849, 113994, 3850, 195639, 365465, 191592, // Grotesque
// Fast Mummy
ActorSnoEnum._fastmummy_a, // = 4104,
ActorSnoEnum._fastmummy_b, // = 4105,
ActorSnoEnum._fastmummy_c, // = 4106,
// Grotesque
ActorSnoEnum._corpulent_a, // = 3847,
ActorSnoEnum._corpulent_b, // = 3848,
ActorSnoEnum._corpulent_c, // = 3849,
ActorSnoEnum._corpulent_d, // = 3850,
//_corpulent_suicide_spiders = 137122,
//_corpulent_suicide_frost = 191602,
//_corpulent_suicide_imps = 220536,
ActorSnoEnum._corpulent_c_oasisambush_unique, // 113994,
ActorSnoEnum._corpulent_frost_a, // 191592,
ActorSnoEnum._corpulent_d_cultistsurvivor_unique, // 195639,
ActorSnoEnum._corpulent_a_unique_01, // 218307,
ActorSnoEnum._corpulent_a_unique_02, // 218308,
ActorSnoEnum._corpulent_b_unique_01, // 218405,
ActorSnoEnum._corpulent_a_unique_03, // 365450,
ActorSnoEnum._corpulent_d_unique_spec_01, // 365465,
};
AlertList.Alerts.Add(new Alert(Hud)
{
Expand Down Expand Up @@ -137,7 +161,12 @@ public override void Load(IController hud)
{
EquippedSkills = new[] { new SnoPowerId(powers.Barbarian_CallOfTheAncients.Sno) },
ActiveBuffs = new[] { new SnoPowerId(318760) }, // only when wearing IK 4pc
InvocationActorSnoIds = new HashSet<uint>() { 90443, 90535, 90536 }
InvocationActorSnoIds = new HashSet<ActorSnoEnum>()
{
ActorSnoEnum._barbarian_calloftheancients_1, // = 90443,
ActorSnoEnum._barbarian_calloftheancients_2, // = 90535,
ActorSnoEnum._barbarian_calloftheancients_3, // = 90536,
}
},
});

Expand Down Expand Up @@ -295,7 +324,14 @@ public override void Load(IController hud)
{
ShowInTown = true,
EquippedSkills = new[] { new SnoPowerId(powers.Necromancer_CommandGolem.Sno) },
InvocationActorSnoIds = new HashSet<uint>() { 471646, 471647, 465239, 471619, 460042 } //missing some?
InvocationActorSnoIds = new HashSet<ActorSnoEnum>()
{
(ActorSnoEnum)471646,
(ActorSnoEnum)471647,
(ActorSnoEnum)465239,
(ActorSnoEnum)471619,
(ActorSnoEnum)460042,
} //missing some?
},
});
AlertList.Alerts.Add(new Alert(Hud, HeroClass.Necromancer)
Expand All @@ -306,7 +342,15 @@ public override void Load(IController hud)
{
ShowInTown = true,
EquippedSkills = new[] { new SnoPowerId(powers.Necromancer_CommandSkeletons.Sno) },
InvocationActorSnoIds = new HashSet<uint>() { 473147, 473428, 473426, 473420, 473417, 473418 } //missing some?
InvocationActorSnoIds = new HashSet<ActorSnoEnum>()
{
(ActorSnoEnum)473147,
(ActorSnoEnum)473428,
(ActorSnoEnum)473426,
(ActorSnoEnum)473420,
(ActorSnoEnum)473417,
(ActorSnoEnum)473418
} //missing some?
},
});

Expand All @@ -322,7 +366,23 @@ public override void Load(IController hud)
{
ShowInTown = true,
EquippedSkills = new[] { new SnoPowerId(powers.WitchDoctor_Gargantuan.Sno) },
InvocationActorSnoIds = new HashSet<uint>() { 432690, 432691, 432692, 432693, 432694, 122305, 179776, 171491, 179778, 171501, 171502, 179780, 179779, 179772 }
InvocationActorSnoIds = new HashSet<ActorSnoEnum>()
{
(ActorSnoEnum)432690,
(ActorSnoEnum)432691,
(ActorSnoEnum)432692,
(ActorSnoEnum)432693,
(ActorSnoEnum)432694,
(ActorSnoEnum)122305,
(ActorSnoEnum)179776,
(ActorSnoEnum)171491,
(ActorSnoEnum)179778,
(ActorSnoEnum)171501,
(ActorSnoEnum)171502,
(ActorSnoEnum)179780,
(ActorSnoEnum)179779,
(ActorSnoEnum)179772
}
},
});
// zombie dogs
Expand All @@ -334,7 +394,23 @@ public override void Load(IController hud)
{
ShowInTown = true,
EquippedSkills = new[] { new SnoPowerId(powers.WitchDoctor_SummonZombieDog.Sno) },
InvocationActorSnoIds = new HashSet<uint>() { 51353, 108536, 103215, 108543, 104079, 105763, 108560, 110959, 105772, 103235, 108550, 103217, 108556, 105606 }
InvocationActorSnoIds = new HashSet<ActorSnoEnum>()
{
(ActorSnoEnum)51353,
(ActorSnoEnum)108536,
(ActorSnoEnum)103215,
(ActorSnoEnum)108543,
(ActorSnoEnum)104079,
(ActorSnoEnum)105763,
(ActorSnoEnum)108560,
(ActorSnoEnum)110959,
(ActorSnoEnum)105772,
(ActorSnoEnum)103235,
(ActorSnoEnum)108550,
(ActorSnoEnum)103217,
(ActorSnoEnum)108556,
(ActorSnoEnum)105606
}
},
});
// Hex
Expand Down
1 change: 0 additions & 1 deletion Extensions/BrushExtensions.cs
Expand Up @@ -6,7 +6,6 @@
using SharpDX;
using SharpDX.Direct2D1;
using Turbo.Plugins.Default;
using Turbo.Plugins.Resu;

namespace Turbo.Plugins.Jack
{
Expand Down
16 changes: 8 additions & 8 deletions Game/UberRunsPlugin.cs
Expand Up @@ -19,15 +19,15 @@ public class UberRunsPlugin : BasePlugin, IInGameWorldPainter, INewAreaHandler,
public string Portal4Label { get { return uberEncounterStates[areaSno4].Label; } set { uberEncounterStates[areaSno4].Label = value; } }

private Dictionary<uint, UberAreaDefinition> uberEncounterStates;
private HashSet<uint> uberPortalSnos;
private HashSet<ActorSnoEnum> uberPortalSnos;
private int gameRunCompletedCounter;
private bool gameRunCompleted;

private const uint portalAreaSno = 257116;
private const uint portalSno1 = 258384;
private const uint portalSno2 = 258385;
private const uint portalSno3 = 258386;
private const uint portalSno4 = 366533;
private const ActorSnoEnum portalSno1 = (ActorSnoEnum)258384;
private const ActorSnoEnum portalSno2 = (ActorSnoEnum)258385;
private const ActorSnoEnum portalSno3 = (ActorSnoEnum)258386;
private const ActorSnoEnum portalSno4 = (ActorSnoEnum)366533;
private const uint areaSno1 = 256767;
private const uint areaSno2 = 256106;
private const uint areaSno3 = 256742;
Expand Down Expand Up @@ -61,7 +61,7 @@ public override void Load(IController hud)
uberEncounterStates.Add(areaSno3, new UberAreaDefinition(areaSno3, portalSno3, "A3 done"));
uberEncounterStates.Add(areaSno4, new UberAreaDefinition(areaSno4, portalSno4, "A4 done"));

uberPortalSnos = new HashSet<uint>(uberEncounterStates.Select(a => a.Value.PortalSno));
uberPortalSnos = new HashSet<ActorSnoEnum>(uberEncounterStates.Select(a => a.Value.PortalSno));
}

public void OnNewArea(bool newGame, ISnoArea area)
Expand Down Expand Up @@ -126,9 +126,9 @@ private class UberAreaDefinition
public bool Visited { get; set; }
public string Label { get; set; }
public uint AreaSno { get; private set; }
public uint PortalSno { get; private set; }
public ActorSnoEnum PortalSno { get; private set; }

public UberAreaDefinition(uint areaSno, uint portalSno, string label)
public UberAreaDefinition(uint areaSno, ActorSnoEnum portalSno, string label)
{
Label = label;
AreaSno = areaSno;
Expand Down

0 comments on commit 0f75a20

Please sign in to comment.