[an error occurred while processing this directive]
[<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/guild_things/quota/thief_quota.c</h2> This is the Thieves' Guild Quota handler for theft quotas.
<p>Written by Eron<p>Started 01/03/2001
<h2>Inherits</h2>
This class inherits the following classes /obj/handlers/guild_things/quota/cache_handler.c<h2>Includes</h2>
This class includes the following files <a href="include.login_handler.h.shtml">/include/login_handler.h</a>, <a href="include.thief.h.shtml">/include/thief.h</a>, <a href="include.money.h.shtml">/include/money.h</a>, <a href="include.login.h.shtml">/include/login.h</a>, /include/shops/bank.h and <a href="include.player_handler.h.shtml">/include/player_handler.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#adjust_debts">adjust_debts</a>(string, int)<br/>
This method is used to pay a given amount toward a thief's quota
up to the amount the thief owes.
<li><a href="#calc_thief_quota">calc_thief_quota</a>(string, int)<br/>
This method is used to calculate a thief's quota values.
<li><a href="#login">login</a>(string, string)<br/>
This method is called by the login handler when a player logs on
or by the code for thief leaves of absence.
<li><a href="#pay_thief_fines">pay_thief_fines</a>(string, int)<br/>
This method is used to pay a given amount in fines to the Guild.
<li><a href="#pay_thief_quota">pay_thief_quota</a>(string, int)<br/>
This method is used when a thief pays the Guild.
<li><a href="#player_quit">player_quit</a>(string)<br/>
This method is called to log players off the quota system.
<li><a href="#query_old_data">query_old_data</a>(string)<br/>
This method returns quota values from the time of the previous quota reset
<li><a href="#query_quota">query_quota</a>(string, string)<br/>
This method is used to retrieve quota values for a 
named thief.
<li><a href="#query_quota_data">query_quota_data</a>(string)<br/>
This method returns the raw quota data
<li><a href="#remove_thief">remove_thief</a>(string)<br/>
This method is used to delete all quota data for a player
<li><a href="#reset_fines">reset_fines</a>(string)<br/>
This method is called be creators to remove fines from a thief's quota
<li><a href="#reset_quota">reset_quota</a>(string)<br/>
This method is used by creators to reset a thief's quota
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="adjust_debts">
adjust_debts</a><pre>
int adjust_debts(string thief,
                 int amount)
</pre></br>
This method is used to pay a given amount toward a thief's quota
up to the amount the thief owes.
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<li><b>Returns:</b>
<br/>amount paid

</dl>

<ul><a name="calc_thief_quota">
calc_thief_quota</a><pre>
varargs class thief_quota_data calc_thief_quota(string thief,
                                                int flag)
</pre></br>
This method is used to calculate a thief's quota values.
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<br/>flag - 1: reset quota now, 2: load data without checking reset
<li><b>Returns:</b>
<br/>quota record for named thief

</dl>

<ul><a name="login">
login</a><pre>
void login(string player,
           string type)
</pre></br>
This method is called by the login handler when a player logs on
or by the code for thief leaves of absence.
It is used to start timing their time on the quota system.
<br/><ul>
<li><b>Parameters:</b>
<br/>player - name of player logging in.
<br/>type - may be: LOGIN, LOGOUT, or NETDEATH

</dl>

<ul><a name="pay_thief_fines">
pay_thief_fines</a><pre>
int pay_thief_fines(string thief,
                    int amount)
</pre></br>
This method is used to pay a given amount in fines to the Guild.
It is used by the heavies to force payment of fines.
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<br/>amount - amount paid
<li><b>Returns:</b>
<br/>1 for success 0 for failure

</dl>

<ul><a name="pay_thief_quota">
pay_thief_quota</a><pre>
int pay_thief_quota(string thief,
                    int value)
</pre></br>
This method is used when a thief pays the Guild.  Fines are
paid first followed by theft cut owed to guild.
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<br/>value - amount paid
<li><b>Returns:</b>
<br/>amount left (if any) after payments are made

</dl>

<ul><a name="player_quit">
player_quit</a><pre>
varargs void player_quit(string player)
</pre></br>
This method is called to log players off the quota system.
<br/><ul>
<li><b>Parameters:</b>
<br/>string - player name of player

</dl>

<ul><a name="query_old_data">
query_old_data</a><pre>
mapping query_old_data(string name)
</pre></br>
This method returns quota values from the time of the previous quota reset
<br/><ul>
<li><b>Parameters:</b>
<br/>name - name of thief
<li><b>Returns:</b>
<br/>mapping containing old quota values

</dl>

<ul><a name="query_quota">
query_quota</a><pre>
varargs mixed query_quota(string thief,
                          string type)
</pre></br>
This method is used to retrieve quota values for a 
named thief.  The format of the return value depends 
on the "type" parameter given.
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<br/>type:
 -   "string": formatted string response showing quota data
   "maxquota": return maxquota value
   "minquota": return minquota value
   "total_stolen" : value of items stolen
   "quota_paid": value of money paid toward quota
   "thief_owes": value of money owed to guild
   "fines": value of fines owed to guild
   "last_check": time of last check for quota reset
   "time_on": time in seconds since last reset
   "time_to_reset": time left until quota resets
   default: mapping containing various values
<li><b>Returns:</b>
<br/>-1 for failure or value dependent upon type

</dl>

<ul><a name="query_quota_data">
query_quota_data</a><pre>
class thief_quota_data query_quota_data(string name)
</pre></br>
This method returns the raw quota data
<br/><ul>
<li><b>Parameters:</b>
<br/>name - name of thief
<li><b>Returns:</b>
<br/>quota class containing quota values

</dl>

<ul><a name="remove_thief">
remove_thief</a><pre>
void remove_thief(string thief)
</pre></br>
This method is used to delete all quota data for a player

<ul><a name="reset_fines">
reset_fines</a><pre>
int reset_fines(string thief)
</pre></br>
This method is called be creators to remove fines from a thief's quota
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<li><b>Returns:</b>
<br/>1 for success or 0 for failure

</dl>

<ul><a name="reset_quota">
reset_quota</a><pre>
int reset_quota(string thief)
</pre></br>
This method is used by creators to reset a thief's quota
<br/><ul>
<li><b>Parameters:</b>
<br/>thief - name of thief
<li><b>Returns:</b>
<br/>1 for success or 0 for failure

</dl>


[an error occurred while processing this directive]

