Fix dropping items to container with tdata3/4#1414
Conversation
… (second part of Sphereserver#793) - added check for placing items into containers with tdata3/4 with actual values instead of fixed ones - changed generating value for random location in container with tdata3/4 to be same as without tdata3/4
- warning, if tdata4 is lower or not set and tdata3 is
|
What about having a fallback to the default hardcoded values, in case tdata isn't defined? With a warning message in console, of course |
|
Sure, could be that way. I was thinking about new method But I would say that it shouldn't be part of this PR as it is beyond fixing #793. |
|
Yes we can discuss about that new method in a separate issue. I wonder though how often would we use that |
|
I've created separate issue for the deprecation discussion: #1419 so this could be merged. |
Is this going to be part of this PR, or another one? |
|
I would leave it to diffferent one. There is warning if tdata4 is undefined / lower than tdata3. For the undefined for both would be nice to have it in script pack, which I haven't done. |
This should fix part 2 of #793. Items got always 1,1 position when dropping onto container and condition checking the localtion wasn't run (sice dropping would give -1,-1 and was rewritten).
Part one (item clip) should be fixed by definining container size with tdata3/4 in scripts.
Maybe move this part from code to scripts and deprecate gettings these values with some fallback in future to 0,0,512,512 (as it is in
CItemContainer::ContentAdd)?Source-X/src/game/items/CItemContainer.cpp
Line 373 in 0911dd2