Sets a default parameter for OnHit. More casting cleanup.
This commit is contained in:
parent
74f498c1c8
commit
d6c0bf2d4c
96 changed files with 350 additions and 579 deletions
|
|
@ -1544,11 +1544,8 @@ namespace Server
|
|||
|
||||
public virtual bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
bool success = false;
|
||||
if ( Parent is Container )
|
||||
success = ((Container)Parent).OnStackAttempt( from, this, dropped );
|
||||
else
|
||||
success = StackWith( from, dropped );
|
||||
bool success = Parent is Container container && container.OnStackAttempt( from, this, dropped ) ||
|
||||
StackWith( from, dropped );
|
||||
|
||||
if ( success && Spawner != null )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue