Skip to content

Commit 5b4331e

Browse files
authored
Merge pull request #40 from ElunaLuaEngine/master-2024-11-14_20-01
Update Eluna documentation
2 parents 6fa6a91 + f356325 commit 5b4331e

34 files changed

+856
-233
lines changed

Player/AddLifetimeKills.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,31 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Adds or detracts from the <a class="mod" href="../Player/index.html">Player</a>s current lifetime kill count</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:AddLifetimeKills()</code>
97+
<code>Player:AddLifetimeKills( kills )</code>
9998
</p>
10099

101100
<h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
<dl>
105+
<dt><code><strong><a href="http://www.lua.org/pil/2.3.html">number</a></strong> kills</code></dt>
106+
<dd class="docblock"><p>Positive number to add, negative number to detract. </p><p><em>Valid numbers</em>: integers from -2,147,483,647 to 2,147,483,647.</p></dd>
107+
</dl>
106108
</p>
107109

108110
<h2 id="returns" class='section-header'>
109111
<a href="#returns">Returns</a>
110112
</h2>
111113
<p>
112-
Unknown.
114+
Nothing.
113115
</p>
114116
</div>
115117

Player/AddTalent.html

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,45 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Adds a talent to the <a class="mod" href="../Player/index.html">Player</a> for the specified spec and learning status.</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:AddTalent()</code>
97+
<code>success = Player:AddTalent( spellId, spec )</code>
98+
</p>
99+
<p>
100+
<code>success = Player:AddTalent( spellId, spec, learning )</code>
99101
</p>
100102

101103
<h2 id="arguments" class='section-header'>
102104
<a href="#arguments">Arguments</a>
103105
</h2>
104106
<p>
105-
Unknown.
107+
<dl>
108+
<dt><code><strong><a href="http://www.lua.org/pil/2.3.html">number</a></strong> spellId</code></dt>
109+
<dd class="docblock"><p>ID of the spell for the talent. </p><p><em>Valid numbers</em>: integers from 0 to 4,294,967,295.</p></dd>
110+
</dl>
111+
<dl>
112+
<dt><code><strong><a href="http://www.lua.org/pil/2.3.html">number</a></strong> spec</code></dt>
113+
<dd class="docblock"><p>The spec to which the talent applies. </p><p><em>Valid numbers</em>: integers from 0 to 255.</p></dd>
114+
</dl>
115+
<dl>
116+
<dt><code><strong><a href="http://www.lua.org/pil/2.2.html">boolean</a></strong> learning (true)</code></dt>
117+
<dd class="docblock"><p>Whether the talent is being learned. </p></dd>
118+
</dl>
106119
</p>
107120

108121
<h2 id="returns" class='section-header'>
109122
<a href="#returns">Returns</a>
110123
</h2>
111124
<p>
112-
Unknown.
125+
<dl>
126+
<dt><code><strong><a href="http://www.lua.org/pil/2.2.html">boolean</a></strong> success</code></dt>
127+
<dd class="docblock"><p>True if the talent was added, false otherwise. </p></dd>
128+
</dl>
113129
</p>
114130
</div>
115131

Player/BindToInstance.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Binds the <a class="mod" href="../Player/index.html">Player</a> to their current instance.</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
@@ -102,14 +101,14 @@ <h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
None.
106105
</p>
107106

108107
<h2 id="returns" class='section-header'>
109108
<a href="#returns">Returns</a>
110109
</h2>
111110
<p>
112-
Unknown.
111+
Nothing.
113112
</p>
114113
</div>
115114

Player/EquipItem.html

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -88,37 +88,102 @@ <h1 class='fqn'>
8888

8989
<div class='docblock'>
9090
<p>Equips the given item or item entry to the given slot. Returns the equipped item or nil.</p>
91-
<pre><code>enum EquipmentSlots // 19 slots
92-
{
93-
EQUIPMENT_SLOT_START = 0,
94-
EQUIPMENT_SLOT_HEAD = 0,
95-
EQUIPMENT_SLOT_NECK = 1,
96-
EQUIPMENT_SLOT_SHOULDERS = 2,
97-
EQUIPMENT_SLOT_BODY = 3,
98-
EQUIPMENT_SLOT_CHEST = 4,
99-
EQUIPMENT_SLOT_WAIST = 5,
100-
EQUIPMENT_SLOT_LEGS = 6,
101-
EQUIPMENT_SLOT_FEET = 7,
102-
EQUIPMENT_SLOT_WRISTS = 8,
103-
EQUIPMENT_SLOT_HANDS = 9,
104-
EQUIPMENT_SLOT_FINGER1 = 10,
105-
EQUIPMENT_SLOT_FINGER2 = 11,
106-
EQUIPMENT_SLOT_TRINKET1 = 12,
107-
EQUIPMENT_SLOT_TRINKET2 = 13,
108-
EQUIPMENT_SLOT_BACK = 14,
109-
EQUIPMENT_SLOT_MAINHAND = 15,
110-
EQUIPMENT_SLOT_OFFHAND = 16,
111-
EQUIPMENT_SLOT_RANGED = 17,
112-
EQUIPMENT_SLOT_TABARD = 18,
113-
EQUIPMENT_SLOT_END = 19
114-
};
115-
116-
enum InventorySlots // 4 slots
91+
<pre><code>enum InventorySlots // 4 slots
11792
{
11893
INVENTORY_SLOT_BAG_START = 19,
11994
INVENTORY_SLOT_BAG_END = 23
12095
};
12196
</code></pre>
97+
<div class="table-container">
98+
<p>
99+
<table>
100+
<thead>
101+
<tr>
102+
<th>Slot</th>
103+
<th>ID</th>
104+
</tr>
105+
</thead>
106+
<tbody>
107+
<tr>
108+
<td>EQUIPMENT_SLOT_HEAD</td>
109+
<td>0</td>
110+
</tr>
111+
<tr>
112+
<td>EQUIPMENT_SLOT_NECK</td>
113+
<td>1</td>
114+
</tr>
115+
<tr>
116+
<td>EQUIPMENT_SLOT_SHOULDERS</td>
117+
<td>2</td>
118+
</tr>
119+
<tr>
120+
<td>EQUIPMENT_SLOT_BODY</td>
121+
<td>3</td>
122+
</tr>
123+
<tr>
124+
<td>EQUIPMENT_SLOT_CHEST</td>
125+
<td>4</td>
126+
</tr>
127+
<tr>
128+
<td>EQUIPMENT_SLOT_WAIST</td>
129+
<td>5</td>
130+
</tr>
131+
<tr>
132+
<td>EQUIPMENT_SLOT_LEGS</td>
133+
<td>6</td>
134+
</tr>
135+
<tr>
136+
<td>EQUIPMENT_SLOT_FEET</td>
137+
<td>7</td>
138+
</tr>
139+
<tr>
140+
<td>EQUIPMENT_SLOT_WRISTS</td>
141+
<td>8</td>
142+
</tr>
143+
<tr>
144+
<td>EQUIPMENT_SLOT_HANDS</td>
145+
<td>9</td>
146+
</tr>
147+
<tr>
148+
<td>EQUIPMENT_SLOT_FINGER1</td>
149+
<td>10</td>
150+
</tr>
151+
<tr>
152+
<td>EQUIPMENT_SLOT_FINGER2</td>
153+
<td>11</td>
154+
</tr>
155+
<tr>
156+
<td>EQUIPMENT_SLOT_TRINKET1</td>
157+
<td>12</td>
158+
</tr>
159+
<tr>
160+
<td>EQUIPMENT_SLOT_TRINKET2</td>
161+
<td>13</td>
162+
</tr>
163+
<tr>
164+
<td>EQUIPMENT_SLOT_BACK</td>
165+
<td>14</td>
166+
</tr>
167+
<tr>
168+
<td>EQUIPMENT_SLOT_MAINHAND</td>
169+
<td>15</td>
170+
</tr>
171+
<tr>
172+
<td>EQUIPMENT_SLOT_OFFHAND</td>
173+
<td>16</td>
174+
</tr>
175+
<tr>
176+
<td>EQUIPMENT_SLOT_RANGED</td>
177+
<td>17</td>
178+
</tr>
179+
<tr>
180+
<td>EQUIPMENT_SLOT_TABARD</td>
181+
<td>18</td>
182+
</tr>
183+
</tbody>
184+
</table>
185+
</p>
186+
</div>
122187

123188

124189
<h2 id="synopsis" class='section-header'>

Player/GetNearbyGameObject.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,31 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Returns the closest <a class="mod" href="../GameObject/index.html">GameObject</a> to the <a class="mod" href="../Player/index.html">Player</a>.</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:GetNearbyGameObject()</code>
97+
<code>gameobject = Player:GetNearbyGameObject()</code>
9998
</p>
10099

101100
<h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
None.
106105
</p>
107106

108107
<h2 id="returns" class='section-header'>
109108
<a href="#returns">Returns</a>
110109
</h2>
111110
<p>
112-
Unknown.
111+
<dl>
112+
<dt><code><strong><a class="mod" href="../GameObject/index.html">GameObject</a></strong> gameobject</code></dt>
113+
<dd class="docblock"><em>See method description.</em></dd>
114+
</dl>
113115
</p>
114116
</div>
115117

Player/GetRecruiterId.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,31 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Returns the <a class="mod" href="../Player/index.html">Player</a>s recruit-a-friend recruiter account ID</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:GetRecruiterId()</code>
97+
<code>recruiterId = Player:GetRecruiterId()</code>
9998
</p>
10099

101100
<h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
None.
106105
</p>
107106

108107
<h2 id="returns" class='section-header'>
109108
<a href="#returns">Returns</a>
110109
</h2>
111110
<p>
112-
Unknown.
111+
<dl>
112+
<dt><code><strong><a href="http://www.lua.org/pil/2.3.html">number</a></strong> recruiterId</code></dt>
113+
<dd class="docblock"><p><em>Valid numbers</em>: integers from 0 to 4,294,967,295.</p></dd>
114+
</dl>
113115
</p>
114116
</div>
115117

Player/GetSelectedPlayer.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,31 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Returns the <a class="mod" href="../Player/index.html">Player</a>s selected <a class="mod" href="../Player/index.html">Player</a> or nil.</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:GetSelectedPlayer()</code>
97+
<code>selection = Player:GetSelectedPlayer()</code>
9998
</p>
10099

101100
<h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
None.
106105
</p>
107106

108107
<h2 id="returns" class='section-header'>
109108
<a href="#returns">Returns</a>
110109
</h2>
111110
<p>
112-
Unknown.
111+
<dl>
112+
<dt><code><strong><a class="mod" href="../Player/index.html">Player</a></strong> selection</code></dt>
113+
<dd class="docblock"><em>See method description.</em></dd>
114+
</dl>
113115
</p>
114116
</div>
115117

Player/GetSelectedUnit.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,31 @@ <h1 class='fqn'>
8787

8888

8989
<div class='docblock'>
90-
<p>This method is <em>undocumented</em>. <strong>Use at your own risk.</strong></p>
91-
<p>For temporary documentation, please check the <a href="https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp">LuaFunctions</a> source file.</p>
90+
<p>Returns the <a class="mod" href="../Player/index.html">Player</a>s selected <a class="mod" href="../Unit/index.html">Unit</a>.</p>
9291

9392

9493
<h2 id="synopsis" class='section-header'>
9594
<a href="#synopsis">Synopsis</a>
9695
</h2>
9796
<p>
98-
<code>Player:GetSelectedUnit()</code>
97+
<code>selection = Player:GetSelectedUnit()</code>
9998
</p>
10099

101100
<h2 id="arguments" class='section-header'>
102101
<a href="#arguments">Arguments</a>
103102
</h2>
104103
<p>
105-
Unknown.
104+
None.
106105
</p>
107106

108107
<h2 id="returns" class='section-header'>
109108
<a href="#returns">Returns</a>
110109
</h2>
111110
<p>
112-
Unknown.
111+
<dl>
112+
<dt><code><strong><a class="mod" href="../Unit/index.html">Unit</a></strong> selection</code></dt>
113+
<dd class="docblock"><em>See method description.</em></dd>
114+
</dl>
113115
</p>
114116
</div>
115117

0 commit comments

Comments
 (0)