protected void Setup(OperationCompleteEvent data) { if (data != null && data.Success == false) { Log.Write("Error fetching QuestDefinition for QuestVisibility script for quest on object " + ObjectPrivate.Name); return; } foreach (var agent in ScenePrivate.GetAgents()) { OnAddUser(agent); } ScenePrivate.User.Subscribe(User.AddUser, OnAddUser); ScenePrivate.User.Subscribe(User.RemoveUser, (userData) => VisibleToSessions.Remove(userData.User)); }
void OnRemoveUser(UserData data) { VisibleToSessions.Remove(data.User); OnRemoveUser(ScenePrivate.FindAgent(data.User)); }