Skip to content

Commit

Permalink
Update jsdocs.html
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonSlayer62 committed Jan 27, 2025
1 parent a70c51e commit 0548225
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions docs/jsdocs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1692,10 +1692,10 @@ <h4>January 9th, 2022</h4>
</ul>
</div>
<div class="settingsDiv">
<p><span class="hl">Example of usage</span><br>
<pre><code class="language-javascript">
function onDrop( iDropped, pDropper )
{
<p>
<span class="hl">Example of usage</span><br>
<pre><code class="language-javascript">function onDrop( iDropped, pDropper )
{
var pSock = pDropper.socket;

// Client version 6.0.1.7+ has an additional byte before serial of target container
Expand All @@ -1709,30 +1709,27 @@ <h4>January 9th, 2022</h4>

if( targSer1 == 0 ) // Target is a character
{
var targetChar = CalcCharFromSer( targSer1, targSer2, targSer3, targSer4 )
if( ValidateObject( targetChar ))
{
pDropper.TextMessage( "I've dropped this item on a character, deny if not my own character!!" );
if( targetChar.serial != pDropper.serial )
{
pDropper.TextMessage( "DENIED!" );
return false;
}
}
var targetChar = CalcCharFromSer( targSer1, targSer2, targSer3, targSer4 )
if( ValidateObject( targetChar ))
{
pDropper.TextMessage( "I've dropped this item on a character, deny if not my own character!!" );
if( targetChar.serial != pDropper.serial )
{
pDropper.TextMessage( "DENIED!" );
return false;
}
}
}
else if( targSer1 == 0xFF ) // Target is ground or another non-container item
{
pDropper.TextMessage( "I've dropped this item on the ground or on another item, let's approve!" );
}
// Default to allow dropping, let code handle it!
return true;
}
pDropper.TextMessage( "I've dropped this item on the ground or on another item, let's approve!" );
}

// Default to allow dropping, let code handle it!
return true;
}
</code></pre></p>
}
</code></pre>
</p>
</div>
</div>
</div> <!-- cd-faq__content -->
Expand Down

0 comments on commit 0548225

Please sign in to comment.