Fix incorrect signature for AttackedBy() trigger#227
Draft
4Luke4 wants to merge 1 commit intoGibberlings3:masterfrom
Draft
Fix incorrect signature for AttackedBy() trigger#2274Luke4 wants to merge 1 commit intoGibberlings3:masterfrom
4Luke4 wants to merge 1 commit intoGibberlings3:masterfrom
Conversation
|
I only observe CAITrigger::CAITrigger(&attackedByTrigger, 2, &this->m_typeAI, 0);The last argument is the event trigger's int parameter. You can check what value the engine is filling with EEex's latest e.g.: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So,
AttackedBy()implementation is not broken. However, the trigger is currently labeled with the wrongIDStype.Unmodded
TRIGGER.IDSstates:But the engine shows the second argument is not an attack style at all.
Details
What the engine actually does (tested on IWD:EE
v2.6.6.0):CGameSprite::Swingat0x1403B8010builds trigger0x0002from:m_selectedWeaponat +0x10f8m_selectedWeaponAbilityat+0x10faCAITrigger::OfTypeat0x140130730.ASTYLESlookup or style interpretation.So the runtime meaning is:
Why vanilla scripts still work:
AttackedBy(..., DEFAULT).DEFAULTevaluates to0inASTYLES.IDS.0behaves like a wildcard (as you all probably know).AttackedBy([GOODCUTOFF],DEFAULT)really means "attacked by [GOODCUTOFF], any slot", not"attacked with style DEFAULT".The engine-side slot evidence is also consistent:
Swing()can emit9(offhand weapon)10(fist/unarmed)11..14,34, and35..38(ammo + magical weapon + ordinary weapon slots)So the real combat domain is:
Summoning @Bubb13 for confirmation...