<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/zh/history?feed=atom</id>
	<title>Translations:Difficulty scaling/376/zh - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/zh/history?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/zh/history"/>
	<updated>2026-05-12T19:35:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Translations:Difficulty_scaling/376/zh&amp;diff=9935&amp;oldid=prev</id>
		<title>Leoetlino: Created page with &quot;&lt;source lang=&quot;c++&quot;&gt; bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString&amp; weapon_to_look_up, // 基礎武器                                     ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Translations:Difficulty_scaling/376/zh&amp;diff=9935&amp;oldid=prev"/>
		<updated>2020-05-11T12:40:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;c++&amp;quot;&amp;gt; bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString&amp;amp; weapon_to_look_up, // 基礎武器                                     ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString&amp;amp; weapon_to_look_up, // 基礎武器&lt;br /&gt;
                                         WeaponModifier required_modifier, // 預設至少加這麼多&lt;br /&gt;
                                         const char** weapon_to_use_name, // 回傳的武器寫在這裡&lt;br /&gt;
                                         WeaponModifier* modifier_to_use, // 回傳的加成寫在這裡&lt;br /&gt;
                                         void* unknown)&lt;br /&gt;
{&lt;br /&gt;
  // some checks using &amp;#039;unknown&amp;#039; here which seems to be a pointer to the actor&lt;br /&gt;
&lt;br /&gt;
  for (weapon_table : this-&amp;gt;byml[&amp;quot;weapon&amp;quot;]) {&lt;br /&gt;
    // find the first weapon entry for which the player has enough points&lt;br /&gt;
    // with the specified name and modifier&lt;br /&gt;
    // 不同的武器系列儲存在不同的 table 裡，要枚舉 table 再枚舉 table 裡的細項&lt;br /&gt;
    i = -1; // 應該是 index，但是 -1 代表尚未找到&lt;br /&gt;
    for (j = 0; j &amp;lt; weapon_table[&amp;quot;actors&amp;quot;].size; ++j) { // 枚舉含有加成訊息的武器&lt;br /&gt;
      entry = weapon_table[&amp;quot;actors&amp;quot;][j];&lt;br /&gt;
      float points_for_next_transition = entry[&amp;quot;value&amp;quot;]; // 這個加成過的武器所需的經驗值&lt;br /&gt;
&lt;br /&gt;
      if (this-&amp;gt;weapon_points &amp;gt; points_for_next_transition &amp;amp;&amp;amp; // 你的經驗值夠&lt;br /&gt;
          weapon_to_look_up == entry[&amp;quot;name&amp;quot;] &amp;amp;&amp;amp; // 武器的名字是對的&lt;br /&gt;
          convert_to_modifier(entry[&amp;quot;plus&amp;quot;]) == required_modifier) { // 加成的方向跟程度是對的&lt;br /&gt;
        i = j;&lt;br /&gt;
        break; // 找到一個了（但是可能還有更多）&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (i == -1)&lt;br /&gt;
      continue; // 找不到就試下一個&lt;br /&gt;
&lt;br /&gt;
    do { // 已知找到一個的情況下，試圖找更多&lt;br /&gt;
      entry = weapon_table[&amp;quot;actors&amp;quot;][i];&lt;br /&gt;
&lt;br /&gt;
      // not_rank_up means there is no link between weapons;&lt;br /&gt;
      // this table is just used to look up modifiers.&lt;br /&gt;
      // so go down the list until there are no more entries for the requested weapon&lt;br /&gt;
      // or until we reach a modifier that requires more points.&lt;br /&gt;
      if (weapon_table[&amp;quot;not_rank_up&amp;quot;] &amp;amp;&amp;amp; entry[&amp;quot;name&amp;quot;] != weapon_to_look_up)&lt;br /&gt;
        break; // ？？？這個 table 裡的武器不能升級，或是 entry 是 null （boundary check）&lt;br /&gt;
&lt;br /&gt;
      // otherwise, just go down the list until we reach the end or a weapon which&lt;br /&gt;
      // requires more points. this will possibly upgrade the weapon (e.g. Knight -&amp;gt; Royal).&lt;br /&gt;
      if (this-&amp;gt;weapon_points &amp;lt;= entry[&amp;quot;value&amp;quot;])&lt;br /&gt;
        break; // 枚舉到經驗值最高又符合條件的才停&lt;br /&gt;
&lt;br /&gt;
      ++i;&lt;br /&gt;
    } while (i &amp;lt; weapon_table[&amp;quot;actors&amp;quot;].size);&lt;br /&gt;
&lt;br /&gt;
    *weapon_to_use_name = entry[&amp;quot;name&amp;quot;];&lt;br /&gt;
    *modifier_to_use = convert_to_modifier(entry[&amp;quot;plus&amp;quot;]);&lt;br /&gt;
    return true; // 有找到&lt;br /&gt;
  }&lt;br /&gt;
  return false;  // cannot scale up // 沒找到&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Leoetlino</name></author>
	</entry>
</feed>