<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetInspectionBragData</id>
	<title>API:GetInspectionBragData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetInspectionBragData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetInspectionBragData&amp;action=history"/>
	<updated>2026-10-18T04:54:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetInspectionBragData&amp;diff=30414&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetInspectionBragData&amp;diff=30414&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:13Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Social}}&lt;br /&gt;
Returns the bragging rights of the player being inspected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
brags = GetInspectionBragData()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;brags : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of 10 brag tables, one per slot.&lt;br /&gt;
&lt;br /&gt;
Each brag table has these fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Tome entry id in the slot. 0 for an empty slot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Name of the tome entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cardData&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Data of the card that belongs to the entry. Empty when the entry has no card. The stock UI checks &amp;lt;code&amp;gt;cardData.cardId&amp;lt;/code&amp;gt; and passes the table to &amp;lt;code&amp;gt;TomeWindow.SetCard&amp;lt;/code&amp;gt;, the same function it uses for &amp;lt;code&amp;gt;TomeGetCardData&amp;lt;/code&amp;gt; results.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rewards&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Only present when the entry has reward data. Array of up to two reward tables with &amp;lt;code&amp;gt;rewardType&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;rewardId&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;). The first one always has &amp;lt;code&amp;gt;rewardType&amp;lt;/code&amp;gt; 0. The second one also has a &amp;lt;code&amp;gt;rewardData&amp;lt;/code&amp;gt; table with the details of an item (types 4 and 7), tactic (type 3) or title (type 1) reward.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The data is the client&amp;#039;s copy of the last inspection result. Use [[API:SendPlayerInspectionRequest|SendPlayerInspectionRequest]] to ask the server for it.&lt;br /&gt;
* Unlike [[API:GetBraggingRights|GetBraggingRights]], the card is returned as a full &amp;lt;code&amp;gt;cardData&amp;lt;/code&amp;gt; table instead of a &amp;lt;code&amp;gt;cardId&amp;lt;/code&amp;gt;, and the second reward carries &amp;lt;code&amp;gt;rewardData&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The table always has 10 entries.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_inspectionwindow/source/inspectionwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EA_Window_Inspection.bragData = GetInspectionBragData()&lt;br /&gt;
&lt;br /&gt;
for index, brag in ipairs( EA_Window_Inspection.bragData )&lt;br /&gt;
do&lt;br /&gt;
    ...&lt;br /&gt;
    LabelSetText( windowName..&amp;quot;Text&amp;quot;, brag.name )&lt;br /&gt;
    ...&lt;br /&gt;
    -- Set the card if there is one&lt;br /&gt;
    local cardData = nil&lt;br /&gt;
    if( brag.cardData.cardId and brag.cardData.cardId ~= 0 )&lt;br /&gt;
    then&lt;br /&gt;
        cardData = brag.cardData&lt;br /&gt;
    end&lt;br /&gt;
    TomeWindow.SetCard( windowName..&amp;quot;Card&amp;quot;, cardData )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetInspectionData|GetInspectionData]]&lt;br /&gt;
* [[API:GetBraggingRights|GetBraggingRights]]&lt;br /&gt;
* [[API:SendPlayerInspectionRequest|SendPlayerInspectionRequest]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>