-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING
close cmangos/mangos-tbc#111
- Loading branch information
1 parent
b6d818d
commit 8b23696
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good.
on R2 named as SPELL_ATTR_EX4_FORCE_TRIGGERED and also used to "force" trigger spell with this attr:
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boxa cmangos/mangos-classic@1e930fe
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the messages anymore sadly, but @cyberium explained to me why SPELL_ATTR_EX4_FORCE_TRIGGERED was wrong, @killerwife should be able to tell you more about this as well.
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boxa Triggered does many shenanigans, amongst which, ignore manacost, ignore casting, ignore checks, etc. This is undesirable for a spell that is initiated by the player, as this could create scenarios where spells with this attribute could be exploited. That is why I tailored the usage of this attribute as close to the chest as possible to work.
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when look into TC code we see:
TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_CAST_DIRECTLY
https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/Spell.cpp#L566
don't check for casting at cast another spell:
https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/Spell.cpp#L2926
and casted imeaditelly in Spell::prepare(...)
https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/Spell.cpp#L3042
so, at the moment "triggered" in mangos-style core close to it.
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I actually read that, but unless someone pulls out a sniff or something that tells me otherwise, I do not mind doing it a bit differently. I love the research trinitycore did, but I try not to copy it straight away and try to think for myself for a change.
If you find a bug with my implementation, thats a different matter alltogether.
8b23696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CAN_CAST_WHILE_CASTING name is correct, in leaked client debug binaries this attribute is checked in a function called CanCastWhileCasting.
Generally attribute meaning does not change in client patches - in legion there are several mage spells present in the spellbook (not hidden internal spells!) that explicitly state this in their tooltips (they all have this attribute)