public void contributeToTreeNode(TreeNode node) { TreeNode headerNode = node.Nodes.Add("header = " + Utility.FormatHex(header)); foreach (ATTRIBUTE_CACHE_MASK element in Enum.GetValues(typeof(ATTRIBUTE_CACHE_MASK))) { if ((header & (uint)element) != 0) { headerNode.Nodes.Add(Enum.GetName(typeof(ATTRIBUTE_CACHE_MASK), element)); } } TreeNode strengthNode = node.Nodes.Add("_strength = "); _strength.contributeToTreeNode(strengthNode); TreeNode enduranceNode = node.Nodes.Add("_endurance = "); _endurance.contributeToTreeNode(enduranceNode); TreeNode quicknessNode = node.Nodes.Add("_quickness = "); _quickness.contributeToTreeNode(quicknessNode); TreeNode coordinationNode = node.Nodes.Add("_coordination = "); _coordination.contributeToTreeNode(coordinationNode); TreeNode focusNode = node.Nodes.Add("_focus = "); _focus.contributeToTreeNode(focusNode); TreeNode selfNode = node.Nodes.Add("_self = "); _self.contributeToTreeNode(selfNode); TreeNode healthNode = node.Nodes.Add("_health = "); _health.contributeToTreeNode(healthNode); TreeNode staminaNode = node.Nodes.Add("_stamina = "); _stamina.contributeToTreeNode(staminaNode); TreeNode manaNode = node.Nodes.Add("_mana = "); _mana.contributeToTreeNode(manaNode); }
public void contributeToTreeNode(TreeNode node) { TreeNode headerNode = node.Nodes.Add("header = " + Utility.FormatHex(header)); ContextInfo.AddToList(new ContextInfo { Length = 4 }, updateDataIndex: false); foreach (ATTRIBUTE_CACHE_MASK element in Enum.GetValues(typeof(ATTRIBUTE_CACHE_MASK))) { if ((header & (uint)element) != 0) { headerNode.Nodes.Add(Enum.GetName(typeof(ATTRIBUTE_CACHE_MASK), element)); ContextInfo.AddToList(new ContextInfo { Length = 4 }, updateDataIndex: false); } } // Now skip the header ContextInfo.DataIndex += 4; TreeNode strengthNode = node.Nodes.Add("_strength = "); ContextInfo.AddToList(new ContextInfo { Length = _strength.Length }, updateDataIndex: false); _strength.contributeToTreeNode(strengthNode); TreeNode enduranceNode = node.Nodes.Add("_endurance = "); ContextInfo.AddToList(new ContextInfo { Length = _endurance.Length }, updateDataIndex: false); _endurance.contributeToTreeNode(enduranceNode); TreeNode quicknessNode = node.Nodes.Add("_quickness = "); ContextInfo.AddToList(new ContextInfo { Length = _quickness.Length }, updateDataIndex: false); _quickness.contributeToTreeNode(quicknessNode); TreeNode coordinationNode = node.Nodes.Add("_coordination = "); ContextInfo.AddToList(new ContextInfo { Length = _coordination.Length }, updateDataIndex: false); _coordination.contributeToTreeNode(coordinationNode); TreeNode focusNode = node.Nodes.Add("_focus = "); ContextInfo.AddToList(new ContextInfo { Length = _focus.Length }, updateDataIndex: false); _focus.contributeToTreeNode(focusNode); TreeNode selfNode = node.Nodes.Add("_self = "); ContextInfo.AddToList(new ContextInfo { Length = _self.Length }, updateDataIndex: false); _self.contributeToTreeNode(selfNode); TreeNode healthNode = node.Nodes.Add("_health = "); ContextInfo.AddToList(new ContextInfo { Length = _health.Length }, updateDataIndex: false); _health.contributeToTreeNode(healthNode); TreeNode staminaNode = node.Nodes.Add("_stamina = "); ContextInfo.AddToList(new ContextInfo { Length = _stamina.Length }, updateDataIndex: false); _stamina.contributeToTreeNode(staminaNode); TreeNode manaNode = node.Nodes.Add("_mana = "); ContextInfo.AddToList(new ContextInfo { Length = _mana.Length }, updateDataIndex: false); _mana.contributeToTreeNode(manaNode); }