-
Notifications
You must be signed in to change notification settings - Fork 6k
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core/SAI: Creatures does not store Cooldown after Counterspell #13559
Comments
True! But not only with SAI, all creatures have this behaviour I believe. |
thats why i asked at least for a solution for sai - because nearly every creature in wow is scripted with sai right now :D |
Why would you only implement it for SAI, more generic for all creatures would be even more insane. |
generic solution would be great, but probably someone instantly know a solution for sai. to my mind the finding of a solution for sai can be done faster, because it will affect a specific part in the core :D |
Add cooldown to all generic creatures. |
👍 |
i'm currious about every idea, but these two proposes really greases the steamplugs! i only saw something with cds here http://docs.trinitycore.info/d8/d14/structgeneric__creature_1_1generic__creatureAI.html :/ |
something like this?
|
What happens when you interupt mid-cast with Counterspell (mage)? |
void Spell::EffectInterruptCast(SpellEffIndex effIndex) |
okay i tested this part: if (!me->HasSpellCooldown(e.action.cast.spell) && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
{
me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
me->AddCreatureSpellCooldown(e.action.cast.spell);
} with this creature: npc=29129. They cast the spell: 37361 every 1 seconds. Probably because the gcd for this spell itself is only 1.5 sec. We have the problem, that the given time from (f.ex.: counterspell = 8 sec) the interrupt cast will not be added to the spellcooldown of the creature. We cast counterspell on the creature and the cooldown for the spell still remains on 1.5 sec and is not inceased by the effect of the counterspell to 8 sec. |
track the code applied for players and try to adapt it to a general case (units) think thats the proper solution, as all units can be affected by silence (if the arent inmune of course) |
nevertheless i think the part in smart_action_cast is needed because we need the check, if the creature has a spellcooldown or not - just a good starting point^^ |
probably we could use something like this: void IsInteruptSpell(SpellInfo const* spell)
{
if (spell->HasEffect(SPELL_EFFECT_INTERRUPT_CAST))
{
interrupted = true;
events.ScheduleEvent(EVENT_INTERRUPT_OVER, spell->GetDuration());
}
} but this must be modified to the sai, dunno how to bring this stuff to unit.cpp |
Why is the spell cooldown being added, if, what's needed is spell school lock timer? Each ability locks given school for a different period of time. This discussion is mostly incorrect... I don't think such mechanic currently works for creatures |
That's true and that's what the discussion is about here. |
PlayerSpellMap is used on players and returns m_spells. What means m_spells for pets? and for creatures? it's a missing value on db making us crazy? PlayerSpellMap PetSpellMap ¿CreatureSpellMap? |
m_spells are taken from creature_template spell1-spell8. If no value, ProhibitSpellSchool can't add cooldown. |
so u mean if the creature has no script assigned and uses a rndmscript(foregot the name for this) which includes the use of the values in spell 1-8, the creature will have a normal cooldown- and interrupt behaviour? |
I'm just saying that to add the cooldown spells for that school they need to be in creature_template. |
This was fixed already no? |
No |
Fixed in 6.x branch |
* Refactored cooldown handling to separate class shared by creatures and players * Updated and enabled cooldown packets * Implemented creature school lockouts * Implemented spell charges * Fixed AuraUpdate structure * Fixed aura flag AFLAG_NOCASTER handling * Implemented spell charge related auras
Will u port this to 3.3.5 ? |
I hope someone will :) |
I will not. 3.3.5a branch is dead to me |
Alot of people using it still. Wouldn't be a waste ;-P |
Can someone port this to 3.3.5a? :/ |
Fixed by f4c1a8f |
Rev: All revisions since mangos
Problem:
Creatures scriptet with SAI will ignore Counterspells.
Reproduction:
Choose an creature, scripted with SAI, which casts spells and repeats them all 2 seconds. Use counterspell on them, while they cast a spell.
How it should be:
After you counterspelled the creature, the creature should not be able to repeat the spell for 5 seconds
Notes:
I know this is a general issue, because cooldown for creatures is not implementet yet and this issue affects also creatures scriptet with escortAI or scriptedAI and so on, but i think if we could realise a 5 sec cooldown for all creatures using sai it would be a great success.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: