<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Discworld MUD</title>
    <link href="/external/includes/style.css" rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <table border="0" width="95%">
        <tr>
          <td style="width:125px">
            <a href="/lpc/index.html"><img src="/external/images/logo_turtle.gif" style="border-style:none" alt="Home" width="110" height="106"></a>
          </td>
          <td valign="top">
            <br>
            <br>
            <script type="text/javascript" src="/external/includes/discworld.js"></script>
            <div id="textnav" style="visibility:hidden;position:absolute;">
              <a href="/lpc/about/">About</a>  | <a href="/lpc/playing/">Playing</a>  | <a href="/lpc/~Playtesters/">Playtesting</a>  | <a href="/lpc/creating/">Creating</a>  | <a href="/lpc/links/">Links</a> 
              <!--%textsubmenu%-->
            </div>
          </td>
        </tr>
        <tr>
          <td valign="top" style="width:125px">
            <!--%login%-->
          <p style="text-align:center" class="menu"><a href="javascript:popup('/external/java/newtelnet/java_client.shtml','JavaClient', 'width=800,height=600,resizable=yes,scrollbar=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')">Play Now</a></p>

          </td>
          <td valign="top">


[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/item_tracker.c</h2>
This handler keeps track of unique (hopefully) per player items in the game.<p>Written by Shaggy
<h2>Inherits</h2>
This class inherits the following classes /std/object.c<h2>Includes</h2>
This class includes the following files /include/quest_handler.h and /include/library.h<h2>Method index</h2>
<ul>
<li><a href="#delete_item">delete_item</a>(mixed, mixed)<br/>
This method deletes the state/location information of a specific quest item
owned by a player.
<li><a href="#query_all_item_states">query_all_item_states</a>(mixed)<br/>
This method returns all the information about quest items
owned by a player.
<li><a href="#query_item_copies">query_item_copies</a>(mixed, mixed)<br/>
This method returns the total number of known copies of a specific quest item
owned by a player.
<li><a href="#query_item_state">query_item_state</a>(mixed, mixed)<br/>
This method returns the state/location of a specific quest item
owned by a player.
<li><a href="#save_all_item_states">save_all_item_states</a>(mixed)<br/>
This method saves the mapping of state/location 
information for items owned by a player to disk.
<li><a href="#save_all_item_states_delete_cache">save_all_item_states_delete_cache</a>(mixed)<br/>
This method saves the mapping of state/location 
information for items owned by a player to disk and deletes
the entry in the cache.
<li><a href="#set_item_state">set_item_state</a>(mixed, mixed, mixed)<br/>
This method sets the state/location of a specific quest item
owned by a player.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="delete_item">
delete_item</a><pre class="autodocfuncdef">
int delete_item(mixed pl_name,
                mixed item)
</pre><dd><br />
This method deletes the state/location information of a specific quest item
owned by a player.
<p>
If the item isn't actually owned by the player it returns 0<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_all_item_states">
query_all_item_states</a><pre class="autodocfuncdef">
mixed query_all_item_states(mixed pl_name)
</pre><dd><br />
This method returns all the information about quest items
owned by a player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
<br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()</a> and <a href="#delete_item">delete_item()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_item_copies">
query_item_copies</a><pre class="autodocfuncdef">
int query_item_copies(mixed pl_name,
                      mixed item)
</pre><dd><br />
This method returns the total number of known copies of a specific quest item
owned by a player.
<p>
If the item isn't actually owned by the player it doesn't matter.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()</a> and <a href="#delete_item">delete_item()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_item_state">
query_item_state</a><pre class="autodocfuncdef">
mixed query_item_state(mixed pl_name,
                       mixed item)
</pre><dd><br />
This method returns the state/location of a specific quest item
owned by a player.
<p>
If the item isn't actually owned by the player it returns 0<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()</a> and <a href="#delete_item">delete_item()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="save_all_item_states">
save_all_item_states</a><pre class="autodocfuncdef">
int save_all_item_states(mixed pl_name)
</pre><dd><br />
This method saves the mapping of state/location 
information for items owned by a player to disk.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()</a>, <a href="#query_item_state">query_item_state()</a>, <a href="#delete_item">delete_item()</a> and <a href="#save_all_item_states_and_delete_from_cache">save_all_item_states_and_delete_from_cache()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="save_all_item_states_delete_cache">
save_all_item_states_delete_cache</a><pre class="autodocfuncdef">
int save_all_item_states_delete_cache(mixed pl_name)
</pre><dd><br />
This method saves the mapping of state/location 
information for items owned by a player to disk and deletes
the entry in the cache.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_item_state">set_item_state()</a>, <a href="#query_item_state">query_item_state()</a>, <a href="#delete_item">delete_item()</a> and <a href="#save_all_item_states">save_all_item_states()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="set_item_state">
set_item_state</a><pre class="autodocfuncdef">
int set_item_state(mixed pl_name,
                   mixed item,
                   mixed state)
</pre><dd><br />
This method sets the state/location of a specific quest item
owned by a player.
<p>
If the item isn't actually owned by the player it returns 0<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pl_name -   player object or name<br />
item -      item object or identifier<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_item_state">query_item_state()</a>, <a href="#delete_item">delete_item()</a> and <a href="#save_all_item_states">save_all_item_states()
</a><br /><br /><br /></dl>

</dl>
</td>
</tr>
<tr>
<td valign="bottom" align="center">
<table>
<tr>
<td align="center" class="imgcell">
<a href="http://validator.w3.org/check?uri=referer"><img src="/external/images/valid-html401" alt="Valid HTML 4.01 Transitional" height=31 width=88 border=0></a>
</td>
</tr>
<tr>
<td align="center" class="imgcell">
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img height="31" width="88" style="border-style:none" src="/external/images/vcss" alt="Valid CSS!"></a>
</td>
</tr>
<tr>
<td align="center">
<a href="/lpc/html_css.html" style="font-size:smaller">Read More</a>
</td>
</tr>
</table>
</td>
<td align="left" valign="top">
<h3></h3>
<p class="copyright">Brought to you by CMOT Dibbler's <a href="/lpc/sausages.html">Sensational Sausages</a>; buy one while they're hot.<br>
Copyright &copy; Discworld MUD, <a href="javascript:popup('/external/java/newtelnet/java_client.shtml','JavaClient', 'width=800,height=600,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')">Play Now</a>, <a href="http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?action=in&amp;id=pinkfish" rel="external">Vote</a>.</p>
</td>
</tr>
</table>
</body>
</html>

