{"id":174,"date":"2024-10-17T09:32:14","date_gmt":"2024-10-17T01:32:14","guid":{"rendered":"https:\/\/nds.cool\/?p=174"},"modified":"2024-10-17T09:33:26","modified_gmt":"2024-10-17T01:33:26","slug":"dayz-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%87%ba%e7%94%9f%e8%a3%85%e5%a4%87%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/blog.wcld.top\/?p=174","title":{"rendered":"Dayz \u670d\u52a1\u5668\u51fa\u751f\u88c5\u5907\u8bbe\u7f6e"},"content":{"rendered":"<p>override void StartingEquipSetup(PlayerBase player, bool clothesChosen)\n{\nEntityAI itemClothing;\nEntityAI itemEnt;\nItemBase itemBs;\nfloat rand;\nitemEnt = player.GetInventory().CreateInInventory( &#8220;ImprovisedBag&#8221; );\u00a0 \u00a0\\\u80cc\u5305\nitemClothing = player.FindAttachmentBySlotName( &#8220;Back&#8221; );\nif ( itemClothing )\n{\nSetRandomHealth( itemClothing );\nitemEnt = itemClothing.GetInventory().CreateInInventory( &#8220;BandageDressing&#8221; );\u00a0 \\\u8863\u670d\u91cc\u88c5\u7684\u4e1c\u897f \u8fd9\u91cc\u662f\u7ef7\u5e26\nif ( Class.CastTo( itemBs, itemEnt ) )\nitemBs.SetQuantity( 2 );\nplayer.SetQuickBarEntityShortcut(itemEnt, 2);\nstring chemlightArray[] = { &#8220;Apple&#8221;, &#8220;Pear&#8221;, &#8220;Plum&#8221; };\u00a0 \\\u8eab\u4e0a\u88c5\u7684\u98df\u7269\nint rndIndex = Math.RandomInt( 0, 4 );\nitemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );\nSetRandomHealth( itemEnt );\nplayer.SetQuickBarEntityShortcut(itemEnt, 1);\nrand = Math.RandomFloatInclusive( 0.0, 1.0 );\nif ( rand  0.65 )\nitemEnt = player.GetInventory().CreateInInventory( &#8220;Pear&#8221; );\nelse\nitemEnt = player.GetInventory().CreateInInventory( &#8220;Plum&#8221; );\nplayer.SetQuickBarEntityShortcut(itemEnt, 3);\nSetRandomHealth( itemEnt );\n}\u00a0 \\\u8fd9\u91cc\u662f\u80cc\u5305\u91cc\u88c5\u7684\u4e1c\u897f\nitemEnt = player.GetInventory().CreateInInventory( &#8220;BeanieHat_Black&#8221; );\nitemEnt = player.GetInventory().CreateInInventory( &#8220;WoolGlovesFingerless_ChristmasBlue&#8221; );\nitemEnt = player.GetInventory().CreateInInventory( &#8220;BandageDressing&#8221; );\nif ( Class.CastTo( itemBs, itemEnt ) )\nitemBs.SetQuantity( 2 );\nitemEnt = itemClothing.GetInventory().CreateInInventory( &#8220;Chemlight_Red&#8221; );\nif ( Class.CastTo( itemBs, itemEnt ) )\nitemBs.SetQuantity( 1 );\nitemEnt = itemClothing.GetInventory().CreateInInventory( &#8220;StoneKnife&#8221; );\nif ( Class.CastTo( itemBs, itemEnt ) )\nitemBs.SetQuantity( 20 );\nitemBs.SetQuantity( 20 );\nitemClothing = player.FindAttachmentBySlotName( &#8220;Legs&#8221; );\nif ( itemClothing )\nSetRandomHealth( itemClothing );\nitemClothing = player.FindAttachmentBySlotName( &#8220;Feet&#8221; );\n}\n};<\/p>","protected":false},"excerpt":{"rendered":"<p>override void StartingEquipSetup(PlayerBase player, bool clo\u2026<\/p>","protected":false},"author":1,"featured_media":175,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3],"class_list":["post-174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dayz","tag-dayz"],"_links":{"self":[{"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=174"}],"version-history":[{"count":0,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/posts\/174\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=\/wp\/v2\/media\/175"}],"wp:attachment":[{"href":"https:\/\/blog.wcld.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wcld.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}