protected void bodyLeft ( final int bodyOid ) { log . debug ( "Body left" , "where" , where ( ) , "oid" , bodyOid ) ; // if their occupant info hasn't been removed (which may be the case if they logged off // rather than left via a MoveTo request), we need to get it on out of here Integer key = Integer . valueOf ( bodyOid ) ; if ( _plobj . occupantInfo . containsKey ( key ) ) { _plobj . removeFromOccupantInfo ( key ) ; } // clear out their canonical (local) occupant info record OccupantInfo leaver = _occInfo . remove ( bodyOid ) ; // let our delegates know what's up applyToDelegates ( new DelegateOp ( PlaceManagerDelegate . class ) { @ Override public void apply ( PlaceManagerDelegate delegate ) { delegate . bodyLeft ( bodyOid ) ; } } ) ; // if that leaves us with zero occupants, maybe do something if ( shouldDeclareEmpty ( leaver ) ) { placeBecameEmpty ( ) ; } }
Called when a body object leaves this place .