修改鱼获摆放位置bug

This commit is contained in:
997146918 2025-10-23 09:59:26 +08:00
parent cb029ce971
commit 3842f9b8f2
10 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
"BuildId": "37670630", "BuildId": "37670630",
"Modules": "Modules":
{ {
"ProjectFish": "UnrealEditor-ProjectFish.dll", "ProjectFish": "UnrealEditor-ProjectFish-0002.dll",
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor.dll" "ProjectFishEditor": "UnrealEditor-ProjectFishEditor-0002.dll"
} }
} }

View File

@ -2,6 +2,6 @@
"BuildId": "37670630", "BuildId": "37670630",
"Modules": "Modules":
{ {
"DeskMode": "UnrealEditor-DeskMode.dll" "DeskMode": "UnrealEditor-DeskMode-0002.dll"
} }
} }

View File

@ -24,7 +24,7 @@ void UContainerInfo::InitContainerByShape(UShapeAsset* InContainerShape)
bool UContainerInfo::AddContainerItem(FContainerItem Item, int32& ItemID) bool UContainerInfo::AddContainerItem(FContainerItem Item, int32& ItemID)
{ {
if (IsItemInContainerShape(Item)) if (!IsItemInContainerShape(Item))
{ {
return false; return false;
} }
@ -98,8 +98,8 @@ bool UContainerInfo::IsItemInContainerShape(FContainerItem NewItem)
{ {
for (int y = 0; y < NewItem.GetItemHeight(); y++) for (int y = 0; y < NewItem.GetItemHeight(); y++)
{ {
if ( (x + NewItem.ContainerStartPos.X) > 0 && (x + NewItem.ContainerStartPos.X) < ContainerShape->GetShapeWidth() && if ( (x + NewItem.ContainerStartPos.X) >= 0 && (x + NewItem.ContainerStartPos.X) < ContainerShape->GetShapeWidth() &&
(y + NewItem.ContainerStartPos.Y) > 0 && (y + NewItem.ContainerStartPos.Y) < ContainerShape->GetShapeHeight() (y + NewItem.ContainerStartPos.Y) >= 0 && (y + NewItem.ContainerStartPos.Y) < ContainerShape->GetShapeHeight()
) )
{ {
if (!ContainerShape->IsSlotActive(NewItem.ContainerStartPos.X + x, NewItem.ContainerStartPos.Y + y)) if (!ContainerShape->IsSlotActive(NewItem.ContainerStartPos.X + x, NewItem.ContainerStartPos.Y + y))