/// <summary> /// Updates the <see cref="ChatItemAsDialogItem"/> property. /// </summary> /// <exception cref="ArgumentException">The <see cref="TreeNode.Tag"/> is not of an expected type.</exception> void UpdateChatItemType() { if (Tag is NPCChatDialogItemBase) { _chatItemType = NPCChatDialogViewNodeItemType.DialogItem; } else if (Tag is NPCChatResponseBase) { _chatItemType = NPCChatDialogViewNodeItemType.Response; } else if (Tag is TreeNode) { _chatItemType = NPCChatDialogViewNodeItemType.Redirect; } else { const string errmsg = "Invalid ChatItem type `{0}` (object: {1})."; throw new ArgumentException(string.Format(errmsg, Tag.GetType(), Tag)); } }
/// <summary> /// Updates the <see cref="ChatItemAsDialogItem"/> property. /// </summary> /// <exception cref="ArgumentException">The <see cref="TreeNode.Tag"/> is not of an expected type.</exception> void UpdateChatItemType() { if (Tag is NPCChatDialogItemBase) _chatItemType = NPCChatDialogViewNodeItemType.DialogItem; else if (Tag is NPCChatResponseBase) _chatItemType = NPCChatDialogViewNodeItemType.Response; else if (Tag is TreeNode) _chatItemType = NPCChatDialogViewNodeItemType.Redirect; else { const string errmsg = "Invalid ChatItem type `{0}` (object: {1})."; throw new ArgumentException(string.Format(errmsg, Tag.GetType(), Tag)); } }