planqi / slashdiablo-maphack

A customized maphack for the slashdiablo D2 server
GNU Affero General Public License v3.0
88 stars 42 forks source link

Shift clicking to stash with PlugY #83

Closed oskros closed 3 years ago

oskros commented 4 years ago

If PlugY is installed, the increased stash bugs out the shift click function when the normal d2 stash size has filled up :(

This can be solved by changing the following lines in https://github.com/planqi/slashdiablo-maphack/blob/master/BH/Modules/ItemMover/ItemMover.cpp, but unfortunately I cannot get the compiler to work on my machine (I made a similar fix in version 1.15s2 where I had success with recompiling)

Line 13: STASH_WIDTH = 10 Line 14: LOD_STASH_HEIGHT = 10 Line 22: STASH_LEFT = 95

The reasoning for line 22 is that CELL_SIZE is 29, and we are changing height from 8 to 10, so that means 153-2*29 = 95

Can someone maybe help me recompile the code with these changes? Or alternatively add a setting for modifying this?

oskros commented 4 years ago

After tinkering a bit around I finally managed to compile the code. Unfortunately my fix as presented above isn't working - It seems that due to a more complicated ItemMover code, more changes are needed to make the mover work correctly in BH 1.9.9 when using PlugY

oskros commented 4 years ago

I solved the issue for my own sake now - All variables are getting overwritten in the ItemMover::Init() function, thus after line 82 I added: STASH_WIDTH = 10; LOD_STASH_HEIGHT = 10;

Furthermore, in the function ItemMover::OnRightClick() I have modified line 406 as follows; } else if (stashUI && x >= (STASH_LEFT - 2*CELL_SIZE) && x <= stashRight && y >= stashTop && y <= stashBottom) {

And line 408 as follows: sourceX = (x - STASH_LEFT + 2*CELL_SIZE) / CELL_SIZE;

This solved the issue - Of course this is a very hacky solution, but as I am not going to use the maphack for anything but PlugY, it can work for me. If anyone wants the .dll, you can download it here: https://github.com/oskros/slashdiablo-maphack-plugy/tree/master/Release

ucotn commented 3 years ago

Is there any way to disable the shift-click hotkeys (as can be with potion and portal hotkeys)? The .dll by oskros fixes the issue for the stash but I've also increased my inventory size which now has that same issue