public int GetCharacterSlotCount(int charID) { PARAM.GroupWrapper group = (PARAM.GroupWrapper)Param.Nodes[0]; for (int i = 0; i < group.Nodes.Count; ++i) { PARAM.ValuesWrapper values = (PARAM.ValuesWrapper)group.Nodes[i]; if ((int)values.Parameters[6].Value == charID) { return((int)((uint)values.Parameters[7].Value)); } } return(-1); }
public void SetCharacterSlotNameIndex(int charID, int slot, int nameIndex) { PARAM.GroupWrapper group = (PARAM.GroupWrapper)Param.Nodes[0]; for (int i = 0; i < group.Nodes.Count; ++i) { PARAM.ValuesWrapper values = (PARAM.ValuesWrapper)group.Nodes[i]; if ((int)values.Parameters[6].Value == charID) { values.Parameters[37 + slot].Value = (byte)nameIndex; return; } } }
public void SetCharacterSlotCount(int charID, int slotCount, bool increaseOnly = true) { PARAM.GroupWrapper group = (PARAM.GroupWrapper)Param.Nodes[0]; for (int i = 0; i < group.Nodes.Count; ++i) { PARAM.ValuesWrapper values = (PARAM.ValuesWrapper)group.Nodes[i]; if ((int)values.Parameters[6].Value == charID) { if (increaseOnly) { if (slotCount > (uint)values.Parameters[7].Value) { values.Parameters[7].Value = (uint)slotCount; } } else { values.Parameters[7].Value = (uint)slotCount; } return; } } }