Sets a default parameter for OnHit. More casting cleanup.

This commit is contained in:
Kamron Batman 2018-09-09 08:54:10 -07:00
parent 74f498c1c8
commit d6c0bf2d4c
96 changed files with 350 additions and 579 deletions

View file

@ -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 )
{