物品来源
<ul>
<li>物品来源
<code>lualib:setthrowitemlyex(player,item)</code></li>
</ul>
<table>
<thead>
<tr>
<th style="text-align: left;">字段</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">空</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">source</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">否</td>
<td>json字符串</td>
</tr>
</tbody>
</table>
<pre><code class="language-lua">--使用示例:
lualib:setthrowitemlyex(player,item)</code></pre>
<h5>json文本格式</h5>
<pre><code class="language-json">source格式
{
map: "0", //地图号
source: 5, //来源:1-GM生成,2-NPC,3-商城,4-NPC商店, 5-怪物掉落,6-系统给与,7-挖矿,8-批量生成,9-宝箱
mon:"白野猪", //掉落的怪物
player:"玩家人物名称",
time:"2021-11-11 00:00:00" //掉落或生成的时间,为空时,设置为系统时间
}
设置来源接口调用后,会将生成的来源数据保存到后端,脚本中给与物品时,会自动绑定。</code></pre>