[DiscordArchive] I'm trying to fix Gathios the Shatterer behavior where he should keep moving while casting Judgement
[DiscordArchive] I'm trying to fix Gathios the Shatterer behavior where he should keep moving while casting Judgement
![[Image: image.png?ex=690c2986&is=690ad806&hm=d81...db8e6268b&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135281888104519/image.png?ex=690c2986&is=690ad806&hm=d810fc8e6b29919bf0bbe1654f0ae4ace79ef156e8b6687caa9e0e4db8e6268b&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=9d5...7b23b297d&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282156535999/image.png?ex=690c2986&is=690ad806&hm=9d5c0243ef06e4f4fc70609372c7d16d8aec0b92da5ec55f9df3bf37b23b297d&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=bb5...6244b76cc&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282378707084/image.png?ex=690c2986&is=690ad806&hm=bb516cfc489de3d41a41918a9b3be7c7485e6e423edf04917039eb46244b76cc&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=93b...81fb09932&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282747936848/image.png?ex=690c2986&is=690ad806&hm=93b21868601b86cf3eab341dbec39bff450bd2f1b9e4d9ac762681181fb09932&)
Archived author: Mattia • Posted: 2024-08-19T16:52:21.976000+00:00
Original source
I'm trying to fix Gathios the Shatterer behavior where he should keep moving while casting Judgement (https://github.com/chromiecraft/chromiec...ssues/7262). I've tried different methods, but the boss was getting blocked by this bool Creature::IsMovementPreventedByCasting() method in the Creature.cpp file. So I decided adopt this solution:
1) Created a new flag in UnitDefines.h (screen1);
2) Added a check in bool Creature::IsMovementPreventedByCasting() const in Creature.cpp (screen2);
3) Added a check in bool Unit::IsMovementPreventedByCasting() const (not necessary for the ticket's purpose, but since I added a UNIT-type flag, I thought it made sense to include the check here as well)(screen3);
4) manage logic in boss_script file(screen4)
What do you think? Would you do it differently? Or do you have another idea?
![[Image: image.png?ex=690c2986&is=690ad806&hm=d81...db8e6268b&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135281888104519/image.png?ex=690c2986&is=690ad806&hm=d810fc8e6b29919bf0bbe1654f0ae4ace79ef156e8b6687caa9e0e4db8e6268b&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=9d5...7b23b297d&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282156535999/image.png?ex=690c2986&is=690ad806&hm=9d5c0243ef06e4f4fc70609372c7d16d8aec0b92da5ec55f9df3bf37b23b297d&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=bb5...6244b76cc&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282378707084/image.png?ex=690c2986&is=690ad806&hm=bb516cfc489de3d41a41918a9b3be7c7485e6e423edf04917039eb46244b76cc&)
![[Image: image.png?ex=690c2986&is=690ad806&hm=93b...81fb09932&]](https://cdn.discordapp.com/attachments/284323424032129024/1275135282747936848/image.png?ex=690c2986&is=690ad806&hm=93b21868601b86cf3eab341dbec39bff450bd2f1b9e4d9ac762681181fb09932&)
Archived author: Nyeriah • Posted: 2024-08-19T17:04:50.391000+00:00
Original source
We don’t have the freedom of creating unit_flags as those are sniffed
Archived author: Nyeriah • Posted: 2024-08-19T17:05:50.542000+00:00
Original source
First thing to check is the spell attributes to be sure we are not missing anything
Archived author: Nyeriah • Posted: 2024-08-19T17:06:16.040000+00:00
Original source
Maybe just checking if the spell has the interrupt on move flag would do
Archived author: Nyeriah • Posted: 2024-08-19T17:06:39.320000+00:00
Original source
Secondly if all else fails better if we create a custom spell attribute for that spell specifically
Archived author: Nyeriah • Posted: 2024-08-19T17:06:53.562000+00:00
Original source
But a global solution would be the better approach here
Archived author: Mattia • Posted: 2024-08-19T17:08:45.965000+00:00
Original source
Thanks <@251803844307189761>
Archived author: Mattia • Posted: 2024-08-19T17:08:52.549000+00:00
Original source
I agree
Archived author: Mattia • Posted: 2024-08-19T17:11:04.554000+00:00
Original source
So I'll try different approach with no flags
Archived author: Natrist • Posted: 2024-08-19T17:21:05.399000+00:00
Original source
Nyeriah is right that you should look for spell attributes instead. That's what defines whether a spell can be cast while moving or not.