public PapyrusStringTableIndex AsStringTableIndex() { if (internal_stringTableIndex != null) { return(internal_stringTableIndex); } if (Name != null && string.IsNullOrEmpty(Name.Value) && Value != null) { if (Type == PapyrusPrimitiveType.Reference) { return(Name.GetStringTable().Add(Value.ToString())); } } return(Name?.AsTableIndex()); }