public ActionChain GetLogoutChain(bool clientSessionTerminatedAbruptly = false) { ActionChain logoutChain = new ActionChain(this, () => LogoutInternal(clientSessionTerminatedAbruptly)); var motionTable = DatManager.PortalDat.ReadFromDat <MotionTable>((uint)MotionTableId); float logoutAnimationLength = motionTable.GetAnimationLength(MotionCommand.LogOut); logoutChain.AddDelaySeconds(logoutAnimationLength); if (CurrentLandblock != null) { // remove the player from landblock management -- after the animation has run logoutChain.AddChain(CurrentLandblock.GetRemoveWorldObjectChain(Guid, false)); } return(logoutChain); }