/// <summary> /// Loads a specific player's cached dialog information. /// </summary> /// <param name="playerId">The player's unique Id</param> /// <returns>The cached player dialog object.</returns> public static PlayerDialog LoadPlayerDialog(string playerId) { if (!PlayerDialogs.ContainsKey(playerId)) { throw new Exception(nameof(playerId) + " '" + playerId + "' could not be found. Be sure to call " + nameof(LoadConversation) + " first."); } return(PlayerDialogs[playerId]); }
/// <summary> /// Checks whether a player has an active dialog in cache. /// </summary> /// <param name="playerId">The player's unique Id.</param> /// <returns>true if the player has the dialog, false otherwise</returns> public static bool HasPlayerDialog(string playerId) { return(PlayerDialogs.ContainsKey(playerId)); }