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
fix spells interaction with walls #3493
Conversation
remove the check for tile in front of player for area spells attempt to fix #2891
the problem is that check for instant spells calls canDoCombat forgottenserver/src/spells.cpp Line 699 in aa6d358
which checks for blockprojectile forgottenserver/src/combat.cpp Line 280 in aa6d358
but in order to remove it, I need to make sure that onAreaCombat gets executed somehow edit: gets called later, can safely be removed |
removing the check for possibility to cast the spell made it also possible to cast the spell through wall because isSightClear was checking the tile in front of the player instead of the player himself so I fixed that as well spells such as ue work normally, just tested
|
I'm a little concerned about At first glance it seems a simple solution, but not very pretty |
@MillhioreBT canDoCombat is checking the first tile in front of the caster. Removing that check from canDoCombat can bug some other function that uses it. Removing canDoCombat from this place doesn't bug anything as other checks were perfomed earlier and pz check will be performed when checking isAggressive parameter. |
Tested my changes on a build from November 2020 now, works fine with diagonal fire/poison/energy wall runes. |
What if you throw field rune at stairs (floorchange item) or so, wont it go down/up? |
not enough room error fire bomb doesn't change floors (both servers) you can aim fire bomb at stairs tile, not sure if this pr allows that, will test tomorrow |
testing update (rl): field spells launch shoot effect, but return "there is not enough room", poff and don't consume the rune when they can't be placed (eg. when you click on opened window) area spells can be thrown to any tile that doesn't block projectile, the charge is consumed regardless of spell area going to look into the code later |
Looks like spells and isSightClear are directly tied. This limits my ability to work on them separately. I'll give that a closer look when working with #3487. |
Delayed until new isSightClear gets merged. Files conflict very likely to happen so I'll rebase this one after isSightClear gets merged. |
new isSightClear was merged, resuming work on that update: merged commits from main repo |
Something is stuck in github mergability verification. I addressed the requested changes with a commit already. |
My blessing was required, Github doesn't automatically dismiss change requests |
Pull Request Prelude
Changes Proposed
Issues addressed: #2891
Note: Not tested yet, side effects unknown.