fix: 카드 호버 nil 가드 추가
This commit is contained in:
@@ -4524,7 +4524,7 @@
|
|||||||
"Name": "slot"
|
"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,
|
"Scope": 2,
|
||||||
"ExecSpace": 6,
|
"ExecSpace": 6,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
|
|||||||
@@ -105,6 +105,9 @@ return out`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [
|
|||||||
method('HoverCard', `if self.DragSlot ~= nil and self.DragSlot > 0 then
|
method('HoverCard', `if self.DragSlot ~= nil and self.DragSlot > 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self.Hand == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
local cardId = self.Hand[slot]
|
local cardId = self.Hand[slot]
|
||||||
if cardId == nil then
|
if cardId == nil then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user