Gnaw - getting bugged if you use Gnaw and Claw on Autocast, because it spams Gnaw when there is not enough energy and gets bugged. It works if you use only Gnaw on auto or use seperate when you have enough energy.
Leap - Doesnt work on Autocast
http://www.wowwiki.com/Risen_Ghoul
TrinityCore rev. 2012-03-28 15:56:25 +0200 (75fef39+) (Unix, Release)
TDB 335.11.46
Confirmed!
Hash: https://github.com/TrinityCore/TrinityCore/commit/1b77fd45fa5
Tdb: 335.11.47+
Leap was fixed in 7a24a16e0be5c87dade28b6a0cd889ab798701aa
As for the other problem, it may also have been fixed since your bug report is older than my patch. Try it out.
its not fixed yet. Shouldnt ghouls also regenerate energy by ticks of 1 like rogues etc, instead of heartbeat ticks per 20 energy? That would kinda solve this issue too, since gnaw costs 30 energy, claw 40, so they wouldnt be ready at once :p I know it wouldnt solve the root of this problem, but still..
changelog says "Patch 3.0.3 (2008-11-04): Regeneration went from 20 energy per tick to 1 energy per decisecond."
Its ok for players, but not pets.
@tibbi
Leap does work on autocast in my AI patch I posted earlier. As for Gnaw, that is a problem with the spell not the AI. The AI checks cooldowns and since Gnaw has no cooldown it attempts to cast it.
It is the spell handlers that should be failing it due to not enough energy which would then allow the AI to cast something else. It apears the spell handlers aren't properly failing the spell so you get stuck in this loop.
@MrSmite ye i meant gnaw cd stucking being still broken, leap somewhat works.
leap somewhat works
Yeah, it seems to need tweaking beyond what the AI does. I don't think it's supposed to cast if the target is within melee range.
Ok, tested this, confirmed, and a little note, when you use Gnaw With lets say 20 Energy, it will trigger its cooldown, but it wont show visually. But when you mount up, and mount down, you will see that it got a cd. And also yeah, the energy regeneration rate should "fix" this.
Here is problem with energy... ghoul don't using last 30 enegry on Claw on offi... this energy is reserved for Gnaw
I found video where you can see it: http://www.youtube.com/watch?v=ea3oVeFPWRA
lol, didnt believe when i read that, but looks like it really is that way.
I don't agree with that assessment of claw / gnaw based on that video. More information is needed to code that.
Currently the core iterates over the pet bar and if an ability is on autocast and if an ability isn't on CD or there is enough focus to cast it then it gets cast.
This is still a valid issue, which eventually got closed when issues were mass closed. It might even be valid for 6.x
Issue is still present in https://github.com/TrinityCore/TrinityCore/commit/19fefbb72b0a4a413e86d57a13fb0fd040c2a78a.
@MrSmite More info for the autocast Claw (I don't think more than this is needed...):
https://www.youtube.com/watch?v=ea3oVeFPWRA (2:00+, see claw is on autocast, pets energy never goes below 40rp)
https://www.youtube.com/watch?v=BYK6OkFwbv8
This works but I believe it's a bad solution (hacky(?)), just as a temp solution:
diff --git a/sql/updates/world/3.3.5/2017_06_26_00_world_335.sql b/sql/updates/world/3.3.5/2017_06_26_00_world_335.sql
new file mode 100644
index 0000000000..478f4d390d
--- /dev/null
+++ b/sql/updates/world/3.3.5/2017_06_26_00_world_335.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dk_ghoul_claw';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(47468, 'spell_dk_ghoul_claw');
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index d26874d974..972c990c8a 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -98,7 +98,8 @@ enum DeathKnightSpells
SPELL_DK_RUNIC_RETURN = 61258,
SPELL_DK_WANDERING_PLAGUE_DAMAGE = 50526,
SPELL_DK_DEATH_COIL_R1 = 47541,
- SPELL_DK_DEATH_GRIP_INITIAL = 49576
+ SPELL_DK_DEATH_GRIP_INITIAL = 49576,
+ SPELL_DK_GHOUL_CLAW = 47468
};
enum DeathKnightSpellIcons
@@ -2932,6 +2933,43 @@ public:
}
};
+// 47468 - Claw
+class spell_dk_ghoul_claw : public SpellScriptLoader
+{
+ public:
+ spell_dk_ghoul_claw() : SpellScriptLoader("spell_dk_ghoul_claw") { }
+
+ class spell_dk_ghoul_claw_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dk_ghoul_claw_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DK_GHOUL_CLAW });
+ }
+
+ // Ghouls never go below 40 energy using claw so they can use other spells
+ SpellCastResult CheckEnergy()
+ {
+ uint32 energy = GetCaster()->GetPower(POWER_ENERGY);
+ if (energy < 80) // Claw cost 40 energy, don't let ghoul cast it below 80 energy so energy will never be below 40
+ return SPELL_FAILED_DONT_REPORT;
+
+ return SPELL_CAST_OK;
+ }
+
+ void Register() override
+ {
+ OnCheckCast += SpellCheckCastFn(spell_dk_ghoul_claw_SpellScript::CheckEnergy);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_dk_ghoul_claw_SpellScript();
+ }
+};
+
void AddSC_deathknight_spell_scripts()
{
new spell_dk_acclimation();
@@ -2985,4 +3023,5 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_raise_ally_initial();
new spell_dk_raise_ally();
new spell_dk_ghoul_thrash();
+ new spell_dk_ghoul_claw();
}
y, it's hack :)
That fix doesn't look like a hack to me, the behavior seems to be exclusive to Ghoul pets so it makes sense to script it into the specific spell.
Here's a hunter pet that autocasts everything it can as long as it has focus.
The problem with coding a default fail at 40 energy means a player can't cast it manually in a macro if they wanted.
Better solution would be to add a check in Spell::CanAutoCast() and return success or fail.
Pseudocode:
Spell::CanAutoCast()
{
if (m_caster->IsGhoul()) && (m_caster->GetEnergy() >= 40) && (m_spellInfo->Id == CLAW_SPELL_ID)
do_something_or_continue_checking;
}
Most helpful comment
y, it's hack :)