oldschoolgg / oldschoolbot

Old School Bot - A fanmade discord bot based on Old School RuneScape (OSRS)
https://www.oldschool.gg/
MIT License
143 stars 132 forks source link

Fix ash sanctifier #6117

Closed nwjgit closed 1 month ago

nwjgit commented 1 month ago

redo of https://github.com/oldschoolgg/oldschoolbot/pull/6061 since it affects osb & bso

Description:

nwjgit commented 1 month ago

I believe eppisis's comment is correct here. You took the loot removing out of this function (not sure why), which I believe now will cause zalcano to give xp without taking away the ashes.

They are removed in monsterActivity.ts now. The issue is I couldn't find a way to properly handle combining these banks. updateBank.merge combines the original bank, that is passed into ashSanctified(), and the modified bank that comes from ashSanctified() which leads to the ashes being forced back into updateBank and give to the user.

Edit: let me know if you want me to handle this a different way but this issue lies here: https://github.com/oldschoolgg/oldschoolbot/pull/6117/files#diff-49f60ef533434f325ce8900f0298f9f232c01b8c2a79fdeb67e3a618f8cb3c0fR378 and also bso not having multiplier set to true for xp

gc commented 1 month ago

ashSanctifierEffect should instead take an updateBank, and add/change it, instead of making its own one.

gc commented 1 month ago

Seems like the code hasnt been linted. I always run yarn dev before committing, which I recommend.

nwjgit commented 1 month ago

Seems like the code hasnt been linted. I always run yarn dev before committing, which I recommend.

Fixed.