fix: 카드 호버 nil 가드 추가

This commit is contained in:
2026-06-23 21:24:34 +09:00
parent fd00ed12d9
commit 0cf714dca6
2 changed files with 4 additions and 1 deletions

View File

@@ -4524,7 +4524,7 @@
"Name": "slot"
}
],
"Code": "if self.DragSlot ~= nil and self.DragSlot > 0 then\n\treturn\nend\nlocal cardId = self.Hand[slot]\nif cardId == nil then\n\treturn\nend\nlocal e = _EntityService:GetEntityByPath(\"/ui/RunUIGroup/CardHand/Card\" .. tostring(slot))\nlocal tx = 0\nif e ~= nil and e.UITransformComponent ~= nil then\n\ttx = e.UITransformComponent.anchoredPosition.x\n\te.UITransformComponent.UIScale = Vector3(1.3, 1.3, 1)\nend\nlocal c = self.Cards[cardId]\nif c ~= nil then\n\tlocal tip = self:BuildCardKeywordTooltip(c)\n\tif tip ~= \"\" then\n\t\tlocal tipX = tx + 270\n\t\tif tx > 180 then tipX = tx - 270 end\n\t\tif tipX > 760 then tipX = tx - 270 end\n\t\tif tipX < -760 then tipX = tx + 270 end\n\t\tself:ShowTooltipAt(\"키워드\", tip, tipX, 90)\n\telse\n\t\tself:HideTooltip()\n\tend\nend",
"Code": "if self.DragSlot ~= nil and self.DragSlot > 0 then\n\treturn\nend\nif self.Hand == nil then\n\treturn\nend\nlocal cardId = self.Hand[slot]\nif cardId == nil then\n\treturn\nend\nlocal e = _EntityService:GetEntityByPath(\"/ui/RunUIGroup/CardHand/Card\" .. tostring(slot))\nlocal tx = 0\nif e ~= nil and e.UITransformComponent ~= nil then\n\ttx = e.UITransformComponent.anchoredPosition.x\n\te.UITransformComponent.UIScale = Vector3(1.3, 1.3, 1)\nend\nlocal c = self.Cards[cardId]\nif c ~= nil then\n\tlocal tip = self:BuildCardKeywordTooltip(c)\n\tif tip ~= \"\" then\n\t\tlocal tipX = tx + 270\n\t\tif tx > 180 then tipX = tx - 270 end\n\t\tif tipX > 760 then tipX = tx - 270 end\n\t\tif tipX < -760 then tipX = tx + 270 end\n\t\tself:ShowTooltipAt(\"키워드\", tip, tipX, 90)\n\telse\n\t\tself:HideTooltip()\n\tend\nend",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],

View File

@@ -105,6 +105,9 @@ return out`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [
method('HoverCard', `if self.DragSlot ~= nil and self.DragSlot > 0 then
return
end
if self.Hand == nil then
return
end
local cardId = self.Hand[slot]
if cardId == nil then
return