123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <title>UAS2: cNPC Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <!-- Generated by Doxygen 1.6.2 -->
- <div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li><a href="main.html"><span>Main Page</span></a></li>
- <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- </ul>
- </div>
- <div class="tabs">
- <ul>
- <li><a href="annotated.html"><span>Class List</span></a></li>
- <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
- <li><a href="functions.html"><span>Class Members</span></a></li>
- </ul>
- </div>
- </div>
- <div class="contents">
- <h1>cNPC Class Reference</h1><!-- doxytag: class="cNPC" --><!-- doxytag: inherits="cObject" --><div class="dynheader">
- Inheritance diagram for cNPC:</div>
- <div class="dynsection">
- <div class="center">
- <img src="classc_n_p_c.png" usemap="#cNPC_map" alt=""/>
- <map id="cNPC_map" name="cNPC_map">
- <area href="classc_object.html" alt="cObject" shape="rect" coords="0,0,56,24"/>
- </map>
- </div>
- </div>
- <p><a href="classc_n_p_c-members.html">List of all members.</a></p>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#a25b8117ffcdf54e743e3a1b4d330d792">cNPC</a> (DWORD dwGUID, DWORD dwNPCModelID, char *szName, WORD wGender, <a class="el" href="structc_location.html">cLocation</a> *pcLoc=NULL, DWORD dwSellCategories=0x00000000)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#aff84ba84869ebc47b6d727d0b15f4852">Assess</a> (<a class="el" href="classc_client.html">cClient</a> *pcAssesser)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classc_message.html">cMessage</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#a67987a957464ec75a37695730392ba9a">CreatePacket</a> ()</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#aa7d2b201f5748dde41e4efa34a50bd80">Action</a> (<a class="el" href="classc_client.html">cClient</a> *who)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#a4bdcca339e30885b30ed03831045e6df">GiveItem</a> (<a class="el" href="classc_client.html">cClient</a> *who, DWORD itemid, DWORD npcid)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#ac00059ece799718927f3554821bd490e">BuyItem</a> (<a class="el" href="classc_client.html">cClient</a> *who, DWORD VendorID, DWORD ItemID)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#afc4acca273355983b86d63a38aa70cda">ApproachVendor</a> (<a class="el" href="classc_client.html">cClient</a> *who)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a552b2aa3ff2a63d95dea95c0f2ce76d4"></a><!-- doxytag: member="cNPC::SetMode" ref="a552b2aa3ff2a63d95dea95c0f2ce76d4" args="(DWORD mode)" -->
- void </td><td class="memItemRight" valign="bottom"><b>SetMode</b> (DWORD mode)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9fab84d4e06592856e2884e1b9d6b2e8"></a><!-- doxytag: member="cNPC::SetModel" ref="a9fab84d4e06592856e2884e1b9d6b2e8" args="(WORD wNPCModel)" -->
- void </td><td class="memItemRight" valign="bottom"><b>SetModel</b> (WORD wNPCModel)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f1a3c0f1415c37920c541adb211b4a0"></a><!-- doxytag: member="cNPC::SetNumMessages" ref="a4f1a3c0f1415c37920c541adb211b4a0" args="(int num)" -->
- void </td><td class="memItemRight" valign="bottom"><b>SetNumMessages</b> (int num)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd50f1fb5f2b9eb200a193ce08edb193"></a><!-- doxytag: member="cNPC::GetNumMessages" ref="afd50f1fb5f2b9eb200a193ce08edb193" args="()" -->
- int </td><td class="memItemRight" valign="bottom"><b>GetNumMessages</b> ()</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a370be43127810a7523b6fb90fecb7c8e"></a><!-- doxytag: member="cNPC::GetMode" ref="a370be43127810a7523b6fb90fecb7c8e" args="()" -->
- DWORD </td><td class="memItemRight" valign="bottom"><b>GetMode</b> ()</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3c9ad2f42f37fea9eeaa6824f929bfc"></a><!-- doxytag: member="cNPC::SetIsVendor" ref="ab3c9ad2f42f37fea9eeaa6824f929bfc" args="(int vend)" -->
- void </td><td class="memItemRight" valign="bottom"><b>SetIsVendor</b> (int vend)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac07c1360e2d26a0d5814cbfeac1fbfbe"></a><!-- doxytag: member="cNPC::GetIsVendor" ref="ac07c1360e2d26a0d5814cbfeac1fbfbe" args="()" -->
- int </td><td class="memItemRight" valign="bottom"><b>GetIsVendor</b> ()</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ad7b0dd49d7804c8d267c32a1541225"></a><!-- doxytag: member="cNPC::Set_npc_id" ref="a5ad7b0dd49d7804c8d267c32a1541225" args="(int npcid)" -->
- void </td><td class="memItemRight" valign="bottom"><b>Set_npc_id</b> (int npcid)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6abe73ce84d63703f89e560ada1bb27"></a><!-- doxytag: member="cNPC::Get_npc_id" ref="aa6abe73ce84d63703f89e560ada1bb27" args="()" -->
- int </td><td class="memItemRight" valign="bottom"><b>Get_npc_id</b> ()</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6af06bbeb361d26cb0f8a633349c2404"></a><!-- doxytag: member="cNPC::SetString" ref="a6af06bbeb361d26cb0f8a633349c2404" args="(std::string str, int index)" -->
- void </td><td class="memItemRight" valign="bottom"><b>SetString</b> (std::string str, int index)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90393fa36eaa161ed9213b63d77ea318"></a><!-- doxytag: member="cNPC::AddInventory" ref="a90393fa36eaa161ed9213b63d77ea318" args="(cObject *pcObject)" -->
- void </td><td class="memItemRight" valign="bottom"><b>AddInventory</b> (<a class="el" href="classc_object.html">cObject</a> *pcObject)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0cd6ef99d1849596cf72a575880a6ab7"></a><!-- doxytag: member="cNPC::RemoveInventory" ref="a0cd6ef99d1849596cf72a575880a6ab7" args="(cObject *pcObject)" -->
- void </td><td class="memItemRight" valign="bottom"><b>RemoveInventory</b> (<a class="el" href="classc_object.html">cObject</a> *pcObject)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a967dcb976bed86a96ae6bba68008fd11"></a><!-- doxytag: member="cNPC::FindInventory" ref="a967dcb976bed86a96ae6bba68008fd11" args="(DWORD dwGUID)" -->
- <a class="el" href="classc_object.html">cObject</a> * </td><td class="memItemRight" valign="bottom"><b>FindInventory</b> (DWORD dwGUID)</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ff172ee52ab9c0a45f48122433c58a4"></a><!-- doxytag: member="cNPC::DeleteFromInventory" ref="a6ff172ee52ab9c0a45f48122433c58a4" args="(cObject *pcObject)" -->
- void </td><td class="memItemRight" valign="bottom"><b>DeleteFromInventory</b> (<a class="el" href="classc_object.html">cObject</a> *pcObject)</td></tr>
- <tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84102fdcbe5c8b78623a7bb802f4d94d"></a><!-- doxytag: member="cNPC::m_dwNPCModelID" ref="a84102fdcbe5c8b78623a7bb802f4d94d" args="" -->
- DWORD </td><td class="memItemRight" valign="bottom"><b>m_dwNPCModelID</b></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6188c8a6ae417c3cc2bd224b1d32a69"></a><!-- doxytag: member="cNPC::m_NPCStats" ref="ae6188c8a6ae417c3cc2bd224b1d32a69" args="" -->
- <a class="el" href="structc_obj_stats.html">cObjStats</a> </td><td class="memItemRight" valign="bottom"><b>m_NPCStats</b></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95ae1aa9e63b7fa742255fdbc4c35262"></a><!-- doxytag: member="cNPC::m_qitem_id1" ref="a95ae1aa9e63b7fa742255fdbc4c35262" args="" -->
- DWORD </td><td class="memItemRight" valign="bottom"><b>m_qitem_id1</b></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd8ee5213701793bdfacf8bb02075caf"></a><!-- doxytag: member="cNPC::m_npc_target_id" ref="abd8ee5213701793bdfacf8bb02075caf" args="" -->
- DWORD </td><td class="memItemRight" valign="bottom"><b>m_npc_target_id</b></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab940e201566b981e3b3661966baa84e1"></a><!-- doxytag: member="cNPC::v_guids" ref="ab940e201566b981e3b3661966baa84e1" args="[255]" -->
- DWORD </td><td class="memItemRight" valign="bottom"><b>v_guids</b> [255]</td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a529657e8509a56cf7a40ef2d704de87e"></a><!-- doxytag: member="cNPC::npc_ids" ref="a529657e8509a56cf7a40ef2d704de87e" args="" -->
- std::list< <a class="el" href="classc_n_p_c.html">cNPC</a> * > </td><td class="memItemRight" valign="bottom"><b>npc_ids</b></td></tr>
- <tr><td colspan="2"><h2>Friends</h2></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78e9d7036b7c968e4844315ec857b73d"></a><!-- doxytag: member="cNPC::cClient" ref="a78e9d7036b7c968e4844315ec857b73d" args="" -->
- class </td><td class="memItemRight" valign="bottom"><a class="el" href="classc_n_p_c.html#a78e9d7036b7c968e4844315ec857b73d">cClient</a></td></tr>
- </table>
- <hr/><h2>Constructor & Destructor Documentation</h2>
- <a class="anchor" id="a25b8117ffcdf54e743e3a1b4d330d792"></a><!-- doxytag: member="cNPC::cNPC" ref="a25b8117ffcdf54e743e3a1b4d330d792" args="(DWORD dwGUID, DWORD dwNPCModelID, char *szName, WORD wGender, cLocation *pcLoc=NULL, DWORD dwSellCategories=0x00000000)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">cNPC::cNPC </td>
- <td>(</td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>dwGUID</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>dwNPCModelID</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char * </td>
- <td class="paramname"> <em>szName</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">WORD </td>
- <td class="paramname"> <em>wGender</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structc_location.html">cLocation</a> * </td>
- <td class="paramname"> <em>pcLoc</em> = <code>NULL</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>dwSellCategories</em> = <code>0x00000000</code></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>A constructor.</p>
- <p>Called whenever an NPC object is initialized.</p>
- <p>Handles the creation of NPCs.</p>
- <p>Called whenever an NPC object should be initialized. </p>
- </div>
- </div>
- <hr/><h2>Member Function Documentation</h2>
- <a class="anchor" id="aa7d2b201f5748dde41e4efa34a50bd80"></a><!-- doxytag: member="cNPC::Action" ref="aa7d2b201f5748dde41e4efa34a50bd80" args="(cClient *who)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void cNPC::Action </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classc_client.html">cClient</a> * </td>
- <td class="paramname"> <em>who</em></td>
- <td> ) </td>
- <td><code> [virtual]</code></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles the actions of NPC objects.</p>
- <p>This function is called whenever an NPC is used or should perform an general action.</p>
- <p>Author: Cubem0j0 </p>
- <p>Implements <a class="el" href="classc_object.html">cObject</a>.</p>
- </div>
- </div>
- <a class="anchor" id="afc4acca273355983b86d63a38aa70cda"></a><!-- doxytag: member="cNPC::ApproachVendor" ref="afc4acca273355983b86d63a38aa70cda" args="(cClient *who)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void cNPC::ApproachVendor </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classc_client.html">cClient</a> * </td>
- <td class="paramname"> <em>who</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles trade interaction with vendor NPCs.</p>
- <p>This function is called whenever a player approaches a vendor.</p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>*who</em> </td><td>- A pointer to the client whose avatar approaching the vendor. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="aff84ba84869ebc47b6d727d0b15f4852"></a><!-- doxytag: member="cNPC::Assess" ref="aff84ba84869ebc47b6d727d0b15f4852" args="(cClient *pcAssesser)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void cNPC::Assess </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classc_client.html">cClient</a> * </td>
- <td class="paramname"> <em>pcAssesser</em></td>
- <td> ) </td>
- <td><code> [virtual]</code></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles the assessment of NPC objects.</p>
- <p>This function is called whenever an NPC is assessed by a client. Returns a Game Event (0x0000F7B0) server message of type Identify Object (0x000000C9). </p>
- <p>Reimplemented from <a class="el" href="classc_object.html">cObject</a>.</p>
- </div>
- </div>
- <a class="anchor" id="ac00059ece799718927f3554821bd490e"></a><!-- doxytag: member="cNPC::BuyItem" ref="ac00059ece799718927f3554821bd490e" args="(cClient *who, DWORD VendorID, DWORD ItemID)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void cNPC::BuyItem </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classc_client.html">cClient</a> * </td>
- <td class="paramname"> <em>pcClient</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>VendorID</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>ItemID</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles the purchasing of items from NPC objects.</p>
- <p>This function is called whenever a player buys an item from an NPC.</p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>*pcClient</em> </td><td>- A pointer to the client whose avatar is purchasing the item. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>VenderID</em> </td><td>- A the GUID of the vendor. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>ItemID</em> </td><td>- The GUID of the object to buy. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="a67987a957464ec75a37695730392ba9a"></a><!-- doxytag: member="cNPC::CreatePacket" ref="a67987a957464ec75a37695730392ba9a" args="()" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classc_message.html">cMessage</a> cNPC::CreatePacket </td>
- <td>(</td>
- <td class="paramname"></td>
- <td> ) </td>
- <td><code> [virtual]</code></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles the message sent for the creation of NPCs.</p>
- <p>This function is called whenever an NPC should be created for a client. </p>
- <dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classc_message.html">cMessage</a> - Returns a Create Object (0x0000F745) server message. </dd></dl>
- <p>Implements <a class="el" href="classc_object.html">cObject</a>.</p>
- </div>
- </div>
- <a class="anchor" id="a4bdcca339e30885b30ed03831045e6df"></a><!-- doxytag: member="cNPC::GiveItem" ref="a4bdcca339e30885b30ed03831045e6df" args="(cClient *who, DWORD itemid, DWORD npcid)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void cNPC::GiveItem </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classc_client.html">cClient</a> * </td>
- <td class="paramname"> <em>who</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>npcid</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">DWORD </td>
- <td class="paramname"> <em>itemid</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Handles the giving of items to NPCs.</p>
- <p>This function is called whenever a player gives an NPC an item. If the NPC is a Town Crier, the NPC should access the item. Other NPCs should only accept particular items or types of items.</p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>*who</em> </td><td>- A pointer to the client whose avatar is giving the item. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>itemid</em> </td><td>- The GUID of the item being given. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>E:/uas2/Server/<a class="el" href="_object_8h_source.html">Object.h</a></li>
- <li>E:/uas2/Server/<a class="el" href="c_n_p_c_8cpp.html">cNPC.cpp</a></li>
- </ul>
- </div>
- <hr size="1"/><address style="text-align: right;"><small>Generated by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
- </body>
- </html>
|